diff options
author | Max Horn | 2002-12-25 21:04:47 +0000 |
---|---|---|
committer | Max Horn | 2002-12-25 21:04:47 +0000 |
commit | fca9ec09e7709ff4400d2a9a7fd76f4f21781006 (patch) | |
tree | 2c9dd18841983469c4780c75d90762f8a167c048 /scumm/gfx.cpp | |
parent | f1808d20ac90f4212fd14aeaf544a8aaac6a3fbc (diff) | |
download | scummvm-rg350-fca9ec09e7709ff4400d2a9a7fd76f4f21781006.tar.gz scummvm-rg350-fca9ec09e7709ff4400d2a9a7fd76f4f21781006.tar.bz2 scummvm-rg350-fca9ec09e7709ff4400d2a9a7fd76f4f21781006.zip |
moved CharsetRendere into its own header/source file; changed Scumm::_charset into a pointer, to make it possible to use different implementations of it
svn-id: r6147
Diffstat (limited to 'scumm/gfx.cpp')
-rw-r--r-- | scumm/gfx.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 075aee2760..02cd689ee8 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -22,7 +22,7 @@ #include "stdafx.h" #include "scumm.h" #include "actor.h" -#include "gui/newgui.h" +#include "charset.h" #include "resource.h" #include "util.h" @@ -337,7 +337,7 @@ void Scumm::drawDirtyScreenParts() } /* Handle shaking */ - if (_shakeEnabled && !_newgui->isActive()) { + if (_shakeEnabled) { _shakeFrame = (_shakeFrame + 1) & (NUM_SHAKE_POSITIONS - 1); _system->set_shake_pos(shake_positions[_shakeFrame]); } else if (!_shakeEnabled &&_shakeFrame != 0) { @@ -613,7 +613,7 @@ void Scumm::redrawBGAreas() int diff; if (!(_features & GF_AFTER_V7)) - if (camera._cur.x != camera._last.x && _charset._hasMask) + if (camera._cur.x != camera._last.x && _charset->_hasMask) stopTalk(); val = 0; @@ -675,14 +675,14 @@ void Scumm::restoreCharsetBg() { if (gdi._mask_left != -1) { restoreBG(gdi._mask_left, gdi._mask_top, gdi._mask_right, gdi._mask_bottom); - _charset._hasMask = false; + _charset->_hasMask = false; gdi._mask_left = -1; - _charset._strLeft = -1; - _charset._left = -1; + _charset->_strLeft = -1; + _charset->_left = -1; } - _charset._nextLeft = _string[0].xpos; - _charset._nextTop = _string[0].ypos; + _charset->_nextLeft = _string[0].xpos; + _charset->_nextTop = _string[0].ypos; } void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor) @@ -725,7 +725,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor) if (vs->alloctwobuffers && _currentRoom != 0 /*&& _vars[VAR_V5_DRAWFLAGS]&2 */ ) { blit(backbuff, bgbak, width, height); - if (vs->number == 0 && _charset._hasMask && height) { + if (vs->number == 0 && _charset->_hasMask && height) { byte *mask; int mask_width = (width >> 3); @@ -751,7 +751,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor) int Scumm::hasCharsetMask(int x, int y, int x2, int y2) { - if (!_charset._hasMask || y > gdi._mask_bottom || x > gdi._mask_right || + if (!_charset->_hasMask || y > gdi._mask_bottom || x > gdi._mask_right || y2 < gdi._mask_top || x2 < gdi._mask_left) return 0; return 1; @@ -1737,7 +1737,7 @@ void Scumm::setCameraAt(int pos_x, int pos_y) runScript(_vars[VAR_SCROLL_SCRIPT], 0, 0, 0); } - if (camera._cur.x != camera._last.x && _charset._hasMask) + if (camera._cur.x != camera._last.x && _charset->_hasMask) stopTalk(); } } |