aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-02-18 21:56:54 +0100
committerStrangerke2014-02-18 21:56:54 +0100
commit6c63a9f4c7fc72369ac91f5d3a000b3063f19f6f (patch)
tree382dbf60a5118f5913dfbf98e93910cdc64d3815 /engines
parent0002eb0eaac6927dbde00b613af85a90803214c0 (diff)
downloadscummvm-rg350-6c63a9f4c7fc72369ac91f5d3a000b3063f19f6f.tar.gz
scummvm-rg350-6c63a9f4c7fc72369ac91f5d3a000b3063f19f6f.tar.bz2
scummvm-rg350-6c63a9f4c7fc72369ac91f5d3a000b3063f19f6f.zip
VOYEUR: Remove some useless variables in Event, cleanup
Diffstat (limited to 'engines')
-rw-r--r--engines/voyeur/events.cpp9
-rw-r--r--engines/voyeur/events.h19
-rw-r--r--engines/voyeur/voyeur_game.cpp2
3 files changed, 9 insertions, 21 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index 8e27e89c2d..51096956c0 100644
--- a/engines/voyeur/events.cpp
+++ b/engines/voyeur/events.cpp
@@ -64,7 +64,6 @@ IntData::IntData() {
EventsManager::EventsManager(): _intPtr(_gameData),
_fadeIntNode(0, 0, 3), _cycleIntNode(0, 0, 3) {
_cycleStatus = 0;
- _mouseButton = 0;
_fadeStatus = 0;
_priorFrameTime = g_system->getMillis();
_gameCounter = 0;
@@ -77,9 +76,8 @@ EventsManager::EventsManager(): _intPtr(_gameData),
_cyclePtr = NULL;
_leftClick = _rightClick = false;
- _mouseClicked = _mouseUnk = false;
+ _mouseClicked = _newMouseClicked = false;
_newLeftClick = _newRightClick = false;;
- _newMouseClicked = _newMouseUnk = false;
_videoDead = 0;
}
@@ -271,12 +269,10 @@ void EventsManager::pollEvents() {
}
return;
case Common::EVENT_LBUTTONDOWN:
- _mouseButton = 1;
_vm->_eventsManager._newLeftClick = true;
_vm->_eventsManager._newMouseClicked = true;
return;
case Common::EVENT_RBUTTONDOWN:
- _mouseButton = 2;
_vm->_eventsManager._newRightClick = true;
_vm->_eventsManager._newMouseClicked = true;
return;
@@ -285,7 +281,6 @@ void EventsManager::pollEvents() {
_vm->_eventsManager._newMouseClicked = false;
_vm->_eventsManager._newLeftClick = false;
_vm->_eventsManager._newRightClick = false;
- _mouseButton = 0;
return;
case Common::EVENT_MOUSEMOVE:
_mousePos = event.mouse;
@@ -586,12 +581,10 @@ void EventsManager::getMouseInfo() {
_vm->_eventsManager._mouseClicked = _vm->_eventsManager._newMouseClicked;
_vm->_eventsManager._leftClick = _vm->_eventsManager._newLeftClick;
_vm->_eventsManager._rightClick = _vm->_eventsManager._newRightClick;
- _vm->_eventsManager._mouseUnk = _vm->_eventsManager._newMouseUnk;
_vm->_eventsManager._newMouseClicked = false;
_vm->_eventsManager._newLeftClick = false;
_vm->_eventsManager._newRightClick = false;
- _vm->_eventsManager._mouseUnk = false;
}
void EventsManager::startCursorBlink() {
diff --git a/engines/voyeur/events.h b/engines/voyeur/events.h
index 454f2e353e..03c26690c5 100644
--- a/engines/voyeur/events.h
+++ b/engines/voyeur/events.h
@@ -45,7 +45,7 @@ public:
uint16 _curTime;
uint16 _timeReset;
uint32 _flags;
-public:
+
IntNode();
IntNode(uint16 curTime, uint16 timeReset, uint16 flags);
};
@@ -61,30 +61,29 @@ public:
int _palStartIndex;
int _palEndIndex;
byte *_palette;
-public:
+
IntData();
};
class EventsManager {
private:
VoyeurEngine *_vm;
- uint32 _priorFrameTime;
bool _counterFlag;
+ bool _cursorBlinked;
uint32 _gameCounter;
+ uint32 _priorFrameTime;
uint32 _recordBlinkCounter; // Original field was called _joe :)
- int _mouseButton;
Common::List<IntNode *> _intNodes;
Common::Point _mousePos;
- bool _cursorBlinked;
void mainVoyeurIntFunc();
-private:
void checkForNextFrameCounter();
void voyeurTimer();
void videoTimer();
void vDoFadeInt();
void vDoCycleInt();
void fadeIntFunc();
+ void addIntNode(IntNode *node);
void deleteIntNode(IntNode *node);
/**
@@ -105,17 +104,14 @@ public:
int _fadeStatus;
bool _leftClick, _rightClick;
- bool _mouseClicked;
- bool _mouseUnk;
- bool _newMouseClicked;
+ bool _mouseClicked, _newMouseClicked;
bool _newLeftClick, _newRightClick;
- bool _newMouseUnk;
int _videoDead;
int _cycleTime[4];
byte *_cycleNext[4];
VInitCycleResource *_cyclePtr;
-public:
+
EventsManager();
void setVm(VoyeurEngine *vm) { _vm = vm; }
@@ -129,7 +125,6 @@ public:
void delayClick(int cycles);
void pollEvents();
void startFade(CMapResource *cMap);
- void addIntNode(IntNode *node);
void addFadeInt();
void setCursor(PictureResource *pic);
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index d94a455e14..e2bf781bbf 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -590,7 +590,7 @@ void VoyeurEngine::reviewTape() {
_eventsManager._intPtr._hasPalette = true;
- if (_eventsManager._mouseClicked || _eventsManager._mouseUnk) {
+ if (_eventsManager._mouseClicked) {
switch (foundIndex) {
case 2:
if (eventStart > 0) {