Commit Graph
44 Commits
Author SHA1 Message Date
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 f5311cfe87 NANCY: Expand TableData struct
From nancy8 on, a new method of writing and evaluating
data started being used. This commit expands the existing
TableData struct to accommodate it.
2024-02-07 23:15:23 +01:00
Kaloyan Chehlarski a2f6f38105 NANCY: Fix Overlay crash in nancy7 2024-02-06 20:32:28 +01:00
Kaloyan Chehlarski 9f63b7c572 NANCY: Fix Overlay in nancy7 scene 3600
The scene in question is yet another edge case, since it
draws more than one rectangle over a single viewport frame.
2024-01-28 02:07:46 +01:00
Le Philousophe 1c2d757dbd NANCY: Migrate engine to Path 2023-12-24 13:19:25 +01:00
Kaloyan Chehlarski f6480a4717 NANCY: Fix for overlapping records in nancy2
Modified the special case input handling in Overlay so that
it no longer gets triggered at all for nancy2 and older games.
This fixes an issue with the TV in nancy2, which will get
turned off even when not holding the remote.
2023-11-26 23:03:57 +02:00
Kaloyan Chehlarski 7303fa4a44 NANCY: Extend Overlay looping behavior to nancy2
It seems nancy2 shares the weird looping behavior when
a sound is present inside an Overlay - it keeps looping
until after the sound is done, even when looping is disabled.
This fixes nancy2 scene 1562.
2023-11-05 23:15:47 +02:00
Kaloyan Chehlarski 732abddabe NANCY: Improve reading of Overlays
A source parameter that was previously erroneously
skipped is now read correctly, resulting in a lot of the
static mode code being no longer needed.
2023-11-05 23:15:46 +02:00
Kaloyan Chehlarski 0260875821 NANCY: Fix Overlay crash
Fixed a divide by 0 crash in nancy2 caused by bad data
in an Overlay action record
2023-11-04 14:31:37 +02:00
Kaloyan Chehlarski 6f2edd92aa NANCY: Fix Overlay with hotspot triggering
Fixed an issue where an Overlay with a hotspot would
actually never have it activated. Also, added a check for game
type to make sure other action records _do_ get activated
alongside an Overlay in nancy2 and lower. Both of these
fixes target nancy2 scene 2541.
2023-10-28 16:19:34 +03:00
Kaloyan Chehlarski be0feffb55 NANCY: Load Autotext surfaces from ResourceManager
Added checks to loadImage() for the special strings used
to indicate an autotext surface instead of an image file
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 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 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 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 7e16ae44ab NANCY: Correctly read Overlay hotspot flags
We're no longer skipping over what apparently was a flag
indicating whether a particular static Overlay frame has
a hotspot or not. This fixes the rubber gloves item in
nancy5, which can now be picked up.
2023-09-29 15:13:42 +03:00
Kaloyan Chehlarski 5068bec9ad NANCY: Static mode overlay fix
Fix for yet another Overlay edge case
2023-09-27 21:08:08 +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 eaf0c56182 NANCY: Implement PeepholePuzzle
Implemented the action record that, despite what its name
suggests, is actually responsible mostly for scrolling text
(e.g. Nancy's journal, the instructions to the Bul minigame).
Introduced in nancy6.
2023-09-23 21:59:40 +03:00
Kaloyan Chehlarski 120160b6e4 NANCY: Implement Autotext
Implemented the Autotext record type, which is used for
text rendering (prior to its introduction in nancy6, all
in-game text was prerendered). Made relevant changes to
the Overlay and Hypertext classes to support it.
2023-09-23 21:59:40 +03:00
Kaloyan Chehlarski ca859337f2 NANCY: Static mode overlay fix
Added support for another edge case in static mode Overlays
2023-09-22 13:37:27 +03:00
Kaloyan Chehlarski a906eabe23 NANCY: Static overlay fix
This is yet another attempt at finally fixing the mess that
is the Overlay ActionRecord's static mode. This commit
fixes nancy4 scene 3500.
2023-09-21 14:46:15 +03:00
Kaloyan Chehlarski 6cfc805477 NANCY: Rename data struct 2023-09-20 16:16:21 +03:00
Kaloyan Chehlarski cffac1e6ae NANCY: Improve Overlay drawing accuracy
This is yet another attempt to fix all the issues caused by
the interaction between the multiple src rects in Overlay data.
2023-09-20 16:16:21 +03:00
Kaloyan Chehlarski f9ccd48a8e NANCY: Handle Overlay input as special case
Added a workaround for a bug in nancy3 where the engine
would move to an incorrect scene, because Overlay input
wasn't being handled with priority like it was in the original
engine.
2023-09-19 17:40:49 +03:00
Kaloyan Chehlarski 5f800b8d7e NANCY: Overlay fixes
Fixed behavior for the two arcade machine animations in
nancy1 scene 833. Also improved timings for all Overlays.
2023-09-19 17:38:25 +03:00
Kaloyan Chehlarski 4adbfaa4ce NANCY: Correctly render static Overlays
Static Overlays (may) use different source rects from animated
ones, which is now correctly implemented. This fixes the
out of service sign on the nancy5 key machine.
2023-09-16 17:04:37 +03:00
Kaloyan Chehlarski 09ef41280d NANCY: Fix Overlay reading
This effectively reverts the last changes made to the class,
and replaces them with an actual fix, which is to only read
the _enableHotspot field in nancy2; later games seem to
have removed it entirely.
2023-09-12 19:43:29 +03:00
Kaloyan Chehlarski 1134a02a18 NANCY: Overlay fixes
Animated overlays in nancy3 and up now ignore their
scene changes and hotspots. This fixes the chandelier
in nancy3 and several conversations with Hotchkiss
in nancy4. This fix is NOT to be applied to earlier games,
as they used those fields even when the overlay is animated.
2023-09-09 12:49:30 +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 9d9374bc85 NANCY: Fix non-looping overlays
Fixed an edge case where a non-looping overlay would
still loop if the sound file is longer than the animation.
This fixes the chandelier dangling animations in nancy3.
2023-07-13 18:13:57 +03:00
Kaloyan Chehlarski 53242d84e8 NANCY: Fix reading of Overlay in nancy3 2023-05-12 12:42:30 +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 685eccf1c2 NANCY: Separate SoundDescription reading functions 2023-05-10 16:57:33 +03:00
Kaloyan Chehlarski ee174389de NANCY: Overlay fixes
Overlays are now correctly set to transparent when needed.
Added a workaround for a broken scene in nancy2.
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 70a916d817 NANCY: Make sure visual ARs stay visible after pause
Added a RenderActionRecord class that automatically
handles re-adding ActionRecords with visuals to the
rendering system, and subclassed relevant ARs from it.
2023-04-19 15:02:32 +03:00
Kaloyan Chehlarski 6ba8e586a3 NANCY: Fix ShowInventoryItem
Fixed a data reading error in ShowInventoryItem that
would crash nancy2.
2023-04-17 20:27:28 +03:00
Kaloyan Chehlarski 7dbfa1e91a NANCY: Overlay fixes
Added code to make sure sound is stopped when an
Overlay is triggered. Added code ensuring hotspots
are enabled when in animated mode. Moved the
setVisible() call so the overlay gets hidden when clicked.
2023-04-16 15:40:50 +03:00
Kaloyan Chehlarski 2150c7c525 NANCY: Fix crash when loading Overlay 2023-04-15 14:46:22 +03:00
Kaloyan Chehlarski 2888248e7e NANCY: Add workaround for broken Overlay 2023-04-13 21:20:36 +03:00
Kaloyan Chehlarski 203d4fa5dc NANCY: Implement Overlay action record
Implemented the Overlay action record, which is the
upgraded version of PlayIntStaticBitmapAnim that appears
from nancy 2 and onward.
2023-04-13 21:20:35 +03:00