Commit graph

87 commits

Author SHA1 Message Date
Colin Snover
76806732e0 SCI: Remove Mac SCI32 code from SCI16 code 2017-09-24 22:56:58 -05:00
Colin Snover
31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Colin Snover
22398e571b SCI: Fix buffer overflows in GfxPicture circle drawing
Fixes Trac#9660.
2016-12-10 19:34:19 -06:00
Eugene Sandulenko
dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Colin Snover
4e1a9be816 SCI32: Remove CoordAdjuster32, at least for the moment
This may come back in the future to deduplicate some gfx code,
but SCI32 had two different inlined ways of doing coordinate
conversions with different rounding methods, so CoordAdjuster32
didn't get used when the graphics system was rewritten.

At the moment, SCI32 code uses the mulru/mulinc methods from
helper.h for scaling up/down coordinates.
2016-08-19 15:23:10 -05:00
Colin Snover
75ccabc325 SCI: Implement accurate renderer architecture for SCI32 2016-02-18 13:18:02 -06:00
Martin Kiewitz
72e6a9eeab SCI: some more work on 480x300 mac support 2014-11-09 12:54:41 +01:00
Filippos Karapetis
9783f0bbd9 SCI: Remove trailing whitespace 2014-10-28 16:17:06 +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
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
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
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
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
Filippos Karapetis
46ebf37ec9 SCI: Change wording for bug/further info references 2013-04-27 14:04:27 +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
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
300cec119c SCI: Bugfix for the palette of Longbow Amiga (still not right) 2011-09-25 04:10:20 +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
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
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
559fda409d SCI: Line wrap some comments 2011-05-09 14:46:17 +02:00
Max Horn
76cf7bc907 SCI: Slight cleanup to undithering code 2011-05-09 14:41:49 +02:00
Matthew Hoops
9fb10f98e2 SCI: Fix Mac SCI32 picture transparency 2011-04-02 22:35:23 -04:00
md5
91d2d04f90 SCI: Some renaming related to the undithering code
Renamed some variables, functions and comments related to the
undithering code, to make them a bit easier to understand
2011-03-10 18:05:59 +02:00
md5
4ddc66d68e SCI: Initial handling of the views in Longbow Amiga. Still not right 2011-03-07 13:23:52 +02:00
eriktorbjorn
6a8fadeec8 SCI: Silence GCC warning 2011-03-06 18:39:26 +01:00
md5
d2ad7898d9 SCI: Merged the cel data unpacking code for views and pictures 2011-03-06 19:22:32 +02:00
md5
0698ee61ab SCI: Some changes to picture drawing
- Fixed picture drawing for Longbow Amiga (view drawing is still wrong,
though)
- Added debug output for picture drawing
2011-03-06 17:30:14 +02:00
md5
5b9677da72 SCI: Cleaned up some view type checks 2011-03-04 22:04:12 +02:00
Willem Jan Palenstijn
b40b87fdb5 SCI: Fix flood fill matching in EGA mode
In EGA games a pixel in the framebuffer is only 4 bits. We store a full
byte per pixel to allow undithering, but when comparing pixels for
flood-fill purposes, we should only compare the visible color of a
pixel.

This fixes bug #3078365 in Iceman.
2011-03-04 18:24:46 +01:00
Matthew Hoops
c1a9857837 SCI: Fix SCI32 Mac picture palettes
The palette offset should be 32-bit, not 16. The GK1 Mac intro now plays properly.

svn-id: r55784
2011-02-05 08:52:52 +00:00
Matthew Hoops
f1f86646de SCI: Fix SCI32 Mac pictures
svn-id: r55724
2011-02-02 16:15:49 +00:00
Filippos Karapetis
94801fcea3 SCI: Fixed bugs #3041044, #3046543 and #3046513
svn-id: r54690
2010-12-01 00:40:52 +00:00
Johannes Schickel
8c997e2608 SCI: Add a default case to a switch statement to silence some compiler warnings.
svn-id: r54078
2010-11-05 00:10:26 +00:00
Martin Kiewitz
bb716c23fa SCI: adding force to memorial area for SQ3/intro
makes the view getting fully undithered

svn-id: r54068
2010-11-04 18:37:03 +00:00
Filippos Karapetis
b2464a9bd1 SCI: Slight change in GfxPicture::vectorFloodFill()
Changed bitwise XOR operations to bitwise NOT AND, to make the code a bit easier
to understand

svn-id: r52614
2010-09-07 07:41:28 +00:00
Martin Kiewitz
d8726d8058 SCI: sci1.1 pictures w/o cel don't set palette
even if one is present in the picture, fixes some transitions looking weird in eq2 - bug #3037126

svn-id: r52125
2010-08-16 16:50:45 +00:00
Martin Kiewitz
dc9c627681 SCI: adding header comments about sci1.1 pictures
also fixing some of the offsets (those are DWORD instead of just WORDs)

svn-id: r51415
2010-07-28 12:41:24 +00:00
Martin Kiewitz
0e47192346 SCI: priority handling for sci1.1 add-pictures
fixes battle cruiser mini game in sq5 (at least we get something displayed now)

svn-id: r51414
2010-07-28 12:28:35 +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
Martin Kiewitz
e3e2ae799e SCI: adding scrollcapability to sci32
svn-id: r51313
2010-07-26 14:41:19 +00:00
Martin Kiewitz
c0d915b616 SCI: some scrolling support for sci32
not fully done yet

svn-id: r51308
2010-07-26 12:20:07 +00:00
Martin Kiewitz
c8dc2e4b8b SCI: locking picture resource
fixes sq6 crashing with resource data NULL pointer

svn-id: r51240
2010-07-24 08:20:54 +00:00
Martin Kiewitz
0e9291e929 SCI: fixing mirrored sci32 pictures
fixes lsl6, also slight cleanup and adding comments about sci32 picture resources

svn-id: r51162
2010-07-22 20:11:53 +00:00
Martin Kiewitz
a01152a3ba SCI: some more work on priority sci32
svn-id: r51139
2010-07-22 12:36:58 +00:00
Martin Kiewitz
15ef4b23a0 SCI: some work on priority in sci32
svn-id: r51134
2010-07-22 10:24:08 +00:00
Martin Kiewitz
ab655ba01f SCI: terminating at another resource of sq4cd
contains broken data as well, room 35

svn-id: r51103
2010-07-21 20:13:24 +00:00