diff options
author | Paul Gilbert | 2016-08-27 13:59:08 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-27 13:59:08 -0400 |
commit | f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7 (patch) | |
tree | 771a8d2b3fddf96c17a1d81d42cb08dfba09d110 /engines/sherlock | |
parent | 873d555add9aaf5eb0d021518f5134142e2c2ff6 (diff) | |
parent | 5ea32efbb0ecb3e6b8336ad3c2edd3905ea5b89a (diff) | |
download | scummvm-rg350-f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7.tar.gz scummvm-rg350-f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7.tar.bz2 scummvm-rg350-f5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7.zip |
Merge branch 'master' into xeen
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/screen.cpp | 34 | ||||
-rw-r--r-- | engines/sherlock/sherlock.cpp | 10 | ||||
-rw-r--r-- | engines/sherlock/surface.cpp | 6 | ||||
-rw-r--r-- | engines/sherlock/surface.h | 2 |
4 files changed, 26 insertions, 26 deletions
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp index a829ab22e6..423be448fe 100644 --- a/engines/sherlock/screen.cpp +++ b/engines/sherlock/screen.cpp @@ -48,7 +48,7 @@ Screen::Screen(SherlockEngine *vm) : BaseSurface(), _vm(vm), Common::fill(&_cMap[0], &_cMap[PALETTE_SIZE], 0); Common::fill(&_sMap[0], &_sMap[PALETTE_SIZE], 0); Common::fill(&_tMap[0], &_tMap[PALETTE_SIZE], 0); - + // Set up the initial font setFont(IS_SERRATED_SCALPEL ? 1 : 4); @@ -172,8 +172,8 @@ void Screen::restoreBackground(const Common::Rect &r) { _backBuffer.SHblitFrom(_backBuffer2, Common::Point(r.left, r.top), r); } -void Screen::slamArea(int16 xp, int16 yp, int16 width, int16 height) { - slamRect(Common::Rect(xp, yp, xp + width, yp + height)); +void Screen::slamArea(int16 xp, int16 yp, int16 width_, int16 height_) { + slamRect(Common::Rect(xp, yp, xp + width_, yp + height_)); } void Screen::slamRect(const Common::Rect &r) { @@ -204,11 +204,11 @@ void Screen::slamRect(const Common::Rect &r) { } } -void Screen::flushImage(ImageFrame *frame, const Common::Point &pt, int16 *xp, int16 *yp, - int16 *width, int16 *height) { +void Screen::flushImage(ImageFrame *frame, const Common::Point &pt, int16 *xp, int16 *yp, + int16 *width_, int16 *height_) { Common::Point imgPos = pt + frame->_offset; Common::Rect newBounds(imgPos.x, imgPos.y, imgPos.x + frame->_frame.w, imgPos.y + frame->_frame.h); - Common::Rect oldBounds(*xp, *yp, *xp + *width, *yp + *height); + Common::Rect oldBounds(*xp, *yp, *xp + *width_, *yp + *height_); if (!_flushScreen) { // See if the areas of the old and new overlap, and if so combine the areas @@ -228,16 +228,16 @@ void Screen::flushImage(ImageFrame *frame, const Common::Point &pt, int16 *xp, i *xp = newBounds.left; *yp = newBounds.top; - *width = newBounds.width(); - *height = newBounds.height(); + *width_ = newBounds.width(); + *height_ = newBounds.height(); } void Screen::flushScaleImage(ImageFrame *frame, const Common::Point &pt, int16 *xp, int16 *yp, - int16 *width, int16 *height, int scaleVal) { + int16 *width_, int16 *height_, int scaleVal) { Common::Point imgPos(pt.x + frame->sDrawXOffset(scaleVal), pt.y + frame->sDrawYOffset(scaleVal)); - Common::Rect newBounds(imgPos.x, imgPos.y, imgPos.x + frame->sDrawXSize(scaleVal), + Common::Rect newBounds(imgPos.x, imgPos.y, imgPos.x + frame->sDrawXSize(scaleVal), imgPos.y + frame->sDrawYSize(scaleVal)); - Common::Rect oldBounds(*xp, *yp, *xp + *width, *yp + *height); + Common::Rect oldBounds(*xp, *yp, *xp + *width_, *yp + *height_); if (!_flushScreen) { // See if the areas of the old and new overlap, and if so combine the areas @@ -257,8 +257,8 @@ void Screen::flushScaleImage(ImageFrame *frame, const Common::Point &pt, int16 * *xp = newBounds.left; *yp = newBounds.top; - *width = newBounds.width(); - *height = newBounds.height(); + *width_ = newBounds.width(); + *height_ = newBounds.height(); } void Screen::flushImage(ImageFrame *frame, const Common::Point &pt, Common::Rect &newBounds, int scaleVal) { @@ -292,15 +292,15 @@ void Screen::print(const Common::Point &pt, uint color, const char *formatStr, . // Figure out area to draw text in Common::Point pos = pt; - int width = stringWidth(str); + int width_ = stringWidth(str); pos.y--; // Font is always drawing one line higher if (!pos.x) // Center text horizontally - pos.x = (this->width() - width) / 2; + pos.x = (this->width() - width_) / 2; - Common::Rect textBounds(pos.x, pos.y, pos.x + width, pos.y + _fontHeight); + Common::Rect textBounds(pos.x, pos.y, pos.x + width_, pos.y + _fontHeight); if (textBounds.right > this->width()) - textBounds.moveTo(this->width() - width, textBounds.top); + textBounds.moveTo(this->width() - width_, textBounds.top); if (textBounds.bottom > this->height()) textBounds.moveTo(textBounds.left, this->height() - _fontHeight); diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp index e068ac481a..c6b38f78d7 100644 --- a/engines/sherlock/sherlock.cpp +++ b/engines/sherlock/sherlock.cpp @@ -30,6 +30,11 @@ namespace Sherlock { SherlockEngine::SherlockEngine(OSystem *syst, const SherlockGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc), _randomSource("Sherlock") { + DebugMan.addDebugChannel(kDebugLevelScript, "scripts", "Script debug level"); + DebugMan.addDebugChannel(kDebugLevelAdLibDriver, "AdLib", "AdLib driver debugging"); + DebugMan.addDebugChannel(kDebugLevelMT32Driver, "MT32", "MT32 driver debugging"); + DebugMan.addDebugChannel(kDebugLevelMusic, "Music", "Music debugging"); + _animation = nullptr; _debugger = nullptr; _events = nullptr; @@ -74,11 +79,6 @@ SherlockEngine::~SherlockEngine() { } void SherlockEngine::initialize() { - DebugMan.addDebugChannel(kDebugLevelScript, "scripts", "Script debug level"); - DebugMan.addDebugChannel(kDebugLevelAdLibDriver, "AdLib", "AdLib driver debugging"); - DebugMan.addDebugChannel(kDebugLevelMT32Driver, "MT32", "MT32 driver debugging"); - DebugMan.addDebugChannel(kDebugLevelMusic, "Music", "Music debugging"); - Fonts::setVm(this); ImageFile::setVm(this); ImageFile3DO::setVm(this); diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp index 93bc001149..cca012630c 100644 --- a/engines/sherlock/surface.cpp +++ b/engines/sherlock/surface.cpp @@ -29,9 +29,9 @@ BaseSurface::BaseSurface() : Graphics::Screen(0, 0), Fonts() { free(); // Free the 0x0 surface allocated by Graphics::Screen } -BaseSurface::BaseSurface(int width, int height) : Graphics::Screen(width, height), +BaseSurface::BaseSurface(int width_, int height_) : Graphics::Screen(width_, height_), Fonts() { - create(width, height); + create(width_, height_); } void BaseSurface::writeString(const Common::String &str, const Common::Point &pt, uint overrideColor) { @@ -61,7 +61,7 @@ void BaseSurface::SHtransBlitFrom(const Graphics::Surface &src, const Common::Po Common::Rect srcRect(0, 0, src.w, src.h); Common::Rect destRect(pt.x, pt.y, pt.x + src.w * SCALE_THRESHOLD / scaleVal, pt.y + src.h * SCALE_THRESHOLD / scaleVal); - + Graphics::Screen::transBlitFrom(src, srcRect, destRect, TRANSPARENCY, flipped, overrideColor); } diff --git a/engines/sherlock/surface.h b/engines/sherlock/surface.h index 401d9b648d..d55606ed82 100644 --- a/engines/sherlock/surface.h +++ b/engines/sherlock/surface.h @@ -121,7 +121,7 @@ protected: virtual void addDirtyRect(const Common::Rect &r) {} public: Surface() : BaseSurface() {} - Surface(int width, int height) : BaseSurface(width, height) {} + Surface(int width_, int height_) : BaseSurface(width_, height_) {} }; } // End of namespace Sherlock |