If a piece is swapped with another piece, the LastPos is forgotten too soon;
after viewing an inventory item with the new piece in hand, that piece can't be
put down.
A scene that contains one of the puzzles that have an
associated PuzzleData struct would previously crash on load,
because loading from a save would clear the PuzzleData
struct after the pointer to it was acquired by the puzzle.
This commit adds second calls to getPuzzleData() in
those puzzles, ensuring the pointer will be correct.
The puzzle may be left in a broken state when a save is
initiated or when clicking a scene item while holding a
puzzle piece. The held piece is now tracked inside the
puzzle state object, and put in its place whenever the
game is saved/the puzzle is reopened.
Added support for the new Telephone AR type, which
adds a cellphone display with a phone number directory,
a dial button, and conditional phone numbers.
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.
Added support for the changes nancy8 made to the
TileMove puzzle type. Specifically, an optional exit button,
and a timer with graphics that indicate how much time the
player has left.
Conversation responses have rules for how they should
be added to the list (just add, add at end, or remove),
which until now have been ignored. It's unclear if these
have ever been used, since scanning for them is hard.
Also, conditional responses are now added after the
regular ones.
The previous implementation of ConditionFlags' orFlag
checking did not account for chained orFlags. This struct
is seldom used, so it's unclear what, if anything, was
affected by this issue.
Implemented the ConversationSoundTerse and
ConversationCelTerse action records, which are even
shorter variants of the corresponding Conversation types.
Made changes to the base ConversationSound to reduce
code duplication.
Added support for the record types that replaced the bare
Autotext, and combined it with a PeepholePuzzle. This
necessitates some ugly, diamond-shaped multiple
inheritance, but the original engine's solution of replacing
the current record with a different type one at runtime
is even uglier. Also, made changes to Autotext to correctly
support LIFO ordering.
Implemented the AddListEntry, DeleteListEntry, and
MarkListEntry action records. These are responsible for
modifying the list of autotext strings for each autotext
surface. Also, the JournalData struct now includes data
for entry marking. The last change breaks compatibility
with nancy6+ saves.
Implemented the action record type that computes a
sum of values, each one with an attached percentage
weight. The values themselves can be either supplied
verbatim, or extracted from the TableData struct.
This was implemented in nancy8, but only started getting
used in nancy9.
Created a new header file for action records that mainly
serve to manipulate data. This is done in preparation for the
addition of SetValue, SetValueCombo, and ValueTest.
This commit makes changes that ensure the nancy7
dog scare sequence will have the correct fades to black
without impacting other scene transitions. This is achieved
by delaying full-screen movies by exactly one frame.
Previously, the record worked based on the assumption that
its background will be completely black. This is not the
case in several nancy7 scenes. To support it, an additional
4-byte ARGB pixel format is now allowed in the engine, since
we need to be able to set an alpha value for the surface.
The puzzle got some changes in nancy7, allowing it to
only rotate 180 degrees or skip rotation entirely, and just
reorder elements instead. Also, a custom pick up graphic
can be used instead of the individual elements; this is used
in the folder reordering puzzle, where a picked up folder
is shown in full.
When using an Autotext surface as a source, PeepholePuzzle
will no longer scroll past the bottom of its text contents.
This was only implemented in nancy7, but I'm leaving
it enabled in nancy6 as well, since it's a nice QOL feature.
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.
The floor and ceiling drawing in RaycastPuzzle is broken
on ARM processors. This commit attempts to fix it, based
on an assumption of precision loss in large floating point
numbers.