aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2013-08-11 01:19:23 +0300
committerEugene Sandulenko2013-09-06 14:51:12 +0300
commit60ca9f74ac8dfbfcee4bdae3ffbce039fce42854 (patch)
tree9eb852ebd1cbff46d4615990ba832a36aa8ea588 /engines/fullpipe
parent1ca1a5dfa041179d980676c6aa8fa135f7b69a0e (diff)
downloadscummvm-rg350-60ca9f74ac8dfbfcee4bdae3ffbce039fce42854.tar.gz
scummvm-rg350-60ca9f74ac8dfbfcee4bdae3ffbce039fce42854.tar.bz2
scummvm-rg350-60ca9f74ac8dfbfcee4bdae3ffbce039fce42854.zip
FULLPIPE: Fix bug with lost picture palettes
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/gameloader.cpp2
-rw-r--r--engines/fullpipe/gfx.cpp4
-rw-r--r--engines/fullpipe/messages.cpp6
-rw-r--r--engines/fullpipe/scene.cpp1
-rw-r--r--engines/fullpipe/statics.cpp8
-rw-r--r--engines/fullpipe/utils.cpp2
6 files changed, 12 insertions, 11 deletions
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index 7d1d938f74..205a84ee41 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -260,7 +260,7 @@ void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAn
StaticANIObject *ani;
for (int i = 0; i < picAniInfoCount; i++) {
- debug(0, "PicAniInfo: id: %d type: %d", picAniInfo[i]->objectId, picAniInfo[i]->type);
+ debug(7, "PicAniInfo: id: %d type: %d", picAniInfo[i]->objectId, picAniInfo[i]->type);
if (picAniInfo[i]->type & 2) {
pict = sc->getPictureObjectById(picAniInfo[i]->objectId, picAniInfo[i]->field_8);
if (pict) {
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 003d619612..2c4701833b 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -333,7 +333,7 @@ bool Picture::load(MfcArchive &file) {
assert (g_fullpipe->_gameProjectVersion >= 12);
- _alpha = file.readUint32LE();
+ _alpha = file.readUint32LE() & 0xff;
int havePal = file.readUint32LE();
@@ -423,7 +423,7 @@ void Picture::draw(int x, int y, int style, int angle) {
if (!_bitmap)
return;
- if (_alpha < 0xff) {
+ if ((_alpha & 0xff) < 0xff) {
warning("Picture:draw: alpha = %0x", _alpha);
}
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 43584f4aa7..40cd35530a 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -88,9 +88,9 @@ bool ExCommand::handleMessage() {
if (_messageKind == 17 || (_excFlags & 1)) {
if (_parId) {
- MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_parId);
- if (m)
- m->update();
+ MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_parId);
+ if (mq)
+ mq->update();
}
}
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index fd506712da..a895010cb7 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -381,6 +381,7 @@ void Scene::objectList_sortByPriority(CPtrList &list) {
}
void Scene::draw() {
+ debug(0, ">>>>> Scene::draw()");
updateScrolling();
drawContent(60000, 0, true);
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 4854bb1d0d..3a82f7dbe6 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -574,7 +574,7 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) {
return false;
}
- debug(0, "StaticANIObject::setPicAniInfo() (%s [%d])", transCyrillic((byte *)_objectName), _id);
+ debug(0, "StaticANIObject::setPicAniInfo() (%s [%d]) type: %d, statid: %d, movid: %d", transCyrillic((byte *)_objectName), _id, picAniInfo->type, picAniInfo->staticsId, picAniInfo->movementId);
if (picAniInfo->type & 3) {
setOXY(picAniInfo->ox, picAniInfo->oy);
@@ -585,7 +585,7 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) {
}
if (picAniInfo->type & 1) {
- _messageQueueId = picAniInfo->type >> 16;
+ _messageQueueId = (picAniInfo->type >> 16) & 0xffff;
if (picAniInfo->staticsId) {
_statics = getStaticsById(picAniInfo->staticsId);
@@ -928,7 +928,7 @@ void Movement::removeFirstPhase() {
}
bool Movement::gotoNextFrame(int callback1, int callback2) {
- debug(0, "Movement::gotoNextFrame(%d, %d)", callback1, callback2);
+ debug(8, "Movement::gotoNextFrame(%d, %d)", callback1, callback2);
if (!callback2) {
if (_currMovement) {
@@ -1151,7 +1151,7 @@ DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) {
_field_6A = src->_field_6A;
_dynFlags = src->_dynFlags;
- setPaletteData(getPaletteData());
+ setPaletteData(src->getPaletteData());
copyMemoryObject2(src);
}
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 900ca84eea..3684d3ccf5 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -155,7 +155,7 @@ void MemoryObject::loadFile(char *filename) {
_dataSize = s->size();
- debug(0, "Loading %s (%d bytes)", filename, _dataSize);
+ debug(5, "Loading %s (%d bytes)", filename, _dataSize);
_data = (byte *)calloc(_dataSize, 1);
s->read(_data, _dataSize);