Commit Graph

43727 Commits

Author SHA1 Message Date
Filippos Karapetis
90d58cf487 SAGA: Rewrote the MacBinary resource loading code
This simplifies the overall code and makes it easier to understand. Also, a bug with the
speech in the MacBinary packed version has been corrected, so there are no more clicking
sounds before each sample.
The Common::MacResMan code isn't really useful here, since it doesn't expose the offsets
and sizes of the actual files, which is what is needed in SAGA.

svn-id: r55674
2011-01-31 10:46:52 +00:00
David Turner
a256b74e0a TEENAGENT: Further Memory Leak Fixes.
svn-id: r55673
2011-01-31 08:51:37 +00:00
David Turner
c11fdabab9 TEENAGENT: Fix Memory Leaks.
svn-id: r55672
2011-01-31 07:44:40 +00:00
David Turner
9573b1d2f5 TINSEL: Memory Leak Fix in Coroutines.
This fixes the leak from the COR0_BEGIN_CODE macro's CoroContextTag allocation.
Setting the _sleep value to negative values prevented the deallocation of these.
Have tested for obvious regressions, but a full DW/DW2 playtest should be done to confirm that this doesn't cause any issues.
Thanks to fingolfin for indicating this solution.

svn-id: r55671
2011-01-30 23:21:40 +00:00
Arnaud Boutonné
785f1776c4 HUGO: Fix warning reported by GCC
svn-id: r55670
2011-01-30 23:19:30 +00:00
Arnaud Boutonné
a07d37d3a5 HUGO:
- Replace several char* by Common::String
- Fix a bug in showDosInventory()

svn-id: r55669
2011-01-30 23:08:05 +00:00
Alyssa Milburn
c7808b9091 MOHAWK: Handle kLBAnimOpSetTempoDiv better.
svn-id: r55668
2011-01-30 22:42:37 +00:00
Filippos Karapetis
b7362876dd SWORD25: Disabled the video save/load code, and made it error out instead.
Videos are never saved or loaded, thus when this happens, it probably indicates a game bug
or a corrupted saved game

svn-id: r55667
2011-01-30 21:00:23 +00:00
Filippos Karapetis
d4e1260b7e SWORD25: Some optimizations to the Theora decoder
- Optimized and cleaned up translateYUVtoRGBA()
- Disabled a lot of seeking-related functionality
- Replaced some calloc() calls, used for audio buffer creation with malloc()

svn-id: r55666
2011-01-30 20:39:02 +00:00
Bastien Bouclet
77d2110101 MOHAWK: Implement Stoneship telescope
svn-id: r55665
2011-01-30 20:37:59 +00:00
Filippos Karapetis
9d6e398e74 SWORD25: Added alternative code for video frame blitting (currently disabled)
svn-id: r55664
2011-01-30 20:36:17 +00:00
Filippos Karapetis
2e42c2d11d SWORD25: Some translations, and a bugfix. Disabled a hack.
Translated some comments, and pushed the indirect rendering define to the header
file, so that the engine won't try and update the screen with direct movie rendering.
Also, the thumbnail hack has been disabled, as it doesn't really work (at least not for
me: all the thumbnails are gray)

svn-id: r55663
2011-01-30 20:34:47 +00:00
Sylvain Dupont
5257d91e99 TOON: Fixes two movie issues
- Can't skip the videos with left button anymore, now the Nefarius video on the
TV is played normally and not skipped.
- Last video playback 2x too big in height.

svn-id: r55662
2011-01-30 20:21:45 +00:00
Johannes Schickel
867c0d9645 COMMON: Add an erase method which takes an iterator to HashMap.
Currently there is no iterator returned from this method, to have some
similarity to associative containers of the STL.

I also "added" one unit test for this method, which is basically just
a copy of the HashMap::erase(const Key &) test with the required adaptions.

svn-id: r55661
2011-01-30 17:28:35 +00:00
David Turner
ec885e5665 SCUMM: Fix Valgrind mismatched delete errors in SMUSH channel base class.
This was due to the SMUSH channel base class using new/delete to manage buffer, but the imuse_channel and saud_channel classes which subclass and override this using malloc/free.
The more C++ solution of moving all to new/delete was tried, but the buffer is passed into a MemoryReadStream and free()'d there, so all classes have been moved to malloc/free instead.
This is not a critical problem as the buffers are byte primitive type anyway.

svn-id: r55660
2011-01-30 16:50:55 +00:00
David Turner
b644c6d466 SCUMM: Remove direct usage of OSystem quit() function in SCUMM engine code.
This would cause leaks, but occurs in development code only.

svn-id: r55659
2011-01-30 14:53:47 +00:00
David Turner
7d5dcc2a0a SWORD1: Fix possible uninitialized memory read in Screen object.
This was detected during playtest with Valgrind during Act 5 (Spain).

svn-id: r55658
2011-01-30 14:41:27 +00:00
Bastien Bouclet
0b69b6a842 MOHAWK: Myst, pass the playback direction from the calling script to the movie player.
svn-id: r55657
2011-01-30 13:54:39 +00:00
Bastien Bouclet
b43fae5c18 MOHAWK: Myst, display a warning when trying to play a movie backwards.
svn-id: r55656
2011-01-30 13:44:01 +00:00
Sylvain Dupont
3cd1ac9ca6 TOON: Add coordinates clamping for safety
In some rare cases, Drew position is outside the valid area. 
Made sure it does not crash in these cases.

svn-id: r55655
2011-01-30 13:31:13 +00:00
Sven Hesse
f8d61c9e55 GOB: Work around the unimplemented copyFile :P
svn-id: r55654
2011-01-30 13:14:54 +00:00
Sven Hesse
c88ee19478 GOB: Stub some Adibou mult stuff
svn-id: r55653
2011-01-30 13:14:32 +00:00
Bastien Bouclet
a95f69c502 MOHAWK: Implement Stoneship cloud orbs
svn-id: r55652
2011-01-30 12:33:39 +00:00
Arnaud Boutonné
aba8451744 HUGO: Fix a crash in maze and a bug in lineHandler()
svn-id: r55651
2011-01-30 07:53:44 +00:00
Sylvain Dupont
5934ccd184 TOON: Fix the last known z-order issues
Rewrote the Z-order management, it's now very close to the original code

svn-id: r55650
2011-01-30 02:18:53 +00:00
Sylvain Dupont
01c32f7287 TOON: More Drew visibility fixes
In the castle, Drew disappeared if you clicked twice on the closed door.

svn-id: r55649
2011-01-30 00:44:51 +00:00
Sven Hesse
fc59e0b6b3 GOB: Add o7_playVmdOrMusic
svn-id: r55648
2011-01-30 00:04:04 +00:00
Sven Hesse
e4a9cafab8 GOB: Add a sanity check to the copyFile stub
svn-id: r55647
2011-01-30 00:03:35 +00:00
Sven Hesse
4588d4cc97 GOB: Add Inter_Playtoons::readSprite()
svn-id: r55646
2011-01-30 00:03:12 +00:00
Sven Hesse
c498d70dd2 GOB: Change SPRITES_COUNT into a const
svn-id: r55645
2011-01-30 00:02:42 +00:00
Sven Hesse
0793e5c0a3 GOB: Adibou has background atmosphere
svn-id: r55644
2011-01-30 00:02:14 +00:00
Sven Hesse
d635c7b950 GOB: Fix Inter_v6::probe16bitMusic()
svn-id: r55643
2011-01-30 00:01:43 +00:00
Arnaud Boutonné
98e329bbd1 HUGO: Cleanup drawRectangle() and keyHandler()
svn-id: r55642
2011-01-29 23:05:12 +00:00
Sylvain Dupont
9c17cedd40 TOON: Bug #3124518 with disappearing inventory items fixed
Bug #3124518: "TOON: loss of inventory items in Bricabrac's machine room"
Was caused by recursive walkTo that were not canceling out.

svn-id: r55641
2011-01-29 23:03:08 +00:00
Sven Hesse
4e66280388 GOB: Implement o7_loadFunctions and o7_callFunction
svn-id: r55640
2011-01-29 22:50:41 +00:00
Sven Hesse
078162c665 GOB: Add setExtension()
svn-id: r55639
2011-01-29 22:50:11 +00:00
Sven Hesse
ec288c0603 GOB: Rename loadGroups/callGroup to loadFunctions/callFunctions
svn-id: r55638
2011-01-29 22:49:40 +00:00
Sven Hesse
993a543432 GOB: Add Inter_Playtoons::getFile()
svn-id: r55637
2011-01-29 22:49:15 +00:00
Sven Hesse
ffc4af820f GOB: _environments doesn't need to be a pointer
svn-id: r55636
2011-01-29 22:48:44 +00:00
Sven Hesse
d2c9893327 GOB: Remove the long obsolete inter_execPtr
svn-id: r55635
2011-01-29 22:48:18 +00:00
Sven Hesse
65bc46d3ab GOB: Add Script::evalInt() and Script::evalString()
svn-id: r55634
2011-01-29 22:47:53 +00:00
Sven Hesse
40bf0286a1 GOB: Rename Script::evalBoolResult() to Script::evalBool()
svn-id: r55633
2011-01-29 22:47:14 +00:00
Sven Hesse
b54416b46e GOB: Stub o7_loadGroups
svn-id: r55632
2011-01-29 22:46:41 +00:00
Sven Hesse
9b9c34a378 GOB: o7_draw0x59 is o7_callGroup
svn-id: r55631
2011-01-29 22:46:16 +00:00
Sven Hesse
ce3d4b5d1b GOB: Add GobEngine::isCurrentTot()
svn-id: r55630
2011-01-29 22:45:51 +00:00
Sven Hesse
0c3a33c354 GOB: Change _curTotFile and _totToLoad into Common::String
svn-id: r55629
2011-01-29 22:45:15 +00:00
Sven Hesse
05d5d64d6c GOB: Rename "skipPlay" to "function" in playTot
svn-id: r55628
2011-01-29 22:44:36 +00:00
Sven Hesse
14678f059b GOB: Move OpcodeFunc's return flag into its parameter
To make the meaning of the flag more clear and make the func
opcodes more similar to draw and gob opcodes.

svn-id: r55627
2011-01-29 22:44:06 +00:00
Sylvain Dupont
c450ac28e9 TOON: Add workarounds in transformed barn scene
Drew does not disappear anymore in the barn when filling his can.
Slowed down the talk animations a bit

svn-id: r55626
2011-01-29 22:15:57 +00:00
Sylvain Dupont
7765c24558 TOON: Fix some palette issues
- In fade out when leaving certain rooms
- When loading a game in a cutaway/closeup state

svn-id: r55625
2011-01-29 20:59:46 +00:00