[Scummvm-cvs-logs] scummvm master -> 6c63a9f4c7fc72369ac91f5d3a000b3063f19f6f

Strangerke Strangerke at scummvm.org
Tue Feb 18 21:58:32 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6c63a9f4c7 VOYEUR: Remove some useless variables in Event, cleanup


Commit: 6c63a9f4c7fc72369ac91f5d3a000b3063f19f6f
    https://github.com/scummvm/scummvm/commit/6c63a9f4c7fc72369ac91f5d3a000b3063f19f6f
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-18T12:56:54-08:00

Commit Message:
VOYEUR: Remove some useless variables in Event, cleanup

Changed paths:
    engines/voyeur/events.cpp
    engines/voyeur/events.h
    engines/voyeur/voyeur_game.cpp



diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index 8e27e89..5109695 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 454f2e3..03c2669 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 d94a455..e2bf781 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) {






More information about the Scummvm-git-logs mailing list