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

dreammaster paulfgilbert at gmail.com
Sun Jul 7 01:15:16 CEST 2019


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:
f445578a4d GLK: ALAN3: Fix hang after entering unknown word
43bc2e4853 GLK: ALAN3: Fix restarting game from quit command
54b838cd60 GLK: ALAN2: Cleanup of unused variables
f282fbb49b GLK: ALAN3: Fix gcc errors


Commit: f445578a4d11929e381caed81aa0df973c655ab6
    https://github.com/scummvm/scummvm/commit/f445578a4d11929e381caed81aa0df973c655ab6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-07-06T15:40:39-07:00

Commit Message:
GLK: ALAN3: Fix hang after entering unknown word

Changed paths:
    engines/glk/alan3/msg.cpp


diff --git a/engines/glk/alan3/msg.cpp b/engines/glk/alan3/msg.cpp
index b26e78a..438b58d 100644
--- a/engines/glk/alan3/msg.cpp
+++ b/engines/glk/alan3/msg.cpp
@@ -56,7 +56,7 @@ void error(CONTEXT, MsgKind msgno) { /* IN - The error message number */
 		/* Print an error message and longjmp to main loop. */
 		if (msgno != NO_MSG)
 			printMessage(msgno);
-		LONG_JUMP_LABEL("return");
+		LONG_JUMP_LABEL("returnError");
 	}
 }
 


Commit: 43bc2e4853e985536a54f00b4e7aa9e87a9b37b6
    https://github.com/scummvm/scummvm/commit/43bc2e4853e985536a54f00b4e7aa9e87a9b37b6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-07-06T15:56:26-07:00

Commit Message:
GLK: ALAN3: Fix restarting game from quit command

Changed paths:
    engines/glk/alan3/main.cpp


diff --git a/engines/glk/alan3/main.cpp b/engines/glk/alan3/main.cpp
index e56ac87..27f87ad 100644
--- a/engines/glk/alan3/main.cpp
+++ b/engines/glk/alan3/main.cpp
@@ -825,10 +825,10 @@ void run(void) {
 						}
 					}
 				}
-
-				if (ctx._break && ctx._label == "restart")
-					break;
 			}
+
+			if (ctx._break && ctx._label == "restart")
+				break;
 		}
 	} while (!g_vm->shouldQuit() && ctx._label == "restart");
 }


Commit: 54b838cd6077e07f16e24d82cd9b7636f5a5b55d
    https://github.com/scummvm/scummvm/commit/54b838cd6077e07f16e24d82cd9b7636f5a5b55d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-07-06T16:01:10-07:00

Commit Message:
GLK: ALAN2: Cleanup of unused variables

Changed paths:
    engines/glk/alan2/alan2.cpp
    engines/glk/alan2/debug.cpp
    engines/glk/alan2/main.cpp
    engines/glk/alan2/main.h


diff --git a/engines/glk/alan2/alan2.cpp b/engines/glk/alan2/alan2.cpp
index 0ad524b..7e942b1 100644
--- a/engines/glk/alan2/alan2.cpp
+++ b/engines/glk/alan2/alan2.cpp
@@ -71,8 +71,6 @@ bool Alan2::initialize() {
 
 	// Set up the code file to point to the already opened game file
 	codfil = &_gameFile;
-	strncpy(codfnm, getFilename().c_str(), 255);
-	codfnm[255] = '\0';
 
 	if (_gameFile.size() < 8) {
 		GUIErrorMessage(_("This is too short to be a valid Alan2 file."));
diff --git a/engines/glk/alan2/debug.cpp b/engines/glk/alan2/debug.cpp
index af72c31..b819eba 100644
--- a/engines/glk/alan2/debug.cpp
+++ b/engines/glk/alan2/debug.cpp
@@ -319,7 +319,9 @@ void debug() {
 			break;
 		}
 		case 'X':
-			dbgflg = FALSE;       /* Fall through to 'G' */
+			dbgflg = FALSE;
+			restoreInfo();
+			return;
 		case 'G':
 			restoreInfo();
 			return;
diff --git a/engines/glk/alan2/main.cpp b/engines/glk/alan2/main.cpp
index be6a60c..5cb800b 100644
--- a/engines/glk/alan2/main.cpp
+++ b/engines/glk/alan2/main.cpp
@@ -97,15 +97,6 @@ int paglen, pagwidth;
 Boolean needsp = FALSE;
 Boolean skipsp = FALSE;
 
-/* Restart jump buffer */
-//jmp_buf restart_label;
-
-
-/* PRIVATE DATA */
-//static jmp_buf jmpbuf;        /* Error return long jump buffer */
-
-
-
 /*======================================================================
 
   terminate()
@@ -1017,12 +1008,7 @@ static void eventchk() {
 
 \*----------------------------------------------------------------------*/
 
-
 Common::SeekableReadStream *codfil;
-char codfnm[256];
-static char txtfnm[256];
-static char logfnm[256];
-
 
 /*----------------------------------------------------------------------
 
@@ -1373,8 +1359,8 @@ static void movactor(CONTEXT) {
 static void openFiles() {
 	// If logging open log file
 	if (logflg) {
-		sprintf(logfnm, "%s.log", advnam);
-		logfil = g_system->getSavefileManager()->openForSaving(logfnm);
+		Common::String filename = Common::String::format("%s.log", advnam);
+		logfil = g_system->getSavefileManager()->openForSaving(filename);
 
 		logflg = logfil != nullptr;
 	}
diff --git a/engines/glk/alan2/main.h b/engines/glk/alan2/main.h
index a77a0c5..3473ebf 100644
--- a/engines/glk/alan2/main.h
+++ b/engines/glk/alan2/main.h
@@ -82,7 +82,6 @@ extern Common::SeekableReadStream *codfil;
 
 /* File names */
 extern const char *advnam;
-extern char codfnm[256];
 
 /* Screen formatting info */
 extern int col, lin;


Commit: f282fbb49bf941c5b8ac1a2dd0b26a4a63978060
    https://github.com/scummvm/scummvm/commit/f282fbb49bf941c5b8ac1a2dd0b26a4a63978060
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-07-06T16:14:54-07:00

Commit Message:
GLK: ALAN3: Fix gcc errors

Changed paths:
    engines/glk/alan3/glkio.cpp
    engines/glk/alan3/instance.cpp
    engines/glk/alan3/inter.cpp
    engines/glk/alan3/version.h


diff --git a/engines/glk/alan3/glkio.cpp b/engines/glk/alan3/glkio.cpp
index c88e9fa..3f0da03 100644
--- a/engines/glk/alan3/glkio.cpp
+++ b/engines/glk/alan3/glkio.cpp
@@ -125,7 +125,7 @@ void GlkIO::setStyle(int style) {
 }
 
 void GlkIO::statusLine(CONTEXT) {
-	uint32 glkWidth;
+	uint glkWidth;
 	char line[100];
 	int pcol = col;
 
diff --git a/engines/glk/alan3/instance.cpp b/engines/glk/alan3/instance.cpp
index b738fd6..e1fab8d 100644
--- a/engines/glk/alan3/instance.cpp
+++ b/engines/glk/alan3/instance.cpp
@@ -289,10 +289,13 @@ bool isAt(int instance, int other, ATrans trans) {
 		switch (trans) {
 		case DIRECT:
 			return admin[instance].location == other;
+
 		case INDIRECT:
 			if (curr == other)
 				return FALSE;
 			curr = admin[curr].location;
+			// fall through
+
 		case TRANSITIVE:
 			while (curr != 0) {
 				if (curr == other)
@@ -302,6 +305,7 @@ bool isAt(int instance, int other, ATrans trans) {
 			}
 			return FALSE;
 		}
+
 		syserr("Unexpected value in switch in isAt() for location");
 		return FALSE;
 	} else if (isALocation(other)) {
@@ -309,11 +313,10 @@ bool isAt(int instance, int other, ATrans trans) {
 		switch (trans) {
 		case DIRECT:
 			return admin[instance].location == other;
-		case INDIRECT: {
+		case INDIRECT:
 			if (admin[instance].location == other)
 				return FALSE;   /* Directly, so not Indirectly */
-			/* Fall through to transitive handling of the location */
-		}
+			// fall through
 		case TRANSITIVE: {
 			int location = locationOf(instance);
 			int curr = other;
diff --git a/engines/glk/alan3/inter.cpp b/engines/glk/alan3/inter.cpp
index 4708cf8..5d70b39 100644
--- a/engines/glk/alan3/inter.cpp
+++ b/engines/glk/alan3/inter.cpp
@@ -254,6 +254,8 @@ static void depexec(Aword v) {
 					break;
 				case I_DEPCASE:
 					instructionString = "DEPCASE";
+					// fall through
+
 				case I_DEPELSE:
 					if (lev == 1) {
 						if (traceInstructionOption)
diff --git a/engines/glk/alan3/version.h b/engines/glk/alan3/version.h
index e2056ab..56c4098 100644
--- a/engines/glk/alan3/version.h
+++ b/engines/glk/alan3/version.h
@@ -31,24 +31,24 @@ namespace Alan3 {
 typedef int64 Time;
 
 struct Version {
-	char  *string;
-	int    version;
-	int    revision;
-	int    correction;
+	const char *string;
+	int version;
+	int revision;
+	int correction;
 	Time time;
-	const char   *state;
+	const char *state;
 };
 
 struct Product {
-	const char   *name;
-	const char   *slogan;
-	const char   *shortHeader;
-	const char   *longHeader;
-	const char   *date;
-	const char   *time;
-	const char   *user;
-	const char   *host;
-	const char   *ostype;
+	const char *name;
+	const char *slogan;
+	const char *shortHeader;
+	const char *longHeader;
+	const char *date;
+	const char *time;
+	const char *user;
+	const char *host;
+	const char *ostype;
 	Version version;
 };
 





More information about the Scummvm-git-logs mailing list