diff options
-rw-r--r-- | engines/parallaction/disk.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/disk.h | 2 | ||||
-rw-r--r-- | engines/parallaction/graphics.cpp | 12 | ||||
-rw-r--r-- | engines/parallaction/graphics.h | 2 |
4 files changed, 8 insertions, 12 deletions
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index def512c1b6..863eaada18 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -307,8 +307,10 @@ StaticCnv* Disk::loadHead(const char* name) { } -void Disk::loadPointer(StaticCnv* cnv) { +StaticCnv* Disk::loadPointer() { + StaticCnv* cnv = new StaticCnv; loadExternalStaticCnv("pointer", cnv); + return cnv; } void Disk::loadFont(const char* name, Cnv* cnv) { diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index a42a988d64..438f7af417 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -107,7 +107,7 @@ public: Script* loadScript(const char* name); Cnv* loadTalk(const char *name); void loadObjects(const char *name, Cnv *cnv); - void loadPointer(StaticCnv* cnv); + StaticCnv* loadPointer(); StaticCnv* loadHead(const char* name); void loadFont(const char* name, Cnv* cnv); void loadStatic(const char* name, StaticCnv* cnv); diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 1adda701f3..e8d8da16d4 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -51,7 +51,6 @@ const byte _glyphWidths[126] = { bool Gfx::_proportionalFont = false; Point Gfx::_labelPosition[2] = { { 0, 0 }, { 0, 0 } }; -StaticCnv Gfx::_mouseComposedArrow; byte * Gfx::_buffers[]; #define PALETTE_BACKUP PALETTE_SIZE @@ -458,7 +457,7 @@ void jobEraseLabel(void *parm, Job *j) { void Gfx::initMouse(uint16 arg_0) { - _vm->_disk->loadPointer(&_mouseComposedArrow); + _mouseComposedArrow = _vm->_disk->loadPointer(); byte temp[16*16]; memcpy(temp, _mouseArrow, 16*16); @@ -485,17 +484,12 @@ void Gfx::setMousePointer(int16 index) { g_system->showMouse(true); } else { - // inventory item pointer - StaticCnv mouse_pointer; - memcpy(&mouse_pointer, &_mouseComposedArrow, sizeof(StaticCnv)); - byte *v8 = mouse_pointer._data0; + byte *v8 = _mouseComposedArrow->_data0; - // FIXME: target offseting is not clear + // FIXME: target offseting is not clear extractInventoryGraphics(index, v8 + 7 + 32 * 7); - g_system->setMouseCursor(v8, 32, 32, 0, 0, 0); - } return; diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h index fbb5bbc0a3..9301fed35d 100644 --- a/engines/parallaction/graphics.h +++ b/engines/parallaction/graphics.h @@ -149,7 +149,7 @@ protected: static byte * _buffers[NUM_BUFFERS]; static byte _mouseArrow[256]; - static StaticCnv _mouseComposedArrow; + StaticCnv *_mouseComposedArrow; Cnv _font; |