Compilation of three bug fixes to text parser I recently made in the AGS project, around alternatives syntax:
1. Stop parsing when reaching end during alternatives skipping (causing an out-of-bounds memory read)
2. Correctly skip over multi-word alternatives (incorrect parsing of alternative lists)
3. Use dedicated function to identify word boundaries (affecting dash and apostrophe containing alternatives)
Upstream commits (release-3.6.1 branch):
1. 17f8ea2f0efadec7b3696d4ba51733f1cddc0772 (check for end of input not to go beyond)
2. e98315393a34629b8935fdee7bd725a8299f941c (fix multi-word alternative skipping)
3. 9b0ccbd04e36e757392b1fc744919c785310c57b (consistently check for word boundaries)
Some games (e.g Reactor9) may include .mod files that are not playable
with the standard protracker player.
Also fix looping not working in rare occasions.
This complements c3a0553e25
adding a configurable parameter. There are no functional differences
From upstream 1c226816e2c3c9c18c3afb976e05535401fc5db4
First "on_event" firing after mouse button is released may cause a sequence of blocking actions.
If there's any control checks during them, the global "wasbutdown" variable will be tested again,
potentially leading to a recursive "mouse up" event, except it's not run immediately, but scheduled
until after the first one has completed running.
For this reason "wasbutdown" must be reset BEFORE firing any events.
This was broken a VERY long time ago, it seems, probably by commit 2f54a16
From upstream ff1baccbffd8ee79fe3a5aff547e2ac7b8d8aaf5 (branch 3.6.1)
This is not as important in case of game quit, as it is in case of RunAGSGame().
* Adjusted order of data release in unload_game_file() to be in sync with 3.6.1 (as much as possible).
* Fixed GameSetupStruct not releasing some of the data in Free().
Noteably this fixes font infos to not getting fully reset on RunAGSGame().
from upstream 1cc9d22095d0ee90541ce506fa54c538de7ca4ad
This fixes Character.AddWaypoint not applying room<->mask resolution conversion,
which result in character's speed being different if room has non 1:1 mask resolution.
Hide calculate_move_stage() inside pathfinder, and expose add_waypoint_direct()
in the pathfinder interface instead.
From upstream 093354d78849dc3b4f13a244d4400c4e71f7d687
These variables had to be set using set_route_move_speed() call in order for
the find_route() and calculate_move_stage() work properly.
But it's not obvious, and easy to forget. So turn them into function arguments instead.
This fixes Character.AddWaypoint potentially using wrong walkspeed, if there are
multiple characters or objects moving simultaneously.
An example of a script that would cause a bug:
cEgo.AddWaypoint(20, 20);
oObject0.Move(0, 160, 1, eNoBlock, eAnywhere);
cEgo.AddWaypoint(200, 200);
from upstream 9a00255a2699845bd0e53054d81c24e6955f663e
This fixes repeated post-state on/off switching, and as a consequence - endless loop
in cause of a "..." sentence, that is run until messagetime reaches -1 on its own,
which did not happen because of repeated post-state.
NOTE: looks like an original bug introduced along with the DisplayPostTimeMs property.
From upstream 37360990b22a79380f2a5b34e686a2d2fbcf7de1
Clifftop's Spritefont plugin returns a off-by one size for font2 that
causes a broken outline for some characters. Fixing the value on
the plugin side breaks line spacing, this adds a workaround to the
autooutliner to avoid the issue.
The sanity check should only be applied for negative values,
otherwise a fully dark sprite ends up fully lit.
This is clearly noticeable in Unavowed during the
encounters and during the intro.
Fixes#14176
This logic got confused at some point in engine development. This property had a meaning back when display mode matched the game's native color depth.
Plugins also could rely on this, when drawing on a software renderer's virtual screen, which must match game's native depth and not the final display resolution.
From upstream 67c3bdc403d5178f1c5c390af820bc446f94f21b
Historically these controls could draw text beyond their vertical bounds too (in non-clipping mode).
From upstream c9572541a6f8d38ed2ca1ba7af8e235c5d56c8f2
This fixes vertical or horizontal borders to be drawn under rightmost and bottom
corners, which may have transparent parts.
From upstream a77393abc2353a7d8309b7edf1f0ff582c34778c