aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/sound
AgeCommit message (Collapse)Author
2018-10-20LASTEXPRESS: save/load sound stateEvgeny Grechnikov
Warning: breaks compatibility with previous savefiles. They were mostly broken anyway, locking any NPC who waited for kActionEndSound when savefile was created.
2018-10-20LASTEXPRESS: loud train noise when NPC exits carEvgeny Grechnikov
If Cath stands near the beginning or the end of a car, looks at a door, and a NPC opens this door, the volume of train noise is temporarily raised. Controlled by variables SoundManager::_data{0,1,2}, renamed to be not so mysterious.
2018-10-19LASTEXPRESS: case-insensitive lookup in sound queueEvgeny Grechnikov
2018-10-18LASTEXPRESS: better names in sound codeEvgeny Grechnikov
Refactoring, no changes in behaviour.
2018-10-17LASTEXPRESS: support for looped soundsEvgeny Grechnikov
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-16LASTEXPRESS: drop sound threadEvgeny Grechnikov
The backend runs its own sound thread anyway, with the corresponding bookkeeping that we use. We don't need yet another sound thread, and it is always nice to not have something that could change our structures from underneath us.
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-10-14LASTEXPRESS: fix constants in sound serializerEvgeny Grechnikov
Wrong enum member used: (status & 0x7000000) should be checked against 0x3000000, not against 3 (this is a check of sound type to skip menu sounds in savefiles). Activate delay should not be compared with sound volume; comparison with 0x8000000 is just a sanity check against overflow.
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.
2016-05-03LASTEXPRESS: Fix logic comparisonEugene Sandulenko
2014-06-16LASTEXPRESS: Fix comparison in sound entry serialization. CID 1004148Littleboy
2014-06-16LASTEXPRESS: Add asserts in sound entry serialization and update code. CID ↵Littleboy
1003259, 1003260
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-08-27LASTEXPRESS: Remove some unreachable codeLittleboy
2012-08-27LASTEXPRESS: Fix analysis warningsLittleboy
2012-08-01LASTEXPRESS: Remove use of skip from savegame functions when loadingLittleboy
We cannot accurately skip over compressed data as it is not know before decoding how much data will be used
2012-07-27LASTEXPRESS: Fix some formatting issuesLittleboy
2012-07-27LASTEXPRESS: Add menu-related warnings and turn some warnings into errorsLittleboy
2012-07-27LASTEXPRESS: Remove entity include in savepoint.hLittleboy
2012-07-27LASTEXPRESS: More include re-organizationLittleboy
2012-07-16LASTEXPRESS: Comment unused variableLittleboy
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-06LASTEXPRESS: implement Sound::updateQueue() and all dependent functionsEugene Sandulenko
2011-07-04LASTEXPRESS: Move sound filtering to base Sound classLittleboy
- Rename kSoundStatusRemoved to kSoundStatusClosed - Rename kSoundStatusClear2 to kSoundStatusCached - Remove sound cache handling
2011-07-01LASTEXPRESS: Fix loading of subtitles from sound nameLittleboy
2011-06-29LASTEXPRESS: Hook up preliminary sound filteringLittleboy
- Add debug checks in soundFilter() - Rename kSoundStatusClear1 to kSoundStatusFilterVariant
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-29LASTEXPRESS: Move SoundStatus to shared headerLittleboy
2011-06-29LASTEXPRESS: Replace shared sound buffer by per-entry bufferLittleboy
2011-06-28LASTEXPRESS: Make SoundEntry members privateLittleboy
2011-06-28LASTEXPRESS: Cleanup commentsLittleboy
2011-06-28LASTEXPRESS: Move Sound class to the sound folderLittleboy
2011-06-28LASTEXPRESS: Move sound queue related functions to a separate classLittleboy
- Implement missing queue reset function - Cleanup SoundManager::playLoopingSound()
2011-06-28LASTEXPRESS: Move more entry-related functions to Entry classLittleboy
2011-06-25LASTEXPRESS: Give proper name to another sound struct memberEugene Sandulenko
2011-06-24LASTEXPRESS: Move subtitle-related methods to the SubtitleEntry classLittleboy
2011-06-24LASTEXPRESS: Refactor Sound classLittleboy
- Move entry-related functions to separate class - Move enumeration to shared header and rename FlagType to SoundFlag