[Scummvm-git-logs] scummvm master -> 0d3bd282f02f43a5f4062d796bbe6440c98d7e8b

alxpnv a04198622 at gmail.com
Fri May 28 10:37:19 UTC 2021


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:
1a01580955 ASYLUM: allow using all printable characters in savegame names
0d3bd282f0 ASYLUM: fix caret position


Commit: 1a01580955b98fa6b3455b04766be8f8bd0b36da
    https://github.com/scummvm/scummvm/commit/1a01580955b98fa6b3455b04766be8f8bd0b36da
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-05-28T13:39:37+03:00

Commit Message:
ASYLUM: allow using all printable characters in savegame names

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


diff --git a/engines/asylum/views/menu.cpp b/engines/asylum/views/menu.cpp
index 4b65289f5b..93649cf9d2 100644
--- a/engines/asylum/views/menu.cpp
+++ b/engines/asylum/views/menu.cpp
@@ -2288,7 +2288,7 @@ void Menu::keySaveGame(const AsylumEvent &evt) {
 
 	switch (evt.kbd.keycode) {
 	default:
-		if (evt.kbd.ascii > 255 || !Common::isAlnum(evt.kbd.ascii))
+		if (evt.kbd.ascii > 255 || !Common::isPrint(evt.kbd.ascii))
 			break;
 
 		if (getSaveLoad()->getName()->size() < 44) {


Commit: 0d3bd282f02f43a5f4062d796bbe6440c98d7e8b
    https://github.com/scummvm/scummvm/commit/0d3bd282f02f43a5f4062d796bbe6440c98d7e8b
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-05-28T13:39:37+03:00

Commit Message:
ASYLUM: fix caret position

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


diff --git a/engines/asylum/views/menu.cpp b/engines/asylum/views/menu.cpp
index 93649cf9d2..bebf477ad8 100644
--- a/engines/asylum/views/menu.cpp
+++ b/engines/asylum/views/menu.cpp
@@ -767,7 +767,7 @@ void Menu::updateLoadGame() {
 			if (index + _startIndex >= 25)
 				break;
 
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
 
 			if (cursor.x < 30 || cursor.x > (30 + getText()->getWidth((char *)&text))
 			 || cursor.y < y  || cursor.y > (y + 24))
@@ -787,7 +787,7 @@ void Menu::updateLoadGame() {
 			if (index + _startIndex >= 25)
 				break;
 
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
 
 			if (cursor.x < 350 || cursor.x > (350 + getText()->getWidth((char *)&text))
 				|| cursor.y < y   || cursor.y > (y + 24))
@@ -890,7 +890,7 @@ void Menu::updateSaveGame() {
 			if (index + _startIndex >= 25)
 				break;
 
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
 
 			if (!_isEditingSavegameName) {
 				if (cursor.x < 30 || cursor.x > (30 + getText()->getWidth((char *)&text))
@@ -927,7 +927,7 @@ void Menu::updateSaveGame() {
 			if (index + _startIndex >= 25)
 				break;
 
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
 
 			if (!_isEditingSavegameName) {
 				if (cursor.x < 350 || cursor.x > (350 + getText()->getWidth((char *)&text))
@@ -1038,7 +1038,7 @@ void Menu::updateDeleteGame() {
 		if (index + _startIndex >= 25)
 			break;
 
-		snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
+		snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
 
 		if (cursor.x < 30 || cursor.x > (30 + getText()->getWidth((char *)&text))
 		 || cursor.y < y  || cursor.y > (y + 24))
@@ -1058,7 +1058,7 @@ void Menu::updateDeleteGame() {
 		if (index + _startIndex >= 25)
 			break;
 
-		snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
+		snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
 
 		if (cursor.x < 350 || cursor.x > (350 + getText()->getWidth((char *)&text))
 		 || cursor.y < y   || cursor.y > (y + 24))
@@ -1125,7 +1125,7 @@ void Menu::updateViewMovies() {
 				break;
 
 			if (_movieList[index] != -1) {
-				snprintf((char *)&text, sizeof(text), "%d. %s ", index + 1, getText()->get(MAKE_RESOURCE(kResourcePackText, 1359 + _movieList[index])));
+				snprintf((char *)&text, sizeof(text), "%d. %s", index + 1, getText()->get(MAKE_RESOURCE(kResourcePackText, 1359 + _movieList[index])));
 				snprintf((char *)&text2, sizeof(text2), getText()->get(MAKE_RESOURCE(kResourcePackText, 1356)), moviesCd[_movieList[index]]);
 				strcat((char *)&text, (char *)&text2);
 
@@ -1150,7 +1150,7 @@ void Menu::updateViewMovies() {
 				break;
 
 			if (_movieList[index] != -1) {
-				snprintf((char *)&text, sizeof(text), "%d. %s ", index + 1, getText()->get(MAKE_RESOURCE(kResourcePackText, 1359 + _movieList[index])));
+				snprintf((char *)&text, sizeof(text), "%d. %s", index + 1, getText()->get(MAKE_RESOURCE(kResourcePackText, 1359 + _movieList[index])));
 				snprintf((char *)&text2, sizeof(text2), getText()->get(MAKE_RESOURCE(kResourcePackText, 1356)), moviesCd[_movieList[index]]);
 				strcat((char *)&text, (char *)&text2);
 
@@ -1639,7 +1639,7 @@ void Menu::clickLoadGame() {
 	int32 index = 0;
 	for (int32 y = 150; y < 324; y += 29) {
 		if (cursor.x >= 350) {
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 7, getSaveLoad()->getName((uint32)(index + _startIndex + 6)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 7, getSaveLoad()->getName((uint32)(index + _startIndex + 6)).c_str());
 
 			if (cursor.x <= (350 + getText()->getWidth((char *)&text))
 			 && cursor.y >= y
@@ -1654,7 +1654,7 @@ void Menu::clickLoadGame() {
 				break;
 			}
 		} else if (cursor.x >= 30) {
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
 
 			if (cursor.x <= (30 + getText()->getWidth((char *)&text))
 			 && cursor.y >= y
@@ -1735,7 +1735,7 @@ void Menu::clickSaveGame() {
 	int32 index = 0;
 	for (int16 y = 150; y < 324; y += 29) {
 		if (cursor.x >= 350) {
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 7, getSaveLoad()->getName((uint32)(index + _startIndex + 6)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 7, getSaveLoad()->getName((uint32)(index + _startIndex + 6)).c_str());
 
 			if (cursor.x <= (350 + getText()->getWidth((char *)&text))
 			 && cursor.y >= y
@@ -1758,7 +1758,7 @@ void Menu::clickSaveGame() {
 				break;
 			}
 		} else if (cursor.x >= 30) {
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
 
 			if (cursor.x <= (30 + getText()->getWidth((char *)&text))
 			 && cursor.y >= y
@@ -1843,7 +1843,7 @@ void Menu::clickDeleteGame() {
 	int32 index = 0;
 	for (int16 y = 150; y < 324; y += 29) {
 		if (cursor.x >= 350) {
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 7, getSaveLoad()->getName((uint32)(index + _startIndex + 6)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 7, getSaveLoad()->getName((uint32)(index + _startIndex + 6)).c_str());
 
 			if (cursor.x <= (350 + getText()->getWidth((char *)&text))
 			 && cursor.y >= y
@@ -1858,7 +1858,7 @@ void Menu::clickDeleteGame() {
 				break;
 			}
 		} else if (cursor.x >= 30) {
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + _startIndex + 1, getSaveLoad()->getName((uint32)(index + _startIndex)).c_str());
 
 			if (cursor.x <= (30 + getText()->getWidth((char *)&text))
 			 && cursor.y >= y
@@ -1929,7 +1929,7 @@ void Menu::clickViewMovies() {
 			if (_movieList[index + _startIndex + 6] == -1)
 				break;
 
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + 1, getText()->get(MAKE_RESOURCE(kResourcePackText, 1359 + _movieList[index])));
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + 1, getText()->get(MAKE_RESOURCE(kResourcePackText, 1359 + _movieList[index])));
 			snprintf((char *)&text2, sizeof(text2), getText()->get(MAKE_RESOURCE(kResourcePackText, 1356)), moviesCd[_movieList[index]]);
 			strcat((char *)&text, (char *)&text2);
 
@@ -1954,7 +1954,7 @@ void Menu::clickViewMovies() {
 			if (_movieList[index + _startIndex] == -1)
 				break;
 
-			snprintf((char *)&text, sizeof(text), "%d. %s ", index + 1, getText()->get(MAKE_RESOURCE(kResourcePackText, 1359 + _movieList[index])));
+			snprintf((char *)&text, sizeof(text), "%d. %s", index + 1, getText()->get(MAKE_RESOURCE(kResourcePackText, 1359 + _movieList[index])));
 			snprintf((char *)&text2, sizeof(text2), getText()->get(MAKE_RESOURCE(kResourcePackText, 1356)), moviesCd[_movieList[index]]);
 			strcat((char *)&text, (char *)&text2);
 




More information about the Scummvm-git-logs mailing list