diff options
Diffstat (limited to 'engines/scumm/detection.cpp')
| -rw-r--r-- | engines/scumm/detection.cpp | 21 | 
1 files changed, 12 insertions, 9 deletions
| diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 18f2f4ddec..d3514645d3 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -142,6 +142,14 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {  	Common::String result;  	char id = 0; +	Common::String bPattern = _filenamePattern.pattern; + +	// Special cases for Blue's games, which share common (b) files +	if (_game.id == GID_BIRTHDAY && !(_game.features & GF_DEMO)) +		bPattern = "Blue'sBirthday"; +	else if (_game.id == GID_TREASUREHUNT) +		bPattern = "Blue'sTreasureHunt"; +  	switch (_filenamePattern.genMethod) {  	case kGenHEMac:  	case kGenHEMacNoParens: @@ -154,13 +162,7 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {  			switch (disk) {  			case 2:  				id = 'b'; -				// Special cases for Blue's games, which share common (b) files -				if (_game.id == GID_BIRTHDAY && !(_game.features & GF_DEMO)) -					result = "Blue'sBirthday.(b)"; -				else if (_game.id == GID_TREASUREHUNT) -					result = "Blue'sTreasureHunt.(b)"; -				else -					result = Common::String::format("%s.(b)", _filenamePattern.pattern); +				result = bPattern + ".(b)";  				break;  			case 1:  				id = 'a'; @@ -185,10 +187,11 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {  				// For mac they're stored in game binary  				result = _filenamePattern.pattern;  			} else { +				Common::String pattern = id == 'b' ? bPattern : _filenamePattern.pattern;  				if (_filenamePattern.genMethod == kGenHEMac) -					result = Common::String::format("%s (%c)", _filenamePattern.pattern, id); +					result = Common::String::format("%s (%c)", pattern.c_str(), id);  				else -					result = Common::String::format("%s %c", _filenamePattern.pattern, id); +					result = Common::String::format("%s %c", pattern.c_str(), id);  			}  		} | 
