Commit Graph
757 Commits
Author SHA1 Message Date
Kaloyan Chehlarski f0ba64cc08 NANCY: Add ciftree_export console command 2023-10-26 19:46:32 +03:00
Kaloyan Chehlarski 172984be7b NANCY: Fix nancy2 dialogue freeze
Fixed an issue in nancy2 where in the very first conversation
the scene wouldn't change after Nancy is done talking.
2023-10-26 19:46:32 +03:00
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 ce9a9a2c0f NANCY: Fix rendering of Autotext Overlays
It appears that an Overlay's _srcRects are junk data when
the overlay is in Autotext mode. This commit makes sure
they're rendered correctly.
2023-10-23 22:32:39 +03:00
Kaloyan Chehlarski faaba2aae8 NANCY: Forcefully reactivate Autotext records when loading save
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.
2023-10-23 22:32:39 +03:00
Kaloyan Chehlarski e2bc4a7bcd NANCY: Make sure getCurFrame() is correct for AVF videos
This fixes an edge case in SecondaryMovie where a frame
flag wouldn't fire when playing in reverse.
2023-10-23 22:32:39 +03:00
Kaloyan Chehlarski e23b573e7a NANCY: Implement BBallPuzzle
Implemented the action record type responsible for
nancy6's basketball minigame.
2023-10-23 22:32:39 +03:00
Kaloyan Chehlarski 1da8f422d2 NANCY: Prevent crash when destroying movie 2023-10-23 22:32:39 +03:00
Kaloyan Chehlarski 13d95f7bc6 NANCY: Fix SecondaryMovie reading
A recent addition to the class was missing a game version
check, ensuring nancy6 and earlier movies would always crash
2023-10-23 22:32:39 +03:00
Kaloyan Chehlarski cf188ca8fb NANCY: Implement CubePuzzle
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)
2023-10-17 18:31:08 +03:00
Kaloyan Chehlarski 489b9c696d NANCY: Fix Coverity issues 2023-10-17 18:31:08 +03:00
Kaloyan Chehlarski 3551db675d NANCY: Implement AssemblyPuzzle
Implemented the record type responsible for nancy6's
broken pottery assembly minigame.
2023-10-17 18:31:08 +03:00
Kaloyan Chehlarski dc3e14d4fc NANCY: Add MouseFollowObject class
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.
2023-10-12 12:42:28 +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
Eugene Sandulenko 17a480f1c5 NANCY: Fix potentially uninitialized variable 2023-10-10 23:55:06 +02:00
Kaloyan Chehlarski 151561e6ee NANCY: Implement KeypadTersePuzzle
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.
2023-10-07 14:45:22 +03:00
Kaloyan Chehlarski 4aa0727f95 NANCY: Reset textbox scrollbar when adding new line 2023-10-07 14:45:22 +03:00
Kaloyan Chehlarski 3a72322d55 NANCY: Ensure objects' last position is cleared
Added a safeguard against an issue that could pop up
when moveTo() is called multiple times between draws.
2023-10-07 14:45:22 +03:00
Kaloyan Chehlarski 67d36e46b7 NANCY: Add support for nancy7 special effects
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.
2023-10-07 14:45:22 +03:00
Kaloyan Chehlarski f126ac3d5f NANCY: Fix intro sound in nancy3
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.
2023-10-07 14:45:22 +03:00
Kaloyan Chehlarski 6ed79ba757 NANCY: Add support for Bink video
nancy7 started using Bink videos for some SecondaryMovies
2023-10-07 14:45:21 +03:00
Kaloyan Chehlarski 6475f9bf6a NANCY: Animated Overlay loop improvement
Looping Overlays no longer speed up to "catch up" to the
current frame when a slowdown happens (e.g. when the
console is opened)
2023-10-07 14:45:21 +03:00
Kaloyan Chehlarski 85b1332ab7 NANCY: Do not retain satisfied status for dependencies
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.
2023-10-07 14:45:21 +03:00
Kaloyan Chehlarski a3f1695f2d NANCY: Implement terse Overlay variants
Added the short variants of Overlay, OverlayStaticTerse,
and OverlayAnimTerse, which were introduced in nancy7.
2023-10-07 14:45:21 +03:00
Kaloyan Chehlarski 7f16ac517d NANCY: Define kNoScene constant 2023-10-07 14:45:21 +03:00
Kaloyan Chehlarski 8b7c7f9b17 NANCY: Implement SetVolume action record 2023-10-07 14:45:21 +03:00
Kaloyan Chehlarski d9e0bc954a NANCY: Move inventory-related records
Moved all ActionRecords related to the inventory to their
own source file.
2023-10-03 17:58:28 +03:00
Kaloyan Chehlarski 57c9f5f203 NANCY: Implement EnableDisableInventory
Implemented an action record type responsible for making
a specific item temporarily unusable.
2023-10-03 17:58:28 +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 cb526a5eb3 NANCY: Fix kSceneCount dependency
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.
2023-10-03 17:58:28 +03:00
Kaloyan Chehlarski dbdb30e5cc NANCY: Implement terse PlaySound variants
Added support for PlaySoundTerse and
PlayRandomSoundTerse, as introduced in nancy7. Also
implemented the new functionality for reading closed
captioning text from the Autotext chunk.
2023-10-03 17:58:28 +03:00
Kaloyan Chehlarski 634b1eb260 NANCY: Rename sound ARs 2023-10-03 17:58:28 +03:00
Kaloyan Chehlarski ddc5378d80 NANCY: Simplify cursor logic and explain CURS structure 2023-10-03 17:58:28 +03:00
Kaloyan Chehlarski 8b473098aa NANCY: Implement HotSceneChangeTerse
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.
2023-10-03 17:58:28 +03:00
Kaloyan Chehlarski 824ba46990 NANCY: Implement terse EventFlags variants 2023-10-03 17:58:27 +03:00
Kaloyan Chehlarski 7aae7ec661 NANCY: Implement GotoMenu
Added support for an action record that boots the player
to the main menu.
2023-10-02 12:19:31 +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 5ecfef2a2e NANCY: Add support for TSUM chunks
Added support for the short variant of a scene summary,
as introduced in nancy7.
2023-10-02 12:19:31 +03:00
Kaloyan Chehlarski ea1d0d2a5c NANCY: Init sound listener vector in conditional dialogue
Added default sound vectors for all conditional dialogue
and goodbyes. This _probably_ doesn't affect much, but
is still good to have.
2023-10-02 12:19:30 +03:00
Kaloyan Chehlarski a4e7dfee97 NANCY: Block SoundManager from creating Scene state
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.
2023-10-02 12:19:30 +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 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 8eff5a7f43 NANCY: Disable sound in nancy6 movies 2023-10-01 13:30:05 +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 206a9b3285 NANCY: Add support for nancy6 AddInventoryNoHS
nancy6 added some additional functionality to the
AddInventoryNoHS record, which is now supported.
2023-10-01 13:20:35 +03:00
Kaloyan Chehlarski eca40b5401 NANCY: Remove irrelevant output in console command
Removed a debug text line which must've been the result
of an incorrect copy-paste.
2023-10-01 13:20:34 +03:00
Kaloyan Chehlarski 62ea6f4e21 NANCY: Implement MouseLightPuzzle
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.
2023-10-01 13:20:34 +03:00
Kaloyan Chehlarski f3fe8f251f NANCY: Increment scene counts on scene exit
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)
2023-09-30 17:56:27 +03:00
Kaloyan Chehlarski 3db0bcbbde NANCY: Implement TwoDialPuzzle
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.
2023-09-30 17:56:27 +03:00