Commit Graph
642 Commits
Author SHA1 Message Date
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 f9296a6445 - Changed the unimplemented debug SCI kernel functions (InspectObj, ShowSends, ShowObjs, ShowFree, StackUsage and Profiler) to be dummy functions - we have our own debugger, and don't use these functions for debugging
- Removed the function number parameter from all kernel functions, as it's no longer needed, and removed the FAKE_FUNCT_NR hack
- Removed kUnknown() and kStub()
- Dummy/unknown kernel functions are no longer invoked, and a warning is shown instead, with the paremeters passed to them

Note: there is an evil hack used for debugging scripts in invoke_selector(), which probably no longer works now

svn-id: r44461
2009-09-29 14:24:07 +00:00
Walter van Niftrik 725377f090 SCI: Fix scrolling in SCI1 list controls.
svn-id: r44429
2009-09-27 23:06:39 +00:00
Willem Jan Palenstijn 33e9b0baf9 SCI: turn assert into warning, as it used in QfG2 char import
svn-id: r44400
2009-09-27 14:18:21 +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
Max Horn 43da40996b SCI: Change kAnimate to actually tail recurse
svn-id: r44238
2009-09-21 21:37:47 +00:00
Max Horn 5f440854b7 SCI: Add EngineState::_kernel member for convenience
svn-id: r44173
2009-09-17 17:00:36 +00:00
Max Horn eb77efda78 SCI: Add a global getSciVersion() function and make use of it
svn-id: r44170
2009-09-17 16:50:53 +00:00
Max Horn 9651562e72 SCI: Rename WAS_FUNCT_NR to FAKE_FUNCT_NR; turn some #defines into enums
svn-id: r44169
2009-09-17 16:49:31 +00:00
Max Horn 730c7c9641 SCI: Get rid of the not_register() hack
svn-id: r44153
2009-09-17 13:22:00 +00:00
Max Horn 364640cfd5 SCI: Rename selector_map_t -> SelectorCache and _selectorMap -> _selectorCache
svn-id: r44152
2009-09-17 13:21:42 +00:00
Filippos Karapetis e1de3d0f3f Removed some unused variables from the engine state
svn-id: r44099
2009-09-15 07:59:48 +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 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 5cd538a1b3 Removed/replaced the gfx_pixmap_color struct
svn-id: r44017
2009-09-09 08:19:16 +00:00
Max Horn d04b5d2c9b SCI: Rename resManager -> resMan; segManager -> segMan
svn-id: r43980
2009-09-06 12:57:42 +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 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 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 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 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 2e04dcb133 - Moved the Sierra game ID conversion code inside game.cpp, so that any game-specific workarounds are tested against ScummVM IDs
- Added detection for the EcoQuest 1 demo in the fallback detector
- Partially reverted my previous "fix" for EcoQuest 1 CD, and turned it into a script-specific hack for that game, for now
- Added handling of kDisposeScript calls made with 2 parameters, e.g. in KQ5CD and others (still untested, haven't found a test case)

svn-id: r43887
2009-09-01 17:09:59 +00:00
Filippos Karapetis 28d7d59de3 Changed an error to a warning, as it occurs at the beginning of EcoQuest 1 CD and doesn't seem to have any side effects
svn-id: r43876
2009-09-01 06:51:40 +00:00
Walter van Niftrik 1d6f946ba7 SCI: Add stub for PalVary.
svn-id: r43857
2009-08-31 18:42:07 +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
Matthew Hoops 3687544fbb Adding support for AVI in SCI games (such as kq6) and implement kPlatform.
svn-id: r43834
2009-08-30 19:47:47 +00:00
Matthew Hoops ad144c8ee8 Silence gcc warning.
svn-id: r43814
2009-08-30 02:10:25 +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
Walter van Niftrik cf5483c3d8 SCI: Add SetCursor detection. Cleanup.
svn-id: r43812
2009-08-30 01:37:52 +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 4c8c31d769 SCI: Fix interpretation of ShowMovie speed argument.
svn-id: r43718
2009-08-25 00:18:11 +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
Walter van Niftrik 00f4794c0a SCI: Stage 1 of the game detection overhaul. The end goal is to autodetect
as much as possible. All SCI_VERSION_* information was removed from
detection.cpp (much of it was incorrect anyway).

svn-id: r43449
2009-08-16 19:18:19 +00:00
Walter van Niftrik 65e9ae163f SCI: Added a crude speed throttler.
svn-id: r43289
2009-08-11 20:18:15 +00:00
Filippos Karapetis 31a0c80905 Moved the kernel and the vocabulary outside of the engine state (they're static data, which never changes during a game)
svn-id: r42398
2009-07-11 23:45:54 +00:00
Filippos Karapetis d55f7e72d0 Added auto-detection for games with older headers for script blocks, and removed game flag GF_SCI0_OLD
svn-id: r42211
2009-07-07 10:28:05 +00:00
Filippos Karapetis c716e43a2b - Added auto-detection for EGA graphics. As a result of this, GF_SCI1_EGA has been removed and versions SCI_VERSION_01_EGA and SCI_VERSION_01_VGA have been merged into SCI_VERSION_01
- Simplified the checks for EGA and VGA graphics
- Fixed a bug in script_adjust_opcode_formats()
- Simplified the code in GfxResManager::getView() a bit

svn-id: r42206
2009-07-07 07:44:25 +00:00
Filippos Karapetis 522b161bec Replaced sciprintf() calls with printf, DebugPrintf, warning and error calls
svn-id: r42167
2009-07-06 10:39:22 +00:00
Filippos Karapetis b093511239 - Merged the "early" and "late" SCI1 versions - these are functionally equivalent, and the code that does the version check is unreliable (e.g. it sets SQ1 VGA to SCI1 "late" and EcoQuest 1 to SCI1 "early")
- Cleanup of the vocabulary setting functions
- Cleanup of the cursor manipulation code

svn-id: r42097
2009-07-04 16:30:20 +00:00
Filippos Karapetis df9570cb32 SCI0 games using older graphics functions are automatically detected now, from the presence of the "TimesSin" and "SinMult" kernel functions. Removed the GF_SCI0_OLDGFXFUNCS game flag
svn-id: r42081
2009-07-03 23:37:08 +00:00
Filippos Karapetis 69da51e71d Replaced all calls for manipulating the mouse cursor to be made to the CursorManager instead of directly to the graphics backend
svn-id: r42060
2009-07-03 14:18:20 +00:00
Walter van Niftrik 06144864e1 SCI: Partial support for dual-language games.
svn-id: r41833
2009-06-24 19:12:45 +00:00