Commit graph

61 commits

Author SHA1 Message Date
Kaloyan Chehlarski
1781a1e140 NANCY: Fix SliderPuzzle for pre-nancy9 games
The last changes to the class broke older titles
which use the SPUZ chunk.
Fixes #15097
2024-05-05 21:03:05 +02:00
Kaloyan Chehlarski
b9aa46c4df NANCY: Merge LOAD structs 2024-05-05 21:03:05 +02:00
Kaloyan Chehlarski
b1a861b50d NANCY: JANITORIAL: Fix trailing whitespace/tabs 2024-02-19 20:46:17 +01:00
Kaloyan Chehlarski
4d5c4fcfcc NANCY: Rename graphics and cursor managers
Changed the names of the pointers to GraphicsManager
and CursorManager to be shorter, since they were
inconsistent with the rest of the managers, and typing
them out is a chore.
2024-02-11 00:41:29 +01:00
Kaloyan Chehlarski
b51cb98d42 NANCY: Read MARK chunk
Added a struct corresponding to the MARK boot chunk,
which contains the source rects for the autotext markings
introduced in nancy8 (and used in the journal).
2024-02-08 23:12:14 +01:00
Kaloyan Chehlarski
de55da6ae4 NANCY: Correctly load nancy8 LOAD chunk
In nancy8, the save/load menu got a rewrite, and its data
is incompatible with the older version. This commit
introduces a new struct type for the new LOAD data,
and makes sure it is loaded. This allows nancy8 to boot.
2024-01-31 22:55:57 +01:00
Kaloyan Chehlarski
13dde71233 NANCY: Completely disable nancy7 clock
Fixed the CLOK chunk reading, so the parameters that
indicate whether the clock is the day clock (nancy5), or
completely disabled (nancy7) now get read correctly.
2024-01-27 23:50:10 +01:00
Kaloyan Chehlarski
ccca59475c NANCY: Support modified nancy.dat format
Added support for the freshly modified nancy.dat. The
previous version is also supported and will be kept that way
until the next time nancy.dat gets updated in master
(most likely after work on nancy8/9 is finished)
2024-01-16 22:26:55 +01:00
Kaloyan Chehlarski
e97c93f276 NANCY: Remove PLG0 flag from detection
Removed the detection flag that was used to mark a
specific nancy3 version with 1 extra byte in its BSUM.
Instead, a heuristic has been added to the BSUM reading
code that checks for it at runtime.
2024-01-11 23:04:14 +01:00
Kaloyan Chehlarski
0d6f44f0eb NANCY: Improve support for nancy7 save menu
The nancy7 (and only nancy7) save menu has two extra
strings in the LOAD chunk: one for the text that will appear
when a save slot is empty, and a default save prefix when
the player inputs an empty save name. Both of these are
now correctly loaded and used.
2024-01-05 23:42:02 +01:00
Le Philousophe
1c2d757dbd NANCY: Migrate engine to Path 2023-12-24 13:19:25 +01:00
Kaloyan Chehlarski
898068b951 NANCY: Cursor dependency improvements
Implemented the correct logic for a cursor dependency
that specifies _not_ holding an item, though I'm still not
sure that functionality is actually ever used. The "can't"
sounds for such a dependency will now also play correctly.

The "standard" cursor dependency (which will activate
only if the player is not holding anything) will now actually
activate; previously it had no chance of doing so, due to
incorrect int signedness. Again, it is unclear if this ever
actually gets used.
2023-10-26 19:46:32 +03:00
Kaloyan Chehlarski
b0bd3f1c3f NANCY: Implement viewable items in nancy7
Added support for the new type of item introduced in nancy7,
which, instead of getting picked up, transports the player to
a new scene with a close-up view of the item.
2023-10-03 17:58: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
24f1044ed3 NANCY: Implement additional save dialogs
Added support for the dialogs asking if you want to
overwrite an existing save, or load a save without saving first
(both introduced in nancy6).
2023-10-02 12:19:30 +03:00
Kaloyan Chehlarski
7e4c4f3287 NANCY: Improve support for nancy6 TOD dependency
The time of day in nancy6 now depends on values for day
start and end found inside BSUM. We now correctly read
and use those.
2023-10-01 13:30:05 +03:00
Kaloyan Chehlarski
4e2fc958c8 NANCY: Fix inventory "can't" caption in nancy6
Like many other places, it seems the captions for item
"can't" sounds can also be broken up into sub-strings.
We now assemble these correctly, which fixes the
item 4 caption in nancy6.
2023-10-01 13:20:35 +03:00
Kaloyan Chehlarski
d6bd820352 NANCY: Fix reading of nancy6 Raycast chunks 2023-09-30 17:56:27 +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
547cc34efe NANCY: Fix Coverity issues 2023-09-19 17:40:49 +03:00
Kaloyan Chehlarski
3bbd8e6bb5 NANCY: Improve TBOX and FONT chunk reading
Fixed some incorrect assumptions about the data found
inside TBOX and FONT boot chunks. Made relevant changes
to HypertextParser to reflect the new data.
2023-09-19 17:38:24 +03:00
Kaloyan Chehlarski
e35722f382 NANCY: Improve BSUM reading
Added several missing fields in the BSUM chunk, and
used their values in relevant code. Also fixed an issue
in nancy6 which would make viewport movement slow.
2023-09-19 17:38:24 +03:00
Kaloyan Chehlarski
ba5696786f NANCY: Implement InventorySoundOverride
Implemented the action record type responsible for
overriding the default "I can't" sound for a specific item.
Also implemented closed captioning for the same use
case, since it had previously been overlooked.
2023-09-16 17:04:37 +03:00
Kaloyan Chehlarski
74145342ea NANCY: Properly read CVTX chunks
Fixed a typo that caused most of CVTX chunks to not
actually be read.
2023-09-16 13:14:52 +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
538e124959 NANCY: Make nancy6 bootable
Made changes to BOOT chunk reading code so the game
no longer crashes on startup.
2023-09-14 22:54:17 +03:00
Kaloyan Chehlarski
4cb1ab3f9b NANCY: Improve readRectArray() utility function
The data in a lot of action record types has a fixed number
of rects in an array, only some of which is actually filled.
readRectArray() has now been modified to take in an
additional parameter indicating the max number of rects
that could be present in the passed stream, so it can
automatically skip to the end, reducing boilerplate code
in calling functions. The function now also appends rects
to the provided array, rather than overwrite them. Also, all
readRect() variants now do not extend rects by 1 pixel when
they are empty, ensuring calls to isEmpty() succeed.
2023-09-12 19:43:29 +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
35e0946ff7 NANCY: Add support for nancy5's day counter
Added support for the nancy5 day counter/countdown
clock that replaces the normal clock in the bottom left of
the UI.
2023-08-31 12:20:39 +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
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
53e548c818 NANCY: Do not leak chunk stream data 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
4c5d0d2299 NANCY: Silence warnings
Fixed several small issues that caused compiler and/or
Coverity warnings.
2023-08-24 12:47: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
cd2d706fd8 NANCY: Fix reading of nancy4 boot summary 2023-05-12 12:42:31 +03:00
Kaloyan Chehlarski
150d0d5c6b NANCY: Improve reading of nancy3 files
Improved the reading of SoundDescriptions, SceneSummaries,
and SceneChangeDescriptions so nancy3 no longer crashes
on the first scene.
2023-05-10 16:57:33 +03:00
Kaloyan Chehlarski
685eccf1c2 NANCY: Separate SoundDescription reading functions 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
bc4f0251f8 NANCY: Improve sound data reading
The samplesPerSec property found in some SoundDescriptions
is no longer ignored. This results in the correct playback of
certain sounds (e.g. the button press sounds in nancy2's
OverrideLockPuzzle).
2023-04-19 15:02:33 +03:00
Kaloyan Chehlarski
5844495076 NANCY: Clock fixes
Added highlight and fixed input issues.
2023-04-17 20:27:27 +03:00
Kaloyan Chehlarski
e77c0317c5 NANCY: Implement button hovering
Added code to display a different image when hovering over
a button, as introduced in nancy2. Also fixed loading of
HELP data.
2023-04-15 15:08:54 +03:00
Kaloyan Chehlarski
fbb2a55da1 NANCY: Implement nancy2 clock 2023-04-15 14:46:23 +03:00
Kaloyan Chehlarski
a67dbb9e09 NANCY: Implement textbox hover highlighting
Added highlighting to hovered response text in nancy2's
textbox.
2023-04-14 22:39:10 +03:00
Kaloyan Chehlarski
e76e3c3f1f NANCY: Correctly load INV chunk in nancy2
Added code to load the new data found in the INV chunk.,
2023-04-13 21:20:35 +03:00
Kaloyan Chehlarski
4f10a4c08e NANCY: Coverity issues fixes 2023-04-09 15:52:14 +03:00