Age | Commit message (Collapse) | Author |
|
Warning: breaks compatibility with previous savefiles.
They were mostly broken anyway, locking any NPC who
waited for kActionEndSound when savefile was created.
|
|
Refactoring, no changes in behaviour.
|
|
|
|
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.
|
|
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".
|
|
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.
|
|
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.
|
|
|
|
|
|
- Rename kSoundStatusRemoved to kSoundStatusClosed
- Rename kSoundStatusClear2 to kSoundStatusCached
- Remove sound cache handling
|
|
- Add debug checks in soundFilter()
- Rename kSoundStatusClear1 to kSoundStatusFilterVariant
|
|
- Move filtering to SoundEntry class
- Make some methods of SoundEntry class private
- Add methods to check if a StreamedSound/AppendableSound is done playing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Move entry-related functions to separate class
- Move enumeration to shared header and rename FlagType to SoundFlag
|