Filippos Karapetis
8dd7537a55
A first attempt at channel remapping (currently disabled)
...
svn-id: r49416
2010-06-03 22:13:23 +00:00
Filippos Karapetis
ddf7449b00
Added code to get which channels are used by a sound. Also, fixed a crash when using Sierra's GM patches, a regression from commit #49391 .
...
svn-id: r49415
2010-06-03 22:00:50 +00:00
Filippos Karapetis
1973bd5a71
Added channel remapping to MidiParser_SCI (currently unused)
...
svn-id: r49414
2010-06-03 21:57:49 +00:00
Filippos Karapetis
576306c323
Re-enabled the cursor position limiting code
...
svn-id: r49413
2010-06-03 21:52:21 +00:00
Filippos Karapetis
7f0b0a83ed
Fixed crashing with wave file patches, a regression from commit #49391
...
svn-id: r49411
2010-06-03 20:42:06 +00:00
Filippos Karapetis
2ae4c5796b
The setCursor selector is no longer used for the detection of the kSetCursor() kernel function semantics
...
svn-id: r49408
2010-06-03 10:44:50 +00:00
Filippos Karapetis
f1af6bad6d
Fixed compilation
...
svn-id: r49407
2010-06-03 10:26:51 +00:00
Filippos Karapetis
86b452d36c
Moved several object-related defines inside vm.h into segment.h, where the Object class resides. Also, removed several unused defines
...
svn-id: r49406
2010-06-03 10:16:21 +00:00
Filippos Karapetis
c4bdca72d7
Fixed regression from commit #49332 (merging of the SCI0 and SCI11 relocate functions, where the SCI0 equivalent had a +1 count): it seems that we should skip over zero exports, however the total number of valid exports remains the same. Fixes KQ5 and QFG2. This also fixes the relocation calculation of script 71 in SQ3, so remove the comment that the script has broken relocation entries
...
svn-id: r49394
2010-06-02 15:31:20 +00:00
Filippos Karapetis
af3fec8c26
- Fixed findGameObject() to properly handle SCI0-SCI1 games where the first block of script 0 isn't the exports block
...
- Changed many places where Common::File is used directly to use Common::SeekableReadStream instead (in order to ultimately remove the SCI_detection hack in the fallback detector)
svn-id: r49391
2010-06-02 13:17:36 +00:00
Matthew Hoops
4493080220
If we can't find the game object or game ID in fallback detection, break out instead of assuming the script is there. Fixes a segfault when detecting an LSCI game.
...
svn-id: r49389
2010-06-02 02:55:55 +00:00
Max Horn
24673b9ee9
Fix warning
...
svn-id: r49386
2010-06-02 00:20:52 +00:00
Filippos Karapetis
a6efbf8880
Fixed the detection of SCI2.1 games in the fallback detector
...
svn-id: r49382
2010-06-01 22:06:52 +00:00
Filippos Karapetis
95001e3676
Add support for SCI2.1 resource patches to the fallback detector
...
svn-id: r49380
2010-06-01 20:37:55 +00:00
Filippos Karapetis
65f3cfcbd8
Stop reconstructing the engine state when restoring, but reset it instead
...
svn-id: r49376
2010-06-01 15:48:17 +00:00
Max Horn
1f54cdf90d
SCI: Fix malloc<->new mismatch in SysStrings, try to increase readability
...
svn-id: r49375
2010-06-01 15:38:34 +00:00
Filippos Karapetis
9c92bd1b81
The parser vocabulary remains static throughout the game, thus it has been removed from the engine state
...
svn-id: r49373
2010-06-01 15:11:20 +00:00
Filippos Karapetis
e083c20da1
The system strings segment is a fixed segment of the segment manager, which doesn't change during the game, thus move all the system strings code and variables inside the segment manager
...
svn-id: r49372
2010-06-01 14:41:48 +00:00
Filippos Karapetis
25fb93465d
Added a new console command, verify_scripts, used for sanity checking of SCI1.1-SCI2.1 game scripts
...
svn-id: r49364
2010-05-31 22:57:05 +00:00
Filippos Karapetis
844ef9ba1a
Merged all the script relocation code inside script_instantiate(), and changed the warning when reading an invalid species into an error (as it's severe, and if it happens it means something is seriously wrong)
...
svn-id: r49361
2010-05-31 18:35:13 +00:00
Filippos Karapetis
de2e935b2c
Wrote the initialization code for the exports and synonyms table to make more sense and fixed a bug with the initialization of the synonyms pointer, introduced with rev #49336
...
svn-id: r49360
2010-05-31 18:31:37 +00:00
Martin Kiewitz
753fdd6c12
SCI: break on anything, warn on anything but spaces in kReadNumber
...
svn-id: r49355
2010-05-31 13:52:07 +00:00
Filippos Karapetis
b5a2e3c758
Fixed operator precedence warning
...
svn-id: r49353
2010-05-31 12:43:28 +00:00
Filippos Karapetis
ba11596572
SCI: Silenced warning when no audio decoder is compiled in
...
svn-id: r49351
2010-05-31 12:36:42 +00:00
Filippos Karapetis
cc025ace18
The code that loads saved game from the launcher
...
can now load SCI2 saved games. Added an explanation
why the injected call is necessary
svn-id: r49349
2010-05-31 12:13:50 +00:00
Martin Kiewitz
a963917e89
SCI: added TODO at kReadNumber space code
...
svn-id: r49348
2010-05-31 12:11:42 +00:00
Filippos Karapetis
3f4302214c
The save/load object init code is now unified with the regular object init code
...
svn-id: r49346
2010-05-31 11:25:59 +00:00
Martin Kiewitz
9d50dac101
SCI: skip spaces in kReadNumber - this happens in lsl3 intro
...
svn-id: r49345
2010-05-31 09:31:05 +00:00
Martin Kiewitz
7001d3e615
SCI: when getting invalid chars in kReadNumber don't error() out, but create a warning - we get invalid chars in the intro of lsl5, cause currently unknown
...
svn-id: r49344
2010-05-31 09:21:15 +00:00
Filippos Karapetis
66d4bddb30
Merged several script instantiation-related functions inside script_instantiate()
...
svn-id: r49343
2010-05-31 08:11:49 +00:00
Filippos Karapetis
05357d0f2a
Cleanup
...
svn-id: r49342
2010-05-31 07:34:18 +00:00
Filippos Karapetis
693618d89a
Slight cleanup
...
svn-id: r49339
2010-05-31 00:04:38 +00:00
Filippos Karapetis
50cd1d1da4
Limited access to the script export table and synonyms block
...
svn-id: r49338
2010-05-30 23:31:33 +00:00
Max Horn
4e25867a67
SCI: Merge setLockers(1) call into Script::init
...
svn-id: r49337
2010-05-30 23:00:32 +00:00
Filippos Karapetis
a0ee93ece5
SCI: Script exports and synonyms are now initialized when a script is loaded. Removed a sanity check inside script_instantiate_sci0 for a bug which no longer exists
...
svn-id: r49336
2010-05-30 21:49:07 +00:00
Filippos Karapetis
3b96e4833e
Cleanup
...
svn-id: r49334
2010-05-30 20:30:07 +00:00
Filippos Karapetis
1fd3877ec7
Cleanup
...
svn-id: r49333
2010-05-30 20:18:42 +00:00
Filippos Karapetis
dc4d61f718
- Merged the SCI0 scriptRelocate() and SCI11 heapRelocate() functions inside relocate(). scriptRelocate checked one more relocation entry, which seems wrong, so we're now checking for the correct number of relocations in all SCI versions
...
- Re-added the error when script + heap exceed 64KB (better than an assert) - this should theoretically never happen, and it never has for the games tested
- Removed the relocated sanity check - again, it shouldn't occur (else something else is wrong)
svn-id: r49332
2010-05-30 20:06:50 +00:00
Filippos Karapetis
9c2da78ba9
kScriptID can be used to load scripts with no exports. Don't throw warnings in this case if no export is requested, as it's perfectly normal behavior
...
svn-id: r49331
2010-05-30 20:01:25 +00:00
Filippos Karapetis
016862ac3a
Moved setScriptSize() inside Script::init(), and removed a FIXME - the SCI1.1 word-align is done inside Script::init()
...
svn-id: r49330
2010-05-30 18:45:07 +00:00
Filippos Karapetis
29c2f30558
Unified the script loading code, and marked an issue with the SCI11 heap addresses
...
svn-id: r49329
2010-05-30 17:02:21 +00:00
Filippos Karapetis
5cdb13b3e8
Made load_script() a member of the Script class
...
svn-id: r49328
2010-05-30 16:38:08 +00:00
Filippos Karapetis
c32e88fe0b
Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
...
svn-id: r49327
2010-05-30 16:14:31 +00:00
Filippos Karapetis
0276ec835e
Fixed findGameObject() for SCI11 games
...
svn-id: r49326
2010-05-30 15:17:29 +00:00
Lars Skovlund
dbe561c59b
Clarify reasoning behind hack in Script::scriptRelocate()
...
svn-id: r49320
2010-05-30 10:27:39 +00:00
Filippos Karapetis
5f2ff0b1e7
Limit access to the _classTable array (now it's directly accessible only inside saveLoadWithSerializer()
...
svn-id: r49318
2010-05-29 23:56:37 +00:00
Filippos Karapetis
67de5b1bd3
Mass renaming of selector-related functions, and removed some defines which were just cloaking functions with a different name
...
- GET_SEL32 -> readSelector
- GET_SEL32V -> readSelectorValue
- PUT_SEL32 -> writeSelector
- PUT_SEL32V -> writeSelectorValue
Also, changed some selector-related function names and variables to CamelCase
svn-id: r49317
2010-05-29 23:37:15 +00:00
Max Horn
4ecacdad16
SCI: Merge Script::relocateBlock and Object::relocate
...
The shared code now resides in a new static function named
relocateBlock, which is invoked by the two methods.
svn-id: r49316
2010-05-29 23:09:00 +00:00
Max Horn
42d6ed880b
SCI: Make Script::_exportTable const (yay :-)
...
svn-id: r49315
2010-05-29 21:42:42 +00:00
Filippos Karapetis
d3bcb10861
Cleanup
...
svn-id: r49312
2010-05-29 15:47:28 +00:00