diff options
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/graphics.cpp | 18 | ||||
-rw-r--r-- | engines/avalanche/trip6.cpp | 2 |
2 files changed, 7 insertions, 13 deletions
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index 957468044c..0574705044 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -86,20 +86,14 @@ void Graphics::drawBar(int16 x1, int16 y1, int16 x2, int16 y2, int16 color) { } void Graphics::drawSprite(const SpriteInfo &sprite, byte picnum, int16 x, int16 y) { - /* First we make the pixels of the spirte blank. */ - for (byte qay = 0; qay < sprite.yl; qay++) { - byte *mask = new byte[sprite.xl]; + drawPicture(_background, 0, 10); // TODO: Remove it later, implement otherwise!!! Now it only works with one sprite on the screen. - for (byte qax = 0; qax < sprite.xl; qax++) { - byte count = qax / 8; - mask[qax] = ((*sprite.sil[picnum])[qay][count] >> ((7 - qax % 8)) & 1); - if (mask[qax] == 0) + /* First we make the pixels of the spirte blank. */ + for (byte qay = 0; qay < sprite.yl; qay++) + for (byte qax = 0; qax < sprite.xl; qax++) + if (((*sprite.sil[picnum])[qay][qax / 8] >> ((7 - qax % 8)) & 1) == 0) *getPixel(x + qax, y + qay) = 0; - } - - delete[] mask; - } - + /* Then we draw the picture to the blank places. */ uint16 i = 0; // Because the original siltype starts at 5!!! See Graphics.h for definition. diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp index d7823c3639..d9b33ac95b 100644 --- a/engines/avalanche/trip6.cpp +++ b/engines/avalanche/trip6.cpp @@ -1093,7 +1093,7 @@ void Trip::rwsp(byte t, byte r) { } void Trip::apped(byte trn, byte np) { - tr[trn].appear(tr[trn].x - tr[trn]._info.xl / 2, tr[trn].y - tr[trn]._info.yl, _vm->_gyro->peds[np].dir); + tr[trn].appear(_vm->_gyro->peds[np].x - tr[trn]._info.xl / 2, _vm->_gyro->peds[np].y - tr[trn]._info.yl, _vm->_gyro->peds[np].dir); rwsp(trn, _vm->_gyro->peds[np].dir); } |