Filippos Karapetis
faa3c64d1b
Stop loading opcodes from vocab.998. They are the same in all SCI games and are hardcoded anyway (plus, vocab.998 is unreliable in some games, e.g. QFG3, or completely missing in others). Also hardcoded the opcode names for the script debugger, the only place they're actually used. The only place where vocab.998 is loaded on demand is when using the "opcodes" console command (for debug/verification purposes)
...
svn-id: r43775
2009-08-27 23:39:59 +00:00
Filippos Karapetis
3963a68937
Removed the signature check from GetSaveDir in order to let the scripts in GK progress a bit further
...
svn-id: r43771
2009-08-27 15:08:21 +00:00
Matthew Hoops
5d83522e75
Add the minor differences of SCI3 to the SCI2.1 kernel table.
...
svn-id: r43763
2009-08-27 01:39:30 +00:00
Filippos Karapetis
c212b5ad1d
Disabled the signature checks for kNewWindow and kGetEvent, which are different in Mac versions. At least, Mac versions should start now
...
svn-id: r43747
2009-08-25 23:39:06 +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
Filippos Karapetis
60af2db2fd
- Added more mappings from Sierra's internal IDs to our own ones. Hopefully, all SCI0-SCI11 games can now be detected correctly from the fallback detector
...
- Simplified some checks for old script types
svn-id: r43678
2009-08-23 21:57:30 +00:00
Johannes Schickel
2f162c72c9
Comment out unused function (which was also currently only enabled when SCI32 is enabled).
...
svn-id: r43528
2009-08-19 07:13:29 +00:00
Filippos Karapetis
db0cd620f6
Started rewriting the SCI engine to use FSNode instead of file names. This is the proper solution for removing the hack in the fallback detector, but it still needs work. Also, reduced the things needed to be initialized a bit, so that the detection is a bit faster
...
svn-id: r43510
2009-08-18 14:10:31 +00:00
Walter van Niftrik
2fc7660e43
SCI: Fix kernel table for multilingual SCI01 games. Cleanup.
...
svn-id: r43497
2009-08-17 23:11:25 +00:00
Walter van Niftrik
260a2019b6
SCI: Add autodetection for DoSound. Cleanup.
...
svn-id: r43482
2009-08-17 15:49:22 +00:00
Filippos Karapetis
c38f58598b
- Simplified some functions to accept only the parts of the EngineState they need as parameters, instead of the whole EngineState
...
- Moved the class table in the Segment manager - it's the only class using it directly
- Removed the sci11 flag from save games (we already know this, we don't need to store it)
- Moved script_get_segment() and get_class_address() inside the segment manager class
- Removed the script_locate_by_segment wrapper
- Simplified script_lookup_export() a lot by removing some paranoia checks
- Added some WIP code for automatically determining the game id in the fallback detector (still not working)
- General cleanup
svn-id: r43458
2009-08-17 05:55:21 +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
f99932b72a
SCI: Added enum for map and volume versions. Removed res_version setting from
...
detection.cpp (should be detectable). Cleanup.
svn-id: r43390
2009-08-15 00:28:59 +00:00
Walter van Niftrik
dd9e569325
SCI: Improved multilanguage support for SCI1 and SCI1.1.
...
svn-id: r43217
2009-08-10 18:37:47 +00:00
Travis Howell
9594beb39f
Only error out, if checkStaticSelectorNames() fails.
...
svn-id: r42376
2009-07-11 07:03:28 +00:00
Filippos Karapetis
0b47fa50ae
Applied a slightly modified patch from clone2727 which adds static selector names to some demos which are missing them (KQ4, LSL1, LSL3, Iceman and Christmas1992)
...
svn-id: r42372
2009-07-11 06:33:19 +00:00
Filippos Karapetis
a9aaf56b3e
Cleanup: added an enum for the auto-detected features, removed the selectors which are only used for auto-detection from the convenience selector map and placed feature auto-detection in a separate function. Also, now the automatically detected graphics resources are shown in the console.
...
svn-id: r42212
2009-07-07 11:14:18 +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
219b0de0d2
Renamed SCI_VERSION_01 -> SCI_VERSION_01_EGA
...
svn-id: r42181
2009-07-06 16:22:14 +00:00
Filippos Karapetis
8f284ad396
KQ6CD should be working correctly again
...
svn-id: r42178
2009-07-06 15:30:07 +00:00
Filippos Karapetis
87988c69ee
Assigned several unimplemented/unused kernel functions as stubs, so that we know when they're used and how they're called
...
svn-id: r42170
2009-07-06 11:19:19 +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
c31d1b3180
- Fixed feature auto-detection for Conquests of Camelot
...
- Auto-detected features are now printed in the console (to ease debugging)
svn-id: r42132
2009-07-05 11:49:05 +00:00
Filippos Karapetis
5c60d94725
SCI1 games with absolute parameters to lofs instructions are automatically detected now. Removed the GF_SCI1_LOFSABSOLUTE game flag
...
svn-id: r42118
2009-07-05 11:08:53 +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
c5522b3766
- Kernel function names are no longer loaded from vocab.999, but are constructed from the hardcoded function table, depending on the SCI version used
...
- SCI0 games using older graphics functions are now detected by the presence of the "curAngle" selector
- SCI0 games using a SCI1 table (like KQ1 demo version and full version) are detected by the presence of the "sightAngle" selector (as no SCI0 game seems to have it)
svn-id: r42095
2009-07-04 15:45:04 +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
9664050ff0
Simplified the kernel name loading code: Merged the default SCI0 and SCI1 kernel name tables in one table. vocab.999 is only used in SCI0 and SCI01 games if it exists as an override to the default kernel name table (which works with SCI0/SCI01 demos with no vocab.999, like KQ1 and xmas1998). Removed GF_SCI0_SCI1VOCAB.
...
svn-id: r42050
2009-07-03 09:01:51 +00:00
Matthew Hoops
4df9dd82fb
After discussing with waltervn, committing my fix for the King's Quest I Demo (original from Patch #2795916 ). I'm also fixing the full game as well :)
...
svn-id: r41841
2009-06-25 00:14:07 +00:00
Walter van Niftrik
a6ed05740f
SCI: Moved resource36 handling into resource manager.
...
svn-id: r41349
2009-06-07 19:15:55 +00:00
Max Horn
870db34cd1
SCI: Renamed _kfuncTable -> _kernelFuncs; and simplified/streamlined the kernel func map in kernel.cpp a bit
...
svn-id: r41176
2009-06-04 21:42:24 +00:00
Max Horn
23a9b5544c
SCI: Added MemObject::isValidOffset method; use it to simplify determine_reg_type
...
svn-id: r41175
2009-06-04 20:51:40 +00:00
Max Horn
ae3c6c3053
SCI: cleanup
...
svn-id: r41173
2009-06-04 20:51:09 +00:00
Filippos Karapetis
98f64cfa2f
Removed the gfxw_new_visual and gfxw_new_port wrappers, moved _kfuncTable inside the Kernel class and moved gfxw_find_port inside the GfxVisual struct
...
svn-id: r41125
2009-06-02 14:16:59 +00:00
Filippos Karapetis
99c6874630
Split the kernel functions away from the vocabulary functions (WIP, saving/loading is broken)
...
svn-id: r41101
2009-06-01 14:12:43 +00:00
Filippos Karapetis
c730e0290d
Replaced kernel_oops with error(), and added an enum to clarify the cases where invoke_selector should stop
...
svn-id: r41095
2009-06-01 08:00:58 +00:00
Filippos Karapetis
76bd1b7c0e
Removed the sci_max_allowed_unknown_kernel_functions array
...
svn-id: r41094
2009-06-01 07:06:04 +00:00
Filippos Karapetis
e55388c787
Removed script_error_flag and script_debug_flag, which were used to error out if something went wrong and open the debugger console. Changed all the places where they were used to error() out instead, as ScummVM's debugger console can open on error()
...
svn-id: r41073
2009-05-31 15:34:23 +00:00
Max Horn
cf68dc1a7b
SCI: Renamed some Vocabulary methods for clarity; also renamed decypherSaidBlock -> decipherSaidBlock; some cleanup in Console::cmdSentenceFragments
...
svn-id: r41072
2009-05-31 15:08:47 +00:00
Filippos Karapetis
4441ca4b3e
- Further objectification of the SCI vocabulary functions
...
- Rewrote the sci_opcodes enum so that it's easier to read
- Made the engine error out if data is sent to an invalid selector (which is a fatal condition)
svn-id: r41069
2009-05-31 14:55:32 +00:00
Filippos Karapetis
e317012cce
Further objectification of the SCI vocabulary functions. Removed the "kernel_words" console command, as it's exactly the same as "parser_words"
...
svn-id: r41065
2009-05-31 12:05:49 +00:00
Torbjörn Andersson
0999534749
The error() and warning() functions add ! and newline automatically. (I didn't
...
look at debug() and debugC(), since I'm really bored with this now. :-)
svn-id: r41061
2009-05-31 10:02:16 +00:00
Filippos Karapetis
76406c35ec
Started objectifying the vocabulary functions (WIP)
...
svn-id: r41051
2009-05-30 22:15:00 +00:00
Filippos Karapetis
3490819a66
- Removed debug_mode from the engine state
...
- Turned all SCIkwarn and SCIkdebug functions to ScummVM's debugC function
- Placed some debug code in appropriate defines: DEBUG_PARSER, DEBUG_AVOIDPATH and DEBUG_SOUND
- Removed the "debuglog" command and the "script_checkloads_flag" and "sci_debug_flags" variables
svn-id: r41033
2009-05-30 15:40:49 +00:00
Max Horn
813853ccc2
SCI: Converted several fprintf(stderr) calls to warning/error (the remaining fprintf calls should probably be replaced by suitable debug/debugC/debugN invocations)
...
svn-id: r40993
2009-05-29 13:07:14 +00:00
Max Horn
32975b25f4
SCI: cleanup
...
svn-id: r40959
2009-05-28 11:15:09 +00:00
Walter van Niftrik
fd191a4920
SCI: Changed signatures of StrLen and StrCpy to allow NULL pointers. This is
...
needed for a game bug in KQ6CD.
svn-id: r40930
2009-05-26 23:34:57 +00:00