diff options
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/bitmap.cpp | 10 | ||||
-rw-r--r-- | engines/mohawk/cursors.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/livingbooks.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/livingbooks.h | 4 | ||||
-rw-r--r-- | engines/mohawk/livingbooks_lbx.cpp | 10 | ||||
-rw-r--r-- | engines/mohawk/riven_graphics.cpp | 8 | ||||
-rw-r--r-- | engines/mohawk/video.cpp | 2 |
7 files changed, 21 insertions, 21 deletions
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp index bc19fe2d3e..b321e043d9 100644 --- a/engines/mohawk/bitmap.cpp +++ b/engines/mohawk/bitmap.cpp @@ -580,7 +580,7 @@ void MohawkBitmap::drawRaw(Graphics::Surface *surface) { _data->skip(_header.bytesPerRow - _header.width * 3); } else { - _data->read((byte *)surface->pixels + y * _header.width, _header.width); + _data->read((byte *)surface->getBasePtr(0, y), _header.width); _data->skip(_header.bytesPerRow - _header.width); } } @@ -599,7 +599,7 @@ void MohawkBitmap::drawRLE8(Graphics::Surface *surface, bool isLE) { for (uint16 i = 0; i < _header.height; i++) { uint16 rowByteCount = isLE ? _data->readUint16LE() : _data->readUint16BE(); int32 startPos = _data->pos(); - byte *dst = (byte *)surface->pixels + i * _header.width; + byte *dst = (byte *)surface->getBasePtr(0, i); int16 remaining = _header.width; while (remaining > 0) { @@ -779,7 +779,7 @@ MohawkSurface *DOSBitmap::decodeImage(Common::SeekableReadStream *stream) { } Graphics::Surface *surface = createSurface(_header.width, _header.height); - memset(surface->pixels, 0, _header.width * _header.height); + memset(surface->getPixels(), 0, _header.width * _header.height); // Expand the <8bpp data to one byte per pixel switch (getBitsPerPixel()) { @@ -801,7 +801,7 @@ MohawkSurface *DOSBitmap::decodeImage(Common::SeekableReadStream *stream) { void DOSBitmap::expandMonochromePlane(Graphics::Surface *surface, Common::SeekableReadStream *rawStream) { assert(surface->format.bytesPerPixel == 1); - byte *dst = (byte *)surface->pixels; + byte *dst = (byte *)surface->getPixels(); // Expand the 8 pixels in a byte into a full byte per pixel @@ -830,7 +830,7 @@ void DOSBitmap::expandEGAPlanes(Graphics::Surface *surface, Common::SeekableRead // Note that the image is in EGA planar form and not just standard 4bpp // This seems to contradict the PoP specs which seem to do something else - byte *dst = (byte *)surface->pixels; + byte *dst = (byte *)surface->getPixels(); for (uint32 i = 0; i < surface->h; i++) { uint x = 0; diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp index c7bd03678f..f70efde5fb 100644 --- a/engines/mohawk/cursors.cpp +++ b/engines/mohawk/cursors.cpp @@ -121,11 +121,11 @@ void MystCursorManager::setCursor(uint16 id) { // Myst ME stores some cursors as 24bpp images instead of 8bpp if (surface->format.bytesPerPixel == 1) { - CursorMan.replaceCursor(surface->pixels, surface->w, surface->h, hotspotX, hotspotY, 0); + CursorMan.replaceCursor(surface->getPixels(), surface->w, surface->h, hotspotX, hotspotY, 0); CursorMan.replaceCursorPalette(mhkSurface->getPalette(), 0, 256); } else { Graphics::PixelFormat pixelFormat = g_system->getScreenFormat(); - CursorMan.replaceCursor(surface->pixels, surface->w, surface->h, hotspotX, hotspotY, pixelFormat.RGBToColor(255, 255, 255), false, &pixelFormat); + CursorMan.replaceCursor(surface->getPixels(), surface->w, surface->h, hotspotX, hotspotY, pixelFormat.RGBToColor(255, 255, 255), false, &pixelFormat); } _vm->_needsUpdate = true; diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index efa0dd3fd3..634ff441b6 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -311,8 +311,8 @@ void MohawkEngine_LivingBooks::loadBookInfo(const Common::String &filename) { // - fDebugWindow (always 0?) if (_bookInfoFile.hasSection("Globals")) { - const Common::ConfigFile::SectionKeyList globals = _bookInfoFile.getKeys("Globals"); - for (Common::ConfigFile::SectionKeyList::const_iterator i = globals.begin(); i != globals.end(); i++) { + const Common::INIFile::SectionKeyList globals = _bookInfoFile.getKeys("Globals"); + for (Common::INIFile::SectionKeyList::const_iterator i = globals.begin(); i != globals.end(); i++) { Common::String command = Common::String::format("%s = %s", i->key.c_str(), i->value.c_str()); LBCode tempCode(this, 0); uint offset = tempCode.parseCode(command); diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h index 76da7d8219..615fcd0e16 100644 --- a/engines/mohawk/livingbooks.h +++ b/engines/mohawk/livingbooks.h @@ -28,7 +28,7 @@ #include "mohawk/livingbooks_graphics.h" #include "mohawk/sound.h" -#include "common/config-file.h" +#include "common/ini-file.h" #include "common/rect.h" #include "common/queue.h" #include "common/random.h" @@ -759,7 +759,7 @@ public: private: LivingBooksConsole *_console; - Common::ConfigFile _bookInfoFile; + Common::INIFile _bookInfoFile; Common::String getBookInfoFileName() const; void loadBookInfo(const Common::String &filename); diff --git a/engines/mohawk/livingbooks_lbx.cpp b/engines/mohawk/livingbooks_lbx.cpp index 2b8b22ec81..dcf8caa4a5 100644 --- a/engines/mohawk/livingbooks_lbx.cpp +++ b/engines/mohawk/livingbooks_lbx.cpp @@ -33,7 +33,7 @@ public: bool call(uint callId, const Common::Array<LBValue> ¶ms, LBValue &result); protected: - Common::ConfigFile _dataFile; + Common::INIFile _dataFile; Common::String _curSection; void open(const Common::String &filename); @@ -77,8 +77,8 @@ bool LBXDataFile::call(uint callId, const Common::Array<LBValue> ¶ms, LBValu case kLBXDataFileGetSectionList: { Common::SharedPtr<LBList> list = Common::SharedPtr<LBList>(new LBList); - Common::ConfigFile::SectionList sections = _dataFile.getSections(); - for (Common::List<Common::ConfigFile::Section>::const_iterator i = sections.begin(); i != sections.end(); ++i) + Common::INIFile::SectionList sections = _dataFile.getSections(); + for (Common::List<Common::INIFile::Section>::const_iterator i = sections.begin(); i != sections.end(); ++i) list->array.push_back(LBValue(i->name)); result = LBValue(list); } @@ -103,8 +103,8 @@ bool LBXDataFile::call(uint callId, const Common::Array<LBValue> ¶ms, LBValu error("incorrect number of parameters (%d) to LBXDataFile::loadCurSectionVars", params.size()); { - const Common::ConfigFile::SectionKeyList globals = _dataFile.getKeys(_curSection); - for (Common::ConfigFile::SectionKeyList::const_iterator i = globals.begin(); i != globals.end(); i++) { + const Common::INIFile::SectionKeyList globals = _dataFile.getKeys(_curSection); + for (Common::INIFile::SectionKeyList::const_iterator i = globals.begin(); i != globals.end(); i++) { Common::String command = Common::String::format("%s = %s", i->key.c_str(), i->value.c_str()); LBCode tempCode(_vm, 0); uint offset = tempCode.parseCode(command); diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index 05e66a3924..cd15960b85 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -255,7 +255,7 @@ void RivenGraphics::runScheduledTransition() { } // For now, just copy the image to screen without doing any transition. - _vm->_system->copyRectToScreen(_mainScreen->pixels, _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h); + _vm->_system->copyRectToScreen(_mainScreen->getPixels(), _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h); _vm->_system->updateScreen(); _scheduledTransition = -1; // Clear scheduled transition @@ -345,7 +345,7 @@ void RivenGraphics::drawInventoryImage(uint16 id, const Common::Rect *rect) { mhkSurface->convertToTrueColor(); Graphics::Surface *surface = mhkSurface->getSurface(); - _vm->_system->copyRectToScreen(surface->pixels, surface->pitch, rect->left, rect->top, surface->w, surface->h); + _vm->_system->copyRectToScreen(surface->getPixels(), surface->pitch, rect->left, rect->top, surface->w, surface->h); delete mhkSurface; } @@ -420,7 +420,7 @@ void RivenGraphics::updateCredits() { } else { // Otheriwse, we're scrolling // Move the screen up one row - memmove(_mainScreen->pixels, _mainScreen->getBasePtr(0, 1), _mainScreen->pitch * (_mainScreen->h - 1)); + memmove(_mainScreen->getPixels(), _mainScreen->getBasePtr(0, 1), _mainScreen->pitch * (_mainScreen->h - 1)); // Only update as long as we're not before the last frame // Otherwise, we're just moving up a row (which we already did) @@ -437,7 +437,7 @@ void RivenGraphics::updateCredits() { } // Now flush the new screen - _vm->_system->copyRectToScreen(_mainScreen->pixels, _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h); + _vm->_system->copyRectToScreen(_mainScreen->getPixels(), _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h); _vm->_system->updateScreen(); } } diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 8b0130d711..b7e06a2b9f 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -245,7 +245,7 @@ bool VideoManager::updateMovies() { // Clip the width/height to make sure we stay on the screen (Myst does this a few times) uint16 width = MIN<int32>(_videoStreams[i]->getWidth(), _vm->_system->getWidth() - _videoStreams[i].x); uint16 height = MIN<int32>(_videoStreams[i]->getHeight(), _vm->_system->getHeight() - _videoStreams[i].y); - _vm->_system->copyRectToScreen(frame->pixels, frame->pitch, _videoStreams[i].x, _videoStreams[i].y, width, height); + _vm->_system->copyRectToScreen(frame->getPixels(), frame->pitch, _videoStreams[i].x, _videoStreams[i].y, width, height); // We've drawn something to the screen, make sure we update it updateScreen = true; |