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

sev- sev at scummvm.org
Tue Sep 3 21:08:52 CEST 2019


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:
8ec8b5fc7d GLK: Fix compilation
a7e30d0e7f HDB: Fix compilation on Amiga


Commit: 8ec8b5fc7d60df0f57883dd819d3db0f6626d8d2
    https://github.com/scummvm/scummvm/commit/8ec8b5fc7d60df0f57883dd819d3db0f6626d8d2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-09-03T21:08:13+02:00

Commit Message:
GLK: Fix compilation

Changed paths:
    engines/glk/tads/tads2/tokenizer.cpp
    engines/glk/tads/tads2/tokenizer.h


diff --git a/engines/glk/tads/tads2/tokenizer.cpp b/engines/glk/tads/tads2/tokenizer.cpp
index 85bba24..b418469 100644
--- a/engines/glk/tads/tads2/tokenizer.cpp
+++ b/engines/glk/tads/tads2/tokenizer.cpp
@@ -219,7 +219,7 @@ void tok_add_define_cvtcase(tokcxdef *ctx, const char *sym, int len,
 
 /* add a symbol to the #define symbol table */
 void tok_add_define(tokcxdef *ctx, const char *sym, int len,
-                    char *expan, int explen)
+                    const char *expan, int explen)
 {
     int       hsh;
     tokdfdef *df;
diff --git a/engines/glk/tads/tads2/tokenizer.h b/engines/glk/tads/tads2/tokenizer.h
index 882ab92..d196540 100644
--- a/engines/glk/tads/tads2/tokenizer.h
+++ b/engines/glk/tads/tads2/tokenizer.h
@@ -436,11 +436,11 @@ void tok_add_define(tokcxdef *ctx, const char *sym, int len,
  *   add a symbol to the #define symbol table, folding case if we're
  *   operating in case-insensitive mode 
  */
-void tok_add_define_cvtcase(tokcxdef *ctx, char *sym, int len,
-                            char *expan, int explen);
+void tok_add_define_cvtcase(tokcxdef *ctx, const char *sym, int len,
+                            const char *expan, int explen);
 
 /* add a symbol to the #define symbol table as a number */
-void tok_add_define_num_cvtcase(tokcxdef *ctx, char *sym, int len, int num);
+void tok_add_define_num_cvtcase(tokcxdef *ctx, const char *sym, int len, int num);
 
 /* undefine a #define symbol */
 void tok_del_define(tokcxdef *ctx, char *sym, int len);


Commit: a7e30d0e7f62aad9aceadd674f1b51146f20958d
    https://github.com/scummvm/scummvm/commit/a7e30d0e7f62aad9aceadd674f1b51146f20958d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-09-03T21:08:13+02:00

Commit Message:
HDB: Fix compilation on Amiga

Changed paths:
    engines/hdb/menu.cpp
    engines/hdb/saveload.cpp
    engines/hdb/sound.h
    engines/hdb/window.cpp


diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp
index 8e20653..4a4bea7 100644
--- a/engines/hdb/menu.cpp
+++ b/engines/hdb/menu.cpp
@@ -1285,7 +1285,9 @@ void Menu::fillSavegameSlots() {
 		Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(saveGameFile);
 
 		if (!in) {
-			memset(&_saveGames[i], 0, sizeof(Save));
+			_saveGames[i].seconds = 0;
+			_saveGames[i].saveID[0] = 0;
+			_saveGames[i].mapName[0] = 0;
 		} else {
 			Graphics::skipThumbnail(*in);
 
diff --git a/engines/hdb/saveload.cpp b/engines/hdb/saveload.cpp
index acf1092..64cd3e7 100644
--- a/engines/hdb/saveload.cpp
+++ b/engines/hdb/saveload.cpp
@@ -65,7 +65,7 @@ Common::Error HDBGame::saveGameState(int slot, const Common::String &desc) {
 
 	Graphics::saveThumbnail(*out);
 
-	memset(&_saveHeader, 0, sizeof(Save));
+	_saveHeader.fileSlot = 0;
 	strcpy(_saveHeader.saveID, saveFileName.c_str());
 	_saveHeader.seconds = _timeSeconds + (_timePlayed / 1000);
 	strcpy(_saveHeader.mapName, _inMapName);
diff --git a/engines/hdb/sound.h b/engines/hdb/sound.h
index 4d2e6ee..d49b522 100644
--- a/engines/hdb/sound.h
+++ b/engines/hdb/sound.h
@@ -1446,11 +1446,11 @@ enum SndType {
 };
 
 struct SoundCache {
-	SndMem loaded; // -1 = freeable; in memory, 0 = not cached, 1 = cached
-	int32 size;				// size of sound
-	const char *name;				// filename / MSD name
-	const char *luaName;			// name used by Lua for i.d.
-	SndType ext;				// 0 = Uninitialized, -1 = WAV, 1 = MP3
+	SndMem loaded;			// -1 = freeable; in memory, 0 = not cached, 1 = cached
+	int size;				// size of sound
+	const char *name;		// filename / MSD name
+	const char *luaName;	// name used by Lua for i.d.
+	SndType ext;			// 0 = Uninitialized, -1 = WAV, 1 = MP3
 	byte *data;
 
 	SoundCache() : loaded(SNDMEM_NOTCACHED), size(0), name(nullptr), luaName(nullptr), ext(SNDTYPE_NONE), data(nullptr) {}
diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp
index 044347c..0f89c36 100644
--- a/engines/hdb/window.cpp
+++ b/engines/hdb/window.cpp
@@ -574,7 +574,9 @@ void Window::openDialog(const char *title, int tileIndex, const char *string, in
 	if (_dialogInfo.active)
 		return;
 
-	memset(&_dialogInfo, 0, sizeof(_dialogInfo));
+	_dialogInfo.gfx = NULL;
+	_dialogInfo.el = _dialogInfo.er = _dialogInfo.et = _dialogInfo.eb = 0;
+	_dialogInfo.luaMore[0] = 0;
 
 	_dialogInfo.tileIndex = tileIndex;
 	strcpy(_dialogInfo.title, title);
@@ -791,18 +793,21 @@ void Window::setDialogDelay(int delay) {
 
 void Window::openDialogChoice(const char *title, const char *text, const char *func, int numChoices, const char *choices[10]) {
 	int		width, height, titleWidth, titleHeight;
-	int		e1, e2, e3, e4, i;
+	int		e1, e2, e3, e4;
 
 	if (_dialogInfo.active)
 		return;
 
-	memset(&_dialogChoiceInfo, 0, sizeof(_dialogChoiceInfo));
+	_dialogChoiceInfo.el = _dialogChoiceInfo.er = _dialogChoiceInfo.et = _dialogChoiceInfo.eb = 0;
+	for (int i = 0; i < 10; i++)
+		_dialogChoiceInfo.choices[i][0] = 0;
+
 	strcpy(_dialogChoiceInfo.title, title);
 	strcpy(_dialogChoiceInfo.text, text);
 	strcpy(_dialogChoiceInfo.func, func);
 	_dialogChoiceInfo.numChoices = numChoices;
 
-	for (i = 0; i < numChoices; i++)
+	for (int i = 0; i < numChoices; i++)
 		strcpy(_dialogChoiceInfo.choices[i], choices[i]);
 	_dialogChoiceInfo.active = true;
 
@@ -811,7 +816,7 @@ void Window::openDialogChoice(const char *title, const char *text, const char *f
 	g_hdb->_gfx->getDimensions(text, &width, &height);
 	g_hdb->_gfx->getDimensions(title, &titleWidth, &titleHeight);
 
-	for (i = 0; i < 10; i++)
+	for (int i = 0; i < 10; i++)
 		if (choices[i]) {
 			int	w, h;
 			g_hdb->_gfx->getDimensions(choices[i], &w, &h);
@@ -948,7 +953,7 @@ void Window::openMessageBar(const char *title, int time) {
 		return;
 	}
 
-	memset(&_msgInfo, 0, sizeof(_msgInfo));
+	_msgInfo.y = 0;
 
 	_msgInfo.timer = (time * kGameFPS);
 	strcpy(_msgInfo.title, title);





More information about the Scummvm-git-logs mailing list