42650 Commits

Author SHA1 Message Date
Max Horn
9531b7766c PS2: Fix use of Ps2File::_sema w/o __PS2_FILE_SEMA__ guard
svn-id: r54343
2010-11-18 20:24:27 +00:00
Max Horn
d6592aaba6 M4: Do not use Common::SubReadStream where ReadStream suffices
svn-id: r54342
2010-11-18 19:27:01 +00:00
Filippos Karapetis
49468fdfff SCI3: Added another previously unused opcode (0x27 / 0x4e)
svn-id: r54341
2010-11-18 19:20:30 +00:00
Filippos Karapetis
c2bdba2ea6 SCI2: Treat SCI2 raw arrays (type 3) as strings in kArray
SCI2 strings inherit from arrays, plus kArray and kString are almost the
same, so this is all possible. This is needed, as SCI scripts copy 
strings on arrays and then process them as such (e.g. in RAMA and LSL7)
However, we really need to merge SCI2 array types with the SCI2 string
types, and ultimately merge the code with the SCI1 array and string types.

svn-id: r54340
2010-11-18 19:18:11 +00:00
Johannes Schickel
e1030e53a5 BACKENDS: Implement logging API proposed by Max on -devel.
This commits a slightly modified patch from my patch tracker item #3104630
"OSYSTEM: Add logging API as proposed by Max on -devel".

I was not able to test compilation on Android and SamsungTV, since there is no
toolchain for those on buildbot (or I was too blind to find them).

svn-id: r54339
2010-11-18 19:12:14 +00:00
Matthew Hoops
411866ee18 MOHAWK: Cleanup bitmap surface and pack/draw function handling
svn-id: r54338
2010-11-18 19:06:38 +00:00
Johannes Schickel
8cd20c70a9 GUI: Simplify Tooltip implementation.
Formerly there was much special handling for the Tooltip dialog in
GuiManager::runLoop. This was replaced by overloading the event handling
functions in Tooltip. Also the Tooltip was adapted to be run like every
other normal dialog.

svn-id: r54337
2010-11-18 18:17:00 +00:00
Max Horn
a9dcb11c54 COMMON: Turn BufferedWriteStream into a template class, with disposeParentStream as param
svn-id: r54336
2010-11-18 17:56:21 +00:00
Max Horn
c02a233084 DS: Add note that ARM_ADPCM is unused (and fix a typo)
svn-id: r54335
2010-11-18 17:45:07 +00:00
Max Horn
7444a06c61 DS: cleanup
svn-id: r54334
2010-11-18 17:42:28 +00:00
Lars Skovlund
487feb3843 Get rid of a const_cast.
svn-id: r54333
2010-11-18 17:38:56 +00:00
Max Horn
316ba2e6a9 DS: Replace GBAMPSaveFile by DSFileStream + wrapBufferedWriteStream
svn-id: r54332
2010-11-18 17:31:12 +00:00
Max Horn
b8995eadfc DS: Remove write buffering in DSFileStream, use wrapBufferedWriteStream instead
svn-id: r54331
2010-11-18 17:30:00 +00:00
Johannes Schickel
b593b15c50 SCI: Slight formatting fix.
svn-id: r54330
2010-11-18 17:25:09 +00:00
Max Horn
24f4d97901 DS: Avoid needlessly allocating temporary Common::String instances
svn-id: r54329
2010-11-18 17:15:35 +00:00
Lars Skovlund
0001a6b74d SCI3: implement setInfoSelector() for SCI3, fixes infinite recursion
svn-id: r54328
2010-11-18 17:13:01 +00:00
Lars Skovlund
c5252071db SCI3: Add proper support for the calle instruction
svn-id: r54327
2010-11-18 17:04:00 +00:00
Max Horn
152e52d015 COMMON: Make implementation of Buffered*Stream classes internal
svn-id: r54326
2010-11-18 17:02:51 +00:00
Max Horn
b8f0026739 DS: Port changes from 1.2.0 branch to trunk
svn-id: r54325
2010-11-18 17:01:30 +00:00
Lars Skovlund
1621e7d5c0 Fix operator precedence problem
svn-id: r54324
2010-11-18 16:58:25 +00:00
Max Horn
a008d14055 ENGINES: Do not use MemoryReadStream where (Seekable)ReadStream suffices; avoid using 'using'
svn-id: r54323
2010-11-18 16:38:03 +00:00
Max Horn
4707b610fc COMMON: Fix incorrect use of assert() macro
The assert() macro may be compiled to be empty. In that case, its
arguments are *NOT* evaluated. Hence, things like
  assert(doSomething())
must not be used whenever doSomething() has important side effects.

Also document BufferedWriteStream::flushBuffer() and explain why it
exists parallel to BufferedWriteStream::flush().

svn-id: r54322
2010-11-18 16:08:56 +00:00
Max Horn
bac018a3aa DS: Two more 'FILE' related fixes/workarounds
svn-id: r54321
2010-11-18 15:42:52 +00:00
Matthew Hoops
ffc6ed643f MOHAWK: Remove unused drawRLE() function
svn-id: r54320
2010-11-18 13:48:49 +00:00
Matthew Hoops
48416a7f03 MOHAWK: Implement the old Mohawk bitmap format (thanks to fuzzie)
svn-id: r54319
2010-11-18 13:31:12 +00:00
Max Horn
51a954c1dd DS: Add some FIXME/TODO comments on changes that need to be applied to the DS backend
svn-id: r54318
2010-11-18 13:17:25 +00:00
Max Horn
16d9e0f14a DS: Fix compilation despite use of 'forbidden' symbols
svn-id: r54317
2010-11-18 13:13:48 +00:00
Yotam Barnoy
50e6fe264b PSP: reduced fragmentation by allocating overlay just once
svn-id: r54316
2010-11-18 11:32:53 +00:00
Yotam Barnoy
dde4f2211c MAIN: initialized more singletons early to prevent fragmentation.
svn-id: r54315
2010-11-18 11:31:46 +00:00
Max Horn
785dd683e1 TOOLS: Do not copy SCUMM MD5 data to web SVN module anymore
svn-id: r54314
2010-11-18 10:15:33 +00:00
Yotam Barnoy
5c8b4dbee7 PSP: added backtracing function for debugging
Currently not used by anything.

svn-id: r54312
2010-11-18 07:52:04 +00:00
Yotam Barnoy
b77ef177ed GUI: changed tooltip to be deleted when inactive
Before, it could be instantiated after an engine loaded and then was never deleted, causing memory fragmentation. Also removed inner tooltip call to the GuiManager runloop, which makes the logic simpler since the tooltip is a bit of a hack. I had to remove it because deleting _tooltip in the inner loop (called from tooltip itself) is trouble.

svn-id: r54311
2010-11-18 07:17:53 +00:00
Yotam Barnoy
3631a5f90b MAIN: added early call to getAudioCdManager to prevent late allocation
This reduces fragmentation.

svn-id: r54310
2010-11-18 07:17:28 +00:00
Matthew Hoops
d971396572 MOHAWK: Cleanup Myst script handling
Scripts are now loaded from a central place and are properly freed at the correct time. This fixes a regression from r54152.

svn-id: r54309
2010-11-18 05:47:16 +00:00
Julien Templier
8ebee136b6 TOOLS: Update create_msvc batch files
- Add support for /clean switch to remove all created files
 - Add switches for generating stable & all engines
 - Add command line help
 - Properly initialize answer variables to default choice

svn-id: r54308
2010-11-18 01:29:44 +00:00
Filippos Karapetis
34c18f20d8 SCI: Added hacks in kClone/kDisposeClone for SCI3
svn-id: r54307
2010-11-17 21:49:19 +00:00
Filippos Karapetis
bd844a8c92 SCI: Call lookupArray() after allocateArray() when duplicating arrays
This ensures that the pointer to the element that lookupArray() returned
won't be invalidated in case the array is reallocated because of
allocateArray() - same issue as in kClone()

svn-id: r54306
2010-11-17 21:47:05 +00:00
Filippos Karapetis
ddbda3eb15 SCI: Code formatting
svn-id: r54305
2010-11-17 20:50:24 +00:00
Filippos Karapetis
ba6de1bcdf SCI: Added sanity checks for SCI3 scripts bigger than 64KB
- Extended the "verify_scripts" console command for SCI3 scripts
- Added a check for such large scripts when scripts are loaded, with
an error for now, till a mechanism to support such scripts with a
16-bit addressing scheme is in place (e.g. overlaying, or splitting
scripts). Either way, such scripts should span over more than one segment

svn-id: r54304
2010-11-17 20:46:59 +00:00
Lars Skovlund
8a6efcac65 SCI3: Implement opcode to retrieve the info selector.
svn-id: r54303
2010-11-17 20:43:51 +00:00
Lars Skovlund
e551f3bf33 SCI3: Handle script exports correctly
svn-id: r54302
2010-11-17 20:37:13 +00:00
Lars Skovlund
5ab823b16a SCI3: relocate operand of the lofsa opcode
svn-id: r54301
2010-11-17 20:29:10 +00:00
Matthew Hoops
ecb42156ce MOHAWK: Cache the Myst screen buffer
This is needed for use with sliders. The screen is now updated fewer times as well.

svn-id: r54300
2010-11-17 19:58:19 +00:00
David Turner
84a753d840 CRUISE: Corrected uninit read of _polyStruct in ctp.cpp:49 detected by Valgrind.
This occurred during intro playback and was due to _polyStruct not being initialised to NULL during engine construction/initialisation.

svn-id: r54299
2010-11-17 19:29:07 +00:00
Filippos Karapetis
61e02f0570 SCI: Fixed the speed in the intro of PQ2, version 1.002.011 (bug #3102071)
In version 1.002.011, global 3, used for timing, is incorrectly initialized
to 0, whereas it should be 6 (like in other versions). Initializing it to
the correct value fixes the speed in the intro. This has been based on the
patch for that version by NewRisingSun(NRS) / Belzorash

svn-id: r54298
2010-11-17 18:46:29 +00:00
Matthew Hoops
4e445b9467 MOHAWK: Apply patch #2988976: "MYST: Fix drawing partial subimages"
svn-id: r54297
2010-11-17 18:22:22 +00:00
Lars Skovlund
e086ef0096 Adapt SCI property instructions (pToa etc.) to SCI3
svn-id: r54296
2010-11-17 17:21:02 +00:00
Filippos Karapetis
430df91076 SCI1.1 and newer games always ignore move count. The "version" command works now in SCI3
svn-id: r54295
2010-11-17 15:02:58 +00:00
Filippos Karapetis
e55a55a277 SCI: Remove key modifier (e.g. num lock) status for keyboard function keys. This fixes function key input (e.g. F3) when num lock is on
svn-id: r54294
2010-11-17 14:48:28 +00:00
Filippos Karapetis
47e137fd8e SCI: lofsa/lofss functionality for SCI3
- Updated detectLofsType() for SCI3
- Cleaned up op_lofsa and op_lofss and updated them for SCI3

svn-id: r54293
2010-11-17 14:28:32 +00:00