In cases where the mouse falls inside a hotspot with the
same cursor type in both the previous and next scenes,
we now avoid a single frame where the cursor flashes to
the default and then back.
Implemented the record type responsible for "unblock me"
type puzzles. Due to similarities in data and behavior, it
has been incorporated into the CollisionPuzzle class.
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.
Implemented the KeypadPuzzle action record type, which
is yet another variation on OrderingPuzzle, this time with
more buttons and the addition of a button for manually
checking whether the sequence is correct.
The data in a lot of action record types has a fixed number
of rects in an array, only some of which is actually filled.
readRectArray() has now been modified to take in an
additional parameter indicating the max number of rects
that could be present in the passed stream, so it can
automatically skip to the end, reducing boilerplate code
in calling functions. The function now also appends rects
to the provided array, rather than overwrite them. Also, all
readRect() variants now do not extend rects by 1 pixel when
they are empty, ensuring calls to isEmpty() succeed.
Tweak in scriptdebug.cpp disassembler logic because the new logging wasn't quite working how it was expected.
- These opcodes weren't showing up with their selectors in all scenarios
- Improve output formatting
This makes it so that half the space before and after a slider value is assigned to that value
Currently for sliders with small value range, the only ways to set them to the highest value is
to either use the mouse wheel scroll, or click and drag, or click at a pixel of the far edge of the slider.
This PR addresses the final option, making it a bit easier to get the final value when using simple clicks.
It still uses integer division to get the slider value from the click position, but "divides" the space between
two values in half, assigning the first half to the left (smaller) value and the right half to the right (higher).
This was inspired mainly for touchsreen interfaces where simple tap is the main form of interaction
(and mouse wheel or click and drag may not be supported or more difficult to pull through).
Fixes a bug introduced in 9aa095873683b990ac85b4c06b5fa843dcbd682a.
That commit limited reading cursors to open res files, not all
*seen* res files. However, that broke the custom cursor in Small
Stories for Sleepless Nights for Mac (nemurenu-mac-ja), which stores
its cursor in the game's main archive which is already closed at the
time the cursor gets loaded.
Fixed an issue where strings with invalid color markup
were being processed differently from the way the original
engine did, making some strings colored when they
shouldn't be. This fixes the nancy4 intro and some other
strings in the same game.
The PCAL chunk is no longer an exception to the
way BOOT chunks are read and processed; it now has
its own struct type and can be accessed through
getEngineData().
Improved ConversationCel reading so it no longer
assumes there are only two cels drawn at a time (the engine
supports up to 4). Also fixed a gap between conversation
scenes where the character would become invisible for a
single frame.
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.