fix shape loading for cdrom version

svn-id: r18737
This commit is contained in:
Gregory Montoir 2005-09-02 18:35:01 +00:00
parent 35bd5fa824
commit a861226f20
2 changed files with 9 additions and 1 deletions

View file

@ -433,7 +433,12 @@ uint8 *KyraEngine::seq_setPanPages(int pageNum, int shape) {
const uint8 *data = _screen->getPagePtr(pageNum);
uint16 numShapes = READ_LE_UINT16(data);
if (shape < numShapes) {
uint16 offs = READ_LE_UINT16(data + 2 + shape * 2);
uint32 offs = 0;
if (_game == KYRA1CD) {
offs = READ_LE_UINT32(data + 2 + shape * 4);
} else {
offs = READ_LE_UINT16(data + 2 + shape * 2);
}
if (offs != 0) {
data += offs;
uint16 sz = READ_LE_UINT16(data + 6);

View file

@ -323,6 +323,9 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
DrawShapePlotPixelCallback plotPixel = _drawShapePlotPixelTable[ppc];
const uint8 *src = shapeData;
if (_vm->game() == KYRA1CD) {
src += 2;
}
uint16 shapeFlags = READ_LE_UINT16(src); src += 2;
int shapeHeight = *src++;