[Scummvm-git-logs] scummvm master -> 94793803106ff2a7e6366b35f223f11715045546

dreammaster dreammaster at scummvm.org
Fri Apr 20 03:42:43 CEST 2018


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:
9479380310 XEEN: Changes for Auto Notes for Swords


Commit: 94793803106ff2a7e6366b35f223f11715045546
    https://github.com/scummvm/scummvm/commit/94793803106ff2a7e6366b35f223f11715045546
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-19T21:42:38-04:00

Commit Message:
XEEN: Changes for Auto Notes for Swords

Changed paths:
    engines/xeen/dialogs/dialogs_quests.cpp
    engines/xeen/party.cpp


diff --git a/engines/xeen/dialogs/dialogs_quests.cpp b/engines/xeen/dialogs/dialogs_quests.cpp
index e0e9829..31d0bdf 100644
--- a/engines/xeen/dialogs/dialogs_quests.cpp
+++ b/engines/xeen/dialogs/dialogs_quests.cpp
@@ -156,23 +156,24 @@ void Quests::execute() {
 				lines[topRow].c_str(), lines[topRow + 1].c_str(), lines[topRow + 2].c_str()));
 			break;
 
-		case AUTO_NOTES:
-			for (int idx = 0; idx < MAX_DIALOG_LINES; ++idx)
+		case AUTO_NOTES: {
+			int count = _vm->getGameID() == GType_Swords ? 49 : MAX_DIALOG_LINES;
+			for (int idx = 0; idx < count; ++idx)
 				lines[idx] = "";
 
 			count = 0;
 			headerShown = false;
-			for (int idx = 0; idx < MAX_DIALOG_LINES; ++idx) {
+			for (int idx = 0; idx < count; ++idx) {
 				if (party._worldFlags[idx]) {
 					if (!count && !headerShown && (_vm->getGameID() == GType_Swords || idx < 72)) {
 						lines[count++] = title1;
 					}
-					if (_vm->getGameID() != GType_Swords && idx >= 72 && !headerShown) {
+					if (idx >= 72 && !headerShown) {
 						lines[count++] = Res.DARKSIDE_OF_XEEN_LINE;
 						headerShown = true;
 					}
 
-					lines[count++] = _questNotes[idx + 56];
+					lines[count++] = _questNotes[idx + (_vm->getGameID() == GType_Swords ? 51 : 56)];
 				}
 			}
 
@@ -188,6 +189,7 @@ void Quests::execute() {
 			));
 			break;
 		}
+		}
 
 		windows[30].writeString("\v000\t000");
 		windows[24].update();
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index 66d1313..b6ac558 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -957,7 +957,7 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
 						break;
 					}
 				} else {
-					if (ps._misc[idx]._material == ((int)takeVal - ACCESSORIES_END)) {
+					if (ps._misc[idx]._material == (int)(takeVal - ACCESSORIES_END)) {
 						ps._misc[idx].clear();
 						ps._misc.sort();
 						found = true;
@@ -1435,11 +1435,11 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
 		_gold += _vm->getRandomNumber(1, giveVal);
 		break;
 	case 103:
-		assert(giveVal < 128);
+		assert(giveVal < (uint)(_vm->getGameID() == GType_Swords ? 49 : 128));
 		_worldFlags[giveVal] = true;
 		break;
 	case 104:
-		assert(giveVal < 30);
+		assert(giveVal < (uint)(_vm->getGameID() == GType_Swords ? 60 : 30));
 		_questFlags[(_vm->getGameID() == GType_Swords ? 0 : files._ccNum * 30) + giveVal] = true;
 		break;
 	case 107:





More information about the Scummvm-git-logs mailing list