Commit Graph

1156 Commits

Author SHA1 Message Date
Martin Kiewitz
5594feff2a SCI: Phantasmagoria actually outputs 630x450 now
clipping of video output was required
2014-11-09 17:33:17 +01:00
Martin Kiewitz
72e6a9eeab SCI: some more work on 480x300 mac support 2014-11-09 12:54:41 +01:00
Martin Kiewitz
0fd16ef39f SCI: hopefully Japanese text wrapping is fine now
also removed duplicate entries in punctuation table
thanks to wjp
2014-11-06 20:45:24 +01:00
Martin Kiewitz
eff78c4424 SCI: fix Japanese Space Quest 4 (intro + buttons)
At least SQ4 uses #j text prefix as signal for the
interpreter to not use the PC9801 hires font, but
to use the internal low res font instead
2014-11-04 22:01:21 +01:00
Martin Kiewitz
fa7a6d473e SCI: GetClosest() bugfix the bugfix thx wjp 2014-11-02 19:37:23 +01:00
Martin Kiewitz
11ba447483 SCI: bugfix in GetLongest() for Japanese SQ4 2014-11-02 19:31:37 +01:00
Martin Kiewitz
5aae18feb8 SCI: text16 Shift-JIS font switch fixed
fixes Police Quest 2 Japanese intro and others,
where the internal SCI font was used and not
the Shift-JIS hires font
2014-11-02 13:08:33 +01:00
Martin Kiewitz
9d693b9a79 SCI: fix another bug in text16 / GetLongest() 2014-11-02 02:31:32 +01:00
Martin Kiewitz
c4ca0a7de2 SCI: fix bug in text16 / GetLongest() 2014-11-02 02:16:00 +01:00
Martin Kiewitz
c9e74d6d54 SCI: text16 GetLongest() changes fixes bug #5334
also fixes bug #5159
also fixes Japanese line wrapping (hopefully)
2014-11-01 23:36:29 +01:00
Martin Kiewitz
9561d5f6f8 SCI: revert r55034, fixes bug #6539
original bug wasn't solved properly
will reopen the original bug #5334
and figure out that one instead
2014-11-01 00:57:26 +01:00
Martin Kiewitz
5c91173337 SCI: color matching bug fix 2014-10-29 00:12:12 +01:00
Martin Kiewitz
bb29cdc899 SCI: color matching - remove debug code 2014-10-28 22:41:14 +01:00
Martin Kiewitz
28967b617f SCI: properly reversed color matching thanks wjp 2014-10-28 22:37:57 +01:00
Filippos Karapetis
9783f0bbd9 SCI: Remove trailing whitespace 2014-10-28 16:17:06 +02:00
Martin Kiewitz
f317e8c877 SCI: implement 8-bit color matching SCI1.1 bug
effectively fixes bug #6455
thanks to wjp and [md5]
2014-10-28 01:40:40 +01:00
Willem Jan Palenstijn
da9ffe9dbc SCI: Add note on SSCI 11 FindColor bug 2014-10-27 23:04:25 +01:00
Filippos Karapetis
22aaf995ed SCI: Hopefully fix bug #6718 in LSL6 Polish
View flags are mainly used by LB2. The flag in the LSL6 view seems to
be garbage, so we ignore it
2014-10-18 16:03:50 +03:00
Filippos Karapetis
bf7eef466d SCI: Wording 2014-10-13 12:26:21 +03:00
Filippos Karapetis
ade33c4c0b SCI: Set the NS rect for all cases in GK1 (bug #6729) 2014-10-13 12:21:40 +03:00
Filippos Karapetis
e7f023883e SCI: Extend hack to fix regression in GK1 2014-08-08 02:11:49 +03:00
Martin Kiewitz
924f1f1fee SCI: fix coordination translation for 480x300 mac 2014-06-08 23:10:17 +02:00
Martin Kiewitz
cebb3e340a SCI32: fix crash during gabriel knight intro 2014-06-03 22:42:56 +02:00
Martin Kiewitz
c1e895d799 SCI: fix regression introduced by 480x300 commit
fix EGA graphic corruption
2014-06-02 01:37:08 +02:00
Martin Kiewitz
94160a28e3 SCI: work on SCI0/01 Mac 480x300 scaling 2014-06-01 13:41:14 +02:00
Johannes Schickel
daa8d57a86 ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. 2014-05-27 02:04:07 +02:00
Matthew Hoops
740b6e8fbd IMAGE: Move all ImageDecoders to image/ 2014-02-28 00:27:28 -05:00
Johannes Schickel
8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis
ed400d57fc SCI: Fix NS rect calculation in GK1 (and SCI32 in general)
This fixes the regressions caused by refactoring in SCI32. Thanks to
Timo Korvola for tracking down the issue and providing an initial
patch in bug #6452
2014-02-17 12:00:17 +02: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
Martin Kiewitz
488375effa SCI: fix sci1early+ ega picture issues
also remove hacks for kq5ega + sq4ega
2013-12-26 16:44:51 +01:00
Martin Kiewitz
f369170043 SCI: floodfill reverted, was sci1early difference
fixes sq4 floppy properly
2013-12-26 11:39:01 +01:00
Martin Kiewitz
fd80030f76 SCI: portraits cleanup + show base picture at end 2013-12-24 23:59:22 +01:00
Martin Kiewitz
a4bde6dade SCI: injecting "dual" view into King's Quest 6 CD
for dual mode (text+speech at the same time)
2013-12-24 23:31:17 +01:00
Martin Kiewitz
a72d7d3932 SCI: injecting "dual" view into Laura Bow 2 CD
for dual mode (text+speech at the same time)
2013-12-24 22:24:42 +01:00
Martin Kiewitz
8b3efba40f SCI: change floodfill fix for sq4
behaviour wasn't changed in SCI1, instead it seems that SSCI draws overlays to separate memory and then copies them over. Previous commit caused regression in qfg1vga (funny room)
2013-12-24 10:39:42 +01:00
Martin Kiewitz
c2a2a760e9 SCI: change floodfill to fix sq4 ship taking off
fixes bug #6446
2013-12-23 23:41:35 +01:00
Martin Kiewitz
60de25fb69 SCI: debug code to print out kq6 raw lipsync data 2013-12-18 20:51:50 +01:00
Martin Kiewitz
693d5e6625 SCI: rave support (KQ6 hires portrait lip sync)
Thanks to wjp and [md5] for helping
2013-12-11 08:25:23 +01:00
Filippos Karapetis
fa2ea4fc61 SCI: Add handling for the RAVE resource type, found in KQ6CD
This contains the sync data in the Windows version of KQ6CD.
Note that currently the sync36 resource is 2 bytes bigger
(it contains 2 bytes from the RAVE resource). Some test code
has also been added to dump the RAVE sync resources
2013-12-10 01:41:15 +02:00
Filippos Karapetis
59e6341e35 SCI: Make a note about pic 390 in the blacklisted SQ4CD NRS patch 1.2 2013-10-02 12:25:10 +03:00
m-kiewitz
fa41ee132b SCI: fix for heap corruption during lsl3 ending 2013-09-21 22:35:53 +02:00
Filippos Karapetis
0885a003c5 SCI: Fix bug #3614914 - "SCI: Castle of Dr Brain Spanish crashes after Computer Room"
Ignore the unused x/y displacement fields of cels embedded in pics.
Dr. Brain Spanish, pic 261 contains garbage in these fields (probably
left overs)
2013-08-19 06:30:50 +03:00
Johannes Schickel
dbda889e63 SCI: Take advantage of Surface::getPixels. 2013-08-03 04:02:52 +02:00
Johannes Schickel
dd67e9f099 SCI: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:33 +02:00
Filippos Karapetis
2088a77388 SCI: Add a hack to fix the inventory in GK1
For some reason, the top left nsRect coordinates get swapped in the GK1
inventory screen, investigate why
2013-07-30 04:21:51 +03:00
Sven Hesse
989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Filippos Karapetis
d530985a6b SCI: Avoid using g_sci for usesOldGfxFunctions() in the GfxPorts class 2013-06-21 13:19:37 +03:00
Filippos Karapetis
5b25c40c40 SCI: Fix a non-initialized variable in GfxScreen - CID 1003105 2013-05-01 01:51:12 +03:00
Filippos Karapetis
012a5ef040 SCI: Fix a non-initialized variable in GfxCursor - CID 1003112 2013-05-01 01:51:12 +03:00
Filippos Karapetis
3012aaa14f SCI: Fix a non-initialized variable in GfxControls16 - CID 1003114 2013-05-01 01:51:11 +03:00
Filippos Karapetis
2d90cc4ac3 SCI: Fix a non-initialized variable in GfxMenu - CID 1003110 2013-05-01 01:51:11 +03:00
Filippos Karapetis
619baf67ae SCI: Initialize some members of GfxPaint16 - CID 1010057 2013-05-01 01:51:10 +03:00
Filippos Karapetis
d840aa4dec SCI: Change wording for the cursor position workarounds 2013-04-28 23:31:10 +03:00
Filippos Karapetis
46ebf37ec9 SCI: Change wording for bug/further info references 2013-04-27 14:04:27 +03:00
Filippos Karapetis
41e02baff1 SCI: Fix scaling in the back room of the bookstore in GK1 2013-04-25 02:36:03 +03:00
Max Horn
51bde6ced5 SCI: Remove a bunch of unused private member variables
All instances uncovered by clang warnings.
2013-04-18 23:50:20 +02:00
Matthew Hoops
8a50d87445 SCI: Fix potential memory leak with Mac cursor's hotspot 2013-04-16 11:14:04 -04:00
Matthew Hoops
6c1b019056 SCI: Fix mac cursor memory leak 2013-04-16 11:09:30 -04:00
Willem Jan Palenstijn
0250fd8ee1 SCI: Fix hunk entry leak 2013-04-15 21:46:09 +02:00
Filippos Karapetis
51b1ec3139 SCI: Fix drawing in SCI21 hires games without breaking lowres SCI2/SCI21 games 2013-03-28 20:28:51 +02:00
Willem Jan Palenstijn
2d1fd3b554 ALL: Fix typo (existant->existent) 2013-02-23 22:07:32 +01:00
Filippos Karapetis
31aec8c581 SCI: Some more work on scaling in SCI32 2013-01-13 17:28:09 +02:00
Filippos Karapetis
41725ab743 SCI: Fix the night time palette in QFG4 2013-01-11 02:24:18 +02:00
Filippos Karapetis
81d614e63a SCI: More proper handling of scaling and global scaling in SCI32
This fixes several scaling related problems in QFG4 and SQ6
2013-01-11 02:24:18 +02:00
Filippos Karapetis
cf3890b79a SCI: Remove obsolete comment and code 2013-01-11 02:24:18 +02:00
Filippos Karapetis
13ec242a2c SCI: Disable modification of object NS rects in SCI32
This fixes the sliders in QFG4 without introducing any regressions,
as the objects are still drawn on screen using the per-frame adjusted
coordinates
2013-01-11 02:24:17 +02:00
D G Turner
77a9f01454 SCI: Amended fix for palette related compiler warnings. 2012-11-26 21:08:39 +00:00
Filippos Karapetis
9c510c1b52 SCI: Fix warnings 2012-11-26 11:27:02 +02:00
Filippos Karapetis
fb0788d12f SCI: Properly reset the palVary signal when loading (bug #3575569) 2012-11-15 14:57:55 +02:00
Filippos Karapetis
3b5e92d4f3 SCI: Fix bug #3575569 - "SCI: QFG1VGA: Palette/hue bug after loading"
We make sure that any leftover palVary timers are removed when
loading. This is an edge case, but it won't hurt to remove these
timers just in case
2012-11-07 18:11: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
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Matthew Hoops
857b92f8ff Merge pull request #268 from clone2727/video-rewrite
VideoDecoder upgrade & partial rewrite
2012-08-26 15:41:56 -04:00
Filippos Karapetis
a391599403 SCI: Update a comment 2012-08-21 11:55:21 +03:00
Filippos Karapetis
7d436622a8 SCI: More work on kRemapColors
This implements some more color remap-based palette effects, found in QFG4
2012-08-21 03:32:23 +03:00
Matthew Hoops
fb35c7f46f VIDEO: Remove setSystemPalette() 2012-08-16 13:30:32 -04:00
Filippos Karapetis
c0beaf2337 SCI: Differentiate between screen width and pitch
This properly addresses the odd screen width (630) in Phantasmagoria 1
2012-07-26 11:06:51 +03:00
Johannes Schickel
dc8d9f4c9f SCI: Fix delete[] formatting. 2012-07-25 21:11:45 +02:00
Filippos Karapetis
797dbfe506 SCI: Set the RemapByPercent palette initially
This needs to be performed because the screen palette might not change
after the call. Fixes the display of the bat in the character selection
screen in the full version of QFG4
2012-07-25 01:16:13 +03:00
Filippos Karapetis
537b1969bf SCI: Rewrite the color remapping code to support simultaneous effects
Fixes the torch in the full version of QFG4
2012-07-25 00:58:16 +03:00
Filippos Karapetis
37b209dac1 SCI: Refresh remapping by percent whenever the screen palette changes 2012-07-24 22:55:34 +03:00
Filippos Karapetis
fe3fb1873c SCI: Cleanup of the palette remapping code 2012-07-24 22:54:37 +03:00
Filippos Karapetis
6f35130204 SCI: More work on color remapping
More transparency/color mapping effects are now working (e.g. the
flashlight at the Gedde tomb in GK1, the rays of light at Schloss Ritter
in GK1, the torch in the QFG4 demo and the shadows in QFG4, PQ4 and KQ7)
2012-07-24 22:34:46 +03:00
Filippos Karapetis
3d395545cb SCI: Remove unused variables 2012-07-24 04:07:08 +03:00
Filippos Karapetis
bd281928cb SCI: Initial implementation of kRemapColors(kRemapByPercent)
Fixes some graphics glitches in the QFG4 demo and the menus of QFG4, by
implementing one of the transparency effects used mainly in SCI32.
Many thanks to fuzzie for her debugging info on QFG4 demo and to wjp for
his great help on the dissassembly
2012-07-24 03:53:44 +03:00
Filippos Karapetis
1a90ca5ecd SCI: Handle all negative priority values. Fixes graphics in the SQ6 demo 2012-07-16 11:49:50 +03:00
Filippos Karapetis
10b3fdf247 SCI: Show information for correct file naming in the QFG4 import room
This information is shown in previous QFG versions, but it had to be
placed in a SCI32 graphics function in order to be shown in QFG4 too
2012-07-08 16:15:47 +03:00
Filippos Karapetis
e4378d5bac SCI: Better handling for Phantasmagoria's odd screen size
Still not right, as the width isn't set
2012-07-06 13:17:04 +03:00
Filippos Karapetis
7513786296 SCI: Add a hack to handle the internal script resolution in Phantasmagoria 2012-07-06 12:11:50 +03:00
Filippos Karapetis
112f03390d SCI: Fix typo 2012-07-05 14:05:26 +03:00
Filippos Karapetis
fb215929ef SCI: Some updates to SCI32 kernel graphics functions
- Added a stub for kSetScroll, which sets the target picture immediately
for now
- Added an initial stub of kPalCycle (doesn't work correctly yet)
- Adjusted the signatures of kUpdateLine and kDeleteLine for LSL6
- Unmapped kSetHotRectangles again, with updated information on how it
is used in Phantasmagoria
2012-07-05 13:58:41 +03:00
Filippos Karapetis
243ea1fa29 SCI: Add a check for invalid clip rectangles
Happens in QFG4, when starting a battle
2012-07-04 02:21:13 +03:00
Filippos Karapetis
5d3e22ae4f SCI: Some cleanup of the warnings in the SCI32 plane manipulation code 2012-07-04 02:21:11 +03:00
Filippos Karapetis
d757b5b94a SCI: Update some version checks in kernelFrameout() to work with SCI3 too 2012-07-04 01:02:21 +03:00
Filippos Karapetis
547fdfe12a SCI: Further cleanup of the frame drawing code 2012-06-22 09:43:44 +03:00
Filippos Karapetis
0812439603 SCI: Simplify the SCI32 coordinate adjustment code 2012-06-22 09:31:51 +03:00
Johannes Schickel
4fb9bceabc Merge pull request #246 from lordhoto/osystem-void-buffers
OSYSTEM: Use void buffers for screen/overlay/mouse buffers and proper pitch values for overlay code
2012-06-20 08:02:26 -07:00
Filippos Karapetis
ea42605297 SCI: Remove multibyte character processing code from SCI32
There are no Japanese/PC-98 SCI32 games, so this code is not needed
2012-06-20 10:55:24 +03:00
Filippos Karapetis
221ee34926 SCI: Don't attempt to draw line feed characters in SCI32
Fixes junk in the about dialogs in PQ4
2012-06-20 04:28:59 +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
Johannes Schickel
7b646e5c62 SCI: Get rid of casts on CursorManager::replaceCursor calls. 2012-06-16 03:28:43 +02:00
Johannes Schickel
084c1259fc SCI: Get rid of casts on OSystem::copyRectToScreen calls. 2012-06-16 02:39:00 +02:00
Filippos Karapetis
425926ed7e SCI: Limit floodfill hack to GK1
Fixes the intro of LSL7 and the inventory screen in PQ4
2012-06-15 12:24:12 +03:00
Filippos Karapetis
dc11d223cd SCI: Initial implementation of AddLine, UpdateLine, DeleteLine 2012-06-09 15:36:36 +03:00
Filippos Karapetis
66af2cf1d7 SCI: Handle translucent text planes
Fixes the incorrect flood fill in the Rada Drums screen in GK1
2012-06-09 12:13:48 +03:00
Filippos Karapetis
a643981a38 SCI: Handle resource ID -1 when setting the palVary resource
Fixes several wrong colors in SQ6
2012-06-08 11:57:43 +03:00
Filippos Karapetis
de3f6a19ed SCI: Initial implementation of kScrollWindow, used in some SCI21 games
This is used in LSL6 hires and SQ6. This initial implementation is hackish
and only works in SQ6 (nothing is shown in LSL6)
2012-06-07 11:27:59 +03:00
Filippos Karapetis
6cda15ba8e SCI: Added two new debug commands, plane_list and plane_items
These can be used to debug drawn items in SCI32
2012-05-21 01:30:10 +03:00
Filippos Karapetis
6b38731d39 SCI: Implement savegame deletion functionality in SCI32
This is based on two kernel functions, kMakeSaveCatName and
kMakeSaveFileName
2012-05-14 11:04:58 +03:00
Filippos Karapetis
398d0ffcef SCI: Check for object visibility, if an object defines it
Fixes the inventory in GK1
2012-05-14 02:30:15 +03:00
Filippos Karapetis
c424c22f19 SCI: Fix bug #3040625 - "SCI: ECOQUEST French/German: Speech balloon graphic glitch"
This bug is caused by the fact that the sprites in that scene and the
speech bubble share the same priority, so we compensate for that with a
workaround
2012-05-11 12:54:06 +03:00
Filippos Karapetis
24e57808aa SCI: Add a hack to fix the cursor colors in Longbow (bug #3489101) 2012-04-29 20:45:14 +03:00
Filippos Karapetis
d801186185 SCI: Fix cursor coordinates for SCI01. Fixes a crash in KQ1 (bug #3503932) 2012-03-25 19:22:31 +03:00
Matthew Hoops
4516b5ea24 GRAPHICS: Convert PictDecoder to the ImageDecoder API 2012-03-20 01:06:48 +01:00
Christoph Mallon
75efdd2d84 JANITORIAL: Replace (x ? false : true) by !(x). 2012-03-13 15:43:36 +01:00
Matthew Hoops
b71dffafbe SCI: Fix GK1 Mac text positioning
A regression from the text bitmap code addition
2012-03-08 10:07:58 -05:00
Filippos Karapetis
7e4c5dce4a SCI: Add a new configuration option for SQ4 CD, "silver_cursors"
This allows the user to choose the alternate set of silver mouse cursors
that is available in the game resources of the game, instead of the
original golden ones
2012-03-07 23:20:50 +02:00
Willem Jan Palenstijn
9ffe3e11d9 Merge pull request #182 from fingolfin/forbid-ctype
ALL: Avoid using is* macros from ctype.h
2012-02-21 11:33:32 -08:00
Max Horn
4f8665fc83 COMMON: Move isFoo functions to namespace Common, add doxygen comments 2012-02-20 16:18:27 +01:00
Filippos Karapetis
c87657f066 SCI: Added some sanity checks by digitall
- Limit the LB1 cursor workaround to LB1 only (so that fanmade games
aren't affected)
- Error our when bad cursor hotspots are found
2012-02-17 21:54:50 +02:00
Filippos Karapetis
b21f956790 SCI: Fix and cleanup the monochrome cursor code
This makes the code like FreeSCI again, which is the correct way to fix
bug #3487088.
2012-02-17 21:09:59 +02:00
Filippos Karapetis
c48ad37244 SCI: Fix bug #3487088 - "SCI: LB1: Missing Wait cursor" 2012-02-17 10:53:42 +02:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Max Horn
658080deed ALL: Avoid using is* macros from ctype.h
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
2012-02-15 16:51:37 +01:00
Filippos Karapetis
7da29858e7 SCI: Fix the order of diagonal roll transitions in the old lookup table
This fixes several inverted transitions (like in SQ3, ICEMAN, Hoyle 1 etc) - bug #3485194
2012-02-13 12:06:35 +02:00
Filippos Karapetis
fbb51fcd88 SCI: Fix bug #3487092: "SCI: LB1: Magnifying glass cursor is grey" 2012-02-13 04:03:05 +02:00
Filippos Karapetis
099b2e9249 SCI: Properly handle negative coordinates in drawTextBitmap()
This fixes occasional crashes when going to the map in GK1. Many thanks
to digitall for finding this through Valgrind
2012-01-15 23:00:23 +02:00
Filippos Karapetis
0f39a43675 SCI: Plug loads of memory leaks in the SCI32 graphics code
Many thanks to digitall for finding these
2012-01-15 18:35:33 +02:00
Filippos Karapetis
bf6c42d816 SCI: Don't clip the plane rectangle in kernelDeletePlane()
The actual cause for this clipping has been fixed
2012-01-14 16:37:07 +02:00
Filippos Karapetis
20bcb0545e SCI: When deleting a plane, also delete the items in it
This fixes a crash in GK1 day 2, after using the thermostat outside
Mosely's office
2012-01-14 14:22:54 +02:00
Filippos Karapetis
4594982ce3 SCI: Fix bug in fadeIn()/fadeOut()
This wasn't added in 4742b4d728)
2012-01-14 00:21:55 +02:00
Filippos Karapetis
22e00a710f SCI: Fixed some graphics corruption (black boxes) in the dialogs of GK1 2012-01-13 02:38:20 +02:00
Strangerke
2858328e28 JANITORIAL: Remove SVN tags 2012-01-01 11:07:48 +01:00
Filippos Karapetis
b400e142af SCI: Break the huge kernelFrameOut function into several smaller ones
Also, prefix more class variables with underscores
2011-11-17 22:09:17 +02:00
Filippos Karapetis
10e14367ec SCI: Prefix class variables with underscores 2011-11-17 22:09:16 +02:00
Filippos Karapetis
ae54885379 SCI: Updated information regarding bug #3439240 2011-11-17 11:16:10 +02:00
Filippos Karapetis
5fc9831577 SCI: Fixed bug #3439240 - "QFG1VGA: Game Crashes While Sleeping at Erana's Peace" 2011-11-17 11:00:09 +02:00
Matthew Hoops
ba798e250d SCI: Add support for slater mac 2011-11-16 17:56:12 -05:00
Filippos Karapetis
9c9ffc45d7 SCI: Do not add 1 pixel to rect dimensions in SCI32 2011-11-10 11:39:37 +02:00
Filippos Karapetis
747bc75bc7 SCI: Fixed typo in colorIsFromMacClut() 2011-11-03 22:40:28 +02:00
Filippos Karapetis
9caacac724 SCI: More work on kEditText 2011-10-30 21:42:33 +02:00
Filippos Karapetis
d87b4d88e0 SCI: Bugfix for text alignment in SCI32 games 2011-10-29 18:32:52 +03:00
Torbjörn Andersson
52522b85e9 SCI: Silence GCC warning 2011-10-29 09:38:40 +02:00
Filippos Karapetis
e2a2cee092 SCI: Fixed the up/down buttons in GK1 2011-10-29 05:21:47 +03:00
Filippos Karapetis
5509d092be SCI: Implemented text alignment for SCI32 2011-10-29 05:21:46 +03:00
Filippos Karapetis
c0d4adbd65 SCI: Fixed typo 2011-10-29 01:42:41 +03:00
Filippos Karapetis
ec7b5a79c2 SCI: Some fixes for text positioning in SCI32 games (still WIP)
Also, removed duplicate code
2011-10-29 01:39:37 +03:00
Filippos Karapetis
1cc30572e6 SCI: Remove unneeded casts (thanks to wjp for pointing that out) 2011-10-28 22:54:02 +03:00
Filippos Karapetis
739ceb851d SCI: Added two files missing in commit 4ac2940 2011-10-28 22:31:01 +03:00
Filippos Karapetis
d8db7b11c1 SCI: Use the original text buffer width/height when drawing it
Fixes the display of overlay text
2011-10-28 22:20:33 +03:00
Filippos Karapetis
1ee923f8d2 SCI: Draw overlay text, if it exists (e.g. on buttons) 2011-10-28 22:20:32 +03:00
Filippos Karapetis
f61ea4c9cf SCI: Fixed text background color and text transparency for SCI32 games 2011-10-28 22:20:31 +03:00
Filippos Karapetis
ac559b0212 SCI: Renamed GfxControls to GfxControls16 2011-10-26 01:54:27 +03:00
Filippos Karapetis
228c4fb286 SCI: Added a hack to fix bug #3035693 - "SCI: QFG3 demo: Rope swinging more heroic than ever" 2011-10-20 00:47:53 +03:00
Filippos Karapetis
010d12ace8 SCI: Moved the width adjustment outside getPlaneRect() 2011-10-19 23:52:53 +03:00
Filippos Karapetis
935eaa175b SCI: Move the palette merging checking code inside the GfxPalette class 2011-10-19 23:52:51 +03:00
Filippos Karapetis
28d0901bff SCI: Added a sanity check when drawing text. Older SCI32 saves work now 2011-10-19 21:54:05 +03:00
Filippos Karapetis
513d0be106 SCI: Merged all the code to get/set the NS rect 2011-10-19 20:29:05 +03:00
Filippos Karapetis
7a96bcb3ed SCI: Removed unused includes 2011-10-19 20:29:04 +03:00
Filippos Karapetis
722ce77675 SCI: Wrapped some very long lines 2011-10-19 20:29:01 +03:00
Filippos Karapetis
de6e5c7366 SCI: Fixed script bug #3425276 - "SCI: PQ2: Game crashes when looking at file" 2011-10-19 15:24:45 +03:00
Filippos Karapetis
fa43ded590 SCI: The draw_pic console command now works in SCI32
Moreover, the overlay is temporarily hidden to show the picture
2011-10-19 02:02:04 +03:00
Filippos Karapetis
7708a4ddbb SCI: Added some hacks related to new functionality in Phantasmagoria 2
The game will now start (but won't do anything exciting - it'll display
its main menu, which doesn't work yet)
2011-10-18 03:10:19 +03:00
Filippos Karapetis
88472151b4 SCI: Fixed text length in upscaled SCI32 games 2011-10-15 00:19:39 +03:00
Filippos Karapetis
9f568f5f0b SCI: Fixed display of text surfaces in SCI21 2011-10-14 21:08:26 +03:00
Filippos Karapetis
8609e22e40 SCI: Silenced warnings 2011-10-14 20:30:22 +03:00
Filippos Karapetis
b04a069782 SCI: More work on kBitmap (still WIP) 2011-10-14 14:07:01 +03:00
Filippos Karapetis
d39cdd8e1c SCI: More work on the vertical plane offset for SCI32. Still WIP.
Vertical clipping is still not finished. This fixes the display in the
Torin demo (which uses a scene with loads of items with a vertical
offset).
2011-10-14 14:07:00 +03:00
Filippos Karapetis
8d4e562555 SCI: Implemented kBitmap(3) and kBitmap(5). Some cleanup 2011-10-13 14:03:57 +03:00
Heather Douglass
084b2deccc SCI: Implementation of kCelInfo subop 4
kCelInfo subop 4 returns the pixel color at the
passed in x,y coordinates for the passed in view,
loop, cel.  Shivers uses this function for the
red door puzzle, room 23601 to determine what
blocks on the puzzle board are already occupied
by pieces.
2011-10-12 02:50:28 +03:00
Filippos Karapetis
4af034a7a9 SCI: Added proper handling of duplicate items in kAddScreenItem
- Items that are being readded to the scene should be updated instead
- Added a findScreenItem() call to simplify the code slightly
2011-10-12 02:44:16 +03:00
Filippos Karapetis
df63b827bf SCI: Fixed text display in QFG4 2011-10-11 02:53:00 +03:00
Filippos Karapetis
a9c6d2a4c4 SCI: Some work on the SCI32 bitmap / font code
- Initial implementation of kBitmap(0)
- Bugfixes for fonts in upscaled games
2011-10-11 02:33:45 +03:00
Filippos Karapetis
3b5b24c8d5 SCI: Removed leftover unused variables 2011-10-11 01:34:32 +03:00
Filippos Karapetis
96ce226967 SCI: Proper implementation of text drawing for SCI2+ 2011-10-11 01:25:08 +03:00
Filippos Karapetis
32b4ef8199 SCI: SCI32 kernel functions kRepaintPlane and kInputText are unused 2011-10-10 12:18:12 +03:00
Filippos Karapetis
90a11586e2 SCI: CreateTextBitmap should return a pointer. Also, silenced a warning 2011-10-09 19:56:51 +03:00
Filippos Karapetis
1dcad17988 SCI32: Documented the extra 2 params in kCreateTextBitmap(0) 2011-10-09 19:16:05 +03:00
Filippos Karapetis
227e69ef08 SCI2+: Fixed the implementation of kTextSize(), removing some hacks
Thanks to lskovlun for the fix
2011-10-08 19:11:14 +03:00
Filippos Karapetis
4ad2ebd995 SCI2+: Some groundwork for kTextSize()
The old behavior is currently hacked in inside kernelTextSize(), as the
top of the subtitles frame is wrong if kTextWidth() is properly working...
2011-10-08 17:19:00 +03:00
Lars Skovlund
d88827b13f SCI: Fix black screen in LSL7 intro 2011-10-08 12:25:32 +02:00
Filippos Karapetis
4717d11862 SCI: Added support for the halfbrite palette used in Longbow Amiga
This fixes the remaining palette problems in the game (bug #3309036)
2011-09-27 16:54:14 +03:00
Filippos Karapetis
43fb9d32b5 SCI: Code formatting 2011-09-26 20:02:32 +03:00
Filippos Karapetis
300cec119c SCI: Bugfix for the palette of Longbow Amiga (still not right) 2011-09-25 04:10:20 +03:00
Filippos Karapetis
75fb3b4ef8 SCI21: Added some skeleton code for offsetting pictures vertically (not working yet). Some cleanup 2011-09-23 18:55:30 +03:00
Willem Jan Palenstijn
7b71e9842e SCI: Fix Island of Dr. Brain copyprot pause menu on touch devices
Patch from m_kiewitz.
2011-09-05 12:14:17 +02:00
Filippos Karapetis
41cc1932d2 SCI32: Added an initial skeleton structure for the SCI2 text drawing code
This includes kCreateTextBitmap, and moves all of the text drawing code
into the new GfxText32 class
2011-09-03 14:51:51 +03:00
Willem Jan Palenstijn
09def52554 SCI: Fix QFG3 run/walk/sleep menu on touch devices
The analysis and fix are from m_kiewitz.
2011-09-03 10:26:25 +02:00
Eugene Sandulenko
78f1ea7690 OSYSTEM: extended installTimerProc() with timer ID parameter 2011-08-06 11:28:35 +01:00
Johannes Schickel
933ee5b156 GRAPHICS: Remove default values from FontSJIS::drawChar.
drawChar is overloaded in FontSJIS. One takes a "Surface &" as first
parameter another one "void *", they furthermore have the exact same
number of required parameters. The one "void *" just had a few extra
parameters with default values. This resulted in a bug in SCUMM, where
"VirtScreen *" (a subclass of Surface) was passed instead of "VirtScreen &"
and thus the method taking "void *" was incorrectly used.

To make it easier to spot such bugs in the future I just removed the default
values and thus disallow such calls.
2011-07-01 05:42:54 +02:00
Littleboy
b694a78f62 ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04: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
Filippos Karapetis
bfa26ffc44 SCI: Reverted commit db7dea3
The original check was correct, and the associated MG bug (#3049515) has
actually been fixed with another commit.

Fixes bug (regression) #3315639 - "Character Glitches in KQ4 SCI".
Many thanks to waltervn and wjp for their help on this
2011-06-13 16:43:04 +03:00
Willem Jan Palenstijn
4c70d39933 SCI: Shrink rectangle updated by DrawControl(Text)
This fixes dialogs in Jones CD (bug #3297111) together
with 9e2c7f26d2.

This grow was probably accidentally added in
6fda9a5067. Assembly of KQ5CD and JonesCD
confirms it shouldn't be there.
2011-06-13 01:24:28 +02:00
Willem Jan Palenstijn
8e2f2e3730 SCI: Remove workaround that caused graphics corruption
This fixes coins disappearing in Mother Goose SCI1.1 (bug #3051136).
Filippos has confirmed the workaround is no longer necessary for the
menubar in LSL6 for which it was added.
2011-06-12 20:26:07 +02:00
Willem Jan Palenstijn
9e2c7f26d2 SCI: Treat all priorities above 15 as none
Before only 255 was treated this way. This fixes part of the broken
dialog boxes in Jones CD (bug #3297111) which use priority 254,
and matches Jones CD disassembly.
2011-06-12 20:25:46 +02:00
md5
60943efafd SCI: Fixed bug #3295931 - "SCI: JONES: Disabled commands are available using shortcuts" 2011-06-12 17:58:25 +03:00
Willem Jan Palenstijn
4ec20f857f SCI: Add FIXME for bug #3051136 2011-06-12 02:02:06 +02:00
Walter van Niftrik
4628833a32 SCI: Set Mac versions of LSL1 and LSL5 to screen height 190.
This fixes bug #3310782. However, as I was unable to get the games working in
a Mac emulator, this is an educated guess at this point.
2011-06-04 15:32:57 +02:00