diff options
author | Max Horn | 2005-03-28 20:18:36 +0000 |
---|---|---|
committer | Max Horn | 2005-03-28 20:18:36 +0000 |
commit | c5a77afb01dcb4dc9329cecbb603beb73cfed592 (patch) | |
tree | 5883e06e7a263e66ada8af8a8035136b366c549a /scumm/object.cpp | |
parent | 6d62b11af70a5ed41c8f3b054314466d9337421a (diff) | |
download | scummvm-rg350-c5a77afb01dcb4dc9329cecbb603beb73cfed592.tar.gz scummvm-rg350-c5a77afb01dcb4dc9329cecbb603beb73cfed592.tar.bz2 scummvm-rg350-c5a77afb01dcb4dc9329cecbb603beb73cfed592.zip |
Cleaned up the object mode code; removed the friend class ScummEngine from class Gdi; moved dither code to ScummEngine
svn-id: r17277
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r-- | scumm/object.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index af145f796c..f406b36158 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -433,7 +433,7 @@ void ScummEngine::drawObject(int obj, int arg) { return; ObjectData &od = _objs[obj]; - int xpos, ypos, height, width; + int height, width; const byte *ptr; int x, a, numstrip; int tmp; @@ -446,8 +446,8 @@ void ScummEngine::drawObject(int obj, int arg) { checkRange(_numGlobalObjects - 1, 0, od.obj_nr, "Object %d out of range in drawObject"); - xpos = od.x_pos / 8; - ypos = od.y_pos; + const int xpos = od.x_pos / 8; + const int ypos = od.y_pos; width = od.width / 8; height = od.height &= 0xFFFFFFF8; // Mask out last 3 bits @@ -483,14 +483,11 @@ void ScummEngine::drawObject(int obj, int arg) { } if (numstrip != 0) { - byte flags = od.flags; + byte flags = od.flags | Gdi::dbObjectMode; - gdi._objectMode = true; if (_version == 1) { if (_features & GF_NES) { gdi.decodeNESObject(ptr, xpos, ypos, width, height); - } else { - gdi.decodeC64Gfx(ptr, gdi._C64.objectMap, width * (height / 8) * 3); } } // Sam & Max needs this to fix object-layering problems with |