Commit Graph
138 Commits
Author SHA1 Message Date
Kaloyan Chehlarski 74307deca6 NANCY: Rewrite resource handling
CifFile/CifTree classes have been completely rewritten and
moved to their own header file. ResourceManager is now
exclusively responsible for loading IFF files, making sure
loose .iff/.cif files take precedence before ones embedded
in a ciftree.
Also, completed work on the cif/ciftree exporting functions.
2023-10-26 19:46:32 +03:00
Kaloyan Chehlarski 56b48f6186 NANCY: Add GetEngineData macro
Added a macro that hides away the ugly casts whenever
an EngineData object is requested.
2023-10-12 12:42:28 +03:00
Kaloyan Chehlarski 7e6d37276b NANCY: Add support for nancy7's "More Nancy Drew!"
Made changes to BSUM reading, MainMenu and Scene states
needed to support the promo button in nancy7's main menu.
2023-10-02 12:19:31 +03:00
Kaloyan Chehlarski 2d68dd87a3 NANCY: Main loop fixes
Made sure that the main loop doesn't run for a frame longer
than it should when quitting the game. Also fixed the checks
for suppressed graphics so they now actually work.
2023-10-02 12:19:30 +03:00
Kaloyan Chehlarski 82c3d2ae0b NANCY: Implement table indexing record types
Added support for three different action records types
(TableIndexOverlay, TableIndexPlaySound, and
TableIndexSetValueHS), all of which use nancy6's newly-
introduced TABL chunk, which describes a table of values
that can be changed through interaction. This is used
in nancy6's museum narrations puzzle.
2023-09-24 17:43:28 +03:00
Kaloyan Chehlarski a864756a67 NANCY: Fix BSUM reading for most nancy3 versions
It seems the version of nancy3 I use for testing is slightly
different from the one that was shipped originally, and the
one currently being sold on Steam. Notably, it features a
slightly different BSUM format not found in later games,
with the difference being there to support the Dreamcatcher
logo shown in the beginning. This commit fixes every other
version, which do not have that extra logo or bit.
2023-09-22 13:37:26 +03:00
Kaloyan Chehlarski ee42466559 NANCY: Print additional info alongside errors
Added an override to the errorString() method, allowing
the engine to print additional data when an error is thrown.
2023-09-19 17:38:24 +03:00
Kaloyan Chehlarski 6b719b4b44 NANCY: Read CVTX chunks
Added code for reading CVTX chunks, which contain
an array of key-value pairs of strings (introduced in nancy6).
2023-09-14 22:54:17 +03:00
Kaloyan Chehlarski 7f8d6a47d3 NANCY: Avoid flashing cursor when changing scene
In cases where the mouse falls inside a hotspot with the
same cursor type in both the previous and next scenes,
we now avoid a single frame where the cursor flashes to
the default and then back.
2023-09-12 19:43:30 +03:00
Kaloyan Chehlarski b918029f01 NANCY: Move PCAL chunk reading
The PCAL chunk is no longer an exception to the
way BOOT chunks are read and processed; it now has
its own struct type and can be accessed through
getEngineData().
2023-09-09 12:49:30 +03:00
Kaloyan Chehlarski 03d4791ed2 NANCY: Implement standard way to access boot chunks
Previously, the NancyEngine class was responsible for
handling creation and destruction of many naked pointers
to engine data, which led to several instances of memory
leaks that needed to be fixed. These changes introduce a
standard way of handling that same data, similar to the
one already used by PuzzleData inside Scene. Unfortunately,
this does add the need for relevant data to be casted to
the proper type before it is handled.
2023-08-31 12:20:39 +03:00
Kaloyan Chehlarski cb60680d37 NANCY: Use original menus by default 2023-08-28 19:53:33 +03:00
Kaloyan Chehlarski 1bb5d42a2e NANCY: Implement save prompt on quit
Later games added a prompt to save before quitting, which is now implemented.
2023-08-28 19:53:33 +03:00
Kaloyan Chehlarski f25b6e42a7 NANCY: Implement original load/save menu 2023-08-28 19:53:33 +03:00
Kaloyan Chehlarski 417669db9b NANCY: Reserve a special slot for Second Chance saves
Second Chance saves have been moved to their own save
slot, which is now write-protected.
2023-08-28 19:53:33 +03:00
Kaloyan Chehlarski f3b5237a82 NANCY: Show partner logo on game start
Games after nancy2 had a second logo that appeared on
startup, which is now also shown.
2023-08-28 19:53:32 +03:00
Kaloyan Chehlarski 17f9b48b2d NANCY: Pause all sound in GMM 2023-08-28 19:53:32 +03:00
Kaloyan Chehlarski 00c7f4d128 NANCY: Implement setup menu
Implemented the Setup menu, which handles game settings.
Also made some fixes to MainMenu.
2023-08-28 19:53:32 +03:00
Kaloyan Chehlarski 7b11d63558 NANCY: Re-enable original main menu
Fixed up all the old commented-out menu code and made
it useable again. Added support for at least up to nancy5's
main menu. For now, several buttons have been left disabled
and the menus are only accessible through a hidden
config option.
2023-08-28 19:53:31 +03:00
Kaloyan Chehlarski e761b5ae25 NANCY: Implement deferred loading for RaycastPuzzle
Added facilities for deferred loading of data that would take
far too long for a single frame. Deferred loading is
executed after the regular loop, where the system would
previously just sleep. Added deferred loading to RaycastPuzzle, which now no longer freezes the game
while initializing.
2023-08-23 12:15:06 +03:00
Kaloyan Chehlarski d8fe9cb4c1 NANCY: Implement new nancy.dat format
The new nancy.dat structure is now read correctly by
the engine. As a result, sound channels are no longer
hardcoded, and some new logic has been added to
dialogue condition handling.
2023-08-10 14:28:50 +03:00
Eugene Sandulenko f94464ecb1 NANCY: JANITORIAL: Remove trailing spaces 2023-08-07 10:47:50 +02:00
Kaloyan Chehlarski a7e063e71f NANCY: Partially implement RaycastPuzzle
Added code to support nancy3's raycasted maze minigame.
The minigame (mostly) works but is not yet completable,
and needs further optimization work.
2023-08-06 19:29:10 +03:00
Kaloyan Chehlarski 15afae7277 NANCY: Add detection for Russian nancy 3/4 variants
Also added entries in the GameType enum for games 4-6.
2023-05-10 16:57:34 +03:00
Kaloyan Chehlarski dff9cbe272 NANCY: Use correct values for nancy3's flags
Nancy3 did away with earlier versions of the engine's usage
of 1 and 2 as false/true values. This commit adds two
new values to NancyEngine: _true and _false, which hold
the correct values used by different versions of the engine.
2023-05-10 16:57:33 +03:00
Kaloyan Chehlarski 9d18181318 NANCY: Implement SpecialEffect
Implemented the SpecialEffect action record, which
handles crossfading between scenes and fades to black.
2023-04-20 18:00:23 +03:00
Kaloyan Chehlarski c8dfd05140 NANCY: Use RandomSource::generateNewSeed() 2023-04-19 15:02:30 +03:00
Kaloyan Chehlarski 970d6c961e NANCY: Do not autosave when scene is not running
Fixed an issue where autosaves would trigger when loading
a game from the launcher, resulting in an invalid save.
2023-04-16 15:40:51 +03:00
Kaloyan Chehlarski 76310e9ef9 NANCY: Implement nancy2 Conversation ARs
Implemented the three Conversation action record types
introduced in nancy2. These replace primary video, with
ConversationVideo being just a renamed
PlayPrimaryVideoChan0.
2023-04-14 22:39:09 +03:00
Kaloyan Chehlarski e5aa308769 NANCY: Remove custom engine settings dialog
Replaced nancy's custom settings dialog with metaengine's
extra GUI options feature.
2023-04-09 15:52:15 +03:00
Kaloyan Chehlarski 4f10a4c08e NANCY: Coverity issues fixes 2023-04-09 15:52:14 +03:00
Kaloyan Chehlarski 4b3b81eb52 NANCY: Change where states are entered and exited
Moved the calls to onStateEnter() and onStateExit() inside the main game
loop.
2023-04-06 18:17:17 +03:00
Kaloyan Chehlarski 846bee430b NANCY: Correctly handle calling the GMM in all states
All game states now correctly handle calling the GMM, pausing and
unpausing sound and video as needed.
2023-04-06 18:17:17 +03:00
Kaloyan Chehlarski 9717f13650 NANCY: Update nancy.dat reading 2023-04-02 22:33:42 +03:00
Kaloyan Chehlarski bb613925c3 NANCY: Stop storing BOOT chunks in memory
Removed the facilities for storing and getting the raw chunks inside BOOT.
The data found inside them is now loaded into the structs defined in
enginedata.h. This removes the need for multiple classes to know about
the layout of every game's version of a particular chunk.
2023-03-30 20:21:45 +03:00
Kaloyan Chehlarski 525d2383fb NANCY: Change loading of common sounds
loadCommonSounds() now takes the BOOT iff as an argument,
removing the need to store the sound chunks in memory.
2023-03-30 20:21:45 +03:00
Kaloyan Chehlarski 323b65c023 NANCY: Implement struct for SPUZ chunk 2023-03-30 20:21:44 +03:00
Kaloyan Chehlarski e23acc9d1f NANCY: Implement struct for CLOK chunk 2023-03-30 20:21:44 +03:00
Kaloyan Chehlarski cbe958db0c NANCY: Change font loading
Changed the font loading code so it doesn't need to call getBootChunk().
2023-03-30 20:21:43 +03:00
Kaloyan Chehlarski 812ec1acb3 NANCY: Implement structs for HELP, CRED and HINT chunks 2023-03-30 20:21:43 +03:00
Kaloyan Chehlarski 7abdf5c126 NANCY: Add list of image chunks 2023-03-30 20:21:42 +03:00
Kaloyan Chehlarski 74ee83c9e1 NANCY: Change cursor data loading
Made CursorManager::init() take the CURS chunk as an argument,
and changed it so it's more readable.
2023-03-30 20:21:39 +03:00
Kaloyan Chehlarski e696064615 NANCY: Implement struct for MAP chunk 2023-03-30 20:21:37 +03:00
Kaloyan Chehlarski e0f74000ef NANCY: Implement structs for some BOOT chunks
Boot chunks BSUM, VIEW, INV, and TBOX are now read only at startup,
and their data is kept permanently inside NancyEngine. This removes the
need for the chunks to be read by multiple classes and always kept
in memory.
2023-03-30 20:21:36 +03:00
Kaloyan Chehlarski 8b13bc1f4b NANCY: Remove handwritten list of boot chunks
Removed the manually typed out list of chunk names to load during
boot, and replaced it with code that simply loads all BOOT chunks.
2023-03-30 20:21:33 +03:00
Kaloyan Chehlarski 60d67f27d0 NANCY: Fix pause issues
Implemented pauseEngineIntern() and hooked existing pausing code
to it. This fixes issues with videos skipping ahead after returning from
the GMM.
2023-03-30 20:21:32 +03:00
Kaloyan Chehlarski 2dea1e4730 NANCY: Improve engine settings
Removed the unused checkboxes for second chance and original
menus from the engine settings dialog. Added the default values
for the character speech and player speech to NancyMetaEngine
so they're both checked when adding a new game.
2023-03-26 11:44:07 +03:00
Kaloyan Chehlarski 6c28de7698 NANCY: Make second chance always active
The Second Chance autosave functionality is now always active
alongside ScummVM's regular autosave feature.
2023-03-26 11:44:06 +03:00
Kaloyan Chehlarski b0c7e3f4c1 NANCY: Clean up TODOs 2023-03-22 20:07:37 +02:00
Kaloyan Chehlarski 79f3bace94 NANCY: Fix player time speed in The Vampire Diaries
The value of the length of an in-game minute in The Vampire Diaries
is now read correctly, fixing an issue with time passing way too fast.
2023-03-15 18:25:03 +02:00