diff options
author | Nicola Mettifogo | 2008-06-29 09:30:32 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-06-29 09:30:32 +0000 |
commit | d8645297cd174fbbd7059a317975c45adefaa5e5 (patch) | |
tree | 29dcfbe1cbfe7ac8cde0e8545c550fc7f8f956cf /engines/parallaction/graphics.cpp | |
parent | 7a9e911896885750566a3c21e794823e4527f78a (diff) | |
download | scummvm-rg350-d8645297cd174fbbd7059a317975c45adefaa5e5.tar.gz scummvm-rg350-d8645297cd174fbbd7059a317975c45adefaa5e5.tar.bz2 scummvm-rg350-d8645297cd174fbbd7059a317975c45adefaa5e5.zip |
Changed all remaining code to use the GfxObj class to keep frames data. This allows for more uniform processing during rendering, and also fixes the display of dialogue faces for BRA.
svn-id: r32833
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r-- | engines/parallaction/graphics.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 58fb02a750..64edd7babe 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -356,7 +356,17 @@ void Gfx::drawItems() { Graphics::Surface *surf = g_system->lockScreen(); for (uint i = 0; i < _numItems; i++) { - blt(_items[i].rect, _items[i].data->getData(_items[i].frame), surf, LAYER_FOREGROUND, _items[i].transparentColor); + GfxObj *obj = _items[i].data; + + Common::Rect rect; + obj->getRect(obj->frame, rect); + rect.translate(obj->x, obj->y); + + if (obj->getSize(obj->frame) == obj->getRawSize(obj->frame)) { + blt(rect, obj->getData(obj->frame), surf, LAYER_FOREGROUND, _items[i].transparentColor); + } else { + unpackBlt(rect, obj->getData(obj->frame), obj->getRawSize(obj->frame), surf, LAYER_FOREGROUND, _items[i].transparentColor); + } } g_system->unlockScreen(); } @@ -949,7 +959,7 @@ Gfx::~Gfx() { -int Gfx::setItem(Frames* frames, uint16 x, uint16 y, byte transparentColor) { +int Gfx::setItem(GfxObj* frames, uint16 x, uint16 y, byte transparentColor) { int id = _numItems; _items[id].data = frames; @@ -965,9 +975,9 @@ int Gfx::setItem(Frames* frames, uint16 x, uint16 y, byte transparentColor) { void Gfx::setItemFrame(uint item, uint16 f) { assert(item < _numItems); - _items[item].frame = f; - _items[item].data->getRect(f, _items[item].rect); - _items[item].rect.moveTo(_items[item].x, _items[item].y); + _items[item].data->frame = f; + _items[item].data->x = _items[item].x; + _items[item].data->y = _items[item].y; } Gfx::Balloon* Gfx::getBalloon(uint id) { |