Johannes Schickel
8ef5d55edb
Fix gcc warning about an comparison which is always false due to data type range.
...
svn-id: r49484
2010-06-07 13:47:14 +00:00
Matthew Hoops
d5b5a8dbae
Allow for the other audio36 patch naming schemes (Mac and some Torin ones).
...
svn-id: r49482
2010-06-07 11:44:52 +00:00
Filippos Karapetis
43ec405ffe
Some initial code for audio36 and sync36 patch support
...
svn-id: r49477
2010-06-07 09:10:22 +00:00
Walter van Niftrik
d30d57b923
SCI: Relax signature of kCreateTextBitmap.
...
svn-id: r49470
2010-06-07 02:11:19 +00:00
Walter van Niftrik
b04535d487
SCI: Adjust kGetSaveFiles for SCI32.
...
svn-id: r49469
2010-06-07 02:11:01 +00:00
Matthew Hoops
1e56ea9ac9
Change some kString subops to use the raw string directly instead of through a Common::String. Fixes usage with strings from kGetSaveFiles().
...
svn-id: r49468
2010-06-07 01:43:35 +00:00
Filippos Karapetis
3c82b6578f
Now that EngineState is not deleted when loading games, we can move some more state-related variables to it, and remove several FIXME's about non-const global variables. Also, the entries in the data stack are now deleted when loading (fixes a memory leak - thanks to digitall for this).
...
svn-id: r49465
2010-06-06 23:00:33 +00:00
Matthew Hoops
51a8978455
Throw a warning in kString(At) if the index is out-of-bounds instead of having it assert out.
...
svn-id: r49464
2010-06-06 22:44:14 +00:00
Filippos Karapetis
43c353d930
Now opening all files via getVolumeFile()
...
svn-id: r49451
2010-06-06 13:04:24 +00:00
Filippos Karapetis
abcd8e093a
Replaced a leftover Common::File::exists() call in the fallback detector
...
svn-id: r49443
2010-06-05 19:55:03 +00:00
Filippos Karapetis
c00d645506
Fixed the cursor limiting code in GK1
...
svn-id: r49440
2010-06-05 18:15:41 +00:00
Filippos Karapetis
e9f35fbf4c
Rewrote the remaining parts of the ResourceManager class to work with file streams, thus removing the SCI_detection hack in the fallback detector
...
svn-id: r49438
2010-06-05 14:09:52 +00:00
David Turner
8b102ab7af
SCI: Fix for Valgrind Warning in Palette.
...
svn-id: r49433
2010-06-04 20:06:59 +00:00
Filippos Karapetis
722c4f1b8d
Some more work on channel remapping: Moved the remapping code to the music loading code (still disabled)
...
svn-id: r49430
2010-06-04 15:01:26 +00:00
Filippos Karapetis
fdc9bbcbf5
Simplified the channel monitoring code inside the SoundResource class
...
svn-id: r49429
2010-06-04 14:53:12 +00:00
Walter van Niftrik
997fdac427
SCI: Replace strncpy with Common::strlcpy
...
svn-id: r49425
2010-06-04 10:51:27 +00:00
Walter van Niftrik
a8acf7468c
SCI: Add savegame version check in CheckSaveGame
...
svn-id: r49424
2010-06-04 10:36:49 +00:00
Walter van Niftrik
f1a55a9c67
SCI: Cleanup
...
svn-id: r49423
2010-06-04 10:15:13 +00:00
Johannes Schickel
664c86f25d
Replace two uses of ::qsort by Common::sort.
...
svn-id: r49418
2010-06-03 23:37:05 +00:00
Johannes Schickel
02ed1a684a
- Made some methods const
...
- Prefer const_iterator over iterator in SciMusic::findUsedChannels
svn-id: r49417
2010-06-03 23:07:53 +00:00
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