[Scummvm-git-logs] scummvm branch-2-6 -> 9fc63f96a87c3a4654f864a372c659814759382f

alxpnv noreply at scummvm.org
Tue Jun 21 08:11:37 UTC 2022


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:
59bcc6c660 ASYLUM: don't show thumbnails on Load Game screen
9fc63f96a8 ASYLUM: add detection for the Polish fanmade translation


Commit: 59bcc6c6605b935d30e561cbc1241df63bb611e9
    https://github.com/scummvm/scummvm/commit/59bcc6c6605b935d30e561cbc1241df63bb611e9
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-06-21T10:53:46+03:00

Commit Message:
ASYLUM: don't show thumbnails on Load Game screen

This feature wasn't present in the original game and didn't work
properly in OpenGL mode

Changed paths:
    engines/asylum/views/menu.cpp
    engines/asylum/views/menu.h


diff --git a/engines/asylum/views/menu.cpp b/engines/asylum/views/menu.cpp
index 8fd21f45f6e..630dab6fbab 100644
--- a/engines/asylum/views/menu.cpp
+++ b/engines/asylum/views/menu.cpp
@@ -734,63 +734,8 @@ void Menu::updateNewGame() {
 	getText()->draw(MAKE_RESOURCE(kResourcePackText, 1323));
 }
 
-void Menu::adjustCoordinates(Common::Point &point) {
-	if (!g_system->isOverlayVisible())
-		return;
-
-	point.x *= 640.0 / g_system->getOverlayWidth();
-	point.y *= 480.0 / g_system->getOverlayHeight();
-}
-
-bool Menu::hasThumbnail(int index) {
-	if (getSaveLoad()->hasSavegame(index + _startIndex))
-		return _vm->getMetaEngine()->querySaveMetaInfos(_vm->getTargetName().c_str(), index + _startIndex).getThumbnail();
-
-	return false;
-}
-
-void Menu::showThumbnail(int index) {
-	SaveStateDescriptor desc = _vm->getMetaEngine()->querySaveMetaInfos(_vm->getTargetName().c_str(), index + _startIndex);
-	const Graphics::Surface *thumbnail = desc.getThumbnail();
-
-	int x, y;
-	int overlayWidth  = g_system->getOverlayWidth(),
-		overlayHeight = g_system->getOverlayHeight();
-	Graphics::PixelFormat overlayFormat = g_system->getOverlayFormat();
-	Graphics::Surface overlay, *thumbnail1;
-
-	x = (index < 6 ? 150 : 470)  * overlayWidth  / 640;
-	y = (179 + (index % 6) * 29) * overlayHeight / 480;
-
-	overlay.create(overlayWidth, overlayHeight, overlayFormat);
-	if (!g_system->hasFeature(OSystem::kFeatureOverlaySupportsAlpha)) {
-		Graphics::Surface *screen = getScreen()->getSurface().convertTo(overlayFormat, getScreen()->getPalette());
-		if (screen->w != overlayWidth || screen->h != overlayHeight) {
-			Graphics::Surface *screen1 = screen->scale(overlayWidth, overlayHeight);
-			overlay.copyRectToSurface(screen1->getPixels(), screen1->pitch, 0, 0, screen1->w, screen1->h);
-			screen1->free();
-			delete screen1;
-		} else {
-			overlay.copyRectToSurface(screen->getPixels(), screen->pitch, 0, 0, 640, 480);
-		}
-		screen->free();
-		delete screen;
-	}
-
-	thumbnail1 = thumbnail->convertTo(overlayFormat);
-	overlay.copyRectToSurface(thumbnail1->getPixels(), thumbnail1->pitch, x, y, thumbnail1->w, thumbnail1->h);
-
-	g_system->copyRectToOverlay(overlay.getPixels(), overlay.pitch, 0, 0, overlay.w, overlay.h);
-	g_system->showOverlay();
-
-	overlay.free();
-	thumbnail1->free();
-	delete thumbnail1;
-}
-
 void Menu::updateLoadGame() {
 	Common::Point cursor = getCursor()->position();
-	adjustCoordinates(cursor);
 
 	char text[100];
 
@@ -824,7 +769,6 @@ void Menu::updateLoadGame() {
 	getText()->loadFont(kFontYellow);
 	getText()->drawCentered(Common::Point(10, 100), 620, MAKE_RESOURCE(kResourcePackText, 1325));
 
-	int current = -1;
 	if (_dword_455C78) {
 		getText()->drawCentered(Common::Point(10,      190), 620, MAKE_RESOURCE(kResourcePackText, 1332));
 		getText()->drawCentered(Common::Point(10, 190 + 29), 620, MAKE_RESOURCE(kResourcePackText, 1333));
@@ -854,8 +798,6 @@ void Menu::updateLoadGame() {
 				getText()->loadFont(kFontYellow);
 			} else {
 				getText()->loadFont(kFontBlue);
-				if (hasThumbnail(index))
-					current = index;
 			}
 
 			getText()->setPosition(Common::Point(30, y));
@@ -877,8 +819,6 @@ void Menu::updateLoadGame() {
 				getText()->loadFont(kFontYellow);
 			} else {
 				getText()->loadFont(kFontBlue);
-				if (hasThumbnail(index))
-					current = index;
 			}
 
 			getText()->setPosition(Common::Point(350, y));
@@ -920,11 +860,6 @@ void Menu::updateLoadGame() {
 
 	getText()->setPosition(Common::Point(550, 340));
 	getText()->draw(MAKE_RESOURCE(kResourcePackText, 1327));
-
-	if (current == -1)
-		g_system->hideOverlay();
-	else
-		showThumbnail(current);
 }
 
 void Menu::updateSaveGame() {
@@ -1646,9 +1581,6 @@ void Menu::clickNewGame() {
 
 void Menu::clickLoadGame() {
 	Common::Point cursor = getCursor()->position();
-	adjustCoordinates(cursor);
-
-	g_system->hideOverlay();
 
 	if (_dword_455C80) {
 		if (cursor.x < 247 || cursor.x > (247 + getText()->getWidth(MAKE_RESOURCE(kResourcePackText, 1330)))
diff --git a/engines/asylum/views/menu.h b/engines/asylum/views/menu.h
index c60bb47460f..7d6ef0115cf 100644
--- a/engines/asylum/views/menu.h
+++ b/engines/asylum/views/menu.h
@@ -206,11 +206,6 @@ private:
 	bool key(const AsylumEvent &evt);
 	bool click(const AsylumEvent &evt);
 
-	// Thumbnails
-	void adjustCoordinates(Common::Point &point);
-	bool hasThumbnail(int index);
-	void showThumbnail(int index);
-
 	// Update handlers
 	void updateNewGame();
 	void updateLoadGame();


Commit: 9fc63f96a87c3a4654f864a372c659814759382f
    https://github.com/scummvm/scummvm/commit/9fc63f96a87c3a4654f864a372c659814759382f
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-06-21T10:53:46+03:00

Commit Message:
ASYLUM: add detection for the Polish fanmade translation

Changed paths:
    engines/asylum/detection_tables.h


diff --git a/engines/asylum/detection_tables.h b/engines/asylum/detection_tables.h
index d38534cf91d..2719988a0a5 100644
--- a/engines/asylum/detection_tables.h
+++ b/engines/asylum/detection_tables.h
@@ -220,6 +220,21 @@ static const ADGameDescription gameDescriptions[] = {
 		ADGF_TESTING | ADGF_DROPPLATFORM,
 		GUIO0()
 	},
+	{
+		// Polish fanmade translation
+		"asylum",
+		"Fanmade",
+		{
+			{"SNTRM.DAT", 0, "7cfcc457c1f579fbf9878ac175d29374", 8930},
+			{"RES.000",   0, "38989acceb9c7942b8758945768c5f85", 279825},
+			{"SCN.006",   0, "3a5b54da08198012dc0614114782d5fb", 2918330},
+			AD_LISTEND
+		},
+		Common::PL_POL,
+		Common::kPlatformWindows,
+		ADGF_TESTING | ADGF_DROPPLATFORM,
+		GUIO0()
+	},
 	{
 		// Spanish fanmade translation
 		"asylum",




More information about the Scummvm-git-logs mailing list