diff options
-rw-r--r-- | akos.cpp | 21 | ||||
-rw-r--r-- | gfx.cpp | 6 | ||||
-rw-r--r-- | object.cpp | 10 | ||||
-rw-r--r-- | scumm.h | 2 |
4 files changed, 30 insertions, 9 deletions
@@ -897,7 +897,26 @@ void Scumm::akos_codec1_ignorePakCols(AkosRenderer * ar, int num) void Scumm::akos_codec5(AkosRenderer * ar) { - warning("akos_codec5: not implemented"); + VirtScreen *vs; + BompDrawData bdd; + + vs = &virtscr[1]; + + bdd.dataptr = ar->srcptr; + bdd.out = ar->outptr - (ar->width/2) - (ar->height * ar->outwidth); + bdd.outheight = ar->outheight; + bdd.outwidth = ar->outwidth; + bdd.scale_x = 0xFF; + bdd.scale_y = 0xFF; + bdd.srcheight = ar->height; + bdd.srcwidth = ar->width; + bdd.x = ar->x; + bdd.y = ar->y; + + drawBomp(&bdd,0,bdd.dataptr,0,0); + updateDirtyRect(0, ar->x - ar->width /2, ar->x - ar->width/2+ar->width, ar->y -ar->height, ar->y, 0); + + } void Scumm::akos_codec16(AkosRenderer * ar) @@ -2544,7 +2544,10 @@ int Scumm::remapPaletteColor(int r, int g, int b, uint threshold) return bestitem; } -void Scumm::drawBomp(BompDrawData * bd) +// param3=clipping ? +// param2=scalling or not ? +// param1= never used ? +void Scumm::drawBomp(BompDrawData *bd, int param1, byte* dataPtr, int param2, int param3) { byte *dest = bd->out + bd->y * bd->outwidth, *src; int h = bd->srcheight; @@ -2640,7 +2643,6 @@ CHECK_HEAP; } - /* Yazoo: This function create the specialPalette used for semi-transparency in SamnMax */ diff --git a/object.cpp b/object.cpp index c0c2f4ddb2..64a12c8009 100644 --- a/object.cpp +++ b/object.cpp @@ -1246,7 +1246,7 @@ void Scumm::drawBlastObject(BlastObject * eo) bdd.srcheight = READ_LE_UINT16(&((BompHeader *)bomp)->height); bdd.out = vs->screenPtr + vs->xstart; - bdd.outwidth = 320; + bdd.outwidth = vs->width; bdd.outheight = vs->height; bdd.dataptr = bomp + 10; bdd.x = eo->posX; @@ -1254,12 +1254,12 @@ void Scumm::drawBlastObject(BlastObject * eo) bdd.scale_x = (unsigned char)eo->unk3; bdd.scale_y = (unsigned char)eo->unk4; + drawBomp(&bdd, 0, bdd.dataptr, 1, 0); + + updateDirtyRect(vs->number, bdd.x, bdd.x + bdd.srcwidth, bdd.y, - bdd.y + bdd.srcheight, 0); + bdd.y + bdd.srcheight, 0); - if (eo->number) { - drawBomp(&bdd); - } } void Scumm::removeBlastObjects() @@ -1155,7 +1155,7 @@ public: void drawRoomObjects(int arg); void drawRoomObject(int i, int arg); void drawBox(int x, int y, int x2, int y2, int color); - void drawBomp(BompDrawData *bd); + void drawBomp(BompDrawData *bd, int param1, byte* dataPtr, int param2, int param3); void restoreBG(int left, int top, int right, int bottom); void redrawBGStrip(int start, int num); |