[Scummvm-git-logs] scummvm master -> 1a601e661fc0dadcb42d144ca5b3926ac84f7864

sev- sev at scummvm.org
Mon Apr 27 20:30:48 UTC 2020


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

Summary:
52f76f4ee5 WINTERMUTE: Added missing break
663901ade5 ULTIMA: Fix arguments in printf
67cf8457d4 GLK: AGT: Fix printf arguments
1a601e661f GLK: ALAN2: Fix printf parameters


Commit: 52f76f4ee501c1dc5bc3a85f59b2fe99708dfc31
    https://github.com/scummvm/scummvm/commit/52f76f4ee501c1dc5bc3a85f59b2fe99708dfc31
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-27T21:58:28+02:00

Commit Message:
WINTERMUTE: Added missing break

Changed paths:
    engines/wintermute/ad/ad_entity.cpp


diff --git a/engines/wintermute/ad/ad_entity.cpp b/engines/wintermute/ad/ad_entity.cpp
index f07f9044ba..c802befbd4 100644
--- a/engines/wintermute/ad/ad_entity.cpp
+++ b/engines/wintermute/ad/ad_entity.cpp
@@ -512,6 +512,8 @@ bool AdEntity::loadBuffer(char *buffer, bool complete) {
 				i = DI_NONE;
 			}
 			_walkToDir = (TDirection)i;
+			break;
+
 #ifdef ENABLE_FOXTAIL
 		case TOKEN_HINT_X:
 			parser.scanStr(params, "%d", &_hintX);
@@ -845,7 +847,7 @@ bool AdEntity::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
 	// [WME Kinjal 1.4] SetBeforeEntity / SetAfterEntity
 	// Usage at HeroCraft games: ent.SetBeforeEntity("redDuskaEntity")
 	// Look for target entity (entity with given name, on the same layer as source entity)
-	// If target entity is not found, do nothing  
+	// If target entity is not found, do nothing
 	// Else shift nodes of the layer to put current entity behind/after target entity
 	//////////////////////////////////////////////////////////////////////////
 	else if (strcmp(name, "SetBeforeEntity") == 0 || strcmp(name, "SetAfterEntity") == 0) {
@@ -872,7 +874,7 @@ bool AdEntity::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
 								k++;
 							}
 
-							// shift layer nodes array between source and target 
+							// shift layer nodes array between source and target
 							int32 delta = j <= k ? 1 : -1;
 							AdSceneNode *tmp = layer->_nodes[j];
 							for (int32 x = j; x != (int32)k; x += delta) {
@@ -1263,7 +1265,7 @@ bool AdEntity::persist(BasePersistenceManager *persistMgr) {
 	persistMgr->transferPtr(TMEMBER_PTR(_theora));
 
 #ifdef ENABLE_FOXTAIL
-    if (BaseEngine::instance().isFoxTail(FOXTAIL_1_2_527, FOXTAIL_LATEST_VERSION)) { 
+    if (BaseEngine::instance().isFoxTail(FOXTAIL_1_2_527, FOXTAIL_LATEST_VERSION)) {
 	    persistMgr->transferSint32(TMEMBER(_hintX));
 	    persistMgr->transferSint32(TMEMBER(_hintY));
 	}


Commit: 663901ade583e6e6c25da216c763f26ca945bc79
    https://github.com/scummvm/scummvm/commit/663901ade583e6e6c25da216c763f26ca945bc79
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-27T22:12:26+02:00

Commit Message:
ULTIMA: Fix arguments in printf

Changed paths:
    engines/ultima/nuvie/keybinding/keys.cpp


diff --git a/engines/ultima/nuvie/keybinding/keys.cpp b/engines/ultima/nuvie/keybinding/keys.cpp
index fd4145f7f1..b7e56e3c88 100644
--- a/engines/ultima/nuvie/keybinding/keys.cpp
+++ b/engines/ultima/nuvie/keybinding/keys.cpp
@@ -651,7 +651,7 @@ void KeyBinder::LoadGameSpecificKeys() {
 		ConsoleAddInfo("Loading %s", key_path);
 		LoadFromFileInternal(key_path);
 	} else // These aren't critical so failing to load doesn't matter much
-		ConsoleAddInfo("Couldn't find $s", key_path);
+		ConsoleAddInfo("Couldn't find %s", key_path);
 }
 
 void KeyBinder::LoadFromPatch() { // FIXME default should probably be system specific


Commit: 67cf8457d4caf1f441fa3850a9d8541882a295f9
    https://github.com/scummvm/scummvm/commit/67cf8457d4caf1f441fa3850a9d8541882a295f9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-27T22:19:33+02:00

Commit Message:
GLK: AGT: Fix printf arguments

Changed paths:
    engines/glk/agt/agxfile.cpp
    engines/glk/agt/exec.cpp
    engines/glk/agt/token.cpp
    engines/glk/agt/util.cpp


diff --git a/engines/glk/agt/agxfile.cpp b/engines/glk/agt/agxfile.cpp
index cd544bb2e5..5a93a2ecf1 100644
--- a/engines/glk/agt/agxfile.cpp
+++ b/engines/glk/agt/agxfile.cpp
@@ -877,7 +877,7 @@ int read_agx(fc_type fc, rbool diag) {
 		rprintf("    Offset   Size   NumRec  RecSz\n");
 		rprintf("    ------  ------  ------  ------\n");
 		for (i = 0; i < AGX_NUMBLOCK; i++)
-			rprintf("%2d: %6d  %6d  %6d  %6d   %s\n", i,
+			rprintf("%2ld: %6d  %6d  %6d  %6d   %s\n", i,
 			        index[i].file_offset, index[i].blocksize,
 			        index[i].numrec, index[i].recsize, block_name[i]);
 	}
diff --git a/engines/glk/agt/exec.cpp b/engines/glk/agt/exec.cpp
index 9e69747a20..6513cfdaa1 100644
--- a/engines/glk/agt/exec.cpp
+++ b/engines/glk/agt/exec.cpp
@@ -695,7 +695,7 @@ void gen_sysmsg(int msgid, const char *s, int context, const char *pword)
 		if (err_ptr[msgid - 1].size <= 0
 		        && msgid > OLD_MAX_STD_MSG && msgid <= MAX_NUM_ERR) {
 			msgid = stdmsg_fallback[msgid - OLD_MAX_STD_MSG - 1];
-			if (DEBUG_SMSG) rprintf("==> %3d");
+			if (DEBUG_SMSG) rprintf("==> %3d", msgid);
 		}
 		if (msgid != 0 && err_ptr[msgid - 1].size > 0) {
 			if (DEBUG_SMSG) rprintf(" : From gamefile\n");
diff --git a/engines/glk/agt/token.cpp b/engines/glk/agt/token.cpp
index 94404e5d27..db5b9ba75d 100644
--- a/engines/glk/agt/token.cpp
+++ b/engines/glk/agt/token.cpp
@@ -232,7 +232,7 @@ static void op_stack(int opnum) {
 /* This is called from the disassembler */
 void print_tos(void) {
 	if (sp > 0)
-		dbgprintf("TOS(%d)", stack[sp - 1]);
+		dbgprintf("TOS(%ld)", stack[sp - 1]);
 	else
 		debugout("TOS(xxx)");
 }
diff --git a/engines/glk/agt/util.cpp b/engines/glk/agt/util.cpp
index 47900fc74e..fce4e8b433 100644
--- a/engines/glk/agt/util.cpp
+++ b/engines/glk/agt/util.cpp
@@ -433,8 +433,8 @@ genfile openbin(fc_type fc, filetype ext, const char *err, rbool ferr)
    regardless of the EOL conventions of the platform, at least up to a point.
    It should work with files that have \n, \r, or \r\n termined lines.  */
 
-#define READLN_GRAIN 64 /* Granularity of readln() rrealloc requests 
-                this needs to be at least the size of a tab 
+#define READLN_GRAIN 64 /* Granularity of readln() rrealloc requests
+                this needs to be at least the size of a tab
                 character */
 #define DOS_EOF 26    /* Ctrl-Z is the DOS end-of-file marker */
 
@@ -603,7 +603,7 @@ buffreopen will be called before any major file activity
 		s = formal_name(fc, ext);
 		rprintf("Reading %s file %s (size:%ld)\n", rectype, s, filesize);
 		rfree(s);
-		rprintf("  Record size=  Formal:%d    File:%ld", minbuff, recsize);
+		rprintf("  Record size=  Formal:%ld    File:%ld", minbuff, recsize);
 	}
 	if (agx_file) return (long) filesize;
 	else return (long) recsize;


Commit: 1a601e661fc0dadcb42d144ca5b3926ac84f7864
    https://github.com/scummvm/scummvm/commit/1a601e661fc0dadcb42d144ca5b3926ac84f7864
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-27T22:30:24+02:00

Commit Message:
GLK: ALAN2: Fix printf parameters

Changed paths:
    engines/glk/alan2/inter.cpp
    engines/glk/alan2/main.cpp


diff --git a/engines/glk/alan2/inter.cpp b/engines/glk/alan2/inter.cpp
index 64aff1fd74..967c8872c4 100644
--- a/engines/glk/alan2/inter.cpp
+++ b/engines/glk/alan2/inter.cpp
@@ -175,13 +175,13 @@ void interpret(CONTEXT, Aaddr adr) {
 
 		switch (I_CLASS(i)) {
 		case C_CONST:
-			if (stpflg) printf("PUSH  \t%5ld", I_OP(i));
+			if (stpflg) printf("PUSH  \t%5u", I_OP(i));
 			push(I_OP(i));
 			break;
 		case C_CURVAR:
 			switch (I_OP(i)) {
 			case V_PARAM:
-				if (stpflg) printf("PARAM \t%5ld\t\t(%ld)", top(), params[top() - 1].code);
+				if (stpflg) printf("PARAM \t%5u\t\t(%ld)", top(), params[top() - 1].code);
 				push(params[pop() - 1].code);
 				break;
 			case V_CURLOC:
@@ -294,7 +294,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				Aptr sc;
 				sc = pop();
 				if (stpflg)
-					printf("SCORE \t%5ld\t\t(%ld)", sc, scores[sc - 1]);
+					printf("SCORE \t%5ld\t\t(%u)", sc, scores[sc - 1]);
 				score(sc);
 				break;
 			}
@@ -607,7 +607,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				rh = pop();
 				lh = pop();
 				if (stpflg)
-					printf("STREQ \t%5ld, %5ld", lh, rh);
+					printf("STREQ \t%5d, %5d", lh, rh);
 				push(streq((char *)lh, (char *)rh));
 				if (stpflg) {
 					if (top()) printf("\t(TRUE)");
@@ -639,7 +639,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				rh = pop();
 				lh = pop();
 				if (stpflg)
-					printf("LE \t%5ld, %5ld", lh, rh);
+					printf("LE \t%5d, %5d", lh, rh);
 				push(lh <= rh);
 				if (stpflg) {
 					if (top()) printf("\t(TRUE)");
@@ -654,7 +654,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				rh = pop();
 				lh = pop();
 				if (stpflg)
-					printf("GE \t%5ld, %5ld", lh, rh);
+					printf("GE \t%5d, %5d", lh, rh);
 				push(lh >= rh);
 				if (stpflg) {
 					if (top()) printf("\t(TRUE)");
@@ -669,7 +669,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				rh = pop();
 				lh = pop();
 				if (stpflg)
-					printf("LT \t%5ld, %5ld", lh, rh);
+					printf("LT \t%5d, %5d", lh, rh);
 				push((signed int)lh < (signed int)rh);
 				if (stpflg) {
 					if (top()) printf("\t(TRUE)");
@@ -684,7 +684,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				rh = pop();
 				lh = pop();
 				if (stpflg)
-					printf("GT \t%5ld, %5ld", lh, rh);
+					printf("GT \t%5d, %5d", lh, rh);
 				push(lh > rh);
 				if (stpflg) {
 					if (top()) printf("\t(TRUE)");
@@ -699,7 +699,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				rh = pop();
 				lh = pop();
 				if (stpflg)
-					printf("PLUS \t%5ld, %5ld", lh, rh);
+					printf("PLUS \t%5d, %5d", lh, rh);
 				push(lh + rh);
 				if (stpflg)
 					printf("\t(%ld)", top());
@@ -712,7 +712,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				rh = pop();
 				lh = pop();
 				if (stpflg)
-					printf("MINUS \t%5ld, %5ld", lh, rh);
+					printf("MINUS \t%5d, %5d", lh, rh);
 				push(lh - rh);
 				if (stpflg)
 					printf("\t(%ld)", top());
@@ -725,7 +725,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				rh = pop();
 				lh = pop();
 				if (stpflg)
-					printf("MULT \t%5ld, %5ld", lh, rh);
+					printf("MULT \t%5d, %5d", lh, rh);
 				push(lh * rh);
 				if (stpflg)
 					printf("\t(%ld)", top());
@@ -738,7 +738,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				rh = pop();
 				lh = pop();
 				if (stpflg)
-					printf("DIV \t%5ld, %5ld", lh, rh);
+					printf("DIV \t%5d, %5d", lh, rh);
 				push(lh / rh);
 				if (stpflg)
 					printf("\t(%ld)", top());
@@ -808,7 +808,7 @@ void interpret(CONTEXT, Aaddr adr) {
 				low = pop();
 				val = pop();
 				if (stpflg)
-					printf("BETWEEN \t%5ld, %5ld, %5ld", val, low, high);
+					printf("BETWEEN \t%5d, %5d, %5d", val, low, high);
 				push(btw(val, low, high));
 				if (stpflg)
 					printf("\t(%ld)", top());
diff --git a/engines/glk/alan2/main.cpp b/engines/glk/alan2/main.cpp
index e09ce6b3f5..d09ac25ba8 100644
--- a/engines/glk/alan2/main.cpp
+++ b/engines/glk/alan2/main.cpp
@@ -1289,7 +1289,7 @@ static void movactor(CONTEXT) {
 						debugsay(cur.act);
 						printf(" (at ");
 						debugsay(cur.loc);
-						printf("), SCRIPT %ld, STEP %ld, Waiting %ld more>\n",
+						printf("), SCRIPT %u, STEP %u, Waiting %d more>\n",
 						       act->script, act->step + 1, step->after - act->count);
 					}
 					act->count++;
@@ -1304,7 +1304,7 @@ static void movactor(CONTEXT) {
 						debugsay(cur.act);
 						printf(" (at ");
 						debugsay(cur.loc);
-						printf("), SCRIPT %ld, STEP %ld, Evaluating:>\n",
+						printf("), SCRIPT %u, STEP %u, Evaluating:>\n",
 						       act->script, act->step + 1);
 					}
 					interpret(step->exp);
@@ -1320,7 +1320,7 @@ static void movactor(CONTEXT) {
 					debugsay(cur.act);
 					printf(" (at ");
 					debugsay(cur.loc);
-					printf("), SCRIPT %ld, STEP %ld, Executing:>\n",
+					printf("), SCRIPT %u, STEP %u, Executing:>\n",
 					       act->script, act->step);
 				}
 				interpret(step->stm);




More information about the Scummvm-git-logs mailing list