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
Since older commit 5f3b8eb the properties are stored in vectors,
strictly resized to the number of characters and objects.
But the script functions that access these do not do any assertion
whether the object or char is valid, which could cause bad mem
access in case script loops over a array of objects of MAX_OBJECTS
size, or tries to access something using Object* pointer from another room.
From upstream 6ad4b220d75a32ea8df959e9a7b7f1ecb21d0c26
This was broken by eb376e6
1. Treating negative loop and frame as an instruction to keep latest object's
loop and frame values was introduced around AGS 2.70 by Object.SetView(),
but this behavior also propagated to SetObjectFrame() command.
2. Removed clamping of loop and frame values inside Object.SetView(),
as that prevented applying a historical behavior of SetObjectFrame(),
where any invalid loop and frame value would be changed to just 0.
3. Don't quit the game in case of invalid loop and frame, but fallback
to default 0 value, and print a warning.
Also removed some redundant assignments to RoomObject,
possibly a result of a commit merge from another branch.
From upstream 66bb18f0224eebfb2a130395e9b18ce59b584e13
This is the 3.6.1 branch, but the fix is required to solve a game-breaking
bug in Chronicle of Innsmouth
This not only simplifies all the use of _t types to the
ScummVM equivalents, it gets rid of the int32 usage in
favor of just int, solving common type clashes with the
Amiga, for which int doesn't match int32