[Scummvm-git-logs] scummvm master -> c773804e10c754a1cc5ecefcb4557a2f6d38f4d1
mduggan
mgithub at guarana.org
Sat Apr 25 14:26:49 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c773804e10 ULTIMA: Don't totally forget crusader games
Commit: c773804e10c754a1cc5ecefcb4557a2f6d38f4d1
https://github.com/scummvm/scummvm/commit/c773804e10c754a1cc5ecefcb4557a2f6d38f4d1
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-04-25T23:26:23+09:00
Commit Message:
ULTIMA: Don't totally forget crusader games
Changed paths:
engines/ultima/detection.cpp
engines/ultima/detection.h
engines/ultima/detection_tables.h
engines/ultima/ultima8/conf/setting_manager.cpp
engines/ultima/ultima8/kernel/core_app.cpp
engines/ultima/ultima8/ultima8.cpp
diff --git a/engines/ultima/detection.cpp b/engines/ultima/detection.cpp
index 6d782362d1..ef93ea7fbc 100644
--- a/engines/ultima/detection.cpp
+++ b/engines/ultima/detection.cpp
@@ -45,6 +45,8 @@ static const PlainGameDescriptor ULTIMA_GAMES[] = {
{ "ultima6", "Ultima VI - The False Prophet" },
{ "ultima6_enh", "Ultima VI - The False Prophet - Enhanced" },
{ "ultima8", "Ultima VIII - Pagan" },
+ { "remorse", "Crusader: No Remorse" },
+ { "regret", "Crusader: No Regret" },
{ "martiandreams", "Worlds of Ultima: Martian Dreams" },
{ "martiandreams_enh", "Worlds of Ultima: Martian Dreams - Enhanced" },
@@ -80,10 +82,13 @@ bool UltimaMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
*engine = new Ultima::Nuvie::NuvieEngine(syst, gd);
break;
case Ultima::GAME_ULTIMA8:
+ case Ultima::GAME_CRUSADER_REG:
+ case Ultima::GAME_CRUSADER_REM:
*engine = new Ultima::Ultima8::Ultima8Engine(syst, gd);
break;
+
default:
- error("Unsupported game specified");
+ error("Unsupported ultima engine game specified");
}
}
return gd != 0;
@@ -121,7 +126,7 @@ Common::KeymapArray UltimaMetaEngine::initKeymaps(const char *target) const {
Common::String gameId = getGameId(target);
if (gameId == "ultima4" || gameId == "ultima4_enh")
return Ultima::Ultima4::MetaEngine::initKeymaps();
- if (gameId == "ultima8")
+ if (gameId == "ultima8" || gameId == "remorse" || gameId == "regret")
return Ultima::Ultima8::MetaEngine::initKeymaps();
return Common::KeymapArray();
diff --git a/engines/ultima/detection.h b/engines/ultima/detection.h
index 5c012e019e..7c9375986c 100644
--- a/engines/ultima/detection.h
+++ b/engines/ultima/detection.h
@@ -43,8 +43,10 @@ enum GameId {
GAME_ULTIMA_UNDERWORLD1,
GAME_ULTIMA_UNDERWORLD2,
GAME_ULTIMA7,
- GAME_ULTIMA8
- // There is no game after Ultima 8. Nope.. none at all.
+ GAME_ULTIMA8,
+ GAME_CRUSADER_REG,
+ GAME_CRUSADER_REM,
+ // There is no ultima game after Ultima 8. Nope.. none at all.
};
enum UltimaGameFeatures {
diff --git a/engines/ultima/detection_tables.h b/engines/ultima/detection_tables.h
index 87d8a51ac4..9a172f8e53 100644
--- a/engines/ultima/detection_tables.h
+++ b/engines/ultima/detection_tables.h
@@ -185,6 +185,41 @@ static const UltimaGameDescription GAME_DESCRIPTIONS[] = {
0
},
+ /*
+ // Crusader games use basically the same engine as ultima8, but still
+ // need a lot of work.
+
+ // GOG Crusader - No Remorse
+ {
+ {
+ "remorse",
+ "",
+ AD_ENTRY1s("eusecode.flx", "0a0f64507adc4f280129c735ee9cad42", 556613),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_UNSTABLE,
+ GUIO1(GUIO_NOMIDI)
+ },
+ GAME_CRUSADER_REM,
+ 0
+ },
+
+ // GOG Crusader - No Regret
+ {
+ {
+ "regret",
+ "",
+ AD_ENTRY1s("eusecode.flx", "1bb360156b7240a1f05eb9bda01c54db", 481652),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_UNSTABLE,
+ GUIO1(GUIO_NOMIDI)
+ },
+ GAME_CRUSADER_REG,
+ 0
+ },
+ */
+
// GOG Martian Dreams
{
{
diff --git a/engines/ultima/ultima8/conf/setting_manager.cpp b/engines/ultima/ultima8/conf/setting_manager.cpp
index 614817e615..9f3c0204d8 100644
--- a/engines/ultima/ultima8/conf/setting_manager.cpp
+++ b/engines/ultima/ultima8/conf/setting_manager.cpp
@@ -182,6 +182,8 @@ Std::vector<istring> SettingManager::listGames() {
Std::vector<istring> games;
games.push_back("pentagram");
games.push_back("ultima8");
+ games.push_back("remorse");
+ games.push_back("regret");
return games;
}
diff --git a/engines/ultima/ultima8/kernel/core_app.cpp b/engines/ultima/ultima8/kernel/core_app.cpp
index f8ea1213b8..8f9cc40d54 100644
--- a/engines/ultima/ultima8/kernel/core_app.cpp
+++ b/engines/ultima/ultima8/kernel/core_app.cpp
@@ -145,29 +145,10 @@ GameInfo *CoreApp::getDefaultGame() {
if (defaultset) {
// default game specified in config file
gamename = defaultgame;
-
- } else if (_games.size() == 2) {// TODO - Do this in a better method
- // only one game in config file, so pick that
- for (GameMap::iterator i = _games.begin(); i != _games.end(); ++i) {
- if (i->_value->_name != "pentagram")
- gamename = i->_value->_name;
- }
-
- } else if (_games.size() == 1) {
- gamename = _games.begin()->_value->_name;
-
} else {
- perr << "Multiple games found in configuration, but no default "
- << "game is selected." << Std::endl
- << "Either start Pentagram with the \"--game <gamename>\","
- << Std::endl
- << "or set pentagram/defaultgame in pentagram.ini"
- << Std::endl; // FIXME - report more useful error message
- return nullptr;
+ gamename = _gameDesc->desc.gameId;
}
- pout << "Default game: " << gamename << Std::endl;
-
GameInfo *info = getGameInfo(gamename);
if (!info) {
@@ -230,10 +211,15 @@ bool CoreApp::getGameInfo(istring &game, GameInfo *ginfo) {
ginfo->_language = GameInfo::GAMELANG_ENGLISH;
} else {
- assert(game == "ultima8");
+ assert(game == "ultima8" || game == "remorse" || game == "regret");
+
+ if (game == "ultima8")
+ ginfo->_type = GameInfo::GAME_U8;
+ else if (game == "remorse")
+ ginfo->_type = GameInfo::GAME_REMORSE;
+ else if (game == "regret")
+ ginfo->_type = GameInfo::GAME_REGRET;
- ginfo->_type = GameInfo::GAME_U8;
-
switch (_gameDesc->desc.language) {
case Common::EN_ANY:
ginfo->_language = GameInfo::GAMELANG_ENGLISH;
diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index 9c48069a76..89b69022e6 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -302,12 +302,12 @@ void Ultima8Engine::startupGame() {
_gameData = new GameData(_gameInfo);
- if (GAME_IS_U8) {
+ if (_gameInfo->_type == GameInfo::GAME_U8) {
_ucMachine = new UCMachine(U8Intrinsics, 256);
- } else if (GAME_IS_REMORSE) {
+ } else if (_gameInfo->_type == GameInfo::GAME_REMORSE) {
_ucMachine = new UCMachine(RemorseIntrinsics, 308);
} else {
- CANT_HAPPEN_MSG("Invalid _game type.");
+ CANT_HAPPEN_MSG("Invalid game type.");
}
_inBetweenFrame = 0;
More information about the Scummvm-git-logs
mailing list