Skip to content

Commit

Permalink
DRASCULA: Remove delays when showing and hiding the inventory
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
criezy committed Apr 17, 2016
1 parent e289b6f commit 44bcaa8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions engines/drascula/drascula.cpp
Expand Up @@ -606,7 +606,6 @@ bool DrasculaEngine::runCurrentChapter() {
if (_rightMouseButton == 1 && _menuScreen) {
#endif
_rightMouseButton = 0;
delay(100);
if (currentChapter == 2) {
loadPic(menuBackground, cursorSurface);
loadPic(menuBackground, backSurface);
Expand Down Expand Up @@ -635,7 +634,6 @@ bool DrasculaEngine::runCurrentChapter() {
!(currentChapter == 5 && pickedObject == 16)) {
#endif
_rightMouseButton = 0;
delay(100);
characterMoved = 0;
if (trackProtagonist == 2)
trackProtagonist = 1;
Expand Down Expand Up @@ -665,9 +663,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;
Expand Down

0 comments on commit 44bcaa8

Please sign in to comment.