[Scummvm-git-logs] scummvm master -> e6ea75c31724ad7e003034cfe27c3d46c0b5b867

dreammaster noreply at scummvm.org
Thu Feb 20 02:28:55 UTC 2025


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

Summary:
e6ea75c317 GOT: Properly don't draw shovel maze in part 2


Commit: e6ea75c31724ad7e003034cfe27c3d46c0b5b867
    https://github.com/scummvm/scummvm/commit/e6ea75c31724ad7e003034cfe27c3d46c0b5b867
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-02-19T18:28:38-08:00

Commit Message:
GOT: Properly don't draw shovel maze in part 2

Changed paths:
    engines/got/gfx/gfx_pics.cpp
    engines/got/views/game_content.cpp


diff --git a/engines/got/gfx/gfx_pics.cpp b/engines/got/gfx/gfx_pics.cpp
index f79a7803bff..961fd350dcf 100644
--- a/engines/got/gfx/gfx_pics.cpp
+++ b/engines/got/gfx/gfx_pics.cpp
@@ -106,6 +106,13 @@ void BgPics::setArea(int area) {
 void BgPics::load() {
 	const Common::String name = Common::String::format("BPICS%d", _area);
 	GfxPics::load(name, 262);
+
+	if (_area == 2) {
+		// FIXME: Background tile 0xbe in part 2 is used for the invisible
+		// maze in part 2 to get the shovel, but it's not drawing as black.
+		// Manually set the transparent color for it so it's properly transparent
+		(*this)[0xbe].setTransparentColor(31);
+	}
 }
 
 } // namespace Gfx
diff --git a/engines/got/views/game_content.cpp b/engines/got/views/game_content.cpp
index e5ed77a9bda..e9f1e208eff 100644
--- a/engines/got/views/game_content.cpp
+++ b/engines/got/views/game_content.cpp
@@ -223,11 +223,12 @@ bool GameContent::tick() {
 }
 
 void GameContent::drawBackground(GfxSurface &s) {
+	const Level &screen = _G(scrn);
+
 	for (int y = 0; y < TILES_Y; y++) {
 		for (int x = 0; x < TILES_X; x++) {
-			if (_G(scrn)._iconGrid[y][x] != 0) {
+			if (screen._iconGrid[y][x] != 0) {
 				const Common::Point pt(x * TILE_SIZE, y * TILE_SIZE);
-				const Level &screen = _G(scrn);
 				s.simpleBlitFrom(_G(bgPics[screen._backgroundColor]), pt);
 				s.simpleBlitFrom(_G(bgPics[screen._iconGrid[y][x]]), pt);
 			}




More information about the Scummvm-git-logs mailing list