1459 Commits

Author SHA1 Message Date
Filippos Karapetis
e1de3d0f3f Removed some unused variables from the engine state
svn-id: r44099
2009-09-15 07:59:48 +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
bfe1538715 SCI: Misc cleanup
svn-id: r44093
2009-09-14 22:34:53 +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
Max Horn
c00edfb64f SCI: Merge kernelDerefCharPtr and kernelDerefString and change it from a macro to a function
svn-id: r44081
2009-09-14 12:59:42 +00:00
Filippos Karapetis
8bf80d9584 Always disable the "Change Directory" button in the save/load menus, as we don't allow the engine to change the directory where saved games will be placed
svn-id: r44044
2009-09-13 00:08:17 +00:00
Filippos Karapetis
18b24da384 Removed the INST_LOOKUP_CLASS define
svn-id: r44043
2009-09-12 18:22:32 +00:00
Filippos Karapetis
15cb36a7ee Made is_object() a method of the segment manager
svn-id: r44042
2009-09-12 17:42:04 +00:00
Filippos Karapetis
358b5649ce Removed the unused ASSERT()-related code and changed a warning where BREAKPOINT() was used to an error
svn-id: r44041
2009-09-12 17:31:29 +00:00
Filippos Karapetis
90ae20c3ea - Made obj_get and obj_get_name methods of SegManager (getObject and getObjectName, respectively)
- Renamed alloc_List -> allocateList, alloc_Node->allocateNode, alloc_hunk_entry->allocateHunkEntry, free_hunk_entry->freeHunkEntry, for consistency

svn-id: r44039
2009-09-12 00:10:07 +00:00
Filippos Karapetis
5cd538a1b3 Removed/replaced the gfx_pixmap_color struct
svn-id: r44017
2009-09-09 08:19:16 +00:00
Max Horn
37e51f1575 Fixed some (pedantic) warnings
svn-id: r44015
2009-09-08 22:03:07 +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
e3a733f2e2 Fixed a regression from commit #43999 (segment ID 1 is valid)
svn-id: r44000
2009-09-07 08:27:49 +00:00
Max Horn
44b60d2750 SCI: Replace GET_SEGMENT_ANY and GET_OBJECT_SEGMENT macros by new segman methods
svn-id: r43999
2009-09-07 06:07:18 +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
eb8cf07db2 SCI: Rename SegManager::exports_wide to _exportsAreWide and changed it to a bool, and rename setExportWidth() to setExportAreWide()
svn-id: r43988
2009-09-06 13:01:26 +00:00
Max Horn
fdaa3d423c SCI: Script::obj_indices is now protected
Add new methods init, allocateObject and getObject to class Script, and use them instead of directly accessing Script::obj_indices. Replace RAW_GET_CLASS_INDEX with Script::getObject()

svn-id: r43987
2009-09-06 13:01:00 +00:00
Max Horn
a550e2ea10 SCI: Replace "IntMapper *id_seg_map" in SegManager with a Common::HashMap<int,int>
This simplifies the code considerably. Also changed the savegame format
accordingly, which required me to bump the format version to 10. Old
saves should still load fine.

svn-id: r43986
2009-09-06 13:00:30 +00:00
Max Horn
1d075291da SCI: Convert saveload code to use the versioning feature of Common::Serializer
svn-id: r43985
2009-09-06 12:59:56 +00:00
Max Horn
029e3a5703 SCI: cleanup
svn-id: r43984
2009-09-06 12:59:34 +00:00
Max Horn
b51e9988e6 SCI: cleanup
svn-id: r43982
2009-09-06 12:58:43 +00:00
Max Horn
fdbb167ea3 SCI: Cleanup for some SegManager internals
- rename segGet and getSegment to getScriptSegment; the two can be
  distinguished by the parameter count.
- rename type SCRIPT_GET to ScriptLoadType to conform with our code
  formatting conventions
- rename get_class_address to getClassAddress
- some cleanup

svn-id: r43981
2009-09-06 12:58:16 +00:00
Max Horn
d04b5d2c9b SCI: Rename resManager -> resMan; segManager -> segMan
svn-id: r43980
2009-09-06 12:57:42 +00:00
Max Horn
c0ff500b0a SCI: Rename player -> s_player and made it static; allocate MemoryReadStream in two cases on the stack, for simplicity
svn-id: r43979
2009-09-06 12:56:50 +00:00
Max Horn
cd7a32eed0 SCI: Change script_lookup_export to use SegManager::validateExportFunc
svn-id: r43978
2009-09-06 12:56:28 +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
Walter van Niftrik
dd0ebb7116 SCI: Reset signal before playing song.
svn-id: r43940
2009-09-04 14:57:27 +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
Sven Hesse
4b4b36cfb1 Fixing signed/unsigned comparison warning
svn-id: r43937
2009-09-04 08:37:53 +00:00
Filippos Karapetis
f5d846d482 Removed the animation_granularity variable from the engine state (it never changes, and it's used in one place only)
svn-id: r43936
2009-09-04 07:21:51 +00:00
Filippos Karapetis
142922387c Moved some functions inside the SegManager class, and renamed alloc_clone() to allocateClone()
svn-id: r43935
2009-09-04 07:17:34 +00:00
Walter van Niftrik
ac078040e1 SCI: Relocate export table when restoring SCI1.1 savegames
svn-id: r43916
2009-09-03 11:51:18 +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
9829378a98 Fixed loading again (broken accidentally in rev. 43504
svn-id: r43913
2009-09-02 23:11:50 +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
Max Horn
0c7093e05c SCI:
* removed kNOP
* renamed k_Unknown to kUnknown
* added FIXME to kfunct_mappers table
* more cleanup

svn-id: r43906
2009-09-02 11:35:00 +00:00
Max Horn
6c44eafa97 SCI: funct_nr is not used in 99% of all opcodes -- hide it in those (to be removed eventually)
svn-id: r43905
2009-09-02 11:33:25 +00:00
Filippos Karapetis
b2415c11c7 Added checksums for KQ5 EGA (bug report #2829470)
svn-id: r43903
2009-09-01 23:07:51 +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