[Scummvm-cvs-logs] scummvm master -> eb9c24ac0e951a782cb5097b0028dba39bc6c492

sev- sev at scummvm.org
Thu Feb 25 11:51:28 CET 2016


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

Summary:
1415e620e4 WAGE: Implemented cropping in cosole. That fixes crashes in Bug Hunt
eb9c24ac0e WAGE: Added detection for Eidisi I


Commit: 1415e620e49ce5585c6e9d277c859e31a539a2a6
    https://github.com/scummvm/scummvm/commit/1415e620e49ce5585c6e9d277c859e31a539a2a6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-02-25T11:51:21+01:00

Commit Message:
WAGE: Implemented cropping in cosole. That fixes crashes in Bug Hunt

Changed paths:
    engines/wage/detection_tables.h
    engines/wage/gui-console.cpp
    engines/wage/gui.cpp



diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index 716a182..9f8c238 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -32,7 +32,6 @@ static const ADGameDescription gameDescriptions[] = {
 	FANGAME("3rd Floor", "3rd Floor", "a107d7a177970b2259e32681bd8b47c9", 285056),
 	BIGGAME("afm", "v1.8", "Another Fine Mess 1.8", "8e5aa915f3253efb2aab52435647b25e", 1456000),
 	BIGGAME("amot", "v1.8", "A Mess O' Trouble 1.8", "b3ef53afed282671b704e45df829350c", 1895552),
-	// Off-screen rendering in second screen
 	FANGAME("Bug Hunt", "Bug Hunt", "2ebd3515a87941063ad66c3cf93c5e78", 200064),
 	// Problems with letter rendering
 	FANGAME("Canal District", "Canal District", "8856bc699a20fc5b7fc67accee12cac7", 658176),
diff --git a/engines/wage/gui-console.cpp b/engines/wage/gui-console.cpp
index ad1bf58..ab5df63 100644
--- a/engines/wage/gui-console.cpp
+++ b/engines/wage/gui-console.cpp
@@ -257,8 +257,30 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) {
 		y1 += _consoleLineHeight;
 	}
 
-	g->copyRectToSurface(_console, r.left - kConOverscan, r.top - kConOverscan, boundsR);
-	g_system->copyRectToScreen(g->getBasePtr(r.left, r.top), g->pitch, r.left, r.top, r.width(), r.height());
+	// Now we need to clip it to the screen
+	int xcon = r.left - kConOverscan;
+	int ycon = r.top - kConOverscan;
+	if (xcon < 0) {
+		boundsR.left -= xcon;
+		xcon = 0;
+	}
+	if (ycon < 0) {
+		boundsR.top -= ycon;
+		ycon = 0;
+	}
+	if (xcon + boundsR.width() >= g->w)
+		boundsR.right -= xcon + boundsR.width() - g->w;
+	if (ycon + boundsR.height() >= g->h)
+		boundsR.bottom -= ycon + boundsR.height() - g->h;
+
+	Common::Rect rr(r);
+	if (rr.right > _screen.w - 1)
+		rr.right = _screen.w - 1;
+	if (rr.bottom > _screen.h - 1)
+		rr.bottom = _screen.h - 1;
+
+	g->copyRectToSurface(_console, xcon, ycon, boundsR);
+	g_system->copyRectToScreen(g->getBasePtr(rr.left, rr.top), g->pitch, rr.left, rr.top, rr.width(), rr.height());
 }
 
 void Gui::drawInput() {
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 26af5f6..387731c 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -132,9 +132,9 @@ static void cursorTimerHandler(void *refCon) {
 		gui->_cursorState = !gui->_cursorState;
 
 	gui->_cursorRect.left = x;
-	gui->_cursorRect.right = x + 1;
+	gui->_cursorRect.right = MIN<uint16>(x + 1, gui->_screen.w);
 	gui->_cursorRect.top = y;
-	gui->_cursorRect.bottom = y + kCursorHeight;
+	gui->_cursorRect.bottom = MIN<uint16>(y + kCursorHeight, gui->_screen.h);
 
 	gui->_cursorDirty = true;
 }


Commit: eb9c24ac0e951a782cb5097b0028dba39bc6c492
    https://github.com/scummvm/scummvm/commit/eb9c24ac0e951a782cb5097b0028dba39bc6c492
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-02-25T11:51:22+01:00

Commit Message:
WAGE: Added detection for Eidisi I

Changed paths:
    engines/wage/detection_tables.h



diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index 9f8c238..8723310 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -40,6 +40,7 @@ static const ADGameDescription gameDescriptions[] = {
 	FANGAME("Dungeon World II", "DungeonWorld2", "e10c5e3cc17879c298b1551f33571b15", 234880),
 	// Polygons with ignored byte 1
 	FANGAME("Double Trouble", "Double Trouble", "5e9ee13d09ac54918ed111fa9727ac1c", 557184),
+	FANGAME("Eidisi I", "Eidisi I", "299d1de4baccf1c66118396519953652", 180480),
 	FANGAME("Escape from School!", "Escape from School!", "a854be48d4af20126d18a9cad93a969b", 51840),
 	FANGAME("Magic Rings", "Magic Rings", "6e0d1dd561d3dad8f9a7a20ed1f09b16", 112000),
 	FANGAME("Midnight Snack", "Midnight Snack", "346982a32fc701f53bb19771d72063d0", 69504),






More information about the Scummvm-git-logs mailing list