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.
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).
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.
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.
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)
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.
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.
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.
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.
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.
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.
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.
Fixed some incorrect assumptions about the data found
inside TBOX and FONT boot chunks. Made relevant changes
to HypertextParser to reflect the new data.
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.
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.
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.
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().
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.
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.
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).