[Scummvm-git-logs] scummvm branch-2-1 -> 750866389abe6ffe6c7f349ae281bf03cd5a5b60

digitall 547637+digitall at users.noreply.github.com
Sat Nov 23 17:17:43 UTC 2019


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fe07b3b849 LINUXMOTO: Fix Missing Declaration in Graphics Class
3435c9e5c8 LINUXMOTO: Replace usage of old SurfaceSdlGraphicsManager APIs
4c847e984c LINUXMOTO: Further Replacement of old SurfaceSdlGraphicsManager APIs
750866389a LINUXMOTO: Hopefully Fix Compilation


Commit: fe07b3b84981b990d7753d93e9aea8f6927cc854
    https://github.com/scummvm/scummvm/commit/fe07b3b84981b990d7753d93e9aea8f6927cc854
Author: D G Turner (digitall at scummvm.org)
Date: 2019-11-23T17:13:18Z

Commit Message:
LINUXMOTO: Fix Missing Declaration in Graphics Class

Changed paths:
    backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h


diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
index ed10ba9..4e886b4 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
@@ -30,6 +30,7 @@ public:
 	LinuxmotoSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
 
 	virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL) override;
+	const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
 	virtual void setGraphicsModeIntern() override;
 	virtual int getGraphicsModeScale(int mode) const override;
 	virtual void internUpdateScreen() override;


Commit: 3435c9e5c8cbcb5644f8b890734be91c77bba2b5
    https://github.com/scummvm/scummvm/commit/3435c9e5c8cbcb5644f8b890734be91c77bba2b5
Author: D G Turner (digitall at scummvm.org)
Date: 2019-11-23T17:13:40Z

Commit Message:
LINUXMOTO: Replace usage of old SurfaceSdlGraphicsManager APIs

Changed paths:
    backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp


diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index 2105bd8..a2466c4 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -154,7 +154,7 @@ bool LinuxmotoSdlGraphicsManager::loadGFXMode() {
 }
 
 void LinuxmotoSdlGraphicsManager::drawMouse() {
-	if (!_mouseVisible || !_mouseSurface) {
+	if (!_cursorVisible || !_mouseSurface) {
 		_mouseBackup.x = _mouseBackup.y = _mouseBackup.w = _mouseBackup.h = 0;
 		return;
 	}
@@ -164,11 +164,11 @@ void LinuxmotoSdlGraphicsManager::drawMouse() {
 	int hotX, hotY;
 
 	if (_videoMode.mode == GFX_HALF && !_overlayVisible) {
-		dst.x = _mouseCurState.x/2;
-		dst.y = _mouseCurState.y/2;
+		dst.x = _cursorX / 2;
+		dst.y = _cursorY / 2;
 	} else {
-		dst.x = _mouseCurState.x;
-		dst.y = _mouseCurState.y;
+		dst.x = _cursorX;
+		dst.y = _cursorY;
 	}
 
 	if (!_overlayVisible) {
@@ -211,7 +211,7 @@ void LinuxmotoSdlGraphicsManager::drawMouse() {
 	// Note that SDL_BlitSurface() and addDirtyRect() will both perform any
 	// clipping necessary
 
-	if (SDL_BlitSurface(_mouseSurface, NULL, _hwscreen, &dst) != 0)
+	if (SDL_BlitSurface(_mouseSurface, NULL, _hwScreen, &dst) != 0)
 		error("SDL_BlitSurface failed: %s", SDL_GetError());
 
 	// The screen will be updated using real surface coordinates, i.e.
@@ -244,8 +244,8 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 	int scale1;
 
 #if defined(DEBUG) // definitions not available for non-DEBUG here. (needed this to compile in SYMBIAN32 & linux?)
-	assert(_hwscreen != NULL);
-	assert(_hwscreen->map->sw_data != NULL);
+	assert(_hwScreen != NULL);
+	assert(_hwScreen->map->sw_data != NULL);
 #endif
 
 	// If the shake position changed, fill the dirty area with blackness
@@ -256,11 +256,11 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 		if (_videoMode.aspectRatioCorrection && !_overlayVisible)
 			blackrect.h = real2Aspect(blackrect.h - 1) + 1;
 
-		SDL_FillRect(_hwscreen, &blackrect, 0);
+		SDL_FillRect(_hwScreen, &blackrect, 0);
 
 		_currentShakePos = _gameScreenShakeOffset;
 
-		_forceFull = true;
+		_forceRedraw = true;
 	}
 
 	// Check whether the palette was changed in the meantime and update the
@@ -272,7 +272,7 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 
 		_paletteDirtyEnd = 0;
 
-		_forceFull = true;
+		_forceRedraw = true;
 	}
 
 	if (!_overlayVisible) {
@@ -301,7 +301,7 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 #endif
 
 	// Force a full redraw if requested
-	if (_forceFull) {
+	if (_forceRedraw) {
 		_numDirtyRects = 1;
 		_dirtyRectList[0].x = 0;
 		_dirtyRectList[0].y = 0;
@@ -326,10 +326,10 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 		}
 
 		SDL_LockSurface(srcSurf);
-		SDL_LockSurface(_hwscreen);
+		SDL_LockSurface(_hwScreen);
 
 		srcPitch = srcSurf->pitch;
-		dstPitch = _hwscreen->pitch;
+		dstPitch = _hwScreen->pitch;
 
 		for (r = _dirtyRectList; r != lastRect; ++r) {
 			int dst_y = r->y + _currentShakePos;
@@ -376,7 +376,7 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 					dst_y = dst_y / 2;
 				}
 				scalerProc((byte *)srcSurf->pixels + (src_x * 2 + 2) + (src_y + 1) * srcPitch, srcPitch,
-						   (byte *)_hwscreen->pixels + dst_x * 2 + dst_y * dstPitch, dstPitch, dst_w, dst_h);
+						   (byte *)_hwScreen->pixels + dst_x * 2 + dst_y * dstPitch, dstPitch, dst_w, dst_h);
 			}
 
 			if (_videoMode.mode == GFX_HALF && scalerProc == DownscaleAllByHalf) {
@@ -392,15 +392,15 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 
 #ifdef USE_SCALERS
 			if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
-				r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1, _videoMode.filtering);
+				r->h = stretch200To240((uint8 *) _hwScreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1, _videoMode.filtering);
 #endif
 		}
 		SDL_UnlockSurface(srcSurf);
-		SDL_UnlockSurface(_hwscreen);
+		SDL_UnlockSurface(_hwScreen);
 
 		// Readjust the dirty rect list in case we are doing a full update.
 		// This is necessary if shaking is active.
-		if (_forceFull) {
+		if (_forceRedraw) {
 			_dirtyRectList[0].y = 0;
 			_dirtyRectList[0].h = (_videoMode.mode == GFX_HALF) ? effectiveScreenHeight()/2 : effectiveScreenHeight();
 		}
@@ -412,35 +412,35 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 #endif
 
 		// Finally, blit all our changes to the screen
-		SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
+		SDL_UpdateRects(_hwScreen, _numDirtyRects, _dirtyRectList);
 	}
 
 	_numDirtyRects = 0;
-	_forceFull = false;
+	_forceRedraw = false;
 	_mouseNeedsRedraw = false;
 }
 
 void LinuxmotoSdlGraphicsManager::showOverlay() {
 	if (_videoMode.mode == GFX_HALF) {
-		_mouseCurState.x = _mouseCurState.x / 2;
-		_mouseCurState.y = _mouseCurState.y / 2;
+		_cursorX /= 2;
+		_cursorY /= 2;
 	}
 	SurfaceSdlGraphicsManager::showOverlay();
 }
 
 void LinuxmotoSdlGraphicsManager::hideOverlay() {
 	if (_videoMode.mode == GFX_HALF) {
-		_mouseCurState.x = _mouseCurState.x * 2;
-		_mouseCurState.y = _mouseCurState.y * 2;
+		_cursorX *= 2;
+		_cursorY *= 2;
 	}
 	SurfaceSdlGraphicsManager::hideOverlay();
 }
 
 void LinuxmotoSdlGraphicsManager::warpMouse(int x, int y) {
-	if (_mouseCurState.x != x || _mouseCurState.y != y) {
+	if (_cursorX != x || _cursorY != y) {
 		if (_videoMode.mode == GFX_HALF && !_overlayVisible) {
-			x = x / 2;
-			y = y / 2;
+			x /= 2;
+			y /= 2;
 		}
 	}
 	SurfaceSdlGraphicsManager::warpMouse(x, y);


Commit: 4c847e984c6789047b40a810abfdaa6c9577c3ac
    https://github.com/scummvm/scummvm/commit/4c847e984c6789047b40a810abfdaa6c9577c3ac
Author: D G Turner (digitall at scummvm.org)
Date: 2019-11-23T17:13:55Z

Commit Message:
LINUXMOTO: Further Replacement of old SurfaceSdlGraphicsManager APIs

Changed paths:
    backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp


diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index a2466c4..4e8da16 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -147,7 +147,7 @@ bool LinuxmotoSdlGraphicsManager::loadGFXMode() {
 			_videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight);
 
 		_videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
-		_videoMode.hardwareHeight = effectiveScreenHeight();
+		_videoMode.hardwareHeight = _videoMode.hardwareHeight;
 	}
 
 	return SurfaceSdlGraphicsManager::loadGFXMode();
@@ -293,7 +293,7 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 
 	// Add the area covered by the mouse cursor to the list of dirty rects if
 	// we have to redraw the mouse.
-	if (_mouseNeedsRedraw)
+	if (_cursorNeedsRedraw)
 		undrawMouse();
 
 #ifdef USE_OSD
@@ -310,7 +310,7 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 	}
 
 	// Only draw anything if necessary
-	if (_numDirtyRects > 0 || _mouseNeedsRedraw) {
+	if (_numDirtyRects > 0 || _cursorNeedsRedraw) {
 		SDL_Rect *r;
 		SDL_Rect dst;
 		uint32 srcPitch, dstPitch;
@@ -402,7 +402,7 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 		// This is necessary if shaking is active.
 		if (_forceRedraw) {
 			_dirtyRectList[0].y = 0;
-			_dirtyRectList[0].h = (_videoMode.mode == GFX_HALF) ? effectiveScreenHeight()/2 : effectiveScreenHeight();
+			_dirtyRectList[0].h = (_videoMode.mode == GFX_HALF) ? _videoMode.hardwareHeight / 2 : _videoMode.hardwareHeight;
 		}
 
 		drawMouse();
@@ -417,7 +417,7 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
 
 	_numDirtyRects = 0;
 	_forceRedraw = false;
-	_mouseNeedsRedraw = false;
+	_cursorNeedsRedraw = false;
 }
 
 void LinuxmotoSdlGraphicsManager::showOverlay() {


Commit: 750866389abe6ffe6c7f349ae281bf03cd5a5b60
    https://github.com/scummvm/scummvm/commit/750866389abe6ffe6c7f349ae281bf03cd5a5b60
Author: D G Turner (digitall at scummvm.org)
Date: 2019-11-23T17:14:07Z

Commit Message:
LINUXMOTO: Hopefully Fix Compilation

Changed paths:
    backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h


diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
index 4e886b4..ec5ebff 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
@@ -31,7 +31,6 @@ public:
 
 	virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL) override;
 	const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
-	virtual void setGraphicsModeIntern() override;
 	virtual int getGraphicsModeScale(int mode) const override;
 	virtual void internUpdateScreen() override;
 	virtual ScalerProc *getGraphicsScalerProc(int mode) const override;




More information about the Scummvm-git-logs mailing list