[Scummvm-git-logs] scummvm master -> 6e0fdde946b88a0535860ac6764bde59bc369c46

aquadran noreply at scummvm.org
Thu Jun 12 05:45:21 UTC 2025


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

Summary:
6e0fdde946 WINTERMUTE: More cleanup in 2D renderer


Commit: 6e0fdde946b88a0535860ac6764bde59bc369c46
    https://github.com/scummvm/scummvm/commit/6e0fdde946b88a0535860ac6764bde59bc369c46
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-06-12T07:45:17+02:00

Commit Message:
WINTERMUTE: More cleanup in 2D renderer

Changed paths:
    engines/wintermute/base/gfx/osystem/base_render_osystem.cpp


diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index ce616b87d9a..f4c45f5bcfd 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -93,11 +93,6 @@ bool BaseRenderOSystem::initRenderer(int width, int height, bool windowed) {
 	_realWidth = width;
 	_realHeight = height;
 
-	//TODO: Tiny resolution-displays might want to do some resolution-selection logic here
-
-	//_realWidth = BaseEngine::instance().getRegistry()->readInt("Debug", "ForceResWidth", _width);
-	//_realHeight = BaseEngine::instance().getRegistry()->readInt("Debug", "ForceResHeight", _height);
-
 	float origAspect = (float)_width / (float)_height;
 	float realAspect = (float)_realWidth / (float)_realHeight;
 
@@ -198,7 +193,6 @@ bool BaseRenderOSystem::flip() {
 		if (_disableDirtyRects || screenChanged) {
 			g_system->copyRectToScreen(_renderSurface->getPixels(), _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h);
 		}
-		// g_system->copyRectToScreen(_renderSurface->getPixels(), _renderSurface->pitch, _dirtyRect->left, _dirtyRect->top, _dirtyRect->width(), _dirtyRect->height());
 		delete _dirtyRect;
 		_dirtyRect = nullptr;
 		_needsFlip = false;
@@ -263,7 +257,6 @@ void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a) {
 
 	modTargetRect(&fillRect);
 
-	//TODO: This is only here until I'm sure about the final pixelformat
 	uint32 col = _renderSurface->format.ARGBToColor(a, r, g, b);
 
 	Graphics::Surface surf;
@@ -275,10 +268,6 @@ void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a) {
 	temp._alphaDisable = false;
 	drawSurface(nullptr, &surf, &sizeRect, &fillRect, temp);
 	surf.free();
-
-	//SDL_SetRenderDrawColor(_renderer, r, g, b, a);
-	//SDL_SetRenderDrawBlendMode(_renderer, SDL_BLENDMODE_BLEND);
-	//SDL_RenderFillRect(_renderer, &fillRect);
 }
 
 Graphics::PixelFormat BaseRenderOSystem::getPixelFormat() const {
@@ -491,7 +480,6 @@ bool BaseRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
 	byte b = RGBCOLGetB(color);
 	byte a = RGBCOLGetA(color);
 
-	//SDL_SetRenderDrawColor(_renderer, r, g, b, a);
 	//SDL_SetRenderDrawBlendMode(_renderer, SDL_BLENDMODE_BLEND);
 
 	Point32 point1, point2;
@@ -503,10 +491,8 @@ bool BaseRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
 	point2.y = y2;
 	pointToScreen(&point2);
 
-	// TODO: This thing is mostly here until I'm sure about the final color-format.
 	uint32 colorVal = _renderSurface->format.ARGBToColor(a, r, g, b);
 	_renderSurface->drawLine(point1.x, point1.y, point2.x, point2.y, colorVal);
-	//SDL_RenderDrawLine(_renderer, point1.x, point1.y, point2.x, point2.y);
 	return STATUS_OK;
 }
 
@@ -526,7 +512,6 @@ Common::String BaseRenderOSystem::getName() const {
 //////////////////////////////////////////////////////////////////////////
 bool BaseRenderOSystem::setViewport(int left, int top, int right, int bottom) {
 	Common::Rect rect;
-	// TODO: Hopefully this is the same logic that ScummVM uses.
 	rect.left = (int16)(left + _borderLeft);
 	rect.top = (int16)(top + _borderTop);
 	rect.setWidth((int16)((right - left) * _ratioX));




More information about the Scummvm-git-logs mailing list