Unlike all later games using the engine, TVD sounds are stored in
an obscure file format (.dwd, DiamondWare Digitized). This commit adds support for uncompressed .dwd files and thus enables audio
in the game.
Moved all hardcoded engine data that changes between games (e.g. number
of items, number of event flags) to a dedicated file and added a function for
accessing it in NancyEngine.
SoundManager is now responsible for loading and storing all common sounds (sounds with their own BOOT chunk). All playSound() calls with a hardcoded channel ID now use the chunk name instead. Also fixed some sound inaccuracies when switching between states.
Added a static table of all nancy1 sound channel types, and changed initSoundChannels() so that it reads from the table instead of manually initializing channels one by one.
Did some cleanup of the engine, mostly focusing on the NancyEngine class. Reordered several classes' members, removed unused functions, edited comments, and renamed arfactory_v1.cpp to arfactory.cpp.
Made all states (Scene, Credits, Help, etc.) singletons, as well as subclasses of a common State parent with a proper state switching API. Moved the OnPause virtual function from RenderObject to ActionRecord and hooked it into the state switching code. Also got rid of the NancyEngine pointer that got passed around between most classes, and replaced it with several convenience macros. As a result of these changes action records that render to the viewport no longer disappear after opening the menu, and state changes feel snappier.
Added functions that directly take a SoundDescription object and only execute if its name isn't NO SOUND. This fixes the elevator in nancy1 taking too long to start.
Some action records have fields for sound that can be left unused by putting "NO SOUND" in the filename string. This commit moves the check for that keyword inside sound.cpp so it isn't repeated everywhere.
The original engine stores sound information in at least four different types of structs, all of which can now be loaded and played back. Also implemented sound types, which will be configurable from the ScummVM interface, added the correct number of sound channels, and implemented sound fx in a couple of action record types.