383 Commits

Author SHA1 Message Date
Willem Jan Palenstijn
b9cdb1abb7 SCI: Merge new GUI code written by m_kiewitz.
This is a major rewrite of the graphics code. A slightly adapted
version of the old code is still available and currently the default.
The new code is selectable in sci.cpp, but is not yet finished.

svn-id: r44565
2009-10-03 20:49:18 +00:00
Martin Kiewitz
a3fc7230eb fixed addMenu isspace() issue on umlauts
svn-id: r44563
2009-10-03 20:35:13 +00:00
Filippos Karapetis
30084d72a5 Added a new special reg_t, SIGNAL_REG, for signaling when an error occurs (usually), or to signal success in some special occasions
svn-id: r44505
2009-09-30 23:00:03 +00:00
Filippos Karapetis
bbb2274a7d - Removed some leftover 16/32bpp color code, as we're always using palette mode now
- Simplified the mouse cursor manipulation code

svn-id: r44502
2009-09-30 22:43:29 +00:00
Max Horn
aa368806d9 oops
svn-id: r44500
2009-09-30 21:12:38 +00:00
Max Horn
25dde91c7c SCI: Some palette code cleanup
svn-id: r44494
2009-09-30 16:06:04 +00:00
Filippos Karapetis
4477f41903 Converted _color_equals() into respective equality operators within the gfx_color_t structure
svn-id: r44477
2009-09-30 08:23:12 +00:00
Willem Jan Palenstijn
f413356bed SCI: When merging palettes, map all unused colours to index 0.
This fixes the boots/belt of the hero sprite in QfG3 character generation.

svn-id: r44448
2009-09-28 19:39:17 +00:00
Willem Jan Palenstijn
4d31d0d725 SCI: Fix crash when opening menu's
svn-id: r44398
2009-09-27 13:08:56 +00:00
Willem Jan Palenstijn
d3c1916384 SCI: Major string handling update.
All string access to segments should now work with both raw and non-raw
(reg_t) segments, using the new utility functions in segMan.

There will likely be regressions.

svn-id: r44388
2009-09-27 01:50:26 +00:00
Filippos Karapetis
180b3f1247 Create a define for the special "signal" offset used throughout the engine, and fixed the arbitrary 0 values from commit #44294, set when some math functions do invalid calculations
svn-id: r44359
2009-09-25 16:15:57 +00:00
Willem Jan Palenstijn
10b6349291 SCI: When setting global palette, map all unused colours to index 0.
This fixes white artifacts outside the bar in the SQ4CD intro,
but might cause regressions elsewhere.

svn-id: r44320
2009-09-24 23:54:48 +00:00
Willem Jan Palenstijn
825421108b SCI: Delete unused function declaration
svn-id: r44319
2009-09-24 23:54:30 +00:00
Willem Jan Palenstijn
e183222df3 SCI: Fix flat dithering by permuting the blended palette so that the EGA colours are the first 16 entries
svn-id: r44317
2009-09-24 21:37:54 +00:00
Filippos Karapetis
13ad217cdd - Moved the SCI version in a global variable
- Changed all the SCI version checks to use getSciVersion()
- Also made getSciVersionDesc a global function (removes some ugly accessing of the SCI engine)

The fallback detector should work correctly now

svn-id: r44269
2009-09-23 10:55:35 +00:00
Filippos Karapetis
af7b2fc018 Simplified the code which creates the mouse cursor
svn-id: r44248
2009-09-22 08:57:45 +00:00
Filippos Karapetis
5605e8b74d Slight cleanup of the resource palette modification code
svn-id: r44097
2009-09-15 07:18:16 +00:00
Max Horn
8ac3db0801 SCI: Rename SegManager::kernelDeref*() methods to SegManager::deref*()
svn-id: r44083
2009-09-14 13:27:09 +00:00
Max Horn
0e834d0b87 SCI: kernelDeref*() functions are now seSegmentManager methods
svn-id: r44082
2009-09-14 13:13:20 +00:00
Filippos Karapetis
5cd538a1b3 Removed/replaced the gfx_pixmap_color struct
svn-id: r44017
2009-09-09 08:19:16 +00:00
Filippos Karapetis
8fa0b431ee Merged xfact and yfact into scaleFactor - it doesn't really make sense to multiply one dimension with an integer multiplier which is different to the multiplier of the other dimension, otherwise we'll end up with funny looking and squashed resolutions like 640x200 or 320x400. Also, removed the now-unused pixelFormat member variable of the graphics driver struct
svn-id: r44003
2009-09-07 16:18:05 +00:00
Filippos Karapetis
9d13de7f88 Removed some unused variables
svn-id: r43998
2009-09-06 23:04:06 +00:00
Filippos Karapetis
8e36d06c4c Cleanup
svn-id: r43996
2009-09-06 23:01:33 +00:00
Filippos Karapetis
10dd604d0a Fixed compilation on BE systems
svn-id: r43995
2009-09-06 23:00:49 +00:00
Filippos Karapetis
876a7b657f Removed the hi-color code (16bpp & 24bpp). All SCI games use up to 256 colors, so hi-color isn't really used anywhere, and it only makes the overall code more complex for no reason
svn-id: r43994
2009-09-06 22:27:29 +00:00
Filippos Karapetis
f98dc19f71 Removed some leftover debug code, and turned p0printf messages into debug messages, introducing a new debug level
svn-id: r43993
2009-09-06 21:56:49 +00:00
Max Horn
d04b5d2c9b SCI: Rename resManager -> resMan; segManager -> segMan
svn-id: r43980
2009-09-06 12:57:42 +00:00
Filippos Karapetis
bd5ba266b4 Oops
svn-id: r43943
2009-09-04 15:47:09 +00:00
Filippos Karapetis
d398c17f79 - Allow SCI games to set the cursor position when it's hidden once again
- Changed the message shown when the game tries to move the cursor off the screen bounds from a warning to a debug message, to avoid spam in games that do this behavior, e.g. the Camelot demo

svn-id: r43942
2009-09-04 15:40:15 +00:00
Filippos Karapetis
32af5eb3be - Removed the gfx error defines. When resources are not found, or are corrupted, we should error out instead of piggy-banking an error flag to another function
- Do not try and set the position of the mouse cursor when it's hidden

svn-id: r43941
2009-09-04 15:04:13 +00:00
Filippos Karapetis
c3a13a6ae6 Removed the "reverse alpha" flag from the graphics driver code. Alpha values are now always 0 for transparent, up to 255 for opaque
svn-id: r43939
2009-09-04 10:15:12 +00:00
Filippos Karapetis
9381362277 Removed the bilinear and trilinear FreeSCI scalers, and only left the unfiltered scaler in (to be replaced by ScummVM's scaler code). We really don't need bilinear and trilinear filtered scaling in the engine, as ScummVM's filters already perform bilinear and trilinear filtered scaling, if requested
svn-id: r43938
2009-09-04 09:44:06 +00:00
Filippos Karapetis
557aaab0e6 - Re-added the SCI0 dithering code. Dithering is disabled by default. Added the 3 dithering modes as an enum (and reorganized them a bit)
- Added 3 config options for dithering in the ini file - mainly for purists (config option "dither_mode"): 0 - disabled, 1 - 16 color dithering (Sierra style) and 2 - 256 color dithering
- Dithering is now always applied depending on the screen scale (removed the relevant parameter)
- Removed the background picture buffering option, used to speed-up room changes. Room changing is quite fast (instantaneous), and the extra memory allocated is not worth the possible speed increase in small devices. Plus.... there is no reliable value to set this option to, so there is no point in letting the user decide what value to put there using guesswork

svn-id: r43915
2009-09-03 07:01:48 +00:00
Filippos Karapetis
2f99fea9a3 Removed the dirty rectangle option of updating one huge rectangle, and only left the algorithm of updating the screen with multiple small rectangles, like we do in all the other engines that support dirty rectangle screen updates
svn-id: r43909
2009-09-02 13:21:38 +00:00
Filippos Karapetis
1bbab8f191 Some renaming:
getresourceManager -> getResourceManger
resourceManager -> resMan
segmentManager ->segMan

svn-id: r43908
2009-09-02 12:02:37 +00:00
Max Horn
b391f08b46 SCI: Renamed kernel_dereference_* to kernelDeref*, and added kernelDerefString
svn-id: r43907
2009-09-02 11:38:16 +00:00
Filippos Karapetis
aace86a6eb Disabled the FreeSCI PIC0 palette dithering code, for now. It doesn't really make sense to dither, as Sierra games use up to 256 colors (even the later SVGA ones), and it messes up the result of the FreeSCI graphics filters. Plus, the resulting image looks worse than the original one
svn-id: r43901
2009-09-01 21:24:09 +00:00
Filippos Karapetis
28e2f0457e Re-enabled custom graphics options, and read the cursor, view, pic and text filtering algorithm options from the ScummVM ini file (options "cursor_filter", "view_filter", "pic_filter" and "text_filter", 0 - unfiltered, 1 - bilinear filtering, 2 - trilinear filtering)
svn-id: r43894
2009-09-01 20:28:44 +00:00
Filippos Karapetis
fd92b49486 - Reverted the *vga targets back to *sci, and used the extras field again for VGA remakes
- The extras field is now filled by the fallback detector for VGA games

svn-id: r43893
2009-09-01 19:40:29 +00:00
Filippos Karapetis
814a37846e Fixed regression with some weird mouse cursors (e.g. in EcoQuest)
svn-id: r43874
2009-09-01 06:21:23 +00:00
Filippos Karapetis
cc17addebf Removed many bogus return values in the SCI graphics functions - some functions always returned "true", whereas in others they errored out in fatal conditions before any value was returned. FreeSCI was returning values from the graphics drivers it used. In ScummVM, we have one graphics driver, and we error out in fatal conditions anyway, so these error checks are no longer necessary, and the resulting code looks much neater
svn-id: r43851
2009-08-31 14:24:35 +00:00
Walter van Niftrik
40d6119fd5 SCI: Add support for SetCursor with 4 args.
svn-id: r43813
2009-08-30 01:38:14 +00:00
Matthew Hoops
b5da8a5cdc - Split SCI_VERSION_32 into SCI_VERSION_2, SCI_VERSION_2_1, and SCI_VERSION_3 (each version has a different kernel table).
- Improve map detection.
- Fix SCI32 object and script initialization (Torin's Passage and GK1 scripts now start up, and probably most SCI2/2.1 games).
- Add SCI2 and SCI2.1 kernel tables.

svn-id: r43742
2009-08-25 23:02:57 +00:00
Filippos Karapetis
ac025f4294 - Replaced more cases of EngineState parameters
- Made some version comparisons for old SCI0 versions easier to read
- Removed the GET_SEL32SV macro

svn-id: r43729
2009-08-25 15:14:29 +00:00
Filippos Karapetis
ed66cad677 - Simplified the parameters of some functions
- Replaced some EngineState parameters
- The SCI version is now obtained from the resource manager or the segment manager, thereby simplifying several functions
- Plugged 2 leaks in the fallback detector
- Renamed the segment manager and resource manager to "segmentManager" and "resourceManager" in all places, for consistency

svn-id: r43722
2009-08-25 08:38:14 +00:00
Walter van Niftrik
d5f61d13b6 SCI: Reverted r40889. New fix for window erasing issue in SCI1.1 games.
svn-id: r43711
2009-08-24 21:56:54 +00:00
Jody Northup
3084919b32 Merged RGB color API and support in from /scummvm/branches/gsoc2009-16bit/
svn-id: r43577
2009-08-21 09:37:51 +00:00
Walter van Niftrik
a2a6967a63 SCI: Don't dither in SCI.
svn-id: r43550
2009-08-19 21:11:15 +00:00
Walter van Niftrik
c3462a8c76 SCI: Add partial support for Amiga SCI1 games.
svn-id: r43549
2009-08-19 21:10:24 +00:00
Walter van Niftrik
9dbc76c459 SCI: Cleanup.
svn-id: r43548
2009-08-19 21:09:10 +00:00