slash: switch between the last held item and normal mouse
comma, period: replace the currently held item with the previous/next item in the inventory
Also, commented a bit better what happens when ESCAPE is present with respect to map
programs and cut-scenes.
svn-id: r50407
The previous bugfix just hid the problem by removing an assert, but it might demonstrate
itself in another way later. This is a proper bugfix.
svn-id: r48460
I have tested that this could only possibly happen when the game has been
loaded with last location being the map. Then pressing Escape calls
enterNewRoom() and this superfluous optimization takes place. It is harmless
to simply reload the map. After having removed it, enterNewRoom() needs not
return any return value, because the test at the tail can be done by the
caller. I have then restructured the code a little to make it cleaner.
svn-id: r46098
(otherwise we could have in our hands an unreachable object). This works
thanks to moving clearing _currentItem into putItem(), which gets called
in inventoryReload().
svn-id: r46096
Verified that we really do not need object animations even if they are in
a different location, and clearing them thus regardless of their location.
Although the game was not crashing due to previous work-arounds at this
moment, this cleanup obliterates the most horrible hack and makes sure
animations will never get stale.
svn-id: r46095
With the previous code, the position of the animation was doubled (due to
counting the position twice, the second time being a relative shift), which
put it mostly outside the screen. This is because one-time hero animations
are actually stored using absolute coordinates.
svn-id: r46057
This simplifies a lot of code calling run(). Also, scripts called from the
inventory are now called with disabled mouse and title, as desired.
svn-id: r45848
Putting items back to the inventory into clipped coordinates, and exiting
running GPL2 programs when the game engine it to be interrupted.
svn-id: r45822
Replaced IDs of objects by pointers, which saves many lookups, each of which
is horribly ineffective. Moved a lot of code into methods of structs now
turned into objects.
Tested the new code a lot and seems to work as well as the old code.
svn-id: r45799