Skip to content

Commit

Permalink
KYRA: Rewrite the VQA decoder, using the VideoDecoder classes
Browse files Browse the repository at this point in the history
There isn't really a lot of benefit to this, but I think it's nicer
if all our video decoders at least try to use the same infrastructure.
  • Loading branch information
Torbjörn Andersson authored and Johannes Schickel committed Jan 18, 2014
1 parent c9b2c16 commit 19cb349
Show file tree
Hide file tree
Showing 4 changed files with 604 additions and 599 deletions.
6 changes: 5 additions & 1 deletion engines/kyra/screen.cpp
Expand Up @@ -977,6 +977,10 @@ void Screen::copyPage(uint8 srcPage, uint8 dstPage) {
}

void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint8 *src) {
copyBlockToPage(pageNum, w, x, y, w, h, src);
}

void Screen::copyBlockToPage(int pageNum, int pitch, int x, int y, int w, int h, const uint8 *src) {
if (y < 0) {
src += (-y) * w;
h += y;
Expand Down Expand Up @@ -1006,7 +1010,7 @@ void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint
while (h--) {
memcpy(dst, src, w);
dst += SCREEN_W;
src += w;
src += pitch;
}
}

Expand Down
1 change: 1 addition & 0 deletions engines/kyra/screen.h
Expand Up @@ -428,6 +428,7 @@ class Screen {

void copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *dest);
void copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint8 *src);
void copyBlockToPage(int pageNum, int pitch, int x, int y, int w, int h, const uint8 *src);

void shuffleScreen(int sx, int sy, int w, int h, int srcPage, int dstPage, int ticks, bool transparent);
void fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum = -1, bool xored = false);
Expand Down

0 comments on commit 19cb349

Please sign in to comment.