[Scummvm-git-logs] scummvm master -> 1902474faab7a3b67e1ce1d7db2c6990362bb1fe
dreammaster
paulfgilbert at gmail.com
Sat Jun 6 18:53:33 UTC 2020
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1255854f1b GLK: COMPREHEND: Implement draw line algorithm, disabled for now
dd3b84b2e5 VOYEUR: Fix end credits getting skipped on exit
1902474faa VOYEUR: Still show end credits when quitting demo
Commit: 1255854f1bb126d95e8200bfed5689c6eaa6d430
https://github.com/scummvm/scummvm/commit/1255854f1bb126d95e8200bfed5689c6eaa6d430
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-06T11:53:22-07:00
Commit Message:
GLK: COMPREHEND: Implement draw line algorithm, disabled for now
SOme screens have issues with the flood fill, and minor
differences in the line draw algorithm may contribute to it.
I've implemented the original's algorithm, but I'm leaving it
disabled for now, until I can verify it makes any difference in
rendering any of the scenes
Changed paths:
engines/glk/comprehend/draw_surface.cpp
diff --git a/engines/glk/comprehend/draw_surface.cpp b/engines/glk/comprehend/draw_surface.cpp
index 5908357ef4..fe1025b665 100644
--- a/engines/glk/comprehend/draw_surface.cpp
+++ b/engines/glk/comprehend/draw_surface.cpp
@@ -214,7 +214,55 @@ void DrawSurface::setColor(uint32 color) {
void DrawSurface::drawLine(int16 x1, int16 y1, int16 x2, int16 y2, uint32 color) {
setColor(color);
+#if 1
Graphics::ManagedSurface::drawLine(x1, y1, x2, y2, _renderColor);
+#else
+ bool swapped = false;
+ int deltaX = -1, deltaY = -1;
+ int xDiff = x1 - x2, yDiff = y1 - y2;
+
+ // Draw pixel at starting point
+ drawPixel(x1, y1);
+
+ // Figure out the deltas movement for creating the line
+ if (xDiff < 0) {
+ deltaX = 1;
+ xDiff = -xDiff;
+ }
+ if (yDiff < 0) {
+ deltaY = 1;
+ yDiff = -yDiff;
+ }
+
+ if (xDiff < yDiff) {
+ swapped = true;
+ SWAP(xDiff, yDiff);
+ SWAP(deltaX, deltaY);
+ SWAP(x1, y1);
+ }
+
+ int temp1 = yDiff;
+ int temp2 = yDiff - xDiff;
+ int temp3 = temp2;
+
+ // Iterate to draw the remaining pixels of the line
+ for (int ctr = xDiff; ctr > 0; --ctr) {
+ x1 += deltaX;
+
+ if (temp3 >= 0) {
+ y1 += deltaY;
+ temp3 += temp2;
+ } else {
+ temp3 += temp1;
+ }
+
+ int xp = x1, yp = y1;
+ if (swapped)
+ SWAP(xp, yp);
+
+ drawPixel(xp, yp, color);
+ }
+#endif
}
void DrawSurface::drawBox(int16 x1, int16 y1, int16 x2, int16 y2,
@@ -372,8 +420,10 @@ void DrawSurface::drawPixel(int16 x, int16 y, uint32 color) {
}
void DrawSurface::drawPixel(int16 x, int16 y) {
- uint32 *ptr = (uint32 *)getBasePtr(x, y);
- *ptr = _renderColor;
+ if (x >= 0 && y >= 0 && x < this->w && y < this->h) {
+ uint32 *ptr = (uint32 *)getBasePtr(x, y);
+ *ptr = _renderColor;
+ }
}
uint32 DrawSurface::getPixelColor(int16 x, int16 y) {
Commit: dd3b84b2e573a1340428eb16d39f4db1c378618d
https://github.com/scummvm/scummvm/commit/dd3b84b2e573a1340428eb16d39f4db1c378618d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-06T11:53:22-07:00
Commit Message:
VOYEUR: Fix end credits getting skipped on exit
Changed paths:
engines/voyeur/voyeur_game.cpp
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index d6d8262b2d..457f75eb15 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -87,6 +87,7 @@ void VoyeurEngine::playStamp() {
break;
case 4:
breakFlag = true;
+ _eventsManager->_mouseClicked = false;
break;
case 5:
doGossip();
Commit: 1902474faab7a3b67e1ce1d7db2c6990362bb1fe
https://github.com/scummvm/scummvm/commit/1902474faab7a3b67e1ce1d7db2c6990362bb1fe
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-06T11:53:22-07:00
Commit Message:
VOYEUR: Still show end credits when quitting demo
Changed paths:
engines/voyeur/voyeur_game.cpp
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index 457f75eb15..a893419c56 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -238,11 +238,13 @@ void VoyeurEngine::doTailTitle() {
_screen->_vPort->setupViewPort(NULL);
_screen->screenReset();
- if (!getIsDemo() && _bVoy->getBoltGroup(0x600)) {
- RL2Decoder decoder;
- decoder.loadRL2File("a1100200.rl2", false);
- decoder.start();
- decoder.play(this);
+ if (_bVoy->getBoltGroup(0x600)) {
+ if (!getIsDemo()) {
+ RL2Decoder decoder;
+ decoder.loadRL2File("a1100200.rl2", false);
+ decoder.start();
+ decoder.play(this);
+ }
if (!shouldQuit() && !_eventsManager->_mouseClicked) {
doClosingCredits();
More information about the Scummvm-git-logs
mailing list