DRASCULA: Remove delays when showing and hiding the inventory

I don't see any purpose to this delays and they were not present in
the original engine. It works fine without those and the interface
seems more responsive.

This fixes bug #7121 DRASCULA: Delay and freeze when pressing
right mouse click on game

Also move a delay when left clicking to after performing the action.
With the delay between the left click and the action, the mouse
position could have moved when performing the action, resulting
in the wrong action being performed (e.g. activating the wrong verb
or picking the wrong object in the inventory). But removing the
delay altogether causes flickering when picking objects from the
inventory.
This commit is contained in:
Thierry Crozat 2016-04-17 23:41:32 +01:00
parent d05d4263e5
commit 6393315a8e

View File

@ -595,7 +595,6 @@ bool DrasculaEngine::runCurrentChapter() {
if (_rightMouseButton == 1 && _menuScreen) {
#endif
_rightMouseButton = 0;
delay(100);
if (currentChapter == 2) {
loadPic(menuBackground, cursorSurface);
loadPic(menuBackground, backSurface);
@ -624,7 +623,6 @@ bool DrasculaEngine::runCurrentChapter() {
!(currentChapter == 5 && pickedObject == 16)) {
#endif
_rightMouseButton = 0;
delay(100);
characterMoved = 0;
if (trackProtagonist == 2)
trackProtagonist = 1;
@ -654,9 +652,9 @@ bool DrasculaEngine::runCurrentChapter() {
if (_leftMouseButton == 1 && _menuBar) {
selectVerbFromBar();
} else if (_leftMouseButton == 1 && takeObject == 0) {
delay(100);
if (verify1())
return true;
delay(100);
} else if (_leftMouseButton == 1 && takeObject == 1) {
if (verify2())
return true;