aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/objects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hopkins/objects.cpp')
-rw-r--r--engines/hopkins/objects.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index b0170b2df3..5bf8342488 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -88,6 +88,7 @@ ObjectsManager::ObjectsManager(HopkinsEngine *vm) {
_lastDirection = DIR_NONE;
_oldDirection = DIR_NONE;
_oldDirectionSpriteIdx = 59;
+ _objectWidth = _objectHeight = 0;
}
ObjectsManager::~ObjectsManager() {
@@ -130,8 +131,8 @@ byte *ObjectsManager::loadObjectFromFile(int objIndex, bool mode) {
int width = ObjectsManager::getWidth(_vm->_globals->_objectDataBuf, idx);
int height = ObjectsManager::getHeight(_vm->_globals->_objectDataBuf, idx);
- _vm->_globals->_objectWidth = width;
- _vm->_globals->_objectHeight = height;
+ _objectWidth = width;
+ _objectHeight = height;
if (mode) {
sprite_alone(_vm->_globals->_objectDataBuf, _vm->_eventsManager->_objectBuf, idx);