Commit Graph
33 Commits
Author SHA1 Message Date
Kaloyan Chehlarski b1a861b50d NANCY: JANITORIAL: Fix trailing whitespace/tabs 2024-02-19 20:46:17 +01:00
Kaloyan Chehlarski b2231ac3cd NANCY: Implement Autotext with hotspots
Added support for hotspots that link to a new scene,
as introduced in nancy9.
2024-02-11 22:53:22 +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 ff39bce6ea NANCY: Implement drawing Autotext marks
Marks are the special symbols introduced in nancy8,
and are used in the task list to mark done/not done tasks
using a checkmark graphic.
2024-02-08 23:12:33 +01:00
Kaloyan Chehlarski 5b2929ce4d NANCY: Fix kThroughBlack special effects
The transition type that fades to black, and then to the
next scene now no longer gets stuck on a black screen
forever.
2024-02-06 20:32:28 +01:00
Kaloyan Chehlarski d468406f25 Revert "NANCY: Fix fades in nancy7 dog scare sequence"
This reverts commit 1f5a3c64cc.

The changes in this commit break other fades in nancy7.
2024-02-06 20:32:28 +01:00
Kaloyan Chehlarski 716041603d NANCY: Carry over unshown text to next scene
A couple of scenes in nancy7 draw to the textbox, then
immediately change the scene, which clears said text.
This commit adds a check for whether text was actually
drawn, and if it hasn't, makes sure it is shown in the next
scene. This is behavior not present in the original engine.
2024-02-06 20:32:27 +01:00
Kaloyan Chehlarski c49c10432c NANCY: Respect text end marker
It appears the <e> marker also expects the text
renderer to ignore everything past it. Doing so fixes the
broken string in nancy7 scene 5770.
2024-02-04 16:29:55 +01:00
Kaloyan Chehlarski f3fee34f42 NANCY: Indent Autotext when wrapping
Replicating a bug in the original engine, where a value
from TBOX is used in all rendering, resulting in all wrapped
textlines appearing slightly indented inwards.
2024-01-30 23:13:12 +01:00
Kaloyan Chehlarski 9a549a88b2 NANCY: Implement Autotext images
Added support for images inside Autotext. Used extensively
in nancy7.
2024-01-30 23:13:12 +01:00
Kaloyan Chehlarski 28fbde9bff NANCY: Improve hypertext token heuristic
Fixed a couple issues when handling hypertext tokens
using the new API in Common::Tokenizer:
- The sound file names that were accidentally left in some
dialogue in nancy6 scenes 1953 and 1954 no longer get
rendered as part of the text.
- Short text strings now get rendered correctly. This fixes
the HAM radio puzzle input readout.
- Hypertext tokens now have checks for proper size;
otherwise, the offending token is output to the newly
created kDebugHypertext debug channel.
2024-01-16 23:01:40 +01:00
Kaloyan Chehlarski 1f5a3c64cc NANCY: Fix fades in nancy7 dog scare sequence
Some fades to black were not being shown correctly,
since from nancy7 on ActionRecords seem to start executing
only after SpecialEffects were done animating.
2024-01-14 22:30:00 +01:00
Kaloyan Chehlarski f3bf65b234 NANCY: Fix nancy7 special effect timings
The timing code in nancy7's special effects is broken, and
produces highly variable results based on the machine it
runs on. Our code fixes that issue, but as a result effects
often run much slower than they were intended to. This
commit shortens effect timings by half, approximating
what the original devs most likely intended for the
effects to actually look like.
2024-01-14 22:30:00 +01:00
Kaloyan Chehlarski 489b9c696d NANCY: Fix Coverity issues 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
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 0a4b4415e0 NANCY: Fix Coverity issues 2023-09-25 14:37:37 +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 58e89ed1a9 NANCY: Make sure text color changes in correct positions
Fixed (hopefully) all issues with color changes in text being
in incorrect positions. The new algorithm ignores all
whitespace characters when counting how much has been
drawn on screen, as they, combined with word wrapping,
were the source of the miscounting.
2023-09-22 13:37:27 +03:00
Kaloyan Chehlarski 09a21ad755 NANCY: Set correct default textbox font
Modified the Textbox code so the conversation font is no
longer the default, but rather has to be requested by
Conversation types. This fixes the nancy6 tutorial having
a blue highlighted text while explicitly needing red.
2023-09-20 16:16:22 +03:00
Kaloyan Chehlarski ed49ad1102 NANCY: Improve textbox rendering
Single whitespaces at the beginning of a line now get
cleared (hopefully) without impacting color changes. Also,
the height at which scrolling stops is now closer to the
original engine's.
2023-09-19 17:38:26 +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 fa522ff939 NANCY: Move hypertext handling outside Textbox
Added a separate class for handling hypertext (tagged
text used in conversations, etc) in preparation for the
addition of Autotext, which will also use it.
2023-09-19 17:38:24 +03:00
Eugene Sandulenko bef7fd845d NANCY: Fix warning 2023-09-19 14:44:58 +02: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
Eugene Sandulenko f94464ecb1 NANCY: JANITORIAL: Remove trailing spaces 2023-08-07 10:47:50 +02:00
Kaloyan Chehlarski 4cddb2e61c NANCY: Handle consecutive SpecialEffects
Handled an edge case where two consecutive scenes have
SpecialEffect fades, but only the latter one would get played.
2023-05-11 14:28:56 +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 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 3157da3f28 NANCY: Fix thunder sound playing in every scene 2023-03-26 11:44:03 +03:00
Kaloyan Chehlarski 5b9b6b5ba3 NANCY: Implement lightning in TVD endgame
Decoupled lightning from the LightningOn action record and
implemented the logic for it to be activated during the endgame
section of The Vampire Diaries.
2023-03-26 11:44:01 +03:00