diff options
| author | Stephen Kennedy | 2008-07-22 00:15:13 +0000 | 
|---|---|---|
| committer | Stephen Kennedy | 2008-07-22 00:15:13 +0000 | 
| commit | 0861fa4c00f0ecb82f3607127c8278d55f95376c (patch) | |
| tree | d757c116b163a401f00859503a7db755b6627504 /engines/scumm | |
| parent | a58080bd58bbcc9f7c710fade55620049bae14e4 (diff) | |
| parent | e09eb75ef77d6e76b763b3a47540a530013a887f (diff) | |
| download | scummvm-rg350-0861fa4c00f0ecb82f3607127c8278d55f95376c.tar.gz scummvm-rg350-0861fa4c00f0ecb82f3607127c8278d55f95376c.tar.bz2 scummvm-rg350-0861fa4c00f0ecb82f3607127c8278d55f95376c.zip  | |
Merged revisions 32879,32883,32895,32899,32902-32904,32910-32912,32923-32924,32930-32931,32938,32940,32948-32949,32951,32960-32964,32966-32970,32972-32974,32976,32978,32983,32986-32990,32992,32994,33002-33004,33006-33007,33009-33010,33014,33017,33021-33023,33030,33033,33052-33053,33056-33058,33061-33064,33068,33070,33072,33075,33078-33079,33083,33086-33087,33089,33094-33096,33098-33099,33104,33108-33109,33114-33117,33120,33135-33146,33160,33162,33165,33167-33169 via svnmerge from 
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
svn-id: r33185
Diffstat (limited to 'engines/scumm')
| -rw-r--r-- | engines/scumm/detection.cpp | 4 | ||||
| -rw-r--r-- | engines/scumm/dialogs.cpp | 27 | ||||
| -rw-r--r-- | engines/scumm/dialogs.h | 2 | ||||
| -rw-r--r-- | engines/scumm/he/resource_he.cpp | 5 | ||||
| -rw-r--r-- | engines/scumm/imuse_digi/dimuse_sndmgr.cpp | 6 | ||||
| -rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.h | 4 | ||||
| -rw-r--r-- | engines/scumm/saveload.cpp | 6 | 
7 files changed, 32 insertions, 22 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 9359c6610c..68d3010199 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -492,7 +492,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com  			// Note that GF_OLD_BUNDLE is true if and only if GF_OLD256 is false.  			// Candidates: maniac enhanced, zak enhanced, indy3ega, loom -			if (g->version != 2 && g->version != 3  || (g->features & GF_OLD256)) +			if ((g->version != 2 && g->version != 3)  || (g->features & GF_OLD256))  				return false;  			/* We distinguish the games by the presence/absence of @@ -949,7 +949,7 @@ SaveStateList ScummMetaEngine::listSaves(const char *target) const {  	sort(filenames.begin(), filenames.end());	// Sort (hopefully ensuring we are sorted numerically..)  	SaveStateList saveList; -	for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++) { +	for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {  		// Obtain the last 2 digits of the filename, since they correspond to the save slot  		int slotNum = atoi(file->c_str() + file->size() - 2); diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 6d1cf1bbd8..e4e2b2b620 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -297,7 +297,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da  		break;  	case GUI::kListSelectionChangedCmd: {  		if (_gfxWidget) { -			updateInfos(); +			updateInfos(true);  		}  		if (_saveMode) { @@ -350,7 +350,7 @@ void SaveLoadChooser::reflowLayout() {  		_fillR = g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillR");  		_fillG = g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillG");  		_fillB = g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillB"); -		updateInfos(); +		updateInfos(false);  	} else {  		_container->setFlags(GUI::WIDGET_INVISIBLE);  		_gfxWidget->setFlags(GUI::WIDGET_INVISIBLE); @@ -362,7 +362,7 @@ void SaveLoadChooser::reflowLayout() {  	Dialog::reflowLayout();  } -void SaveLoadChooser::updateInfos() { +void SaveLoadChooser::updateInfos(bool redraw) {  	int selItem = _list->getSelected();  	Graphics::Surface *thumb;  	thumb = _vm->loadThumbnailFromSlot(_saveMode ? selItem + 1 : selItem); @@ -376,7 +376,8 @@ void SaveLoadChooser::updateInfos() {  	}  	delete thumb; -	_gfxWidget->draw(); +	if (redraw) +		_gfxWidget->draw();  	InfoStuff infos;  	memset(&infos, 0, sizeof(InfoStuff)); @@ -386,12 +387,14 @@ void SaveLoadChooser::updateInfos() {  			(infos.date >> 24) & 0xFF, (infos.date >> 16) & 0xFF,  			infos.date & 0xFFFF);  		_date->setLabel(buffer); -		_date->draw(); +		if (redraw) +			_date->draw();  		snprintf(buffer, 32, "Time: %.2d:%.2d",  			(infos.time >> 8) & 0xFF, infos.time & 0xFF);  		_time->setLabel(buffer); -		_time->draw(); +		if (redraw) +			_time->draw();  		int minutes = infos.playtime / 60;  		int hours = minutes / 60; @@ -400,19 +403,23 @@ void SaveLoadChooser::updateInfos() {  		snprintf(buffer, 32, "Playtime: %.2d:%.2d",  			hours & 0xFF, minutes & 0xFF);  		_playtime->setLabel(buffer); -		_playtime->draw(); +		if (redraw) +			_playtime->draw();  	} else {  		snprintf(buffer, 32, "No date saved");  		_date->setLabel(buffer); -		_date->draw(); +		if (redraw) +			_date->draw();  		snprintf(buffer, 32, "No time saved");  		_time->setLabel(buffer); -		_time->draw(); +		if (redraw) +			_time->draw();  		snprintf(buffer, 32, "No playtime saved");  		_playtime->setLabel(buffer); -		_playtime->draw(); +		if (redraw) +			_playtime->draw();  	}  } diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h index 7c99a0ebcc..0d04d8faea 100644 --- a/engines/scumm/dialogs.h +++ b/engines/scumm/dialogs.h @@ -69,7 +69,7 @@ protected:  	uint8 _fillR, _fillG, _fillB; -	void updateInfos(); +	void updateInfos(bool redraw);  public:  	SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode, ScummEngine *engine);  	~SaveLoadChooser(); diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index 33e6748860..f8fb1efca2 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -522,12 +522,13 @@ int Win32ResExtractor::do_resources_recurs(WinLibrary *fi, WinResource *base,  	/* get a list of all resources at this level */  	wr = list_resources(fi, base, &rescnt); -	if (wr == NULL) +	if (wr == NULL) {  		if (size != 0)  			return size;  		else  			return 0; - +	} +	  	/* process each resource listed */  	for (c = 0 ; c < rescnt ; c++) {  		/* (over)write the corresponding WinResource holder with the current */ diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp index 1511b9aefc..b18b0ba70f 100644 --- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -102,10 +102,10 @@ void ImuseDigiSndMgr::prepareSoundFromRMAP(Common::File *file, SoundDesc *sound,  	int32 version = file->readUint32BE();  	if (version != 3) {  		if (version == 2) { -			warning("ImuseDigiSndMgr::prepareSoundFromRMAP: Wrong version of compressed *.bun file, expected 3, but it's 2."); -			warning("Suggested to recompress with latest tool from daily builds."); +			warning("ImuseDigiSndMgr::prepareSoundFromRMAP: Wrong version of compressed *.bun file, expected 3, but it's 2"); +			warning("Suggested to recompress with latest tool from daily builds");  		} else -			error("ImuseDigiSndMgr::prepareSoundFromRMAP: Wrong version number, expected 3, but it's: %d.", version); +			error("ImuseDigiSndMgr::prepareSoundFromRMAP: Wrong version number, expected 3, but it's: %d", version);  	}  	sound->bits = file->readUint32BE();  	sound->freq = file->readUint32BE(); diff --git a/engines/scumm/imuse_digi/dimuse_track.h b/engines/scumm/imuse_digi/dimuse_track.h index 33147128cb..2d4c673cf6 100644 --- a/engines/scumm/imuse_digi/dimuse_track.h +++ b/engines/scumm/imuse_digi/dimuse_track.h @@ -85,13 +85,15 @@ struct Track {  	int getPan() const { return (pan != 64) ? 2 * pan - 127 : 0; }  	int getVol() const { return vol / 1000; }  	Audio::Mixer::SoundType getType() const { -		Audio::Mixer::SoundType type = Audio::Mixer::kPlainSoundType; +		Audio::Mixer::SoundType type;  		if (volGroupId == 1)  			type = Audio::Mixer::kSpeechSoundType;  		else if (volGroupId == 2)  			type = Audio::Mixer::kSFXSoundType;  		else if (volGroupId == 3)  			type = Audio::Mixer::kMusicSoundType; +		else +			error("Track::getType(): invalid sound type");  		return type;  	}  }; diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 36b82519e9..f9e4eb415c 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -411,15 +411,15 @@ void ScummEngine::listSavegames(bool *marks, int num) {  	char prefix[256];  	char slot[3];  	int slotNum; -	Common::StringList filenames; +	Common::StringList files;  	makeSavegameName(prefix, 99, false);  	prefix[strlen(prefix)-2] = '*';  	prefix[strlen(prefix)-1] = 0;  	memset(marks, false, num * sizeof(bool));	//assume no savegames for this title -	filenames = _saveFileMan->listSavefiles(prefix); +	files = _saveFileMan->listSavefiles(prefix); -	for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){ +	for (Common::StringList::const_iterator file = files.begin(); file != files.end(); ++file) {  		//Obtain the last 2 digits of the filename, since they correspond to the save slot  		slot[0] = file->c_str()[file->size()-2];  		slot[1] = file->c_str()[file->size()-1];  | 
