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.
Autotext records generate surfaces that are used by other
action records. When loading from a save, the Autotext
will already be marked as "done", and thus wouldn't generate anything, resulting in a crash. This commit makes
sure this doesn't happen.
Implemented the record type responsible for nancy6's
cube assembly minigame (not to be confused with the
pottery assembly one, which uses a different AR type)
Added a class that combines a certain behavior used by
several puzzles: that of an object that follows the mouse
cursor, but stays within the Viewport's bounds.
Implemented the short variant of KeypadPuzzle introduced
in nancy7. Also added the new flag that marks whether
we need to check the order the buttons were pressed in.
The SpecialEffect action record got some significant changes
in nancy7, including a new type of fade, and the removal
of the predefined number of frames to fade. Testing with the
original is tough, since it runs way too fast on modern PCs,
and the new fade type is never actually used properly, so
the current implementation is only an approximation. Also,
I've discovered that prior to these changes the entire screen
got crossfaded, so the screenshotViewport() function is now
entirely removed.
It seems a scene change only interrupts the execution of
the rest of the ActionRecords in a scene starting from nancy4.
Adding the version check fixes the intro of nancy3, where
the narration wouldn't start playing.
Fixed all instances of dependencies that, once satisfied, stay
that way forever. This fixes more complex event flag
dependency like the one in nancy7 scene 2805.
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.
It seems the kSceneCount dependency type has been
broken pretty much always, and the last attempt at fixing it
was a fluke. Also added checks for nancy7, since the devs
decided that, for whatever reason, the conditions need to
be flipped, and what was before a less-than check is now a
greater-than one, and vice versa.
Added support for PlaySoundTerse and
PlayRandomSoundTerse, as introduced in nancy7. Also
implemented the new functionality for reading closed
captioning text from the Autotext chunk.
Added support for a short variant of Hot1FrSceneChange,
which combines all the directional scene changes into one.
Due to the weird way the data is combined, significant
changes to the way ActionRecords are created had to be made.
Added a check inside SoundManager that makes sure it
doesn't prematurely create a new Scene state. This fixes
the chain reaction that results in the load/save menu having
clickable Save buttons.
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.
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.
Implemented the ActionRecord type responsible for the
nancy6 sequence where the player holds a weak light
(which follows the cursor) in the dark and must use it
to illuminate the path ahead.
The counters for how many times a scene has been
visited now get incremented only when we exit it. This
makes sure the counter is not incremented when loading a
save, and makes sure dependencies that require the
sceneCount to be equal to 0 can actually execute
(e.g. nancy6 scene 2319)
Added support for the TwoDialPuzzle action record, which
is an incredibly simple puzzle with two dials that need to
be rotated in the correct position.