aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v6.cpp
diff options
context:
space:
mode:
authorSven Hesse2009-06-24 21:49:37 +0000
committerSven Hesse2009-06-24 21:49:37 +0000
commitd03dc08b64073044267fb4b3ca6704fd62a19741 (patch)
treeb614178e652348fe9072479254ca333825a28a05 /engines/gob/inter_v6.cpp
parentef33f98a1a966b3956990414e62584ec371a550e (diff)
downloadscummvm-rg350-d03dc08b64073044267fb4b3ca6704fd62a19741.tar.gz
scummvm-rg350-d03dc08b64073044267fb4b3ca6704fd62a19741.tar.bz2
scummvm-rg350-d03dc08b64073044267fb4b3ca6704fd62a19741.zip
Wrapping resources (out of TOT, EXT, IM? and EX? files) loading into its own class
svn-id: r41839
Diffstat (limited to 'engines/gob/inter_v6.cpp')
-rw-r--r--engines/gob/inter_v6.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index c9fed80578..506de821d4 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -34,6 +34,7 @@
#include "gob/game.h"
#include "gob/expression.h"
#include "gob/script.h"
+#include "gob/resources.h"
#include "gob/draw.h"
#include "gob/sound/sound.h"
#include "gob/videoplayer.h"
@@ -241,18 +242,21 @@ bool Inter_v6::o6_loadCursor(OpFuncParams &params) {
if ((index * _vm->_draw->_cursorWidth) >= _vm->_draw->_cursorSprites->getWidth())
return false;
- int16 width, height;
- byte *dataBuf = _vm->_game->loadTotResource(id, 0, &width, &height);
+ Resource *resource = _vm->_game->_resources->getResource((uint16) id);
+ if (!resource)
+ return false;
_vm->_video->fillRect(*_vm->_draw->_cursorSprites,
index * _vm->_draw->_cursorWidth, 0,
index * _vm->_draw->_cursorWidth + _vm->_draw->_cursorWidth - 1,
_vm->_draw->_cursorHeight - 1, 0);
- _vm->_video->drawPackedSprite(dataBuf, width, height,
+ _vm->_video->drawPackedSprite(resource->getData(),
+ resource->getWidth(), resource->getHeight(),
index * _vm->_draw->_cursorWidth, 0, 0, *_vm->_draw->_cursorSprites);
_vm->_draw->_cursorAnimLow[index] = 0;
+ delete resource;
return false;
}