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.
Added support for InstallShield v6 cabinets, which can be made up of
multiple files. The interface for creating an Archive instance now takes
the base filename (e.g. the "data" in "data1.cab") for all cabinets,
including single-file ones.
Co-Authored-By: clone2727 <236052+clone2727@users.noreply.github.com>
Co-Authored-By: Walter van Niftrik <615114+waltervn@users.noreply.github.com>
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.
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.
Implemented Second Chance, which is the original engine's autosave system. This is disabled by default, since it replaces ScummVM's built-in autosaves.
Moved CheatDialog and EventFlagDialog to dialogs.h and removed cheat.h. Fixed a crash on closing the event flags dialog. Fixed the timer data in CheatDialog being incorrectly written to the player time. Removed a couple of incorrectly marked translation strings.
Implemented the original engine's main menu and added an option to enable it from the custom options dialog. Several buttons in the main menu don't work yet since they require implementing additional game states.
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.
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.
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.
Now, persistent sounds which do not exist will not be loaded. This allows
nancy2 to progress a bit further now - it now crashes when attempting to
initialize the inventory
Moved the static members of SliderPuzzle that were used to save the puzzle's state to a struct inside Scene. Removed the SliderPuzzle::synchronize() function and incorporated its logic into Scene::synchronize(). Also fixed a possible use of uninitialized variables inside the synchronization code.
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.
Savefiles are now versioned (breaking previously made saves). Right now the savefile version is global across all supported games, but this will probably change as more games are added.
Added generic methods for getting the pixel format and transparent color. Also added a method for loading an image directly into a ManagedSurface, which also loads the palette and lets The Vampire Diaries logo display properly.
Added code that allows The Vampire Diaries to load its image resources, which are stored in separate .bmp files. However, they are in a different pixel format than the ones from later games, so they don't yet display correctly on screen.
The resource manager now keeps track of its cif trees and calls to loadImage() and loadData() don't need to specify a cif tree. In order to support The Vampire Diaries, IFFs can now be loaded from their own dedicated .iff file, and the engine doesn't require a cif tree to be loaded on boot.
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.