diff options
| author | Johannes Schickel | 2016-03-21 03:24:23 +0100 | 
|---|---|---|
| committer | Johannes Schickel | 2016-03-21 16:24:13 +0100 | 
| commit | 892aa2886cee1ccf829e90fc72a941de22c49467 (patch) | |
| tree | 5a688818054b2089e60293e6213377353265d30b | |
| parent | ce1be463c2dfea61e74a816d6590a1a4506483d2 (diff) | |
| download | scummvm-rg350-892aa2886cee1ccf829e90fc72a941de22c49467.tar.gz scummvm-rg350-892aa2886cee1ccf829e90fc72a941de22c49467.tar.bz2 scummvm-rg350-892aa2886cee1ccf829e90fc72a941de22c49467.zip  | |
SHERLOCK: Get rid of Surface::setPixelData.
| -rw-r--r-- | engines/sherlock/screen.cpp | 5 | ||||
| -rw-r--r-- | engines/sherlock/surface.cpp | 8 | ||||
| -rw-r--r-- | engines/sherlock/surface.h | 5 | 
3 files changed, 3 insertions, 15 deletions
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp index 33e12530ed..b60a931e4f 100644 --- a/engines/sherlock/screen.cpp +++ b/engines/sherlock/screen.cpp @@ -319,8 +319,9 @@ void Screen::vgaBar(const Common::Rect &r, int color) {  }  void Screen::setDisplayBounds(const Common::Rect &r) { -	_sceneSurface.setPixelsData((byte *)_backBuffer1.getBasePtr(r.left, r.top), -		r.width(), r.height(), _backBuffer1.format); +	_sceneSurface.create(_backBuffer1, r); +	assert(_sceneSurface.width()  == r.width()); +	assert(_sceneSurface.height() == r.height());  	_backBuffer = &_sceneSurface;  } diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp index b9df33a309..47b7d4a780 100644 --- a/engines/sherlock/surface.cpp +++ b/engines/sherlock/surface.cpp @@ -33,14 +33,6 @@ Surface::Surface(int width, int height) : Graphics::ManagedSurface(width, height  	create(width, height);  } -void Surface::setPixelsData(byte *pixelsPtr, int sizeX, int sizeY, const Graphics::PixelFormat &pixFormat) { -	Graphics::ManagedSurface::setPixels(pixelsPtr); -	this->format = pixFormat; -	this->w = sizeX; -	this->h = sizeY; -	this->pitch = sizeX * pixFormat.bytesPerPixel; -} -  void Surface::writeString(const Common::String &str, const Common::Point &pt, uint overrideColor) {  	Fonts::writeString(this, str, pt, overrideColor);  } diff --git a/engines/sherlock/surface.h b/engines/sherlock/surface.h index 856d0edc9b..7f946b467f 100644 --- a/engines/sherlock/surface.h +++ b/engines/sherlock/surface.h @@ -52,11 +52,6 @@ public:  	Surface(int width, int height);  	/** -	 * Set the surface details -	 */ -	void setPixelsData(byte *pixelsPtr, int sizeX, int sizeY, const Graphics::PixelFormat &pixFormat); - -	/**  	 * Draws a surface on this surface  	 */  	virtual void SHblitFrom(const Graphics::Surface &src) {  | 
