Added a compressed variant of the Russian translation of Nancy Drew:
Secrets Can Kill. Added a flag to mark compressed game variants and
only load archives when playing one. Removed the 8-bit colors flag.
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.
Implemented Second Chance, which is the original engine's autosave system. This is disabled by default, since it replaces ScummVM's built-in autosaves.
Class members that get properly initialized after the constructor now also get default values during construction to silence warnings. Also fixed a couple of broken entries in response.cpp that were uncovered by these changes.
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.
Added code to filter out inputs that began in a different state; e.g. if the mouse was pushed and held down in a previous state, the button up event won't fire. This fixes the issue where dismissing the intro logo would accidentally trigger a click inside the scene viewport.
Changed the readBootSummary function so it uses a serializer with the game type enum as its version. With this change, we don't need separate subclasses just to read every different BSUM format, so all of the NancyEngine child classes have been removed.
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 initial support for savestates. The format will most likely change with future commits, but I will only start versioning once the engine supports more than a single game. To support proper serialization the Scene state has had its kInit state split into kInit and kInitStatic, InventoryBox had some of its code reordered, and members of several classes have had their types changed.
Renamed all functions relating to the engine's internal state so they only mention the word State instead of GameState. This is to avoid confusion between them and functions relating to savegames, whose names already include GameState.
Implemented the WinGame action record, which allows the player to reach the credits after winning, as well as the Credits state itself. Also made some minor changes to Scene and Nancy to accommodate for the addition.
The menu and help buttons on the sides of the frame are now functional, and the help screen is now also accessible. Also replaced the Frame class with a more general FullScreenImage that will be used across different game states.
The original engine has two secret debug/cheat dialogs: one for general data (timers, current scene, inventory), and one for event flags. I decided to implement them as I find them much more useful than just using debug commands, particularly since they contain descriptions of every event flag and inventory item (this data is pulled directly from the executable's embedded resources, albeit in a slightly hacky way). Also, I've decided not to implement the slider puzzle tab present in nancy1 since I have no use for it.
Secondary movies now actually reach the kActionTrigger state, and now also supports reverse playback. The PlaySecondaryMovie class was moved to its own header file, the SecondaryVideoDescription struct was moved to commontypes.h, and new methods for disabling mouse input were added to NancyEngine and Scene.
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.
Implemented the map state, as well as the two main action record types that call it. Also made some minor related changes to the scene and graphics managers.
Added a sound manager and hooked the Logo and Scene classes to it; also implemented the PlayDigiSoundAndDie action record. As a result the first part of the intro and some of the sounds in the first area can now play properly.
Implemented (almost) all of processActionRecords(), which is the primary logic processing function of the engine. Moved the playState structure from Scene to NancyEngine.
Added an Input class with support for every nancy1 key combo (that I know of). Added code for skipping the Logo state with a left click. Proper mouse handling is still TODO.