aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/gui32.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-02-05 18:56:13 +0000
committerMartin Kiewitz2010-02-05 18:56:13 +0000
commitf3ea96d168052e72ff0e5b16cef745779a89ea30 (patch)
tree916aee71947e6b8c7065762e9a512ea11c8a377b /engines/sci/graphics/gui32.cpp
parente7cffa90b2718398f93ce9e8ad331cd39e832c14 (diff)
downloadscummvm-rg350-f3ea96d168052e72ff0e5b16cef745779a89ea30.tar.gz
scummvm-rg350-f3ea96d168052e72ff0e5b16cef745779a89ea30.tar.bz2
scummvm-rg350-f3ea96d168052e72ff0e5b16cef745779a89ea30.zip
SCI: GfxCoordAdjuster class added, local2Global and global2Local use that class directly, kGraph / RedrawBox is now using GfxPaint16 directly
svn-id: r47908
Diffstat (limited to 'engines/sci/graphics/gui32.cpp')
-rw-r--r--engines/sci/graphics/gui32.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/engines/sci/graphics/gui32.cpp b/engines/sci/graphics/gui32.cpp
index f8c54c0fe4..031544e663 100644
--- a/engines/sci/graphics/gui32.cpp
+++ b/engines/sci/graphics/gui32.cpp
@@ -37,6 +37,7 @@
#include "sci/graphics/cursor.h"
#include "sci/graphics/cache.h"
#include "sci/graphics/compare.h"
+#include "sci/graphics/coordadjuster.h"
#include "sci/graphics/frameout.h"
#include "sci/graphics/paint32.h"
#include "sci/graphics/picture.h"
@@ -48,6 +49,8 @@ namespace Sci {
SciGui32::SciGui32(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor)
: _s(state), _screen(screen), _palette(palette), _cache(cache), _cursor(cursor) {
+ _coordAdjuster = new GfxCoordAdjuster32(_s->_segMan);
+ _s->_gfxCoordAdjuster = _coordAdjuster;
_compare = new GfxCompare(_s->_segMan, _s->_kernel, _cache, _screen);
_paint32 = new GfxPaint32(_s->resMan, _s->_segMan, _s->_kernel, _cache, _screen, _palette);
_s->_gfxPaint = _paint32;
@@ -59,6 +62,7 @@ SciGui32::~SciGui32() {
delete _frameout;
delete _paint32;
delete _compare;
+ delete _coordAdjuster;
}
void SciGui32::resetEngineState(EngineState *s) {
@@ -68,24 +72,6 @@ void SciGui32::resetEngineState(EngineState *s) {
void SciGui32::init() {
}
-void SciGui32::globalToLocal(int16 *x, int16 *y, reg_t planeObj) {
- //int16 resY = GET_SEL32V(_s->_segMan, planeObj, resY);
- //int16 resX = GET_SEL32V(_s->_segMan, planeObj, resX);
- //*x = ( *x * _screen->getWidth()) / resX;
- //*y = ( *y * _screen->getHeight()) / resY;
- *x -= GET_SEL32V(_s->_segMan, planeObj, left);
- *y -= GET_SEL32V(_s->_segMan, planeObj, top);
-}
-
-void SciGui32::localToGlobal(int16 *x, int16 *y, reg_t planeObj) {
- //int16 resY = GET_SEL32V(_s->_segMan, planeObj, resY);
- //int16 resX = GET_SEL32V(_s->_segMan, planeObj, resX);
- *x += GET_SEL32V(_s->_segMan, planeObj, left);
- *y += GET_SEL32V(_s->_segMan, planeObj, top);
- //*x = ( *x * resX) / _screen->getWidth();
- //*y = ( *y * resY) / _screen->getHeight();
-}
-
void SciGui32::textSize(const char *text, int16 font, int16 maxWidth, int16 *textWidth, int16 *textHeight) {
*textWidth = 0;
*textHeight = 0;