diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index ca794e9..4a4a837 100644
a
|
b
|
reg_t kDrawPic(EngineState *s, int argc, reg_t *argv) {
|
533 | 533 | if (argc >= 4) |
534 | 534 | EGApaletteNo = argv[3].toUint16(); |
535 | 535 | |
| 536 | debugC(kDebugLevelGraphics, "kDrawPic(pictureId:%d, animationNr:%d, animationBlackOutFlag:%d, mirroredFlag:%d, addToFlag:%d, EGApaletteNo:%d)", pictureId, animationNr, animationBlackoutFlag, mirroredFlag, addToFlag, EGApaletteNo); |
536 | 537 | g_sci->_gfxPaint16->kernelDrawPicture(pictureId, animationNr, animationBlackoutFlag, mirroredFlag, addToFlag, EGApaletteNo); |
537 | 538 | |
538 | 539 | return s->r_acc; |
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index 7e71c1a..3545286 100644
a
|
b
|
GuiResourceId GfxPicture::getResourceId() {
|
61 | 61 | // Games like PQ1 use the "old" vector data picture format, but are actually SCI1.1 |
62 | 62 | // We should leave this that way to decide the format on-the-fly instead of hardcoding it in any way |
63 | 63 | void GfxPicture::draw(int16 animationNr, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo) { |
| 64 | debugC(kDebugLevelGraphics, "GfxPicture::draw(animationNr: %d...)", animationNr); |
64 | 65 | uint16 headerSize; |
65 | 66 | |
66 | 67 | _animationNr = animationNr; |
… |
… |
void GfxPicture::draw(int16 animationNr, bool mirroredFlag, bool addToFlag, int1
|
70 | 71 | _priority = 0; |
71 | 72 | |
72 | 73 | headerSize = READ_LE_UINT16(_resource->data); |
| 74 | debugC(kDebugLevelGraphics, "\theaderSize: %d (0x%02x)", headerSize, headerSize); |
73 | 75 | switch (headerSize) { |
74 | 76 | case 0x26: // SCI 1.1 VGA picture |
75 | 77 | _resourceType = SCI_PICTURE_TYPE_SCI11; |
… |
… |
static const byte vector_defaultEGApriority[PIC_EGAPRIORITY_SIZE] = {
|
487 | 489 | }; |
488 | 490 | |
489 | 491 | void GfxPicture::drawVectorData(byte *data, int dataSize) { |
| 492 | debugC(kDebugLevelGraphics, "GfxPicture::drawVectorData(data, dataSize:%d) _resourceId: %d", dataSize, _resourceId); |
490 | 493 | byte pic_op; |
491 | 494 | byte pic_color = _screen->getColorDefaultVectorData(); |
492 | 495 | byte pic_priority = 255, pic_control = 255; |
… |
… |
void GfxPicture::drawVectorData(byte *data, int dataSize) {
|
510 | 513 | _EGApaletteNo = 0; |
511 | 514 | |
512 | 515 | if (_resMan->getViewType() == kViewEga) { |
| 516 | debugC(kDebugLevelGraphics, "\tEGA View"); |
513 | 517 | isEGA = true; |
514 | 518 | // setup default mapping tables |
515 | 519 | for (i = 0; i < PIC_EGAPALETTE_TOTALSIZE; i += PIC_EGAPALETTE_SIZE) |
… |
… |
void GfxPicture::drawVectorData(byte *data, int dataSize) {
|
539 | 543 | if (_resourceId == 631) |
540 | 544 | ignoreBrokenPriority = true; |
541 | 545 | } |
542 | | } |
| 546 | } else |
| 547 | debugC(kDebugLevelGraphics, "\tNon-EGA View"); |
543 | 548 | |
544 | 549 | // Drawing |
545 | 550 | while (curPos < dataSize) { |
546 | | //warning("%X at %d", data[curPos], curPos); |
| 551 | if (curPos >= 9300) |
| 552 | debugC(kDebugLevelGraphics, "%X at %d", data[curPos], curPos); |
547 | 553 | switch (pic_op = data[curPos++]) { |
548 | 554 | case PIC_OP_SET_COLOR: |
549 | 555 | pic_color = data[curPos++]; |
… |
… |
void GfxPicture::drawVectorData(byte *data, int dataSize) {
|
797 | 803 | if ((_EGAdrawingVisualize) && (isEGA)) { |
798 | 804 | _screen->copyToScreen(); |
799 | 805 | g_system->updateScreen(); |
800 | | g_system->delayMillis(10); |
| 806 | if (curPos < 9300) |
| 807 | g_system->delayMillis(10); |
| 808 | else |
| 809 | g_system->delayMillis(100); |
801 | 810 | } |
802 | 811 | } |
803 | 812 | error("picture vector data without terminator"); |