On vista point it may happen that two sequences for the rock landings
are executed at the same time. Although they intend to be locked via
pause_scripts(), changing the set will call unpause_scripts() and unlock
all of them.
The patch will use the optional parameter for (un)pause_scripts() to
determine whether the pause calls should be counting (e.g. when
switching a set or opening the inventory) or not.
Scripts that have explicitly been paused must not be resumed when
pause_scripts and unpause_scripts are called, e.g. when opening the
inventory, pausing the game or changing sets.
This patch splits the existing paused flag in two separate ones:
- LState::all_paused is controlled by pause/unpause_scripts (plural)
- LState::paused is controlled by pause/unpause_script (singular)
For compatibility with Grim savegames both flags are stored in a single
byte, with bit 0 having the same meaning as the former boolean.
Implemented also the movement of Manny's head when looking at usable items.
This commit also introduces a new Object class with a ObjectPtr used for
caching the resources loaded by ResourceLoader. This fixes also the lipsync
regression.