Commit Graph

15875 Commits

Author SHA1 Message Date
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
Matthew Hoops
e13abd77e9 Add md5's for Myst ME and Riven DVD French.
svn-id: r49335
2010-05-30 21:44:26 +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
Filippos Karapetis
a6156a6805 Removed the scriptRelocateExportsSci11() hack. The open spell in QFG1VGA works now (thanks to waltervn for all his help on this)
svn-id: r49311
2010-05-29 15:29:27 +00:00
Filippos Karapetis
3d09af0377 Removed the hack inside findGameObject(), and replaced it with code from the segment manager, till we find out why the segment is sometimes off by 1 (note that findGameObject() works fine for finding the game ID itself)
svn-id: r49310
2010-05-29 15:27:27 +00:00
Filippos Karapetis
708b37898c Fixed regression in SCI2-SCI21 games from commit 49308
svn-id: r49309
2010-05-29 15:01:33 +00:00
Filippos Karapetis
6f056c6c98 Added a method to the resource manager, to limit the places where script exports are accessed, since for SCI11 and newer exports can be functions and objects (first step in removing scriptRelocateExportsSci11(), which is a gross hack and it fails in QFG1VGA)
svn-id: r49308
2010-05-29 14:03:08 +00:00
Torbjörn Andersson
928eafcccf Fixed potential memory leak found by cppcheck. Though I'm guessing that if this
case happens, we may have bigger problems...

svn-id: r49307
2010-05-29 08:14:50 +00:00
Filippos Karapetis
5d21ff280a Silenced some superfluous warnings in KQ5CD
svn-id: r49294
2010-05-28 16:47:30 +00:00
Filippos Karapetis
5b12fda059 Added some more info when severe script errors occur
svn-id: r49293
2010-05-28 12:37:54 +00:00
Filippos Karapetis
b2e4e4b340 Cleaned up detectGfxFunctionsType() slightly, and made it work for Hoyle 1 and 2 properly.
svn-id: r49292
2010-05-28 12:36:47 +00:00
Filippos Karapetis
d9c0abe0b8 Cleanup
svn-id: r49290
2010-05-28 10:53:03 +00:00
Filippos Karapetis
e694b66e4f Added comments to kMergePoly()
svn-id: r49289
2010-05-28 10:52:22 +00:00
Filippos Karapetis
967d9ea308 Added a stub for kMergePoly, to avoid crashing in QFG1VGA after killing a monster
svn-id: r49288
2010-05-28 10:45:20 +00:00
Paul Gilbert
bea6ef4beb Clarified variable usage for sequence list entry indexes
svn-id: r49287
2010-05-28 10:20:02 +00:00
Paul Gilbert
145eacd491 Implemented needed methods for scrolling surfaces horizontally or vertically
svn-id: r49286
2010-05-28 10:17:16 +00:00
Martin Kiewitz
dad3ad86ea SCI: read out vol selector on initSound/playSound for sci1early (soundversion) as well - fixes lsl1demo
svn-id: r49285
2010-05-28 09:29:05 +00:00
Martin Kiewitz
7029b059bf SCI: disabling music fading again, but only for sci32 - drivers seem to have issues when fading in on gk1/sierra logo
svn-id: r49271
2010-05-27 21:20:07 +00:00
Martin Kiewitz
d2513c9cc2 SCI: enabling fading again, issues in pharkas and gk1demo are actually "normal" - maybe we should add some hack workaround, but the delay in ssci was just slow resource loading
svn-id: r49269
2010-05-27 20:53:37 +00:00
Matthew Hoops
a32b7b3851 Fix starting GK1.
svn-id: r49265
2010-05-27 17:47:32 +00:00
Martin Kiewitz
845c34ee45 SCI: removing tab from vo output (debug console)
svn-id: r49264
2010-05-27 17:43:06 +00:00
Martin Kiewitz
453d13dc2d SCI: fixing -propDict- selector on instances to contain -propDict- of the corresponding class - fixes sq4cd/room 381 talk-clicking on robot - thx to waltervn & wjp
svn-id: r49263
2010-05-27 17:41:20 +00:00
Filippos Karapetis
5f5dcbad47 Added an explanation for audio36 and sync36 external patches
svn-id: r49262
2010-05-27 12:00:20 +00:00
Martin Kiewitz
cfed70df07 SCI: fixing resuming samples - fixes hang when ship is flying away happening when you entered menu during that sequence
svn-id: r49261
2010-05-27 11:26:37 +00:00
Filippos Karapetis
e5eaf3ee55 Split all of the audio-related functions of the resource manager in a separate file
svn-id: r49260
2010-05-27 08:09:32 +00:00
Filippos Karapetis
739f551852 Slight formatting, and added a note that audio36 and sync36 resource patches were introduced in SCI2, and didn't exist in SCI0-SCI1.1
svn-id: r49259
2010-05-27 07:50:23 +00:00
Matthew Hoops
99fc5cbfca Add the Mac sync resource type and allow for more than 9 Mac SCI1.1+ data files.
svn-id: r49255
2010-05-27 03:15:24 +00:00
Matthew Hoops
7f678907d7 Add some null checking when pausing/resuming videos.
svn-id: r49254
2010-05-27 02:15:11 +00:00
Filippos Karapetis
2c2a1fa1ba Made _k_new_node() a method of the segment manager, and fixed a bug with the rarely used SCI0 kernel function kSort in the process (_k_new_node was called with key, value instead of value, key inside kSort)
svn-id: r49251
2010-05-26 22:05:51 +00:00
Martin Kiewitz
d35121fc61 SCI: fixing kReadNumber to behave like in sierra sci (non standard atoi implementation) - fixes big door not unlocking in sq4
svn-id: r49250
2010-05-26 20:48:08 +00:00
Max Horn
947edd08c3 Replace SCUMM F5 dialog by GMM & add help button to GMM
The new "Help" button in the GMM is currently only used by SCUMM.
To use it, an engine currently needs to subclass MainMenuDialog.

svn-id: r49249
2010-05-26 19:54:50 +00:00
Max Horn
db475d1501 SCI: More const related changes; remove unnecessary casts which hide const issues
svn-id: r49248
2010-05-26 18:11:17 +00:00
Martin Kiewitz
2fa8ac0575 SCI: adding another workaround for picture 376 in sq4/cd (same issue like originally found in r49216)
svn-id: r49247
2010-05-26 17:15:49 +00:00
Max Horn
0197e9f6a1 SCI: Making various object and script related things const
svn-id: r49246
2010-05-26 16:30:10 +00:00
Max Horn
7b8837cda7 SCI: Simplify appending string 'seeker' to sierraId
svn-id: r49244
2010-05-26 15:41:50 +00:00