aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-22 12:36:58 +0000
committerMartin Kiewitz2010-07-22 12:36:58 +0000
commita01152a3bacdeec06a4206b939bcfc1dc2c8ee65 (patch)
tree6ee9568bdaac761c48534b90373c46e08b8d681f /engines/sci/graphics
parent68783fa01cb144e676137444126e3c9d6caf0fa9 (diff)
downloadscummvm-rg350-a01152a3bacdeec06a4206b939bcfc1dc2c8ee65.tar.gz
scummvm-rg350-a01152a3bacdeec06a4206b939bcfc1dc2c8ee65.tar.bz2
scummvm-rg350-a01152a3bacdeec06a4206b939bcfc1dc2c8ee65.zip
SCI: some more work on priority sci32
svn-id: r51139
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/frameout.cpp6
-rw-r--r--engines/sci/graphics/picture.cpp7
-rw-r--r--engines/sci/graphics/picture.h1
3 files changed, 11 insertions, 3 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index c6956e97ca..bbfbd37ebe 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -218,12 +218,12 @@ void GfxFrameout::kernelFrameout() {
if (planePicture) {
// Show base picture
- planePicture->drawSci32Vga(0, planePicture->getSci32celX(0), planePicture->getSci32celY(0), planePictureMirrored);
+// planePicture->drawSci32Vga(0, planePicture->getSci32celX(0), planePicture->getSci32celY(0), planePictureMirrored);
// Allocate memory for picture cels
pictureCels = (FrameoutEntry *)malloc(planePicture->getSci32celCount() * sizeof(FrameoutEntry));
// Add following cels to the itemlist
FrameoutEntry *picEntry = pictureCels;
- for (int pictureCelNr = 1; pictureCelNr < planePictureCels; pictureCelNr++) {
+ for (int pictureCelNr = 0; pictureCelNr < planePictureCels; pictureCelNr++) {
picEntry->celNo = pictureCelNr;
picEntry->object = NULL_REG;
picEntry->y = planePicture->getSci32celY(pictureCelNr);
@@ -233,7 +233,7 @@ void GfxFrameout::kernelFrameout() {
if (_screen->getWidth() > 320)
celHeight = celHeight / 2;
- picEntry->priority = picEntry->y + celHeight;
+ picEntry->priority = planePicture->getSci32celPriority(pictureCelNr); // picEntry->y + celHeight;
picEntry->y = ((picEntry->y * _screen->getHeight()) / planeResY);
picEntry->x = ((picEntry->x * _screen->getWidth()) / planeResX);
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index 2b4ceac97b..b1ba656ccd 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -145,6 +145,13 @@ int16 GfxPicture::getSci32celX(int16 celNo) {
return READ_LE_UINT16(inbuffer + cel_headerPos + 38);
}
+int16 GfxPicture::getSci32celPriority(int16 celNo) {
+ byte *inbuffer = _resource->data;
+ int header_size = READ_LE_UINT16(inbuffer);
+ int cel_headerPos = header_size + 42 * celNo;
+ return READ_LE_UINT16(inbuffer + cel_headerPos + 36);
+}
+
int16 GfxPicture::getSci32celHeight(int16 celNo) {
byte *inbuffer = _resource->data;
int header_size = READ_LE_UINT16(inbuffer);
diff --git a/engines/sci/graphics/picture.h b/engines/sci/graphics/picture.h
index 571d291442..e684fc6fe1 100644
--- a/engines/sci/graphics/picture.h
+++ b/engines/sci/graphics/picture.h
@@ -58,6 +58,7 @@ public:
int16 getSci32celCount();
int16 getSci32celY(int16 celNo);
int16 getSci32celX(int16 celNo);
+ int16 getSci32celPriority(int16 celNo);
int16 getSci32celHeight(int16 celNo);
void drawSci32Vga(int16 celNo, int16 callerX, int16 callerY, bool mirrored);
#endif