MORTEVIELLE: Take advantage of Surface::getPixels.
This commit is contained in:
parent
575cfca013
commit
0c0f99eb96
3 changed files with 3 additions and 3 deletions
|
@ -1067,7 +1067,7 @@ void ScreenSurface::setPixel(const Common::Point &pt, int palIndex) {
|
|||
assert((pt.x >= 0) && (pt.y >= 0) && (pt.x <= SCREEN_WIDTH) && (pt.y <= SCREEN_ORIG_HEIGHT));
|
||||
Graphics::Surface destSurface = lockArea(Common::Rect(pt.x, pt.y * 2, pt.x + 1, (pt.y + 1) * 2));
|
||||
|
||||
byte *destP = (byte *)destSurface.getBasePtr(0, 0);
|
||||
byte *destP = (byte *)destSurface.getPixels();
|
||||
*destP = palIndex;
|
||||
*(destP + SCREEN_WIDTH) = palIndex;
|
||||
}
|
||||
|
|
|
@ -393,7 +393,7 @@ void Menu::menuUp(int msgId) {
|
|||
// Get a pointer to the source and destination of the area to restore
|
||||
const byte *pSrc = (const byte *)_vm->_backgroundSurface.getBasePtr(0, 10);
|
||||
Graphics::Surface destArea = _vm->_screenSurface.lockArea(Common::Rect(0, 10, SCREEN_WIDTH, SCREEN_HEIGHT));
|
||||
byte *pDest = (byte *)destArea.getBasePtr(0, 0);
|
||||
byte *pDest = (byte *)destArea.getPixels();
|
||||
|
||||
// Copy the data
|
||||
Common::copy(pSrc, pSrc + (400 - 10) * SCREEN_WIDTH, pDest);
|
||||
|
|
|
@ -189,7 +189,7 @@ void SavegameManager::writeSavegameHeader(Common::OutSaveFile *out, const Common
|
|||
Graphics::Surface *thumb = new Graphics::Surface();
|
||||
Graphics::Surface s = g_vm->_screenSurface.lockArea(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
|
||||
|
||||
::createThumbnail(thumb, (const byte *)s.getBasePtr(0, 0), SCREEN_WIDTH, SCREEN_HEIGHT, thumbPalette);
|
||||
::createThumbnail(thumb, (const byte *)s.getPixels(), SCREEN_WIDTH, SCREEN_HEIGHT, thumbPalette);
|
||||
Graphics::saveThumbnail(*out, *thumb);
|
||||
thumb->free();
|
||||
delete thumb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue