aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNicola Mettifogo2007-03-18 10:30:51 +0000
committerNicola Mettifogo2007-03-18 10:30:51 +0000
commit8f74bc15aef1c56b29d21bf3aa7e8e51687b98ae (patch)
tree17591017cb77075e393b1a9e29562200108fa7f8 /engines
parentec58e9ac05cb887c3c2e0c8c9d98d3300fb4ad86 (diff)
downloadscummvm-rg350-8f74bc15aef1c56b29d21bf3aa7e8e51687b98ae.tar.gz
scummvm-rg350-8f74bc15aef1c56b29d21bf3aa7e8e51687b98ae.tar.bz2
scummvm-rg350-8f74bc15aef1c56b29d21bf3aa7e8e51687b98ae.zip
- made loadPointer return a new StaticCnv instead of accepting a parameter.
- adjusted Gfx code handling mouse pointers. svn-id: r26201
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/disk.cpp4
-rw-r--r--engines/parallaction/disk.h2
-rw-r--r--engines/parallaction/graphics.cpp12
-rw-r--r--engines/parallaction/graphics.h2
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;