Primary video now affects the mouse the same way it does in the original game: the cursor gets moved to a set location when starting a conversation, and is blocked from moving above a certain threshold. Also removed the static pointer from PlayPrimaryVideoChan0.
Hooked the engine into ScummVM's speech/subtitle settings, and added two extra options for player and character speech. Added a custom settings dialog which gets shown both inside the Edit Game window and the in-game Settings.
Added a \0 to every instance of a char buffer being loaded into a Common::String. Fixed an instance of a large buffer getting repeatedly allocated and deleted inside a for loop. Fixed an instance of a small char buffer being unnecessarily allocated on the heap. Also added a readFilename() convenience function to util.h for reading 8-character filenames found in the data.
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.
Primary video now waits for the NPC video to end before changing scenes/playing a response sound. This usually adds a small delay at the end of a dialogue line, making the conversation sound more natural.
Action records are no longer expected to return how much data they've read, which will be helpful with supporting different versions in the same class. Also added a much more helpful error message on a bad read.
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.
Fixed a lot of code formatting issues, including switch case statements being indented, some curly braces not being left hanging, if and for statements not being surrounded by newlines, some double spaces, and more.
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.
Implemented the finishExecution function, which allows some action records with the correct execType to restart after they've been triggered. Since this can result in objects getting added to the graphics manager twice, also added checks to the addObject function to avoid duplicates.
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.
Rewrote most of the engine using a much more object-oriented approach and using more of ScummVM's common classes. This design deviates quite a lot from the original engine's, but should be more maintainable and extensible in the future.
Implemented most of the PlayPrimaryVideoChan0 action record, which is used in all dialogue and the intro cutscene. For now the audio and video are out of sync, the scrollbar doesn't work, and the mouse isn't constrained.