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.
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.
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.
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.
Some fades to black were not being shown correctly,
since from nancy7 on ActionRecords seem to start executing
only after SpecialEffects were done animating.
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.
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.
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.
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.
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.
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.
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.
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.
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 a separate class for handling hypertext (tagged
text used in conversations, etc) in preparation for the
addition of Autotext, which will also use it.
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.
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.
Decoupled lightning from the LightningOn action record and
implemented the logic for it to be activated during the endgame
section of The Vampire Diaries.