[Scummvm-cvs-logs] scummvm master -> a6a8f1afd862f8fa4ecf1f0a0b4ad5c53ec7c1b6

Strangerke Strangerke at scummvm.org
Sat Mar 23 14:24:46 CET 2013


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:
a6a8f1afd8 HOPKINS: Remove one more variable from AnimationManager


Commit: a6a8f1afd862f8fa4ecf1f0a0b4ad5c53ec7c1b6
    https://github.com/scummvm/scummvm/commit/a6a8f1afd862f8fa4ecf1f0a0b4ad5c53ec7c1b6
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-03-23T06:23:43-07:00

Commit Message:
HOPKINS: Remove one more variable from AnimationManager

Changed paths:
    engines/hopkins/anim.cpp
    engines/hopkins/anim.h
    engines/hopkins/hopkins.cpp
    engines/hopkins/objects.cpp
    engines/hopkins/script.cpp



diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
index e6278ef..090117b 100644
--- a/engines/hopkins/anim.cpp
+++ b/engines/hopkins/anim.cpp
@@ -38,7 +38,6 @@ namespace Hopkins {
 AnimationManager::AnimationManager(HopkinsEngine *vm) {
 	_vm = vm;
 	_clearAnimationFl = false;
-	NO_COUL = false;
 }
 
 /**
@@ -605,13 +604,13 @@ void AnimationManager::searchAnim(const byte *data, int animIndex, int bufSize)
 /**
  * Play sequence
  */
-void AnimationManager::playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipEscFl, bool skipSeqFl) {
+void AnimationManager::playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipEscFl, bool skipSeqFl, bool noColFl) {
 	if (_vm->shouldQuit())
 		return;
 
 	bool hasScreenCopy = false;
 	_vm->_eventsManager->_mouseFl = false;
-	if (!NO_COUL) {
+	if (!noColFl) {
 		_vm->_eventsManager->refreshScreenAndEvents();
 
 		if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH)
@@ -678,7 +677,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
 			} while (_vm->_eventsManager->_rateCounter < rate1);
 		}
 	} else {
-		if (NO_COUL)
+		if (noColFl)
 			_vm->_graphicsManager->fadeInDefaultLength(screenP);
 		_vm->_eventsManager->_rateCounter = 0;
 		_vm->_eventsManager->_escKeyFl = false;
@@ -764,7 +763,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
 	_vm->_graphicsManager->_skipVideoLockFl = false;
 	f.close();
 
-	if (!NO_COUL) {
+	if (!noColFl) {
 		_vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen);
 		g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
 
diff --git a/engines/hopkins/anim.h b/engines/hopkins/anim.h
index 5e94c38..93c8339 100644
--- a/engines/hopkins/anim.h
+++ b/engines/hopkins/anim.h
@@ -41,7 +41,6 @@ private:
 
 public:
 	bool _clearAnimationFl;
-	bool NO_COUL;
 
 	AnimationManager(HopkinsEngine *vm);
 
@@ -49,7 +48,7 @@ public:
 	void clearAnim();
 	void playAnim(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl = false);
 	void playAnim2(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3);
-	void playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipEscFl = false, bool skipSeqFl = false);
+	void playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipEscFl, bool skipSeqFl, bool noColFl = false);
 	void playSequence2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl = false);
 };
 
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 2057613..0b57405 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -2032,10 +2032,8 @@ void HopkinsEngine::playUnderwaterBaseCutscene() {
 	_soundManager->playSound(26);
 	_globals->iRegul = 1;
 	_globals->_disableInventFl = true;
-	_animationManager->NO_COUL = true;
 	_graphicsManager->FADE_LINUX = 2;
-	_animationManager->playSequence("abase.seq", 50, 15, 50);
-	_animationManager->NO_COUL = false;
+	_animationManager->playSequence("abase.seq", 50, 15, 50, false, false, true);
 	_graphicsManager->loadImage("IM92");
 	_animationManager->loadAnim("ANIM92");
 	_graphicsManager->displayAllBob();
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 0f8814f..44d1bc5 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -3696,7 +3696,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
 		_vm->_eventsManager->refreshScreenAndEvents();
 	_vm->_graphicsManager->fadeInLong();
 	if (_vm->_globals->_screenId == 61) {
-		_vm->_animationManager->playSequence("OUVRE.SEQ", 10, 4, 10);
+		_vm->_animationManager->playSequence("OUVRE.SEQ", 10, 4, 10, false, false);
 		stopBobAnimation(3);
 		_vm->_globals->_checkDistanceFl = true;
 		_oldCharacterPosX = getSpriteX(0);
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index 1d5b214..ac7182c 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -714,7 +714,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
 			_vm->_soundManager->loadSample(2, "SOUND42.WAV");
 			_vm->_soundManager->loadSample(3, "SOUND41.WAV");
 			_vm->_soundManager->_specialSoundNum = 17;
-			_vm->_animationManager->playSequence("grenade.SEQ", 1, 32, 100);
+			_vm->_animationManager->playSequence("grenade.SEQ", 1, 32, 100, false, false);
 			_vm->_soundManager->_specialSoundNum = 0;
 			_vm->_graphicsManager->FADE_LINUX = 2;
 			_vm->_animationManager->playAnim("CREVE17.ANM", 24, 24, 200);
@@ -1292,11 +1292,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
 		case 90:
 			_vm->_soundManager->playSoundFile("SOUND52.WAV");
 			if (!_vm->_globals->_saveData->_data[svField186]) {
-				_vm->_animationManager->playSequence("CIB5A.SEQ", 1, 12, 1);
+				_vm->_animationManager->playSequence("CIB5A.SEQ", 1, 12, 1, false, false);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0);
-			}
-			if (_vm->_globals->_saveData->_data[svField186] == 1) {
-				_vm->_animationManager->playSequence("CIB5C.SEQ", 1, 12, 1);
+			} else if (_vm->_globals->_saveData->_data[svField186] == 1) {
+				_vm->_animationManager->playSequence("CIB5C.SEQ", 1, 12, 1, false, false);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 329, 87, 2);
 			}
@@ -1305,11 +1304,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
 		case 91:
 			_vm->_soundManager->playSoundFile("SOUND52.WAV");
 			if (!_vm->_globals->_saveData->_data[svField186]) {
-				_vm->_animationManager->playSequence("CIB5B.SEQ", 1, 12, 1);
+				_vm->_animationManager->playSequence("CIB5B.SEQ", 1, 12, 1, false, false);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5);
-			}
-			if (_vm->_globals->_saveData->_data[svField186] == 1) {
-				_vm->_animationManager->playSequence("CIB5D.SEQ", 1, 12, 1);
+			} else if (_vm->_globals->_saveData->_data[svField186] == 1) {
+				_vm->_animationManager->playSequence("CIB5D.SEQ", 1, 12, 1, false, false);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 160, 6);
 			}
@@ -1318,11 +1316,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
 		case 92:
 			_vm->_soundManager->playSoundFile("SOUND52.WAV");
 			if (!_vm->_globals->_saveData->_data[svField184]) {
-				_vm->_animationManager->playSequence("CIB6A.SEQ", 1, 12, 1);
+				_vm->_animationManager->playSequence("CIB6A.SEQ", 1, 12, 1, false, false);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0);
-			}
-			if (_vm->_globals->_saveData->_data[svField184] == 1) {
-				_vm->_animationManager->playSequence("CIB6C.SEQ", 1, 12, 1);
+			} else if (_vm->_globals->_saveData->_data[svField184] == 1) {
+				_vm->_animationManager->playSequence("CIB6C.SEQ", 1, 12, 1, false, false);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 293, 139, 3);
 			}
@@ -1331,11 +1328,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
 		case 93:
 			_vm->_soundManager->playSoundFile("SOUND52.WAV");
 			if (!_vm->_globals->_saveData->_data[svField184]) {
-				_vm->_animationManager->playSequence("CIB6B.SEQ", 1, 12, 1);
+				_vm->_animationManager->playSequence("CIB6B.SEQ", 1, 12, 1, false, false);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5);
-			}
-			if (_vm->_globals->_saveData->_data[svField184] == 1) {
-				_vm->_animationManager->playSequence("CIB6D.SEQ", 1, 12, 1);
+			} else if (_vm->_globals->_saveData->_data[svField184] == 1) {
+				_vm->_animationManager->playSequence("CIB6D.SEQ", 1, 12, 1, false, false);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5);
 				_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 161, 8);
 			}
@@ -1872,7 +1868,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
 			_vm->_globals->_disableInventFl = true;
 			if (_vm->_globals->_saveData->_data[svLastPrevScreenId] != _vm->_globals->_saveData->_data[svField401]) {
 				_vm->_soundManager->_specialSoundNum = 208;
-				_vm->_animationManager->playSequence("SORT.SEQ", 10, 4, 10, true);
+				_vm->_animationManager->playSequence("SORT.SEQ", 10, 4, 10, true, false);
 				_vm->_soundManager->_specialSoundNum = 0;
 			}
 			_vm->_globals->_checkDistanceFl = true;
@@ -1986,7 +1982,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
 
 		case 229:
 			_vm->_soundManager->_specialSoundNum = 229;
-			_vm->_animationManager->playSequence("MUR.SEQ", 1, 12, 1);
+			_vm->_animationManager->playSequence("MUR.SEQ", 1, 12, 1, false, false);
 			_vm->_soundManager->_specialSoundNum = 0;
 			_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 340, 157, 2);
 			break;






More information about the Scummvm-git-logs mailing list