Filippos Karapetis
bcade54247
Started rewriting the check for the graphics functions type (still not finished)
...
svn-id: r44787
2009-10-08 14:37:55 +00:00
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
Max Horn
523f0b34fb
SCI: Remove dead code
...
svn-id: r44530
2009-10-02 07:44:55 +00:00
Filippos Karapetis
7d40dde96f
- Removed the toggle for "weak" validations, as there are cases where they fail (e.g. in Longbow), so there is no point in having strict validations
...
- Removed the invalid toggle from kernel signatures - we now never error out on invalid object references, but throw a warning instead
- Simplified determine_reg_type()
svn-id: r44511
2009-10-01 10:57:59 +00:00
Filippos Karapetis
2c2cf614c8
Oops - don't attempt to print the sought kernel function name when its empty
...
svn-id: r44462
2009-09-29 14:28:37 +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
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
Max Horn
d2a6713a8e
SCI: Replace IntMapper Script::_objIndices and Common::Array Script::_objects by a HashMap -- goodbye, class IntMapper
...
svn-id: r44240
2009-09-21 21:38:43 +00:00
Max Horn
7f728af76e
SCI: Workaround for crash in debugger's backtrace
...
svn-id: r44239
2009-09-21 21:38:07 +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
c38f150d56
SCI: Moved Kernel::findSelector from vocabulary.cpp to engine/kernel.cpp
...
svn-id: r44161
2009-09-17 14:54:11 +00:00
Max Horn
e3e1c0754f
SCI: Properly hook up (I hope) CantBeHere instead of CanBeHere in SCI versions that need it
...
svn-id: r44160
2009-09-17 14:53:57 +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
Max Horn
10f898c90e
SCI: Rename MemObject -> SegmentObj
...
svn-id: r44130
2009-09-17 00:45:12 +00:00
Max Horn
b26f744e23
SCI: cleanup
...
svn-id: r44128
2009-09-16 23:55:11 +00:00
Max Horn
a277123f54
SCI: Rename Script class members, change Script from struct to class
...
svn-id: r44126
2009-09-16 23:32:27 +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
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
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
d04b5d2c9b
SCI: Rename resManager -> resMan; segManager -> segMan
...
svn-id: r43980
2009-09-06 12:57:42 +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
Filippos Karapetis
a6f457b45d
Rewrote the static selector mapper to use SCI versions instead of game IDs, and split the selectors in SCI generations
...
svn-id: r43863
2009-08-31 20:45:46 +00:00
Walter van Niftrik
1d6f946ba7
SCI: Add stub for PalVary.
...
svn-id: r43857
2009-08-31 18:42:07 +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
Walter van Niftrik
3e543d2518
SCI: Add lofs detection.
...
svn-id: r43824
2009-08-30 14:53:58 +00:00
Filippos Karapetis
af2668145a
- Removed the unused selectors "prevSignal", "who" and "distance" from the quick access selector array
...
- Added the "motionCue" and "egoMoveSpeed" selectors to the selector array, to limit the places where findSelector() is used only in debugging functions
- Reordered the selector initialization in mapSelectors(), so that their order matches the order found in vocab.997
svn-id: r43779
2009-08-28 10:13:03 +00:00
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