[Scummvm-cvs-logs] scummvm master -> 91469d7d386d5eca3f471d0a57cc5bf333212b89

Strangerke Strangerke at scummvm.org
Mon Mar 25 08:03:26 CET 2013


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

Summary:
6f2eb50d2a HOPKINS: Move some more variables and functions from Globals to ObjectsManager
91469d7d38 HOPKINS: More work on Globals


Commit: 6f2eb50d2affac01556f068e6efd1888ed5e9b99
    https://github.com/scummvm/scummvm/commit/6f2eb50d2affac01556f068e6efd1888ed5e9b99
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-03-24T23:35:44-07:00

Commit Message:
HOPKINS: Move some more variables and functions from Globals to ObjectsManager

Changed paths:
    engines/hopkins/globals.cpp
    engines/hopkins/globals.h
    engines/hopkins/hopkins.cpp
    engines/hopkins/objects.cpp
    engines/hopkins/objects.h



diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index 639586e..0d97789 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -80,8 +80,6 @@ Globals::Globals(HopkinsEngine *vm) {
 		Common::fill((byte *)&Liste2[i], (byte *)&Liste2[i] + sizeof(ListeItem), 0);
 	for (int i = 0; i < 30; ++i)
 		Common::fill((byte *)&VBob[i], (byte *)&VBob[i] + sizeof(VBobItem), 0);
-	for (int i = 0; i < 300; ++i)
-		Common::fill((byte *)&_objectAuthIcons[i], (byte *)&_objectAuthIcons[i] + sizeof(ObjectAuthIcon), 0);
 	for (int i = 0; i < 500; ++i)
 		_spriteSize[i] = 0;
 	for (int i = 0; i < 70; ++i)
@@ -95,7 +93,6 @@ Globals::Globals(HopkinsEngine *vm) {
 
 	_linuxEndDemoFl = false;
 	_speed = 1;
-	_curObjectFileNum = 0;
 	iRegul = 0;
 	_exitId = 0;
 	_characterSpriteBuf = 0;
@@ -129,7 +126,6 @@ Globals::Globals(HopkinsEngine *vm) {
 	_levelSpriteBuf = NULL;
 	_saveData = NULL;
 	_answerBuffer = g_PTRNUL;
-	_objectDataBuf = NULL;
 	_characterSpriteBuf = NULL;
 	_optionDialogSpr = NULL;
 
@@ -146,7 +142,6 @@ Globals::~Globals() {
 	freeMemory(_levelSpriteBuf);
 	freeMemory((byte *)_saveData);
 	freeMemory(_answerBuffer);
-	freeMemory(_objectDataBuf);
 	freeMemory(_characterSpriteBuf);
 
 	clearVBob();
@@ -196,8 +191,6 @@ void Globals::clearAll() {
 	_vm->_fontManager->clearAll();
 
 	initVBob();
-	_objectDataBuf = g_PTRNUL;
-	_curObjectFileNum = 0;
 	_vm->_dialogsManager->clearAll();
 	_answerBuffer = g_PTRNUL;
 	_levelSpriteBuf = g_PTRNUL;
@@ -211,8 +204,6 @@ void Globals::clearAll() {
 	memset(_saveData, 0, sizeof(Savegame));
 
 	_vm->_eventsManager->clearAll();
-
-	_objectDataBuf = g_PTRNUL;
 }
 
 void Globals::loadCharacterData() {
@@ -268,26 +259,6 @@ void Globals::clearVBob() {
 	}
 }
 
-// Load Object
-void Globals::loadObjects() {
-	byte *data = _vm->_fileManager->loadFile("OBJET.DAT");
-	byte *srcP = data;
-
-	for (int idx = 0; idx < 300; ++idx) {
-		ObjectAuthIcon *objectAuthIcon = &_objectAuthIcons[idx];
-		objectAuthIcon->_objectFileNum = *srcP++;
-		objectAuthIcon->_idx = *srcP++;
-		objectAuthIcon->_flag1 = *srcP++;
-		objectAuthIcon->_flag2 = *srcP++;
-		objectAuthIcon->_flag3 = *srcP++;
-		objectAuthIcon->_flag4 = *srcP++;
-		objectAuthIcon->_flag5 = *srcP++;
-		objectAuthIcon->_flag6 = *srcP++;
-	}
-
-	freeMemory(data);
-}
-
 byte *Globals::allocMemory(int count) {
 	byte *result = (byte *)malloc(count);
 	if (!result)
diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h
index 6e54605..519ad51 100644
--- a/engines/hopkins/globals.h
+++ b/engines/hopkins/globals.h
@@ -63,17 +63,6 @@ struct VBobItem {
 	byte *_oldSpriteData;
 };
 
-struct ObjectAuthIcon {
-	byte _objectFileNum;
-	byte _idx;
-	byte _flag1;
-	byte _flag2;
-	byte _flag3;
-	byte _flag4;
-	byte _flag5;
-	byte _flag6;
-};
-
 /**
  * Mode for SortItem records
  */
@@ -271,9 +260,6 @@ public:
 	bool _freezeCharacterFl;
 	bool _checkDistanceFl;
 	BqeAnimItem _animBqe[35];
-	ObjectAuthIcon _objectAuthIcons[300];
-	int _curObjectFileNum;
-	byte *_objectDataBuf;
 	byte *_characterSpriteBuf;
 	Common::String _zoneFilename;
 	Common::String _textFilename;
@@ -290,7 +276,6 @@ public:
 	byte *allocMemory(int count);
 	byte *freeMemory(byte *p);
 	void setConfig();
-	void loadObjects();
 	void clearAll();
 	void loadCharacterData();
 	void clearVBob();
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index d0aafc9..a355226 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -131,7 +131,7 @@ Common::Error HopkinsEngine::run() {
 }
 
 bool HopkinsEngine::runWin95Demo() {
-	_globals->loadObjects();
+	_objectsManager->loadObjects();
 	_objectsManager->changeObject(14);
 	_objectsManager->addObject(14);
 	_objectsManager->_helicopterFl = false;
@@ -430,7 +430,7 @@ bool HopkinsEngine::runWin95Demo() {
 }
 
 bool HopkinsEngine::runLinuxDemo() {
-	_globals->loadObjects();
+	_objectsManager->loadObjects();
 	_objectsManager->changeObject(14);
 	_objectsManager->addObject(14);
 	_objectsManager->_helicopterFl = false;
@@ -754,7 +754,7 @@ bool HopkinsEngine::runFull() {
 	if (getPlatform() == Common::kPlatformLinux)
 		_soundManager->playSound(16);
 
-	_globals->loadObjects();
+	_objectsManager->loadObjects();
 	_objectsManager->changeObject(14);
 	_objectsManager->addObject(14);
 
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index f8161ae..5810daa 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -48,6 +48,9 @@ ObjectsManager::ObjectsManager(HopkinsEngine *vm) {
 		Common::fill((byte *)&_lockedAnims[i], (byte *)&_lockedAnims[i] + sizeof(LockAnimItem), 0);
 	}
 
+	for (int i = 0; i < 300; ++i)
+		Common::fill((byte *)&_objectAuthIcons[i], (byte *)&_objectAuthIcons[i] + sizeof(ObjectAuthIcon), 0);
+
 	_sortedDisplayCount = 0;
 	for (int i = 0; i < 51; ++i)
 		Common::fill((byte *)&_sortedDisplay[i], (byte *)&_sortedDisplay[i] + sizeof(SortItem), 0);
@@ -72,10 +75,8 @@ ObjectsManager::ObjectsManager(HopkinsEngine *vm) {
 	_saveLoadSprite2 = g_PTRNUL;
 	_spritePtr = g_PTRNUL;
 	_oldSpriteData = g_PTRNUL;
-	PERSO_ON = false;
 	_saveLoadFl = false;
 	_visibleFl = false;
-	BOBTOUS = false;
 	_zoneNum = 0;
 	_forceZoneFl = false;
 	_changeVerbFl = false;
@@ -85,7 +86,6 @@ ObjectsManager::ObjectsManager(HopkinsEngine *vm) {
 	_twoCharactersFl = false;
 	_characterPos = Common::Point(0, 0);
 	_startSpriteIndex = 0;
-	OBSSEUL = false;
 	_jumpVerb = 0;
 	_jumpZone = 0;
 	_oldSpriteIndex = 0;
@@ -104,12 +104,18 @@ ObjectsManager::ObjectsManager(HopkinsEngine *vm) {
 	_oldDirectionSpriteIdx = 59;
 	_objectWidth = _objectHeight = 0;
 	_hidingActiveFl = false;
+	_curObjectFileNum = 0;
+	_objectDataBuf = g_PTRNUL;
+	PERSO_ON = false;
+	BOBTOUS = false;
+	OBSSEUL = false;
 }
 
 ObjectsManager::~ObjectsManager() {
 	_vm->_globals->freeMemory(_forestSprite);
 	_vm->_globals->freeMemory(_gestureBuf);
 	_vm->_globals->freeMemory(_headSprites);
+	_vm->_globals->freeMemory(_objectDataBuf);
 
 	for (int idx = 0; idx < 6; ++idx)
 		_hidingItemData[idx] = _vm->_globals->freeMemory(_hidingItemData[idx]);
@@ -120,9 +126,32 @@ void ObjectsManager::clearAll() {
 	_forestSprite = _vm->_globals->freeMemory(_forestSprite);
 	_curGestureFile = 0;
 	_gestureBuf = _vm->_globals->freeMemory(_gestureBuf);
+	_curObjectFileNum = 0;
 
 	for (int idx = 0; idx < 6; ++idx)
 		_hidingItemData[idx] = _vm->_globals->freeMemory(_hidingItemData[idx]);
+
+	_objectDataBuf = _vm->_globals->freeMemory(_objectDataBuf);
+}
+
+// Load Object
+void ObjectsManager::loadObjects() {
+	byte *data = _vm->_fileManager->loadFile("OBJET.DAT");
+	byte *srcP = data;
+
+	for (int idx = 0; idx < 300; ++idx) {
+		ObjectAuthIcon *objectAuthIcon = &_objectAuthIcons[idx];
+		objectAuthIcon->_objectFileNum = *srcP++;
+		objectAuthIcon->_idx = *srcP++;
+		objectAuthIcon->_flag1 = *srcP++;
+		objectAuthIcon->_flag2 = *srcP++;
+		objectAuthIcon->_flag3 = *srcP++;
+		objectAuthIcon->_flag4 = *srcP++;
+		objectAuthIcon->_flag5 = *srcP++;
+		objectAuthIcon->_flag6 = *srcP++;
+	}
+
+	_vm->_globals->freeMemory(data);
 }
 
 // Reset Hiding Items
@@ -157,35 +186,35 @@ void ObjectsManager::changeObject(int objIndex) {
 
 byte *ObjectsManager::loadObjectFromFile(int objIndex, bool mode) {
 	byte *dataP = NULL;
-	int objectFileNum = _vm->_globals->_objectAuthIcons[objIndex]._objectFileNum;
-	int idx = _vm->_globals->_objectAuthIcons[objIndex]._idx;
+	int objectFileNum = _objectAuthIcons[objIndex]._objectFileNum;
+	int idx = _objectAuthIcons[objIndex]._idx;
 
 	if (mode)
 		++idx;
 
-	if (objectFileNum != _vm->_globals->_curObjectFileNum) {
-		if (_vm->_globals->_objectDataBuf != g_PTRNUL)
-			ObjectsManager::removeObjectDataBuf();
+	if (objectFileNum != _curObjectFileNum) {
+		if (_objectDataBuf != g_PTRNUL)
+			removeObjectDataBuf();
 		if (objectFileNum == 1) {
-			_vm->_globals->_objectDataBuf = ObjectsManager::loadSprite("OBJET1.SPR");
+			_objectDataBuf = loadSprite("OBJET1.SPR");
 		}
-		_vm->_globals->_curObjectFileNum = objectFileNum;
+		_curObjectFileNum = objectFileNum;
 	}
 
-	int width = ObjectsManager::getWidth(_vm->_globals->_objectDataBuf, idx);
-	int height = ObjectsManager::getHeight(_vm->_globals->_objectDataBuf, idx);
+	int width = getWidth(_objectDataBuf, idx);
+	int height = getHeight(_objectDataBuf, idx);
 	_objectWidth = width;
 	_objectHeight = height;
 
 	if (mode) {
-		sprite_alone(_vm->_globals->_objectDataBuf, _vm->_eventsManager->_objectBuf, idx);
+		sprite_alone(_objectDataBuf, _vm->_eventsManager->_objectBuf, idx);
 		dataP = _vm->_eventsManager->_objectBuf;
 	} else { 
 		dataP = _vm->_globals->allocMemory(height * width);
 		if (dataP == g_PTRNUL)
 			error("CAPTURE_OBJET");
 
-		capture_mem_sprite(_vm->_globals->_objectDataBuf, dataP, idx);
+		capture_mem_sprite(_objectDataBuf, dataP, idx);
 	}
 
 	return dataP;
@@ -308,8 +337,8 @@ void ObjectsManager::capture_mem_sprite(const byte *objectData, byte *sprite, in
 }
 
 void ObjectsManager::removeObjectDataBuf() {
-	_vm->_globals->_curObjectFileNum = 0;
-	_vm->_globals->_objectDataBuf = _vm->_globals->freeMemory(_vm->_globals->_objectDataBuf);
+	_curObjectFileNum = 0;
+	_objectDataBuf = _vm->_globals->freeMemory(_objectDataBuf);
 }
 
 /**
@@ -2504,13 +2533,13 @@ void ObjectsManager::nextObjectIcon(int idx) {
 	do {
 		if (nextCursorId == 2 || nextCursorId == 5 || nextCursorId == 6) {
 			_vm->_eventsManager->_mouseCursorId = 6;
-			if (_vm->_globals->_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag1 == 1)
+			if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag1 == 1)
 				return;
 			nextCursorId++;
 		}
 		if (nextCursorId == 7) {
 			_vm->_eventsManager->_mouseCursorId = 7;
-			if (_vm->_globals->_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag2 == 1)
+			if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag2 == 1)
 				return;
 			nextCursorId++;
 		}	
@@ -2520,35 +2549,35 @@ void ObjectsManager::nextObjectIcon(int idx) {
 		}
 		if (nextCursorId == 9 || nextCursorId == 10) {
 			_vm->_eventsManager->_mouseCursorId = 10;
-			if (_vm->_globals->_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag6 == 1)
+			if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag6 == 1)
 				return;
 			nextCursorId = 11;
 		}
 
 		if (nextCursorId == 11) {
 			_vm->_eventsManager->_mouseCursorId = 11;
-			if (_vm->_globals->_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag3 == 1)
+			if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag3 == 1)
 				return;
 			nextCursorId++;
 		}
 
 		if (nextCursorId == 12 || nextCursorId == 13) {
 			_vm->_eventsManager->_mouseCursorId = 13;
-			if (_vm->_globals->_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag4 == 1)
+			if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag4 == 1)
 				return;
 			nextCursorId = 14;
 		}
 
 		if (nextCursorId == 14 || nextCursorId == 15) {
 			_vm->_eventsManager->_mouseCursorId = 15;
-			if (_vm->_globals->_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag5 == 1)
+			if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag5 == 1)
 				return;
 			nextCursorId = 23;
 		}
 
 		if (nextCursorId >= 16 && nextCursorId <= 23) {
 			_vm->_eventsManager->_mouseCursorId = 23;
-			if (_vm->_globals->_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag5 == 2)
+			if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag5 == 2)
 				return;
 			nextCursorId = 24;
 		}
@@ -2558,7 +2587,7 @@ void ObjectsManager::nextObjectIcon(int idx) {
 		}
 		
 		nextCursorId = 6;
-	} while (_vm->_globals->_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag6 != 2);
+	} while (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag6 != 2);
 }
 
 void ObjectsManager::takeInventoryObject(int idx) {
diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h
index ed8b202..00317c0 100644
--- a/engines/hopkins/objects.h
+++ b/engines/hopkins/objects.h
@@ -32,6 +32,17 @@
 #define MAX_SPRITE 5
 namespace Hopkins {
 
+struct ObjectAuthIcon {
+	byte _objectFileNum;
+	byte _idx;
+	byte _flag1;
+	byte _flag2;
+	byte _flag3;
+	byte _flag4;
+	byte _flag5;
+	byte _flag6;
+};
+
 struct SpriteItem {
 	int _animationType;
 	const byte *_spriteData;
@@ -111,6 +122,9 @@ private:
 	byte *_hidingItemData[6];
 	HidingItem _hidingItem[25];
 	bool _hidingActiveFl;
+	ObjectAuthIcon _objectAuthIcons[300];
+	int _curObjectFileNum;
+	byte *_objectDataBuf;
 
 	void sprite_alone(const byte *objectData, byte *sprite, int objIndex);
 	void removeObjectDataBuf();
@@ -238,6 +252,7 @@ public:
 	void doActionLeft(int idx);
 	void doActionDiagRight(int idx);
 	void doActionDiagLeft(int idx);
+	void loadObjects();
 	byte *loadObjectFromFile(int objIndex, bool mode);
 	void resetHidingItems();
 	void resetHidingUseCount(int idx);


Commit: 91469d7d386d5eca3f471d0a57cc5bf333212b89
    https://github.com/scummvm/scummvm/commit/91469d7d386d5eca3f471d0a57cc5bf333212b89
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-03-25T00:02:07-07:00

Commit Message:
HOPKINS: More work on Globals

Changed paths:
    engines/hopkins/anim.cpp
    engines/hopkins/anim.h
    engines/hopkins/globals.cpp
    engines/hopkins/globals.h
    engines/hopkins/graphics.cpp
    engines/hopkins/objects.cpp
    engines/hopkins/objects.h
    engines/hopkins/talk.cpp



diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
index 8967281..7debc1f 100644
--- a/engines/hopkins/anim.cpp
+++ b/engines/hopkins/anim.cpp
@@ -38,6 +38,14 @@ namespace Hopkins {
 AnimationManager::AnimationManager(HopkinsEngine *vm) {
 	_vm = vm;
 	_clearAnimationFl = false;
+	for (int i = 0; i < 8; ++i)
+		Common::fill((byte *)&Bank[i], (byte *)&Bank[i] + sizeof(BankItem), 0);
+	for (int i = 0; i < 35; ++i)
+		Common::fill((byte *)&_animBqe[i], (byte *)&_animBqe[i] + sizeof(BqeAnimItem), 0);
+}
+
+void AnimationManager::clearAll() {
+	initAnimBqe();
 }
 
 /**
@@ -475,15 +483,15 @@ void AnimationManager::loadAnim(const Common::String &animName) {
  */
 void AnimationManager::clearAnim() {
 	for (int idx = 0; idx < 35; ++idx) {
-		_vm->_globals->_animBqe[idx]._data = _vm->_globals->freeMemory(_vm->_globals->_animBqe[idx]._data);
-		_vm->_globals->_animBqe[idx]._enabledFl = false;
+		_animBqe[idx]._data = _vm->_globals->freeMemory(_animBqe[idx]._data);
+		_animBqe[idx]._enabledFl = false;
 	}
 
 	for (int idx = 0; idx < 8; ++idx) {
-		_vm->_globals->Bank[idx]._data = _vm->_globals->freeMemory(_vm->_globals->Bank[idx]._data);
-		_vm->_globals->Bank[idx]._loadedFl = false;
-		_vm->_globals->Bank[idx]._filename = "";
-		_vm->_globals->Bank[idx]._fileHeader = 0;
+		Bank[idx]._data = _vm->_globals->freeMemory(Bank[idx]._data);
+		Bank[idx]._loadedFl = false;
+		Bank[idx]._filename = "";
+		Bank[idx]._fileHeader = 0;
 	}
 }
 
@@ -492,24 +500,24 @@ void AnimationManager::clearAnim() {
  */
 int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) {
 	int result = 0;
-	_vm->_globals->Bank[idx]._loadedFl = true;
-	_vm->_globals->Bank[idx]._filename = filename;
+	Bank[idx]._loadedFl = true;
+	Bank[idx]._filename = filename;
 
 	byte *fileDataPtr = _vm->_fileManager->loadFile(filename);
 
-	_vm->_globals->Bank[idx]._fileHeader = 0;
+	Bank[idx]._fileHeader = 0;
 	if (fileDataPtr[1] == 'L' && fileDataPtr[2] == 'E')
-		_vm->_globals->Bank[idx]._fileHeader = 1;
+		Bank[idx]._fileHeader = 1;
 	else if (fileDataPtr[1] == 'O' && fileDataPtr[2] == 'R')
-		_vm->_globals->Bank[idx]._fileHeader = 2;
+		Bank[idx]._fileHeader = 2;
 
-	if (!_vm->_globals->Bank[idx]._fileHeader) {
+	if (!Bank[idx]._fileHeader) {
 		_vm->_globals->freeMemory(fileDataPtr);
-		_vm->_globals->Bank[idx]._loadedFl = false;
+		Bank[idx]._loadedFl = false;
 		result = -1;
 	}
 	
-	_vm->_globals->Bank[idx]._data = fileDataPtr;
+	Bank[idx]._data = fileDataPtr;
 
 	int objectDataIdx = 0;
 	for(objectDataIdx = 0; objectDataIdx <= 249; objectDataIdx++) {
@@ -521,12 +529,12 @@ int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) {
 
 	if (objectDataIdx > 249) {
 		_vm->_globals->freeMemory(fileDataPtr);
-		_vm->_globals->Bank[idx]._loadedFl = false;
+		Bank[idx]._loadedFl = false;
 		result = -2;
 	}
-	_vm->_globals->Bank[idx]._objDataIdx = objectDataIdx;
+	Bank[idx]._objDataIdx = objectDataIdx;
 
-	Common::String ofsFilename = _vm->_globals->Bank[idx]._filename;
+	Common::String ofsFilename = Bank[idx]._filename;
 	char ch;
 	do {
 		ch = ofsFilename.lastChar();
@@ -538,15 +546,15 @@ int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) {
 	if (f.exists(ofsFilename)) {
 		byte *ofsData = _vm->_fileManager->loadFile(ofsFilename);
 		byte *curOfsData = ofsData;
-		for (int objIdx = 0; objIdx < _vm->_globals->Bank[idx]._objDataIdx; ++objIdx, curOfsData += 8) {
+		for (int objIdx = 0; objIdx < Bank[idx]._objDataIdx; ++objIdx, curOfsData += 8) {
 			int x1 = READ_LE_INT16(curOfsData);
 			int y1 = READ_LE_INT16(curOfsData + 2);
 			int x2 = READ_LE_INT16(curOfsData + 4);
 			int y2 = READ_LE_INT16(curOfsData + 6);
 
-			_vm->_objectsManager->setOffsetXY(_vm->_globals->Bank[idx]._data, objIdx, x1, y1, 0);
-			if (_vm->_globals->Bank[idx]._fileHeader == 2)
-				_vm->_objectsManager->setOffsetXY(_vm->_globals->Bank[idx]._data, objIdx, x2, y2, 1);
+			_vm->_objectsManager->setOffsetXY(Bank[idx]._data, objIdx, x1, y1, 0);
+			if (Bank[idx]._fileHeader == 2)
+				_vm->_objectsManager->setOffsetXY(Bank[idx]._data, objIdx, x2, y2, 1);
 		}
 
 		_vm->_globals->freeMemory(ofsData);
@@ -571,18 +579,18 @@ void AnimationManager::searchAnim(const byte *data, int animIndex, int bufSize)
 					if (READ_BE_UINT32(&data[curBufferPos]) == MKTAG('A', 'N', 'I', 'M') || READ_BE_UINT24(&data[curBufferPos]) == MKTAG24('F', 'I', 'N'))
 						innerLoopCond = true;
 					if (bufSize < curBufferPos) {
-						_vm->_globals->_animBqe[animIndex]._enabledFl = false;
-						_vm->_globals->_animBqe[animIndex]._data = g_PTRNUL;
+						_animBqe[animIndex]._enabledFl = false;
+						_animBqe[animIndex]._data = g_PTRNUL;
 						return;
 					}
 					++curBufferPos;
 					++count;
 				} while (!innerLoopCond);
-				_vm->_globals->_animBqe[animIndex]._data = _vm->_globals->allocMemory(count + 50);
-				_vm->_globals->_animBqe[animIndex]._enabledFl = true;
-				memcpy(_vm->_globals->_animBqe[animIndex]._data, data + dataIdx + 5, 20);
+				_animBqe[animIndex]._data = _vm->_globals->allocMemory(count + 50);
+				_animBqe[animIndex]._enabledFl = true;
+				memcpy(_animBqe[animIndex]._data, data + dataIdx + 5, 20);
 
-				byte *dataP = _vm->_globals->_animBqe[animIndex]._data;
+				byte *dataP = _animBqe[animIndex]._data;
 				int curDestDataIndx = 20;
 				int curSrcDataIndx = dataIdx + 25;
 
@@ -904,4 +912,18 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
 	_vm->_eventsManager->_mouseFl = true;
 }
 
+void AnimationManager::initAnimBqe() {
+	for (int idx = 0; idx < 35; ++idx) {
+		_animBqe[idx]._data = g_PTRNUL;
+		_animBqe[idx]._enabledFl = false;
+	}
+
+	for (int idx = 0; idx < 8; ++idx) {
+		Bank[idx]._data = g_PTRNUL;
+		Bank[idx]._loadedFl = false;
+		Bank[idx]._filename = "";
+		Bank[idx]._fileHeader = 0;
+	}
+}
+
 } // End of namespace Hopkins
diff --git a/engines/hopkins/anim.h b/engines/hopkins/anim.h
index 93256f9..6becd54 100644
--- a/engines/hopkins/anim.h
+++ b/engines/hopkins/anim.h
@@ -30,6 +30,19 @@
 
 namespace Hopkins {
 
+struct BankItem {
+	byte *_data;
+	bool _loadedFl;
+	Common::String _filename;
+	int _fileHeader;
+	int _objDataIdx;
+};
+
+struct BqeAnimItem {
+	byte *_data;
+	bool _enabledFl;
+};
+
 class HopkinsEngine;
 
 class AnimationManager {
@@ -38,11 +51,16 @@ private:
 
 	HopkinsEngine *_vm;
 
+	void initAnimBqe();
 	int loadSpriteBank(int idx, const Common::String &filename);
 	void searchAnim(const byte *data, int animIndex, int count);
 
 public:
+	BqeAnimItem _animBqe[35];
+	BankItem Bank[8];
+
 	AnimationManager(HopkinsEngine *vm);
+	void clearAll();
 
 	void loadAnim(const Common::String &animName);
 	void clearAnim();
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index 0d97789..459bf56 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -70,16 +70,10 @@ Globals::Globals(HopkinsEngine *vm) {
 	strcpy((char *)g_PTRNUL, "POINTERNULL");
 
 	// Initialize array properties
-	for (int i = 0; i < 35; ++i)
-		Common::fill((byte *)&_animBqe[i], (byte *)&_animBqe[i] + sizeof(BqeAnimItem), 0);
-	for (int i = 0; i < 8; ++i)
-		Common::fill((byte *)&Bank[i], (byte *)&Bank[i] + sizeof(BankItem), 0);
 	for (int i = 0; i < 6; ++i)
 		Common::fill((byte *)&Liste[i], (byte *)&Liste[i] + sizeof(ListeItem), 0);
 	for (int i = 0; i < 35; ++i)
 		Common::fill((byte *)&Liste2[i], (byte *)&Liste2[i] + sizeof(ListeItem), 0);
-	for (int i = 0; i < 30; ++i)
-		Common::fill((byte *)&VBob[i], (byte *)&VBob[i] + sizeof(VBobItem), 0);
 	for (int i = 0; i < 500; ++i)
 		_spriteSize[i] = 0;
 	for (int i = 0; i < 70; ++i)
@@ -143,9 +137,6 @@ Globals::~Globals() {
 	freeMemory((byte *)_saveData);
 	freeMemory(_answerBuffer);
 	freeMemory(_characterSpriteBuf);
-
-	clearVBob();
-
 	free(g_PTRNUL);
 }
 
@@ -186,11 +177,7 @@ void Globals::setConfig() {
 }
 
 void Globals::clearAll() {
-	initAnimBqe();
-
 	_vm->_fontManager->clearAll();
-
-	initVBob();
 	_vm->_dialogsManager->clearAll();
 	_answerBuffer = g_PTRNUL;
 	_levelSpriteBuf = g_PTRNUL;
@@ -221,44 +208,6 @@ void Globals::loadCharacterData() {
 	_vm->_objectsManager->resetOldDirection();
 }
 
-void Globals::initAnimBqe() {
-	for (int idx = 0; idx < 35; ++idx) {
-		_animBqe[idx]._data = g_PTRNUL;
-		_animBqe[idx]._enabledFl = false;
-	}
-
-	for (int idx = 0; idx < 8; ++idx) {
-		Bank[idx]._data = g_PTRNUL;
-		Bank[idx]._loadedFl = false;
-		Bank[idx]._filename = "";
-		Bank[idx]._fileHeader = 0;
-	}
-}
-
-void Globals::initVBob() {
-	for (int idx = 0; idx < 30; ++idx) {
-		VBob[idx]._displayMode = 0;
-		VBob[idx]._xp = 0;
-		VBob[idx]._yp = 0;
-		VBob[idx]._frameIndex = 0;
-		VBob[idx]._surface = g_PTRNUL;
-		VBob[idx]._spriteData = g_PTRNUL;
-		VBob[idx]._oldSpriteData = g_PTRNUL;
-	}
-}
-
-void Globals::clearVBob() {
-	for (int idx = 0; idx < 30; ++idx) {
-		VBob[idx]._displayMode = 0;
-		VBob[idx]._xp = 0;
-		VBob[idx]._yp = 0;
-		VBob[idx]._frameIndex = 0;
-		VBob[idx]._surface = freeMemory(VBob[idx]._surface);
-		VBob[idx]._spriteData = g_PTRNUL;
-		VBob[idx]._oldSpriteData = g_PTRNUL;
-	}
-}
-
 byte *Globals::allocMemory(int count) {
 	byte *result = (byte *)malloc(count);
 	if (!result)
diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h
index 519ad51..76439fc 100644
--- a/engines/hopkins/globals.h
+++ b/engines/hopkins/globals.h
@@ -29,19 +29,6 @@
 
 namespace Hopkins {
 
-struct BqeAnimItem {
-	byte *_data;
-	bool _enabledFl;
-};
-
-struct BankItem {
-	byte *_data;
-	bool _loadedFl;
-	Common::String _filename;
-	int _fileHeader;
-	int _objDataIdx;
-};
-
 struct ListeItem {
 	bool _visibleFl;
 	int _posX;
@@ -50,45 +37,6 @@ struct ListeItem {
 	int _height;
 };
 
-struct VBobItem {
-	byte *_spriteData;
-	int _displayMode;
-	int _xp;
-	int _yp;
-	int _frameIndex;
-	byte *_surface;
-	int _oldX;
-	int _oldY;
-	int _oldFrameIndex;
-	byte *_oldSpriteData;
-};
-
-/**
- * Mode for SortItem records
- */
-enum SortMode { SORT_NONE = 0, SORT_BOB = 1, SORT_SPRITE = 2, SORT_HIDING = 3 };
-
-/**
- * Structure to represent a pending display of either a Bob, Sprite, or Cache Item.
- */
-struct SortItem {
-	SortMode _sortMode;
-	int _index;
-	int _priority;
-};
-
-struct HidingItem {
-	int _x;
-	int _y;
-	int _spriteIndex;
-	int _width;
-	int _height;
-	int _useCount;
-	byte *_spriteData;
-	bool _resetUseCount;
-	int _yOffset;
-};
-
 struct HopkinsItem {
 	int _speedX;
 	int _speedY;
@@ -211,9 +159,6 @@ class Globals {
 private:
 	HopkinsEngine *_vm;
 
-	void initAnimBqe();
-	void initVBob();
-
 public:
 	bool _disableInventFl;
 	bool _cityMapEnabledFl;
@@ -259,7 +204,6 @@ public:
 	bool _actionMoveTo;
 	bool _freezeCharacterFl;
 	bool _checkDistanceFl;
-	BqeAnimItem _animBqe[35];
 	byte *_characterSpriteBuf;
 	Common::String _zoneFilename;
 	Common::String _textFilename;
@@ -268,8 +212,6 @@ public:
 	int iRegul;
 	ListeItem Liste[6];
 	ListeItem Liste2[35];
-	BankItem Bank[8];
-	VBobItem VBob[30];
 
 	Globals(HopkinsEngine *vm);
 	~Globals();
@@ -278,7 +220,6 @@ public:
 	void setConfig();
 	void clearAll();
 	void loadCharacterData();
-	void clearVBob();
 
 	void B_CACHE_OFF(int idx);
 };
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 14f23ad..a0cd39c 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -1061,7 +1061,7 @@ void GraphicsManager::Sprite_Vesa(byte *surface, const byte *spriteData, int xp,
 
 void GraphicsManager::endDisplayBob() {
 	for (int idx = 1; idx <= 20; ++idx) {
-		if (_vm->_globals->_animBqe[idx]._enabledFl)
+		if (_vm->_animationManager->_animBqe[idx]._enabledFl)
 			_vm->_objectsManager->hideBob(idx);
 	}
 
@@ -1069,7 +1069,7 @@ void GraphicsManager::endDisplayBob() {
 	_vm->_eventsManager->refreshScreenAndEvents();
 
 	for (int idx = 1; idx <= 20; ++idx) {
-		if (_vm->_globals->_animBqe[idx]._enabledFl)
+		if (_vm->_animationManager->_animBqe[idx]._enabledFl)
 			_vm->_objectsManager->resetBob(idx);
 	}
 
@@ -1078,13 +1078,13 @@ void GraphicsManager::endDisplayBob() {
 	}
 
 	for (int idx = 1; idx <= 20; ++idx) {
-		_vm->_globals->_animBqe[idx]._enabledFl = false;
+		_vm->_animationManager->_animBqe[idx]._enabledFl = false;
 	}
 }
 
 void GraphicsManager::displayAllBob() {
 	for (int idx = 1; idx <= 20; ++idx) {
-		if (_vm->_globals->_animBqe[idx]._enabledFl)
+		if (_vm->_animationManager->_animBqe[idx]._enabledFl)
 			_vm->_objectsManager->displayBob(idx);
 	}
 }
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 5810daa..531c32c 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -45,6 +45,7 @@ ObjectsManager::ObjectsManager(HopkinsEngine *vm) {
 		Common::fill((byte *)&_bob[i], (byte *)&_bob[i] + sizeof(BobItem), 0);
 
 	for (int i = 0; i < 30; ++i) {
+		Common::fill((byte *)&VBob[i], (byte *)&VBob[i] + sizeof(VBobItem), 0);
 		Common::fill((byte *)&_lockedAnims[i], (byte *)&_lockedAnims[i] + sizeof(LockAnimItem), 0);
 	}
 
@@ -116,6 +117,7 @@ ObjectsManager::~ObjectsManager() {
 	_vm->_globals->freeMemory(_gestureBuf);
 	_vm->_globals->freeMemory(_headSprites);
 	_vm->_globals->freeMemory(_objectDataBuf);
+	clearVBob();
 
 	for (int idx = 0; idx < 6; ++idx)
 		_hidingItemData[idx] = _vm->_globals->freeMemory(_hidingItemData[idx]);
@@ -132,6 +134,7 @@ void ObjectsManager::clearAll() {
 		_hidingItemData[idx] = _vm->_globals->freeMemory(_hidingItemData[idx]);
 
 	_objectDataBuf = _vm->_globals->freeMemory(_objectDataBuf);
+	initVBob();
 }
 
 // Load Object
@@ -652,11 +655,11 @@ void ObjectsManager::displayBob(int idx) {
 
 	resetBob(idx);
 
-	const byte *data = _vm->_globals->_animBqe[idx]._data;
+	const byte *data = _vm->_animationManager->_animBqe[idx]._data;
 	int bankIdx = READ_LE_INT16(data);
 	if (!bankIdx)
 		return;
-	if ((!_vm->_globals->Bank[bankIdx]._loadedFl) || (!READ_LE_UINT16(data + 24)))
+	if ((!_vm->_animationManager->Bank[bankIdx]._loadedFl) || (!READ_LE_UINT16(data + 24)))
 		return;
 
 
@@ -672,15 +675,15 @@ void ObjectsManager::displayBob(int idx) {
 
 	_bob[idx]._isSpriteFl = false;
 
-	if (_vm->_globals->Bank[bankIdx]._fileHeader == 1) {
+	if (_vm->_animationManager->Bank[bankIdx]._fileHeader == 1) {
 		_bob[idx]._isSpriteFl = true;
 		_bob[idx]._zoomFactor = 0;
 		_bob[idx]._flipFl = false;
 	}
 
-	_bob[idx]._animData = _vm->_globals->_animBqe[idx]._data;
+	_bob[idx]._animData = _vm->_animationManager->_animBqe[idx]._data;
 	_bob[idx]._bobMode = 10;
-	_bob[idx]._spriteData = _vm->_globals->Bank[bankIdx]._data;
+	_bob[idx]._spriteData = _vm->_animationManager->Bank[bankIdx]._data;
 
 	_bob[idx]._bobModeChange = bobModeChange;
 	_bob[idx].field20 = newField20;
@@ -1139,7 +1142,7 @@ void ObjectsManager::displayVBob() {
 	int width, height;
 
 	for (int idx = 0; idx <= 29; idx++) {
-		VBobItem *vbob = &_vm->_globals->VBob[idx];
+		VBobItem *vbob = &VBob[idx];
 		if (vbob->_displayMode == 4) {
 			width = getWidth(vbob->_spriteData, vbob->_frameIndex);
 			height = getHeight(vbob->_spriteData, vbob->_frameIndex);
@@ -2120,7 +2123,7 @@ void ObjectsManager::clearScreen() {
 	_vm->_graphicsManager->endDisplayBob();
 	_vm->_fontManager->hideText(5);
 	_vm->_fontManager->hideText(9);
-	_vm->_globals->clearVBob();
+	clearVBob();
 	_vm->_animationManager->clearAnim();
 	_vm->_linesManager->clearAllZones();
 	_vm->_linesManager->resetLines();
@@ -2776,7 +2779,7 @@ void ObjectsManager::VBOB(byte *src, int idx, int xp, int yp, int frameIndex) {
 	if (idx > 29)
 		error("MAX_VBOB exceeded");
 
-	VBobItem *vbob = &_vm->_globals->VBob[idx];
+	VBobItem *vbob = &VBob[idx];
 	if (vbob->_displayMode <= 1) {
 		vbob->_displayMode = 1;
 		vbob->_xp = xp;
@@ -2805,7 +2808,7 @@ void ObjectsManager::VBOB_OFF(int idx) {
 	if (idx > 29)
 		error("MAX_VBOB exceeded");
 
-	VBobItem *vbob = &_vm->_globals->VBob[idx];
+	VBobItem *vbob = &VBob[idx];
 	if (vbob->_displayMode <= 1)
 		vbob->_displayMode = 0;
 	else
@@ -4007,6 +4010,30 @@ void ObjectsManager::loadHidingItems(const Common::String &file) {
 	_vm->_globals->freeMemory(ptr);
 }
 
+void ObjectsManager::initVBob() {
+	for (int idx = 0; idx < 30; ++idx) {
+		VBob[idx]._displayMode = 0;
+		VBob[idx]._xp = 0;
+		VBob[idx]._yp = 0;
+		VBob[idx]._frameIndex = 0;
+		VBob[idx]._surface = g_PTRNUL;
+		VBob[idx]._spriteData = g_PTRNUL;
+		VBob[idx]._oldSpriteData = g_PTRNUL;
+	}
+}
+
+void ObjectsManager::clearVBob() {
+	for (int idx = 0; idx < 30; ++idx) {
+		VBob[idx]._displayMode = 0;
+		VBob[idx]._xp = 0;
+		VBob[idx]._yp = 0;
+		VBob[idx]._frameIndex = 0;
+		VBob[idx]._surface = _vm->_globals->freeMemory(VBob[idx]._surface);
+		VBob[idx]._spriteData = g_PTRNUL;
+		VBob[idx]._oldSpriteData = g_PTRNUL;
+	}
+}
+
 void ObjectsManager::enableHiding() {
 	_hidingActiveFl = true;
 }
diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h
index 00317c0..c1bfadd 100644
--- a/engines/hopkins/objects.h
+++ b/engines/hopkins/objects.h
@@ -91,11 +91,50 @@ struct BobItem {
 	int _zoomOutFactor;
 };
 
+struct HidingItem {
+	int _x;
+	int _y;
+	int _spriteIndex;
+	int _width;
+	int _height;
+	int _useCount;
+	byte *_spriteData;
+	bool _resetUseCount;
+	int _yOffset;
+};
+
 struct LockAnimItem {
 	bool _enableFl;
 	int _posX;
 };
 
+struct VBobItem {
+	byte *_spriteData;
+	int _displayMode;
+	int _xp;
+	int _yp;
+	int _frameIndex;
+	byte *_surface;
+	int _oldX;
+	int _oldY;
+	int _oldFrameIndex;
+	byte *_oldSpriteData;
+};
+
+/**
+ * Mode for SortItem records
+ */
+enum SortMode { SORT_NONE = 0, SORT_BOB = 1, SORT_SPRITE = 2, SORT_HIDING = 3 };
+
+/**
+ * Structure to represent a pending display of either a Bob, Sprite, or Cache Item.
+ */
+struct SortItem {
+	SortMode _sortMode;
+	int _index;
+	int _priority;
+};
+
 class HopkinsEngine;
 
 class ObjectsManager {
@@ -125,6 +164,10 @@ private:
 	ObjectAuthIcon _objectAuthIcons[300];
 	int _curObjectFileNum;
 	byte *_objectDataBuf;
+	VBobItem VBob[30];
+
+	void initVBob();
+	void clearVBob();
 
 	void sprite_alone(const byte *objectData, byte *sprite, int objIndex);
 	void removeObjectDataBuf();
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index 2c1281f..3404399 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -470,26 +470,26 @@ void TalkManager::searchCharacterPalette(int startIdx, bool dark) {
 
 void TalkManager::dialogWait() {
 	for (int idx = 26; idx <= 30; ++idx) {
-		if (_vm->_globals->_animBqe[idx]._enabledFl)
+		if (_vm->_animationManager->_animBqe[idx]._enabledFl)
 			BOB_VISU_PARLE(idx);
 	}
 }
 
 void TalkManager::dialogTalk() {
 	for (int idx = 26; idx <= 30; ++idx) {
-		if (_vm->_globals->_animBqe[idx]._enabledFl)
+		if (_vm->_animationManager->_animBqe[idx]._enabledFl)
 			_vm->_objectsManager->hideBob(idx);
 	}
 
 	for (int idx = 26; idx <= 30; ++idx) {
-		if (_vm->_globals->_animBqe[idx]._enabledFl)
+		if (_vm->_animationManager->_animBqe[idx]._enabledFl)
 			_vm->_objectsManager->resetBob(idx);
 	}
 }
 
 void TalkManager::dialogEndTalk() {
 	for (int idx = 21; idx <= 25; ++idx) {
-		if (_vm->_globals->_animBqe[idx]._enabledFl)
+		if (_vm->_animationManager->_animBqe[idx]._enabledFl)
 			_vm->_objectsManager->hideBob(idx);
 	}
 
@@ -497,7 +497,7 @@ void TalkManager::dialogEndTalk() {
 	_vm->_eventsManager->refreshScreenAndEvents();
 
 	for (int idx = 21; idx <= 25; ++idx) {
-		if (_vm->_globals->_animBqe[idx]._enabledFl)
+		if (_vm->_animationManager->_animBqe[idx]._enabledFl)
 			_vm->_objectsManager->resetBob(idx);
 	}
 }
@@ -592,7 +592,7 @@ int TalkManager::countBoxLines(int idx, const Common::String &file) {
 
 void TalkManager::VISU_PARLE() {
 	for (int idx = 21; idx <= 25; ++idx) {
-		if (_vm->_globals->_animBqe[idx]._enabledFl)
+		if (_vm->_animationManager->_animBqe[idx]._enabledFl)
 			BOB_VISU_PARLE(idx);
 	}
 }
@@ -601,7 +601,7 @@ void TalkManager::BOB_VISU_PARLE(int idx) {
 	_vm->_objectsManager->_priorityFl = true;
 	if (!_vm->_objectsManager->_bob[idx]._bobMode) {
 		_vm->_objectsManager->resetBob(idx);
-		byte *bqeData = _vm->_globals->_animBqe[idx]._data;
+		byte *bqeData = _vm->_animationManager->_animBqe[idx]._data;
 		int newMode = READ_LE_INT16(bqeData + 2);
 		if (!newMode)
 			newMode = 1;
@@ -609,7 +609,7 @@ void TalkManager::BOB_VISU_PARLE(int idx) {
 			_vm->_objectsManager->_bob[idx]._isSpriteFl = true;
 			_vm->_objectsManager->_bob[idx]._zoomFactor = 0;
 			_vm->_objectsManager->_bob[idx]._flipFl = false;
-			_vm->_objectsManager->_bob[idx]._animData = _vm->_globals->_animBqe[idx]._data;
+			_vm->_objectsManager->_bob[idx]._animData = _vm->_animationManager->_animBqe[idx]._data;
 			_vm->_objectsManager->_bob[idx]._bobMode = 10;
 			bqeData = _characterSprite;
 			_vm->_objectsManager->_bob[idx]._spriteData = _characterSprite;
@@ -695,8 +695,8 @@ void TalkManager::initCharacterAnim() {
 
 void TalkManager::clearCharacterAnim() {
 	for (int idx = 21; idx <= 34; ++idx) {
-		_vm->_globals->_animBqe[idx]._data = _vm->_globals->freeMemory(_vm->_globals->_animBqe[idx]._data);
-		_vm->_globals->_animBqe[idx]._enabledFl = false;
+		_vm->_animationManager->_animBqe[idx]._data = _vm->_globals->freeMemory(_vm->_animationManager->_animBqe[idx]._data);
+		_vm->_animationManager->_animBqe[idx]._enabledFl = false;
 	}
 }
 
@@ -713,25 +713,25 @@ bool TalkManager::searchCharacterAnim(int idx, const byte *bufPerso, int animId,
 				if (READ_BE_UINT32(curPtr) == MKTAG('A', 'N', 'I', 'M') || READ_BE_UINT24(curPtr) == MKTAG24('F', 'I', 'N'))
 					loopCond = true;
 				if (bufIndx > bufferSize) {
-					_vm->_globals->_animBqe[idx]._enabledFl = false;
-					_vm->_globals->_animBqe[idx]._data = g_PTRNUL;
+					_vm->_animationManager->_animBqe[idx]._enabledFl = false;
+					_vm->_animationManager->_animBqe[idx]._data = g_PTRNUL;
 					return false;
 				}
 				++bufIndx;
 				++animLength;
 				++curPtr;
 			} while (!loopCond);
-			_vm->_globals->_animBqe[idx]._data = _vm->_globals->allocMemory(animLength + 50);
-			_vm->_globals->_animBqe[idx]._enabledFl = true;
-			memcpy(_vm->_globals->_animBqe[idx]._data, (const byte *)(bufPerso + bufPos + 5), 20);
+			_vm->_animationManager->_animBqe[idx]._data = _vm->_globals->allocMemory(animLength + 50);
+			_vm->_animationManager->_animBqe[idx]._enabledFl = true;
+			memcpy(_vm->_animationManager->_animBqe[idx]._data, (const byte *)(bufPerso + bufPos + 5), 20);
 			int bqeVal = READ_LE_INT16(bufPos + bufPerso + 29);
-			WRITE_LE_UINT16(_vm->_globals->_animBqe[idx]._data + 20, READ_LE_INT16(bufPos + bufPerso + 25));
-			WRITE_LE_UINT16(_vm->_globals->_animBqe[idx]._data + 22, READ_LE_INT16(bufPos + bufPerso + 27));
-			WRITE_LE_UINT16(_vm->_globals->_animBqe[idx]._data + 24, bqeVal);
-			WRITE_LE_UINT16(_vm->_globals->_animBqe[idx]._data + 26, READ_LE_INT16(bufPos + bufPerso + 31));
-			_vm->_globals->_animBqe[idx]._data[28] = bufPerso[bufPos + 33];
-			_vm->_globals->_animBqe[idx]._data[29] = bufPerso[bufPos + 34];
-			byte *bqeCurData = _vm->_globals->_animBqe[idx]._data + 20;
+			WRITE_LE_UINT16(_vm->_animationManager->_animBqe[idx]._data + 20, READ_LE_INT16(bufPos + bufPerso + 25));
+			WRITE_LE_UINT16(_vm->_animationManager->_animBqe[idx]._data + 22, READ_LE_INT16(bufPos + bufPerso + 27));
+			WRITE_LE_UINT16(_vm->_animationManager->_animBqe[idx]._data + 24, bqeVal);
+			WRITE_LE_UINT16(_vm->_animationManager->_animBqe[idx]._data + 26, READ_LE_INT16(bufPos + bufPerso + 31));
+			_vm->_animationManager->_animBqe[idx]._data[28] = bufPerso[bufPos + 33];
+			_vm->_animationManager->_animBqe[idx]._data[29] = bufPerso[bufPos + 34];
+			byte *bqeCurData = _vm->_animationManager->_animBqe[idx]._data + 20;
 			const byte *curBufPerso = bufPos + bufPerso + 25;
 			for (int i = 1; i < 5000; i++) {
 				bqeCurData += 10;






More information about the Scummvm-git-logs mailing list