diff options
| author | Strangerke | 2012-12-26 22:02:48 +0100 | 
|---|---|---|
| committer | Strangerke | 2012-12-26 22:02:48 +0100 | 
| commit | 55478fd11b669487cc2047954b855f51458fa1cd (patch) | |
| tree | 4b1a53845a91d636abc470fd8aab2a034b8bdc6c | |
| parent | 10a61a8124413eee2523bcb57c0e23f2a49973d5 (diff) | |
| download | scummvm-rg350-55478fd11b669487cc2047954b855f51458fa1cd.tar.gz scummvm-rg350-55478fd11b669487cc2047954b855f51458fa1cd.tar.bz2 scummvm-rg350-55478fd11b669487cc2047954b855f51458fa1cd.zip  | |
HOPKINS: Some more renaming, remove '== true' statements
| -rw-r--r-- | engines/hopkins/anim.cpp | 38 | ||||
| -rw-r--r-- | engines/hopkins/dialogs.cpp | 2 | ||||
| -rw-r--r-- | engines/hopkins/events.cpp | 6 | ||||
| -rw-r--r-- | engines/hopkins/globals.cpp | 4 | ||||
| -rw-r--r-- | engines/hopkins/globals.h | 4 | ||||
| -rw-r--r-- | engines/hopkins/graphics.h | 2 | ||||
| -rw-r--r-- | engines/hopkins/hopkins.cpp | 52 | ||||
| -rw-r--r-- | engines/hopkins/objects.cpp | 92 | ||||
| -rw-r--r-- | engines/hopkins/script.cpp | 18 | 
9 files changed, 108 insertions, 110 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 763f19cd2f..d495ed0d75 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -296,15 +296,15 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint  		if (_vm->_globals.iRegul != 1)  			break;  		for (;;) { -			if (_vm->_eventsManager._escKeyFl == true) +			if (_vm->_eventsManager._escKeyFl)  				goto LABEL_114; -			if (redrawAnim() == true) +			if (redrawAnim())  				break;  			_vm->_eventsManager.refreshEvents();  			if (_vm->_eventsManager._rateCounter >= a2)  				goto LABEL_48;  		} -		if (_vm->_graphicsManager._skipVideoLockFl == true) +		if (_vm->_graphicsManager._skipVideoLockFl)  			goto LABEL_114;  		if (v8 == 1)  			ptr = _vm->_globals.freeMemory(ptr); @@ -376,9 +376,9 @@ LABEL_77:  LABEL_88:  		if (v5 == -1) {  			if (_vm->_globals.iRegul == 1) { -				while (_vm->_eventsManager._escKeyFl != true) { -					if (redrawAnim() == true) { -						if (_vm->_graphicsManager._skipVideoLockFl == true) +				while (!_vm->_eventsManager._escKeyFl) { +					if (redrawAnim()) { +						if (_vm->_graphicsManager._skipVideoLockFl)  							goto LABEL_114;  						if (v8 == 1)  							ptr = _vm->_globals.freeMemory(ptr); @@ -418,9 +418,9 @@ LABEL_88:  			goto LABEL_114;  		}  	} -	while (_vm->_eventsManager._escKeyFl != true) { -		if (redrawAnim() == true) { -			if (_vm->_graphicsManager._skipVideoLockFl == true) +	while (!_vm->_eventsManager._escKeyFl) { +		if (redrawAnim()) { +			if (_vm->_graphicsManager._skipVideoLockFl)  				break;  			if (v8 == 1)  				ptr = _vm->_globals.freeMemory(ptr); @@ -871,7 +871,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui  		_vm->_soundManager.LOAD_ANM_SOUND();  		if (_vm->_globals.iRegul == 1) {  			do { -				if (_vm->_eventsManager._escKeyFl == true) { +				if (_vm->_eventsManager._escKeyFl) {  					if (!_vm->_eventsManager._disableEscKeyFl)  						goto LABEL_59;  					_vm->_eventsManager._escKeyFl = false; @@ -914,7 +914,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui  			f.read(v9, READ_LE_UINT32(v10 + 8));  			if (_vm->_globals.iRegul == 1) {  				do { -					if (_vm->_eventsManager._escKeyFl == true) { +					if (_vm->_eventsManager._escKeyFl) {  						if (!_vm->_eventsManager._disableEscKeyFl)  							goto LABEL_59;  						_vm->_eventsManager._escKeyFl = false; @@ -941,7 +941,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui  	if (_vm->_globals.iRegul == 1) {  		do { -			if (_vm->_eventsManager._escKeyFl == true) { +			if (_vm->_eventsManager._escKeyFl) {  				if (!_vm->_eventsManager._disableEscKeyFl)  					goto LABEL_59;  				_vm->_eventsManager._escKeyFl = false; @@ -1031,9 +1031,9 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u  		if (_vm->_globals.iRegul != 1)  			break;  		while (!_vm->shouldQuit()) { -			if (_vm->_eventsManager._escKeyFl == true) +			if (_vm->_eventsManager._escKeyFl)  				goto LABEL_54; -			if (redrawAnim() == true) +			if (redrawAnim())  				break;  			_vm->_eventsManager.refreshEvents();  			_vm->_soundManager.VERIF_SOUND(); @@ -1041,7 +1041,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u  				goto LABEL_23;  		}  LABEL_48: -		if (_vm->_graphicsManager._skipVideoLockFl == true) +		if (_vm->_graphicsManager._skipVideoLockFl)  			goto LABEL_54;  		if (v7 == 1)  			ptr = _vm->_globals.freeMemory(ptr); @@ -1083,8 +1083,8 @@ LABEL_33:  LABEL_44:  		if (v4) {  			if (_vm->_globals.iRegul == 1) { -				while (_vm->_eventsManager._escKeyFl != true) { -					if (redrawAnim() == true) +				while (!_vm->_eventsManager._escKeyFl) { +					if (redrawAnim())  						goto LABEL_48;  					_vm->_eventsManager.refreshEvents();  					_vm->_soundManager.VERIF_SOUND(); @@ -1098,9 +1098,9 @@ LABEL_53:  			goto LABEL_54;  		}  	} -	while (_vm->_eventsManager._escKeyFl != true) { +	while (!_vm->_eventsManager._escKeyFl) {  		_vm->_eventsManager.refreshEvents(); -		if (redrawAnim() == true) +		if (redrawAnim())  			goto LABEL_48;  		if (_vm->_eventsManager._rateCounter >= rate2)  			goto LABEL_33; diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp index 19934f01df..1f1a009e1b 100644 --- a/engines/hopkins/dialogs.cpp +++ b/engines/hopkins/dialogs.cpp @@ -426,7 +426,7 @@ LABEL_7:  					}  				}  			} -			if (_removeInventFl == true) +			if (_removeInventFl)  				v20 = true;  			if (v20)  				break; diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index b56ce17e18..702da52a42 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -336,7 +336,7 @@ void EventsManager::VBL() {  		}  		_vm->_graphicsManager.unlockScreen();  	} -	if (_mouseFl == true) { +	if (_mouseFl) {  		v1 = 20;  		if (!_mouseLinuxFl)  			v1 = 10; @@ -382,7 +382,7 @@ LABEL_34:  LABEL_35:  	if (!_vm->_globals.PUBEXIT)  		_vm->_objectsManager.displaySprite(); -	if (_mouseFl != true) { +	if (!_mouseFl) {  		updateCursor();  		goto LABEL_54;  	} @@ -415,7 +415,7 @@ LABEL_54:  			while (_breakoutFl || _vm->_globals.iRegul != 1) {  				checkForNextFrameCounter(); -				if (_breakoutFl != true) +				if (!_breakoutFl)  					goto LABEL_63;  				if (_rateCounter > 1)  					goto LABEL_65; diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index 3abc7b7ada..15f5abcd29 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -127,7 +127,7 @@ Globals::Globals() {  	g_old_anim = 0;  	g_old_sens = 0;  	g_old_sens2 = 0; -	last_sens = 0; +	_lastDirection = 0;  	police_l = police_h = 0;  	TETE = NULL;  	texte_long = 0; @@ -189,7 +189,7 @@ Globals::Globals() {  	Credit_l = 0;  	Credit_h = 0; -	OCEAN_SENS = 0; +	_oceanDirection = 0;  	// Initialise pointers  	ICONE = NULL; diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index 2689b59c01..a2104a6fbd 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -357,7 +357,7 @@ public:  	bool CENSURE;  	int g_old_anim;  	int g_old_sens, g_old_sens2; -	int last_sens; +	int _lastDirection;  	byte *police;  	int police_l;  	int police_h; @@ -465,7 +465,7 @@ public:  	int Credit_l;  	int Credit_h; -	int OCEAN_SENS; +	int _oceanDirection;  	Globals();  	~Globals(); diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index 379d83018f..1ad0fae97c 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -95,7 +95,7 @@ public:  	int _width;  	int Compteur_y;  	int spec_largeur; -	bool NOFADE; +	bool _noFadingFl;  public:  	GraphicsManager();  	~GraphicsManager(); diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 1cda13c3c7..30d7f502dd 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -5460,13 +5460,13 @@ void HopkinsEngine::BTOCEAN() {  			int oldPosY = _eventsManager.getMouseY();  			bool displAnim = false;  			if (_objectsManager.NUMZONE == 1) { -				if (_globals.OCEAN_SENS == 3) +				if (_globals._oceanDirection == 3)  					_objectsManager.SPACTION(_globals.PERSO, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 0, 0, 6, 0); -				else if (_globals.OCEAN_SENS == 1) +				else if (_globals._oceanDirection == 1)  					_objectsManager.SPACTION(_globals.PERSO, "27,26,25,24,23,22,21,20,19,18,-1,", 0, 0, 6, 0); -				else if (_globals.OCEAN_SENS == 5) +				else if (_globals._oceanDirection == 5)  					_objectsManager.SPACTION(_globals.PERSO, "9,10,11,12,13,14,15,16,17,18,-1,", 0, 0, 6, 0); -				_globals.OCEAN_SENS = 7; +				_globals._oceanDirection = 7;  				_globals._exitId = 1;  				int oldX = _objectsManager.getSpriteX(0);  				for (;;) { @@ -5492,13 +5492,13 @@ void HopkinsEngine::BTOCEAN() {  			}  LABEL_22:  			if (_objectsManager.NUMZONE == 2) { -				if (_globals.OCEAN_SENS == 7) +				if (_globals._oceanDirection == 7)  					_objectsManager.SPACTION(_globals.PERSO, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 0, 0, 6, 0); -				else if (_globals.OCEAN_SENS == 1) +				else if (_globals._oceanDirection == 1)  					_objectsManager.SPACTION(_globals.PERSO, "27,28,29,30,31,32,33,34,35,36,-1,", 0, 0, 6, 0); -				else if (_globals.OCEAN_SENS == 5) +				else if (_globals._oceanDirection == 5)  					_objectsManager.SPACTION(_globals.PERSO, "9,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 6, 0); -				_globals.OCEAN_SENS = 3; +				_globals._oceanDirection = 3;  				_globals._exitId = 2;  				int oldX = _objectsManager.getSpriteX(0);  				for (;;) { @@ -5524,7 +5524,7 @@ LABEL_22:  			}  LABEL_41:  			if (_objectsManager.NUMZONE == 3) { -				if (_globals.OCEAN_SENS == 3) { +				if (_globals._oceanDirection == 3) {  					int oldX = _objectsManager.getSpriteX(0);  					do {  						if (_globals._speed == 1) @@ -5549,7 +5549,7 @@ LABEL_41:  						_objectsManager.SPACTION(_globals.PERSO, "36,35,34,33,32,31,30,29,28,27,-1,", 0, 0, 6, 0);  				}  LABEL_57: -				if (_globals.OCEAN_SENS == 7) { +				if (_globals._oceanDirection == 7) {  					int oldX = _objectsManager.getSpriteX(0);  					do {  						if (_globals._speed == 1) @@ -5574,13 +5574,13 @@ LABEL_57:  						_objectsManager.SPACTION(_globals.PERSO, "18,19,20,21,22,23,24,25,26,27,-1,", 0, 0, 6, 0);  				}  LABEL_72: -				if (_globals.OCEAN_SENS == 5) +				if (_globals._oceanDirection == 5)  					_objectsManager.SPACTION(_globals.PERSO, "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,", 0, 0, 6, 0); -				_globals.OCEAN_SENS = 1; +				_globals._oceanDirection = 1;  				_globals._exitId = 3;  			}  			if (_objectsManager.NUMZONE == 4) { -				if (_globals.OCEAN_SENS == 3) { +				if (_globals._oceanDirection == 3) {  					int oldX = _objectsManager.getSpriteX(0);  					do {  						if (_globals._speed == 1) @@ -5605,7 +5605,7 @@ LABEL_72:  						_objectsManager.SPACTION(_globals.PERSO, "0,1,2,3,4,5,6,7,8,9,-1,", 0, 0, 6, 0);  				}  LABEL_91: -				if (_globals.OCEAN_SENS == 7) { +				if (_globals._oceanDirection == 7) {  					int oldX = _objectsManager.getSpriteX(0);  					for (;;) {  						if (_globals._speed == 1) @@ -5630,9 +5630,9 @@ LABEL_91:  						}  					}  				} -				if (_globals.OCEAN_SENS == 1) +				if (_globals._oceanDirection == 1)  					_objectsManager.SPACTION(_globals.PERSO, "27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,-1,", 0, 0, 6, 0); -				_globals.OCEAN_SENS = 5; +				_globals._oceanDirection = 5;  				_globals._exitId = 4;  			}  		} @@ -5640,19 +5640,19 @@ LABEL_91:  }  void HopkinsEngine::OCEAN_HOME() { -	if (_globals.OCEAN_SENS == 3) +	if (_globals._oceanDirection == 3)  		_objectsManager.setSpriteIndex(0, 0); -	if (_globals.OCEAN_SENS == 7) +	else if (_globals._oceanDirection == 7)  		_objectsManager.setSpriteIndex(0, 18); -	if (_globals.OCEAN_SENS == 1) +	else if (_globals._oceanDirection == 1)  		_objectsManager.setSpriteIndex(0, 27); -	if (_globals.OCEAN_SENS == 5) +	else if (_globals._oceanDirection == 5)  		_objectsManager.setSpriteIndex(0, 9);  }  void HopkinsEngine::OCEAN(int16 curExitId, Common::String backgroundFilename, int16 defaultDirection, int16 exit1, int16 exit2, int16 exit3, int16 exit4, int16 soundId) {  	_globals.PLAN_FLAG = false; -	_graphicsManager.NOFADE = false; +	_graphicsManager._noFadingFl = false;  	_globals.NOMARCHE = false;  	_globals._exitId = 0;  	_globals.AFFLI = false; @@ -5682,10 +5682,10 @@ void HopkinsEngine::OCEAN(int16 curExitId, Common::String backgroundFilename, in  	if (!exit4)  		_objectsManager.disableZone(4); -	if (!_globals.OCEAN_SENS) -		_globals.OCEAN_SENS = defaultDirection; +	if (!_globals._oceanDirection) +		_globals._oceanDirection = defaultDirection; -	switch (_globals.OCEAN_SENS) { +	switch (_globals._oceanDirection) {  	case 1:  		_objectsManager._characterPos.x = 236;  		_objectsManager.PERI = 27; @@ -5717,9 +5717,9 @@ void HopkinsEngine::OCEAN(int16 curExitId, Common::String backgroundFilename, in  	for (int cpt = 0; cpt <= 4; cpt++)  		_eventsManager.VBL(); -	if (!_graphicsManager.NOFADE) +	if (!_graphicsManager._noFadingFl)  		_graphicsManager.FADE_INW(); -	_graphicsManager.NOFADE = false; +	_graphicsManager._noFadingFl = false;  	_globals.iRegul = 1;  	bool loopCond = false; diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index c42fb5b825..b4f803551a 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -474,7 +474,7 @@ void ObjectsManager::displaySprite() {  		_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_dialogsManager._inventX, _vm->_dialogsManager._inventY, _vm->_dialogsManager._inventX + _vm->_dialogsManager._inventWidth, _vm->_dialogsManager._inventY + _vm->_dialogsManager._inventHeight);  	} -	if (SL_FLAG == true) { +	if (SL_FLAG) {  		_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, SL_SPR, _vm->_eventsManager._startPos.x + 183, 60, 274, 353);  		if (SL_X && SL_Y)  			_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, SL_SPR2, SL_X + _vm->_eventsManager._startPos.x + 300, SL_Y + 300, 0); @@ -1145,7 +1145,7 @@ void ObjectsManager::AFF_BOB_ANIM() {  	int idx = 0;  	do {  		++idx; -		if (idx <= 20 && PERSO_ON == true) { +		if (idx <= 20 && PERSO_ON) {  			_vm->_globals._bob[idx].field1C = false;  			continue;  		} @@ -1173,7 +1173,7 @@ void ObjectsManager::AFF_BOB_ANIM() {  			_vm->_globals._bob[idx]._xp = (int16)READ_LE_UINT16(v20 + 2 * v24);  			if (_vm->_globals.BL_ANIM[idx].v1 == 1)  				_vm->_globals._bob[idx]._xp = _vm->_globals.BL_ANIM[idx].v2; -			if ( PERSO_ON == true && idx > 20 ) +			if ( PERSO_ON && idx > 20 )  				_vm->_globals._bob[idx]._xp += _vm->_eventsManager._startPos.x;  			_vm->_globals._bob[idx]._yp = (int16)READ_LE_UINT16(v20 + 2 * v24 + 2); @@ -1212,7 +1212,7 @@ LABEL_38:  					if (_vm->_globals.BL_ANIM[idx].v1 == 1)  						_vm->_globals._bob[idx]._xp = _vm->_globals.BL_ANIM[idx].v2; -					if (PERSO_ON == true && idx > 20) +					if (PERSO_ON && idx > 20)  						_vm->_globals._bob[idx]._xp += _vm->_eventsManager._startPos.x;  					_vm->_globals._bob[idx]._yp = (int16)READ_LE_UINT16(v21 + 2); @@ -1237,7 +1237,7 @@ LABEL_38:  		}  	} while (idx != 35); -	if (!PERSO_ON && BOBTOUS == true) { +	if (!PERSO_ON && BOBTOUS) {  		for (int v26 = 0; v26 != 35; v26++) {  			if (_vm->_globals._bob[v26].field0 == 10 && !_vm->_globals._bob[v26]._disabledAnimationFl)  				_vm->_globals._bob[v26].field1C = true; @@ -1247,7 +1247,7 @@ LABEL_38:  	BOBTOUS = false;  	for (int v27 = 1; v27 < 35; v27++) { -		if (v27 > 20 || PERSO_ON != true) { +		if (v27 > 20 || !PERSO_ON) {  			if ((_vm->_globals._bob[v27].field0 == 10) && (_vm->_globals._bob[v27].field1C)) {  				v14 = _vm->_globals._bob[v27].field1E; @@ -1549,7 +1549,7 @@ void ObjectsManager::checkZone() {  	        || _vm->_eventsManager._startPos.x >= v0  	        || (v1 = _vm->_graphicsManager.ofscroll + 54, v0 >= v1)  	        || (v1 = v2 - 1, (uint16)(v2 - 1) > 59)) { -		if (_visibleFl == true) +		if (_visibleFl)  			FLAG_VISIBLE_EFFACE = 4;  		_visibleFl = false;  	} else { @@ -1625,14 +1625,14 @@ LABEL_54:  			_vm->_globals.old_x_69 = v0;  			_vm->_globals.old_y_70 = v2;  			_vm->_globals.old_zone_68 = v4; -			if (_vm->_globals.NOMARCHE == true) { +			if (_vm->_globals.NOMARCHE) {  				if (_vm->_eventsManager._mouseCursorId == 4) {  					v1 = v4 + 1;  					if ((uint16)(v4 + 1) > 1u)  						handleRightButton();  				}  			} -			if ((_vm->_globals.PLAN_FLAG == true && v4 == -1) || !v4) { +			if ((_vm->_globals.PLAN_FLAG && v4 == -1) || !v4) {  				_verb = 0;  				_vm->_eventsManager._mouseCursorId = 0;  				_vm->_eventsManager.changeMouseCursor(0); @@ -2208,13 +2208,13 @@ void ObjectsManager::GOHOME2() {  				if (_vm->_globals.j_104 >= v0)  					goto LABEL_19;  			} -			if (_vm->_globals.last_sens == 1) +			if (_vm->_globals._lastDirection == 1)  				setSpriteIndex(0, 0); -			if (_vm->_globals.last_sens == 3) +			if (_vm->_globals._lastDirection == 3)  				setSpriteIndex(0, 1); -			if (_vm->_globals.last_sens == 5) +			if (_vm->_globals._lastDirection == 5)  				setSpriteIndex(0, 2); -			if (_vm->_globals.last_sens == 7) +			if (_vm->_globals._lastDirection == 7)  				setSpriteIndex(0, 3);  			_vm->_globals.chemin = (int16 *)g_PTRNUL; @@ -2223,16 +2223,16 @@ void ObjectsManager::GOHOME2() {  			A_DEPA = 0;  		} else {  LABEL_19: -			_vm->_globals.last_sens = nouveau_sens; +			_vm->_globals._lastDirection = nouveau_sens;  			setSpriteX(0, nouveau_x);  			setSpriteY(0, nouveau_y); -			if (_vm->_globals.last_sens == 1) +			if (_vm->_globals._lastDirection == 1)  				setSpriteIndex(0, 4); -			if (_vm->_globals.last_sens == 3) +			if (_vm->_globals._lastDirection == 3)  				setSpriteIndex(0, 5); -			if (_vm->_globals.last_sens == 5) +			if (_vm->_globals._lastDirection == 5)  				setSpriteIndex(0, 6); -			if (_vm->_globals.last_sens == 7) +			if (_vm->_globals._lastDirection == 7)  				setSpriteIndex(0, 7);  			if (my_anim++ > 1) @@ -2446,7 +2446,7 @@ void ObjectsManager::PLAN_BETA() {  	_vm->_globals.Max_Perso_Y = 440;  	_vm->_globals.NOSPRECRAN = true;  	_vm->_globals.PLAN_FLAG = true; -	_vm->_graphicsManager.NOFADE = false; +	_vm->_graphicsManager._noFadingFl = false;  	_vm->_globals.NOMARCHE = false;  	_spritePtr = g_PTRNUL;  	_vm->_globals._exitId = 0; @@ -2497,7 +2497,7 @@ void ObjectsManager::PLAN_BETA() {  	_vm->_globals.iRegul = 1;  	_vm->_graphicsManager.FADE_INW();  	_vm->_eventsManager.changeMouseCursor(4); -	_vm->_graphicsManager.NOFADE = false; +	_vm->_graphicsManager._noFadingFl = false;  	do {  		v5 = _vm->_eventsManager.getMouseButton(); @@ -2532,10 +2532,10 @@ void ObjectsManager::PLAN_BETA() {  			v1 = 1;  	} while (!_vm->shouldQuit() && v1 != 1); -	if (!_vm->_graphicsManager.NOFADE) +	if (!_vm->_graphicsManager._noFadingFl)  		_vm->_graphicsManager.FADE_OUTW();  	_vm->_globals.iRegul = 0; -	_vm->_graphicsManager.NOFADE = false; +	_vm->_graphicsManager._noFadingFl = false;  	_vm->_globals.PLANX = getSpriteX(0);  	_vm->_globals.PLANY = getSpriteY(0);  	_vm->_globals.PLANI = 1; @@ -2616,7 +2616,7 @@ void ObjectsManager::handleLeftButton() {  			return;  		}  	} -	if (_vm->_globals.PLAN_FLAG == true) { +	if (_vm->_globals.PLAN_FLAG) {  		if (!_vm->_globals.GOACTION)  			goto LABEL_38;  		checkZone(); @@ -2643,7 +2643,7 @@ void ObjectsManager::handleLeftButton() {  		_vm->_globals._saveData->data[svField2] = 0;  	}  LABEL_38: -	if (_vm->_globals.PLAN_FLAG == true && (_vm->_eventsManager._mouseCursorId != 4 || NUMZONE <= 0)) +	if (_vm->_globals.PLAN_FLAG && (_vm->_eventsManager._mouseCursorId != 4 || NUMZONE <= 0))  		return;  	if ((uint16)(NUMZONE + 1) > 1u) {  		zoneCount = NUMZONE; @@ -2674,7 +2674,6 @@ LABEL_38:  			g_old_y = getSpriteY(0);  			_vm->_globals.Compteur = 0;  			if (_vm->_globals.chemin != (int16 *)g_PTRNUL || v9 == _vm->_globals.chemin) { -LABEL_64:  				_vm->_globals.g_old_sens = -1;  				goto LABEL_65;  			} @@ -2702,12 +2701,13 @@ LABEL_64:  			g_old_y = getSpriteY(0);  			_vm->_globals.Compteur = 0;  			if (_vm->_globals.chemin != (int16 *)g_PTRNUL || v9 == _vm->_globals.chemin) -				goto LABEL_64; +				_vm->_globals.g_old_sens = -1; +			else  LABEL_63: -			_vm->_globals.chemin = v9; +				_vm->_globals.chemin = v9;  		}  LABEL_65: -		if (!_vm->_globals.NOMARCHE && _vm->_globals.PLAN_FLAG == true) { +		if (!_vm->_globals.NOMARCHE && _vm->_globals.PLAN_FLAG) {  			v17 = getSpriteY(0);  			v18 = getSpriteX(0);  			_vm->_globals.chemin = PARC_VOITURE(v18, v17, destX, destY); @@ -2717,7 +2717,7 @@ LABEL_65:  		// TODO: Reformat the weird if statement generated by the decompiler  		if (_vm->_eventsManager._mouseCursorId == 23 || (_vm->_globals._saveData->data[svField1] = _vm->_eventsManager._mouseCursorId, _vm->_eventsManager._mouseCursorId == 23))  			_vm->_globals._saveData->data[svField1] = 5; -		if (_vm->_globals.PLAN_FLAG == true) +		if (_vm->_globals.PLAN_FLAG)  			_vm->_globals._saveData->data[svField1] = 6;  		_vm->_globals._saveData->data[svField2] = NUMZONE;  		_vm->_globals._saveData->data[svField3] = _vm->_globals._curObjectIndex; @@ -2836,11 +2836,11 @@ LABEL_64:  		_vm->_globals._saveData->data[svField1] = 0;  		_vm->_globals._saveData->data[svField2] = 0;  	} -	if (_vm->_globals.PLAN_FLAG == true) { +	if (_vm->_globals.PLAN_FLAG) {  		_vm->_eventsManager._mouseCursorId = 0;  		_vm->_eventsManager.changeMouseCursor(0);  	} -	if (_vm->_globals.NOMARCHE == true) { +	if (_vm->_globals.NOMARCHE) {  		if (_vm->_eventsManager._mouseCursorId == 4) {  			result = NUMZONE + 1;  			if ((uint16)(NUMZONE + 1) > 1u) @@ -3026,15 +3026,13 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha  void ObjectsManager::VERIFTAILLE() {  	int v0 = _vm->_globals.STAILLE[getSpriteY(0)];  	if (_vm->_globals.PERSO_TYPE == 1) { -		int v1 = v0;  		if (v0 < 0) -			v1 = -v0; -		v0 = 20 * (5 * v1 - 100) / -80; +			v0 = -v0; +		v0 = 20 * (5 * v0 - 100) / -80;  	} else if (_vm->_globals.PERSO_TYPE == 2) { -		int v2 = v0;  		if (v0 < 0) -			v2 = -v0; -		v0 = 20 * (5 * v2 - 165) / -67; +			v0 = -v0; +		v0 = 20 * (5 * v0 - 165) / -67;  	}  	SETTAILLESPR(0, v0);  } @@ -3502,7 +3500,7 @@ void ObjectsManager::VERBEPLUS() {  		do {  			_vm->_eventsManager._mouseCursorId = 4;  LABEL_24: -			if (_vm->_globals.NOMARCHE != true || (v = NUMZONE + 1, (uint16)(NUMZONE + 1) <= 1u)) { +			if (!_vm->_globals.NOMARCHE || (v = NUMZONE + 1, (uint16)(NUMZONE + 1) <= 1u)) {  				if (_vm->_eventsManager._mouseCursorId == 4)  					return;  			} else { @@ -4669,10 +4667,10 @@ void ObjectsManager::SPECIAL_INI(const Common::String &a1) {  		_vm->_graphicsManager.FADE_INW();  		_vm->_globals.iRegul = 1;  		_vm->_globals._disableInventFl = false; -		_vm->_graphicsManager.NOFADE = true; +		_vm->_graphicsManager._noFadingFl = true;  		_vm->_globals.NOPARLE = true;  		_vm->_talkManager.PARLER_PERSO("MAGE1.pe2"); -		_vm->_graphicsManager.NOFADE = true; +		_vm->_graphicsManager._noFadingFl = true;  		_vm->_globals._disableInventFl = false;  	}  	if (_vm->_globals._screenId == 17 && _vm->_globals.OLD_ECRAN == 20) { @@ -4709,7 +4707,7 @@ void ObjectsManager::SPECIAL_INI(const Common::String &a1) {  		VBOB_OFF(5);  		for (int v7 = 0; v7 <= 3; v7++)  			_vm->_eventsManager.VBL(); -		_vm->_graphicsManager.NOFADE = true; +		_vm->_graphicsManager._noFadingFl = true;  		_vm->_globals._disableInventFl = false;  	}  } @@ -5197,7 +5195,7 @@ void ObjectsManager::TEST_FORET(int a1, int a2, int a3, int a4, int a5, int a6)  					_vm->_graphicsManager.FADE_LINUX = 2;  					_vm->_animationManager.playAnim("CREVE2.ANM", 100, 24, 500);  					_vm->_globals._exitId = 150; -					_vm->_graphicsManager.NOFADE = true; +					_vm->_graphicsManager._noFadingFl = true;  					BOB_OFF(1);  					BOB_OFF(2);  					BOB_OFF(3); @@ -5338,7 +5336,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm  	_vm->_graphicsManager.ofscroll = 0;  	_vm->_dialogsManager._removeInventFl = false;  	_vm->_globals.PLAN_FLAG = false; -	_vm->_graphicsManager.NOFADE = false; +	_vm->_graphicsManager._noFadingFl = false;  	_vm->_globals.NOMARCHE = false;  	_vm->_globals._exitId = 0;  	_vm->_globals.AFFLI = false; @@ -5418,9 +5416,9 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm  	_vm->_globals.BPP_NOAFF = false;  	_vm->_globals.iRegul = 1; -	if (!_vm->_graphicsManager.NOFADE) +	if (!_vm->_graphicsManager._noFadingFl)  		_vm->_graphicsManager.FADE_INW(); -	_vm->_graphicsManager.NOFADE = false; +	_vm->_graphicsManager._noFadingFl = false;  	_vm->_eventsManager.changeMouseCursor(4);  	int xCheck = 0; @@ -5466,9 +5464,9 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm  	}  	if (_vm->_globals._exitId != 8 || _vm->_globals._screenId != 5 || !_vm->_globals._helicopterFl) { -		if (!_vm->_graphicsManager.NOFADE) +		if (!_vm->_graphicsManager._noFadingFl)  			_vm->_graphicsManager.FADE_OUTW(); -		_vm->_graphicsManager.NOFADE = false; +		_vm->_graphicsManager._noFadingFl = false;  		removeSprite(0);  		_vm->_globals.AFFLI = false;  		if (_twoCharactersFl) { diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index a519f81bdc..4d98cfbcca 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -694,7 +694,7 @@ LABEL_1141:  		case 37:  			_vm->_graphicsManager.FADE_LINUX = 2;  			_vm->_animationManager.playSequence2("corde.SEQ", 32, 32, 100); -			_vm->_graphicsManager.NOFADE = true; +			_vm->_graphicsManager._noFadingFl = true;  			break;  		case 38: @@ -709,7 +709,7 @@ LABEL_1141:  			_vm->_soundManager.DEL_SAMPLE(1);  			_vm->_soundManager.DEL_SAMPLE(2);  			_vm->_soundManager.DEL_SAMPLE(3); -			_vm->_graphicsManager.NOFADE = true; +			_vm->_graphicsManager._noFadingFl = true;  			break;  		case 40: @@ -891,7 +891,7 @@ LABEL_1141:  			} while (_vm->_objectsManager.BOBPOSI(12) != 34);  			_vm->_objectsManager.stopBobAnimation(2);  			_vm->_graphicsManager.FADE_OUTW(); -			_vm->_graphicsManager.NOFADE = true; +			_vm->_graphicsManager._noFadingFl = true;  			_vm->_globals._exitId = 20;  			break;  			} @@ -1930,7 +1930,7 @@ LABEL_1141:  			_vm->_animationManager.playSequence("SECRET2.SEQ", 1, 12, 100);  			_vm->_soundManager.SPECIAL_SOUND = 0;  			_vm->_animationManager.NO_SEQ = false; -			_vm->_graphicsManager.NOFADE = true; +			_vm->_graphicsManager._noFadingFl = true;  			_vm->_graphicsManager.FADE_OUTW();  			for (int i = 1; i <= 39; i++) { @@ -2063,7 +2063,7 @@ LABEL_1141:  			_vm->_globals.NOPARLE = false;  			_vm->_graphicsManager.FADE_OUTW();  			_vm->_objectsManager.stopBobAnimation(13); -			_vm->_graphicsManager.NOFADE = true; +			_vm->_graphicsManager._noFadingFl = true;  			_vm->_globals._exitId = 94;  			break;  			} @@ -2270,7 +2270,7 @@ LABEL_1141:  			_vm->_animationManager.NO_SEQ = true;  			_vm->_animationManager.playSequence2("TUNNEL.SEQ", 1, 18, 20);  			_vm->_animationManager.NO_SEQ = false; -			_vm->_graphicsManager.NOFADE = true; +			_vm->_graphicsManager._noFadingFl = true;  			_vm->_graphicsManager.FADE_OUTW();  			_vm->_objectsManager.PERSO_ON = false;  			_vm->_globals._exitId = 100; @@ -2321,7 +2321,7 @@ LABEL_1141:  				_vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500);  			_vm->_soundManager.SPECIAL_SOUND = 0;  			memset(_vm->_graphicsManager._vesaBuffer, 0, 614400); -			_vm->_graphicsManager.NOFADE = true; +			_vm->_graphicsManager._noFadingFl = true;  			_vm->_globals._exitId = 151;  			break; @@ -2336,7 +2336,7 @@ LABEL_1141:  			else if (_vm->_globals.SVGA == 2)  				_vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500);  			_vm->_soundManager.SPECIAL_SOUND = 0; -			_vm->_graphicsManager.NOFADE = true; +			_vm->_graphicsManager._noFadingFl = true;  			memset(_vm->_graphicsManager._vesaBuffer, 0, 614400);  			_vm->_globals._exitId = 151;  			break; @@ -2354,7 +2354,7 @@ LABEL_1141:  			else if (_vm->_globals.SVGA == 2)  				_vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500);  			_vm->_soundManager.SPECIAL_SOUND = 0; -			_vm->_graphicsManager.NOFADE = true; +			_vm->_graphicsManager._noFadingFl = true;  			memset(_vm->_graphicsManager._vesaBuffer, 0, 614400);  			_vm->_globals._exitId = 151;  			break;  | 
