Commit Graph
83 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Coen Rampen 36d395b2d1 CGE2: Stop current SFX before loading a new one
When loading a sound effect, the engine would deallocate the memory for the
currently playing sound effect, and stop playback afterwards. This commit
changes this to stop playback first, and then deallocate and load the new
sound effect.

This should fix the problem with the mixer accessing deallocated memory
reported in issue #12852.
2021-08-31 23:31:54 +02:00
taylorzhancher d3dd051e91 CGE2: Adding TTS feature 2021-07-26 12:35:27 +01:00
Thierry Crozat fc024141b7 CGE2: Fix heap buffer overflow
This was reported by address-sanitizer.
When the command is kCmdGhost, the Sprite pointer is not a valid
sprite, and trying to access its content causes a buffer overflow.
In normal usage it was not causing issues as while it reads some
random values in memory, this was then ignore.
2021-07-21 22:30:37 +01:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Tomasz Długosz eaab877d66 JANITORIAL: fix the name of original author of cge and cge2
The first name is Janusz, not Janus.
The correct name was used in AUTHORS and credits.
In case of doubts, see his personal webpage: https://www.jbw.pl/ - name is in the page footer
2020-04-18 20:59:57 +02:00
D G Turner f39a9b5563 CGE2: Add Script Workaround for Clothes Horse Carpet Bug.
This now allows the Carpet to be placed and removed from the Clothes
Horse repeatedly, thus avoiding the dead-end when you do not beat the
Carpet with the Racket on first attempt.

This is bug Trac #6842.
2018-10-09 18:07:59 +01:00
Colin Snover a5bc89102e ALL: Remove obsolete register keyword
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so
cannot exist in a well-formed C++17 program.

It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html>
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>.

The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.

Closes gh-1079.
2017-12-03 20:27:42 -06:00
Filippos Karapetis c76c72c799 CGE2: Remove trailing whitespace 2014-10-28 16:06:07 +02:00
uruk 601918c917 CGE2: Fix bug #6733.
The problem was that the engine used the SFX volume for later parts of speeches longer than one sound file.
2014-10-10 15:02:29 +02:00
uruk 3e8041d54b CGE2: Fix comparing _spr->file against null in runCommand(). 2014-08-13 17:43:52 +02:00
Strangerke b8b3e5af04 CGE2: Some more minor cleanup 2014-08-03 15:44:20 +02:00
uruk 60a77ae6d7 CGE2: Add autosave functionality. 2014-08-03 14:46:11 +02:00
uruk 4e32736e44 CGE2: Prevent the engine from entering an endless loop when loading.
Also remove CommandHandler::reset(), since it's not useful anymore.
2014-07-29 16:41:56 +02:00
uruk 95854c3a57 CGE2: Get rid of sndSetVolume() and connected code. 2014-07-29 12:13:38 +02:00
uruk 375a7c3b15 CGE2: Implement snCycle, add stub for Vga::rotate(). 2014-07-29 11:17:07 +02:00
uruk d4e14253c4 CGE2: Implement snFlash(). 2014-07-29 10:38:05 +02:00
uruk fca11e77f8 CGE2: Get rid of more unused variables. 2014-07-28 16:29:51 +02:00
uruk 8e28a2c0d0 CGE2: Make the debug channel of the opcodes more verbose. 2014-07-26 13:37:59 +02:00
uruk 0bfde974cd CGE2: Implement debug console and add a debug channel for opcodes. 2014-07-26 12:59:39 +02:00
uruk 737fc953a4 CGE2: Rearrange _commandText[]'s content. 2014-07-24 23:25:09 +02:00
uruk b85e5dcfdb CGE2: Remove kCmdDim and kCmdStep and connected code. 2014-07-24 23:19:02 +02:00
uruk 42f0440127 CGE2: Remove more unused opcodes. 2014-07-24 23:16:12 +02:00
uruk 12210ecf27 CGE2: Remove the unused opcodes. 2014-07-24 23:06:11 +02:00
uruk c843898132 CGE2: Remove handling of unused opcodes. 2014-07-24 22:57:26 +02:00
uruk 15a2256972 CGE2: Implement snTrans() and snPort(). 2014-07-24 22:19:11 +02:00
uruk ff97d52d72 CGE2: Distinguish SFX from speech when playing sounds.
Now the sound options of ScummVM are taken into account when playing these two types of sounds. Until now, everything was considered SFX sound.
2014-07-24 18:55:09 +02:00
uruk 848b2650e9 CGE2: Unstub CommandHandler::runCommand(). 2014-07-22 19:07:56 +02:00
uruk def6b4fc3e CGE2: Add and use Sound::checkSoundHandle(). 2014-07-22 18:54:48 +02:00
uruk 2f19de9ebe CGE2: Fix error introduced by previous commit. 2014-07-22 18:01:37 +02:00
uruk e261886d92 CGE2: Fix snSound(). 2014-07-22 17:59:16 +02:00
uruk 77b5c7e4ad CGE2: Rename _commandStat to _soundStat. 2014-07-22 15:41:33 +02:00
uruk db9e503cfc CGE2: Rework snSetRef(). 2014-07-18 02:26:13 +02:00
uruk a82bd2d9c6 CGE2: Fix memory leak regarding Sprite::ghost().
uint8 *v = new uint8;
was the faulty line in Sprite::ghost(), and it should be released right here.
2014-07-17 15:18:55 +02:00
Strangerke fbd8f2c390 CGE2: Some rework in snail 2014-07-15 19:32:07 +02:00
uruk 8fae34df05 CGE2: Implement snRoom(). 2014-07-15 16:22:43 +02:00
uruk d947167931 CGE2: Fix the intro animation. 2014-07-15 15:17:00 +02:00
uruk 753b5f89ba CGE2: Unstub CommandHandler::reset(). 2014-07-14 18:17:07 +02:00
uruk c7aa91019b CGE2: Replace NULL with nullptr everywhere. 2014-07-07 21:42:45 +02:00
uruk b9dc93c451 CGE2: Heavily rework memory management of Sprites.
Hopefully it will solve a bunch of memory leak problems.
Now Spare is a central container, which stores pointers to every Sprite currently used by the engine.
Because of that, there's no more need for Queue's clear().
In case of snKill(), it's just a safeguard, since it's only used by the engine to "kill" the speech bubbles, but we will check Spare anyway, so it's the safest this way.
2014-07-04 12:58:46 +02:00
Strangerke 384f1b664b CGE2: Implement snMidi() 2014-06-25 19:36:59 +02:00
Strangerke 3dd6c9f7aa CGE2: Implement a couple of stubs 2014-06-24 22:14:19 +02:00
uruk 2226eb0789 CGE2: Implement snSay(), reimplement some parts of the sound code. 2014-06-23 10:20:24 +02:00
Strangerke af646247f3 CGE2: Remove useless variable declarations 2014-06-22 13:48:58 +02:00
uruk 8ae41648f9 CGE2: Implement snSwap(). 2014-06-22 13:38:47 +02:00
uruk fc5c92b5d0 CGE2: Implement snGive() and snRmNear(). 2014-06-22 13:05:24 +02:00
uruk ea9b4d0729 CGE2: Implement snMouse(). 2014-06-19 11:50:42 +02:00
uruk ea5697d5a0 CGE2: Implement snKeep().
Now the inventory system is (at least partially) working.
2014-06-18 22:58:33 +02:00
uruk d85d3229e6 CGE2: Implement functions connected to inventory handling.
Also move closePocket() closer to the others and fix the stub message in busy().
2014-06-18 22:37:54 +02:00
uruk fb97e24a5a CGE2: Fix coords of misplaced speech bubbles.
The origin of the bug is that when we added the command (triggered by a mouse-click on a sprite) to display a speech bubble we checked the command's reference wrong and didn't bind (by modifying the reference) the bubble to a certain hero. So they just appeared randomly above the sprites what triggered the event, or even in worse places.
2014-06-18 20:43:24 +02:00