aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/sound/sound.cpp
AgeCommit message (Collapse)Author
2018-10-18LASTEXPRESS: better names in sound codeEvgeny Grechnikov
Refactoring, no changes in behaviour.
2018-10-16LASTEXPRESS: dynamic adjusting of sound volumeEvgeny Grechnikov
Now it works just like in the original game, including fading where it is applicable (e.g. in a passengers list if closing the list while a sound is playing). By the way, p2s sequence is known as http://oeis.org/A000265 , p1s is 4 - A007814, and p2s[i]/2**p1s[i] is just i/16. It is time to get rid of these arrays.
2018-10-16LASTEXPRESS: support for delay-activated soundsEvgeny Grechnikov
Not very obvious, but noticeable e.g. when knocking on harem doors. I suppose this is the problem that wiki describes as "improper triggering of actions on sound end".
2018-10-16LASTEXPRESS: Fix Compiler Warning in Sound Code.D G Turner
The SoundFlag type is an enumeration which have a default underlying type of unsigned int in most case. Thus comparing this to -1 causes a compiler warning. Since the default entity sound flag type is 0xFFFF... which is equivalent to -1, then replacing this with the correct enum symbol fixes the issue and should result in the correct behaviour. Examination of the resulting code line seems to confirm that this is the correct expected logic.
2018-10-14LASTEXPRESS: refactor sound flagsEvgeny Grechnikov
Merge SoundFlag and SoundStatus into a single enum; SoundEntry::setupStatus just casts one to another. Keep only definitions of bits in SoundFlag; drop compound flags like kFlagSteam = kSoundTypeAmbient | kSoundFlagLooped | kVolume7, use ORed simple flags in calls; change the signature of SoundManager::playSoundWithSubtitles to use uint32 instead of SoundFlag to avoid excess casting. Add meaningful names to flags; add some comments. Get rid of endian-unsafe SoundStatusUnion. Fixes an issue with big-endian hosts. No changes in behaviour on little-endian hosts.
2018-08-26LASTEXPRESS: multiple fixes in NPC logicEvgeny Grechnikov
Checked the logic against the original game (to be precise, DOS English version from GOG, although I think AI logic has no significant differences with other versions). Fixed a *lot* of errors with varying visibility for the user. Also, save+exit+load sometimes resulted in memory corruption like ((EntityParametersSSII*)(new EntityParametersIIII))->param8 = 0; load operation did not restore the correct type of NPC logic context, the default one was used (which also has the smallest sizeof). Should be fixed now. Save+load is still unusable because it locks everybody waiting for kActionEndSound (the sound state is not restored), but, at least, it should not corrupt the memory. Hopefully.
2014-06-16LASTEXPRESS: Rename Server* classes to Waiter*Littleboy
2014-02-18LASTEXPRESS: Make GPL headers consistent in themselves.Johannes Schickel
2013-12-10LASTEXPRESS: Rename Object propertiesLittleboy
2012-07-27LASTEXPRESS: Fix some formatting issuesLittleboy
2012-07-14LASTEXPRESS: CleanupLittleboy
- Add missing initializer/destructors - Add some const modifiers - Remove some unneeded casts - Use enumeration values in switch constructs
2012-07-14LASTEXPRESS: Remove duplicated include statementsLittleboy
2011-07-08LASTEXPRESS: Simplify SoundQueue::updateQueue()Littleboy
- Remove useless cache code - Use helper function to get the proper sound entry - Fix crash on using an invalid entry
2011-07-01LASTEXPRESS: Fix loading of subtitles from sound nameLittleboy
2011-06-29LASTEXPRESS: Update sound timer and sound entry playingLittleboy
- Move filtering to SoundEntry class - Make some methods of SoundEntry class private - Add methods to check if a StreamedSound/AppendableSound is done playing
2011-06-28LASTEXPRESS: Make SoundEntry members privateLittleboy
2011-06-28LASTEXPRESS: Cleanup commentsLittleboy
2011-06-28LASTEXPRESS: Move Sound class to the sound folderLittleboy