[Scummvm-git-logs] scummvm master -> 0dee5ede3101e84e01ffa02e96c4d9c85133d203
OMGPizzaGuy
48367439+OMGPizzaGuy at users.noreply.github.com
Mon Feb 1 05:45:54 UTC 2021
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:
94b24966be ULTIMA8: Draw font border as radius with "ttf_antialiasing=false"
7c974b8cf9 ULTIMA8: Move more options to ConfigManager and remove unused methods related to pentagram menu
b555cc8ee6 ULTIMA8: Remove commands related to swtiching games from pentagram.
0dee5ede31 ULTIMA8: Remove game map setup as it is no longer neccessary
Commit: 94b24966beb683fea59bbbde5bee32115ed6f161
https://github.com/scummvm/scummvm/commit/94b24966beb683fea59bbbde5bee32115ed6f161
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2021-01-31T23:43:17-06:00
Commit Message:
ULTIMA8: Draw font border as radius with "ttf_antialiasing=false"
This will not change rendering with border size set to 1
Changed paths:
engines/ultima/ultima8/graphics/fonts/tt_font.cpp
diff --git a/engines/ultima/ultima8/graphics/fonts/tt_font.cpp b/engines/ultima/ultima8/graphics/fonts/tt_font.cpp
index c959cfb3b6..81519ec732 100644
--- a/engines/ultima/ultima8/graphics/fonts/tt_font.cpp
+++ b/engines/ultima/ultima8/graphics/fonts/tt_font.cpp
@@ -183,7 +183,12 @@ RenderedText *TTFont::renderText(const Std::string &text, unsigned int &remainin
int by = iter->_dims.top + y + _borderSize + dy;
if (bx >= 0 && bx < resultWidth && by >= 0 && by < resultHeight) {
if (texBuf[by * resultWidth + bx] == 0) {
- texBuf[by * resultWidth + bx] = borderColor;
+ // Add border within radius.
+ int sqrSize = (_borderSize + 1) * (_borderSize + 1);
+ int sqrDist = (dx * dx) + (dy * dy);
+ if (sqrDist < sqrSize) {
+ texBuf[by * resultWidth + bx] = borderColor;
+ }
}
}
}
Commit: 7c974b8cf9afe57878a8ffa1c512d1a2f84d9aac
https://github.com/scummvm/scummvm/commit/7c974b8cf9afe57878a8ffa1c512d1a2f84d9aac
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2021-01-31T23:43:17-06:00
Commit Message:
ULTIMA8: Move more options to ConfigManager and remove unused methods related to pentagram menu
Changed paths:
engines/ultima/ultima8/graphics/fonts/font_manager.cpp
engines/ultima/ultima8/ultima8.cpp
engines/ultima/ultima8/ultima8.h
diff --git a/engines/ultima/ultima8/graphics/fonts/font_manager.cpp b/engines/ultima/ultima8/graphics/fonts/font_manager.cpp
index acab2b0418..64b61a005c 100644
--- a/engines/ultima/ultima8/graphics/fonts/font_manager.cpp
+++ b/engines/ultima/ultima8/graphics/fonts/font_manager.cpp
@@ -31,7 +31,8 @@
#include "ultima/ultima8/graphics/fonts/tt_font.h"
#include "ultima/ultima8/graphics/fonts/jp_font.h"
#include "ultima/ultima8/graphics/palette_manager.h"
-#include "ultima/ultima8/conf/setting_manager.h"
+
+#include "common/config-manager.h"
#include "graphics/fonts/ttf.h"
namespace Ultima {
@@ -44,8 +45,7 @@ FontManager::FontManager(bool ttf_antialiasing) : _ttfAntialiasing(ttf_antialias
_fontManager = this;
- SettingManager *settingman = SettingManager::get_instance();
- settingman->setDefault("ttf_highres", true);
+ ConfMan.registerDefault("font_highres", true);
}
FontManager::~FontManager() {
@@ -148,9 +148,7 @@ bool FontManager::addTTFOverride(unsigned int fontnum, const Std::string &filena
return false;
TTFont *font = new TTFont(f, rgb, bordersize, _ttfAntialiasing, SJIS);
- SettingManager *settingman = SettingManager::get_instance();
- bool highres;
- settingman->get("ttf_highres", highres);
+ bool highres = ConfMan.getBool("font_highres");
font->setHighRes(highres);
setOverride(fontnum, font);
@@ -204,9 +202,7 @@ bool FontManager::loadTTFont(unsigned int fontnum, const Std::string &filename,
TTFont *font = new TTFont(f, rgb, bordersize, _ttfAntialiasing, false);
// TODO: check if this is indeed what we want for non-gamefonts
- SettingManager *settingman = SettingManager::get_instance();
- bool highres;
- settingman->get("ttf_highres", highres);
+ bool highres = ConfMan.getBool("font_highres");
font->setHighRes(highres);
if (fontnum >= _ttFonts.size())
diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index 8668685423..bfd24e8247 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -430,32 +430,6 @@ void Ultima8Engine::changeGame(istring newgame) {
_changeGameName = newgame;
}
-void Ultima8Engine::menuInitMinimal(istring gamename) {
- // Only if in the pentagram menu
- if (_gameInfo->_name != "pentagram") return;
- GameInfo *info = getGameInfo(gamename);
- if (!info) info = getGameInfo("pentagram");
- assert(info);
-
- pout << Std::endl << "-- Loading minimal _game data for: " << info->_name << " --" << Std::endl;
-
- FORGET_OBJECT(_game);
- FORGET_OBJECT(_gameData);
-
-
- setupGamePaths(info);
-
- if (info->_name == "pentagram") return;
-
- _gameData = new GameData(info);
- _game = Game::createGame(info);
-
- _game->loadFiles();
- _gameData->setupFontOverrides();
-
- pout << "-- Finished loading minimal--" << Std::endl << Std::endl;
-}
-
//
// To time the frames, we use "fast" ticks which come 3000 times a second.
//
@@ -666,11 +640,10 @@ void Ultima8Engine::GraphicSysInit() {
showSplashScreen();
}
- bool ttf_antialiasing = true;
- _settingMan->setDefault("ttf_antialiasing", true);
- _settingMan->get("ttf_antialiasing", ttf_antialiasing);
+ ConfMan.registerDefault("font_antialiasing", true);
+ bool font_antialiasing = ConfMan.getBool("font_antialiasing");
- _fontManager = new FontManager(ttf_antialiasing);
+ _fontManager = new FontManager(font_antialiasing);
_paletteManager = new PaletteManager(new_screen);
// TODO: assign names to these fontnumbers somehow
@@ -679,17 +652,16 @@ void Ultima8Engine::GraphicSysInit() {
// GameWidget's version number information:
_fontManager->loadTTFont(2, "Vera.ttf", 8, 0xA0A0A0, 0);
- bool faded_modal = true;
- _settingMan->setDefault("fadedModal", faded_modal);
- _settingMan->get("fadedModal", faded_modal);
+ ConfMan.registerDefault("fadedModal", true);
+ bool faded_modal = ConfMan.getBool("fadedModal");
DesktopGump::SetFadedModal(faded_modal);
paint();
}
void Ultima8Engine::changeVideoMode(int width, int height) {
- if (width > 0) _settingMan->set("width", width);
- if (height > 0) _settingMan->set("height", height);
+ if (width > 0) width = ConfMan.getInt("width");
+ if (height > 0) height = ConfMan.getInt("height");
GraphicSysInit();
}
@@ -1189,9 +1161,8 @@ Common::Error Ultima8Engine::loadGameStream(Common::SeekableReadStream *stream)
message += "Savegame : " + saveinfo.getPrintDetails();
#ifdef DEBUG
- bool ignore;
- _settingMan->setDefault("ignore_savegame_mismatch", false);
- _settingMan->get("ignore_savegame_mismatch", ignore);
+ ConfMan.registerDefault("ignore_savegame_mismatch", true);
+ bool ignore = ConfMan.getBool("ignore_savegame_mismatch");
if (!ignore) {
error("%s", message.c_str());
diff --git a/engines/ultima/ultima8/ultima8.h b/engines/ultima/ultima8/ultima8.h
index 10811c2656..39f80919f5 100644
--- a/engines/ultima/ultima8/ultima8.h
+++ b/engines/ultima/ultima8/ultima8.h
@@ -177,14 +177,9 @@ public:
void shutdown();
bool startupGame();
- void startupPentagramMenu();
void shutdownGame(bool reloading = true);
void changeGame(istring newgame);
- // When in the Pentagram Menu, load minimal amount of data for the specific game
- // Used to enable access to the games gumps and shapes
- void menuInitMinimal(istring game);
-
void changeVideoMode(int width, int height);
RenderSurface *getRenderScreen() {
Commit: b555cc8ee63f809a263cf24f9c033e5b205a0c04
https://github.com/scummvm/scummvm/commit/b555cc8ee63f809a263cf24f9c033e5b205a0c04
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2021-01-31T23:43:17-06:00
Commit Message:
ULTIMA8: Remove commands related to swtiching games from pentagram.
ScummVM launcher replaces all pentagram menu functionality and this was now effectively dead code.
Changed paths:
engines/ultima/ultima8/kernel/core_app.cpp
engines/ultima/ultima8/misc/debugger.cpp
engines/ultima/ultima8/misc/debugger.h
engines/ultima/ultima8/ultima8.cpp
engines/ultima/ultima8/ultima8.h
diff --git a/engines/ultima/ultima8/kernel/core_app.cpp b/engines/ultima/ultima8/kernel/core_app.cpp
index 531572ed54..8d490e25c1 100644
--- a/engines/ultima/ultima8/kernel/core_app.cpp
+++ b/engines/ultima/ultima8/kernel/core_app.cpp
@@ -129,18 +129,7 @@ void CoreApp::setupGameList() {
}
GameInfo *CoreApp::getDefaultGame() {
- istring gamename;
-
- Std::string defaultgame;
- bool defaultset = _settingMan->get("defaultgame", defaultgame,
- SettingManager::DOM_GLOBAL);
- if (defaultset) {
- // default game specified in config file
- gamename = defaultgame;
- } else {
- gamename = _gameDesc->desc.gameId;
- }
-
+ istring gamename = _gameDesc->desc.gameId;
GameInfo *info = getGameInfo(gamename);
if (!info) {
diff --git a/engines/ultima/ultima8/misc/debugger.cpp b/engines/ultima/ultima8/misc/debugger.cpp
index b7454c939e..919d80c0ee 100644
--- a/engines/ultima/ultima8/misc/debugger.cpp
+++ b/engines/ultima/ultima8/misc/debugger.cpp
@@ -81,8 +81,6 @@ Debugger::Debugger() : Shared::Debugger() {
registerCmd("Ultima8Engine::loadGame", WRAP_METHOD(Debugger, cmdLoadGame));
registerCmd("Ultima8Engine::newGame", WRAP_METHOD(Debugger, cmdNewGame));
registerCmd("Ultima8Engine::engineStats", WRAP_METHOD(Debugger, cmdEngineStats));
- registerCmd("Ultima8Engine::changeGame", WRAP_METHOD(Debugger, cmdChangeGame));
- registerCmd("Ultima8Engine::listGames", WRAP_METHOD(Debugger, cmdListGames));
registerCmd("Ultima8Engine::setVideoMode", WRAP_METHOD(Debugger, cmdSetVideoMode));
registerCmd("Ultima8Engine::toggleAvatarInStasis", WRAP_METHOD(Debugger, cmdToggleAvatarInStasis));
registerCmd("Ultima8Engine::togglePaintEditorItems", WRAP_METHOD(Debugger, cmdTogglePaintEditorItems));
@@ -284,36 +282,6 @@ bool Debugger::cmdEngineStats(int argc, const char **argv) {
return true;
}
-bool Debugger::cmdChangeGame(int argc, const char **argv) {
- if (argc == 1) {
- debugPrintf("Current _game is: %s\n", Ultima8Engine::get_instance()->_gameInfo->_name.c_str());
- } else {
- Ultima8Engine::get_instance()->changeGame(argv[1]);
- }
-
- return true;
-}
-
-bool Debugger::cmdListGames(int argc, const char **argv) {
- Ultima8Engine *app = Ultima8Engine::get_instance();
- Std::vector<istring> games;
- games = app->_settingMan->listGames();
- Std::vector<istring>::const_iterator iter;
- for (iter = games.begin(); iter != games.end(); ++iter) {
- const istring &_game = *iter;
- GameInfo *info = app->getGameInfo(_game);
- debugPrintf("%s: ", _game.c_str());
- if (info) {
- Std::string details = info->getPrintDetails();
- debugPrintf("%s\n", details.c_str());
- } else {
- debugPrintf("(unknown)\n");
- }
- }
-
- return true;
-}
-
bool Debugger::cmdSetVideoMode(int argc, const char **argv) {
if (argc != 3) {
debugPrintf("Usage: Ultima8Engine::setVidMode width height\n");
diff --git a/engines/ultima/ultima8/misc/debugger.h b/engines/ultima/ultima8/misc/debugger.h
index 90e84aaa9c..85b57e24d1 100644
--- a/engines/ultima/ultima8/misc/debugger.h
+++ b/engines/ultima/ultima8/misc/debugger.h
@@ -143,8 +143,6 @@ private:
bool cmdLoadGame(int argc, const char **argv);
bool cmdNewGame(int argc, const char **argv);
bool cmdQuit(int argc, const char **argv);
- bool cmdChangeGame(int argc, const char **argv);
- bool cmdListGames(int argc, const char **argv);
bool cmdSetVideoMode(int argc, const char **argv);
bool cmdEngineStats(int argc, const char **argv);
bool cmdToggleAvatarInStasis(int argc, const char **argv);
diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index bfd24e8247..59053f2669 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -426,10 +426,6 @@ void Ultima8Engine::shutdownGame(bool reloading) {
}
}
-void Ultima8Engine::changeGame(istring newgame) {
- _changeGameName = newgame;
-}
-
//
// To time the frames, we use "fast" ticks which come 3000 times a second.
//
@@ -497,28 +493,6 @@ bool Ultima8Engine::runGame() {
// Paint Screen
paint();
- if (!_changeGameName.empty()) {
- pout << "Changing Game to: " << _changeGameName << Std::endl;
-
- GameInfo *info = getGameInfo(_changeGameName);
-
- if (info) {
- shutdownGame();
-
- _changeGameName.clear();
-
- if (setupGame(info)) {
- if (!startupGame())
- return false;
- } else {
- CANT_HAPPEN_MSG("Failed to start up game with valid info.");
- }
- } else {
- perr << "Game '" << _changeGameName << "' not found" << Std::endl;
- _changeGameName.clear();
- }
- }
-
if (!_errorMessage.empty()) {
MessageBoxGump::Show(_errorTitle, _errorMessage, 0xFF8F3030);
_errorTitle.clear();
@@ -1256,7 +1230,7 @@ Common::Error Ultima8Engine::loadGameStream(Common::SeekableReadStream *stream)
_mouse->pushMouseCursor();
if (!totalok) {
- Error(message, "Error Loading savegame", true);
+ Error(message, "Error Loading savegame");
delete sg;
return Common::kReadingFailed;
}
@@ -1267,18 +1241,13 @@ Common::Error Ultima8Engine::loadGameStream(Common::SeekableReadStream *stream)
return Common::kNoError;
}
-void Ultima8Engine::Error(Std::string message, Std::string title, bool exit_to_menu) {
- if (title.empty()) title = exit_to_menu ? "Fatal Game Error" : "Error";
+void Ultima8Engine::Error(Std::string message, Std::string title) {
+ if (title.empty()) title = "Error";
perr << title << ": " << message << Std::endl;
_errorMessage = message;
_errorTitle = title;
-
- if (exit_to_menu) {
- _changeGameName = "pentagram";
- Kernel::get_instance()->killProcesses(0, 6, false);
- }
}
Gump *Ultima8Engine::getGump(uint16 gumpid) {
diff --git a/engines/ultima/ultima8/ultima8.h b/engines/ultima/ultima8/ultima8.h
index 39f80919f5..2cc6201ee7 100644
--- a/engines/ultima/ultima8/ultima8.h
+++ b/engines/ultima/ultima8/ultima8.h
@@ -77,7 +77,6 @@ private:
// full system
Game *_game;
- istring _changeGameName;
Std::string _errorMessage;
Std::string _errorTitle;
@@ -178,7 +177,6 @@ public:
bool startupGame();
void shutdownGame(bool reloading = true);
- void changeGame(istring newgame);
void changeVideoMode(int width, int height);
@@ -325,8 +323,7 @@ public:
//! Display an error message box
//! \param message The message to display on the box
- //! \param exit_to_menu If true, then exit to the Pentagram menu then display the message
- void Error(Std::string message, Std::string title = Std::string(), bool exit_to_menu = false);
+ void Error(Std::string message, Std::string title = Std::string());
public:
unsigned int getInversion() const {
return _inversion;
Commit: 0dee5ede3101e84e01ffa02e96c4d9c85133d203
https://github.com/scummvm/scummvm/commit/0dee5ede3101e84e01ffa02e96c4d9c85133d203
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2021-01-31T23:43:17-06:00
Commit Message:
ULTIMA8: Remove game map setup as it is no longer neccessary
Changed paths:
engines/ultima/ultima8/conf/setting_manager.cpp
engines/ultima/ultima8/conf/setting_manager.h
engines/ultima/ultima8/kernel/core_app.cpp
engines/ultima/ultima8/kernel/core_app.h
engines/ultima/ultima8/ultima8.cpp
diff --git a/engines/ultima/ultima8/conf/setting_manager.cpp b/engines/ultima/ultima8/conf/setting_manager.cpp
index c9940397b8..cf220fd55c 100644
--- a/engines/ultima/ultima8/conf/setting_manager.cpp
+++ b/engines/ultima/ultima8/conf/setting_manager.cpp
@@ -177,16 +177,6 @@ void SettingManager::unregisterCallback(istring key, ConfigCallback callback) {
}
}
-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;
-}
-
Std::vector<istring> SettingManager::listDataKeys(istring section) {
istring csection = "settings/" + _domains[DOM_GAME] + ":" + section;
diff --git a/engines/ultima/ultima8/conf/setting_manager.h b/engines/ultima/ultima8/conf/setting_manager.h
index ad63c61618..c11930d583 100644
--- a/engines/ultima/ultima8/conf/setting_manager.h
+++ b/engines/ultima/ultima8/conf/setting_manager.h
@@ -102,9 +102,6 @@ public:
//! unregister a callback
void unregisterCallback(istring key, ConfigCallback callback);
- //! list all games
- Std::vector<istring> listGames();
-
//! list all keys in a game data section
//! \param section The section to return setkeys of
//! \return the keys. They have no guaranteed order.
diff --git a/engines/ultima/ultima8/kernel/core_app.cpp b/engines/ultima/ultima8/kernel/core_app.cpp
index 8d490e25c1..bac909dbbe 100644
--- a/engines/ultima/ultima8/kernel/core_app.cpp
+++ b/engines/ultima/ultima8/kernel/core_app.cpp
@@ -39,11 +39,6 @@ CoreApp::CoreApp(const Ultima::UltimaGameDescription *gameDesc)
}
CoreApp::~CoreApp() {
- for (GameMap::iterator i = _games.begin(); i != _games.end(); ++i)
- delete i->_value;
-
- _games.clear();
-
FORGET_OBJECT(_fileSystem);
FORGET_OBJECT(_settingMan);
FORGET_OBJECT(_configFileMan);
@@ -101,49 +96,22 @@ void CoreApp::loadConfig() {
}
}
-void CoreApp::setupGameList() {
- Std::vector<istring> gamelist;
- gamelist = _settingMan->listGames();
- debugN(MM_INFO, "Scanning config file for games:\n");
- Std::vector<istring>::iterator iter;
- istring gamename;
-
- for (iter = gamelist.begin(); iter != gamelist.end(); ++iter) {
- istring game = *iter;
- GameInfo *info = new GameInfo;
- bool detected = getGameInfo(game, info);
-
- // output detected game info
- debugN(MM_INFO, "%s: ", game.c_str());
- if (detected) {
- // add game to games map
- _games[game] = info;
-
- Std::string details = info->getPrintDetails();
- debugN(MM_INFO, "%s", details.c_str());
- } else {
- debugN(MM_INFO, "unknown, skipping");
- }
- debugN(MM_INFO, "\n");
- }
-}
-
-GameInfo *CoreApp::getDefaultGame() {
+bool CoreApp::setupGame() {
istring gamename = _gameDesc->desc.gameId;
- GameInfo *info = getGameInfo(gamename);
-
- if (!info) {
- perr << "Game \"" << gamename << "\" not found." << Std::endl;
+ GameInfo *info = new GameInfo;
+ bool detected = getGameInfo(gamename, info);
+
+ // output detected game info
+ debugN(MM_INFO, "%s: ", gamename.c_str());
+ if (detected) {
+ // add game to games map
+ Std::string details = info->getPrintDetails();
+ debugN(MM_INFO, "%s", details.c_str());
+ } else {
+ debugN(MM_INFO, "unknown, skipping");
+ return false;
}
- // We've got a default game name, doesn't mean it will work though
- return info;
-}
-
-bool CoreApp::setupGame(GameInfo *info) {
- if (!info) return false;
- assert(info->_name != "");
-
_gameInfo = info;
pout << "Selected game: " << info->_name << Std::endl;
@@ -151,7 +119,7 @@ bool CoreApp::setupGame(GameInfo *info) {
setupGamePaths(info);
- return info->_name != "pentagram";
+ return true;
}
void CoreApp::killGame() {
@@ -184,50 +152,41 @@ bool CoreApp::getGameInfo(const istring &game, GameInfo *ginfo) {
ginfo->version = 0;
ginfo->_language = GameInfo::GAMELANG_UNKNOWN;
- istring gamekey = "settings/";
- gamekey += game;
+ assert(game == "ultima8" || game == "remorse" || game == "regret");
- if (game == "pentagram") {
- ginfo->_type = GameInfo::GAME_PENTAGRAM_MENU;
- ginfo->_language = GameInfo::GAMELANG_ENGLISH;
+ 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;
- } else {
- 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;
-
- switch (_gameDesc->desc.language) {
- case Common::EN_ANY:
- ginfo->_language = GameInfo::GAMELANG_ENGLISH;
- break;
- case Common::FR_FRA:
- ginfo->_language = GameInfo::GAMELANG_FRENCH;
- break;
- case Common::DE_DEU:
- ginfo->_language = GameInfo::GAMELANG_GERMAN;
- break;
- case Common::ES_ESP:
- ginfo->_language = GameInfo::GAMELANG_SPANISH;
- break;
- case Common::JA_JPN:
- ginfo->_language = GameInfo::GAMELANG_JAPANESE;
- break;
- default:
- error("Unknown language");
- break;
- }
+ switch (_gameDesc->desc.language) {
+ case Common::EN_ANY:
+ ginfo->_language = GameInfo::GAMELANG_ENGLISH;
+ break;
+ case Common::FR_FRA:
+ ginfo->_language = GameInfo::GAMELANG_FRENCH;
+ break;
+ case Common::DE_DEU:
+ ginfo->_language = GameInfo::GAMELANG_GERMAN;
+ break;
+ case Common::ES_ESP:
+ ginfo->_language = GameInfo::GAMELANG_SPANISH;
+ break;
+ case Common::JA_JPN:
+ ginfo->_language = GameInfo::GAMELANG_JAPANESE;
+ break;
+ default:
+ error("Unknown language");
+ break;
}
return ginfo->_type != GameInfo::GAME_UNKNOWN;
}
void CoreApp::setupGamePaths(GameInfo *ginfo) {
- if (!ginfo || ginfo->_name == "pentagram") {
+ if (!ginfo) {
_settingMan->setCurrentDomain(SettingManager::DOM_GLOBAL);
return;
}
@@ -262,15 +221,5 @@ void CoreApp::ParseArgs(const int argc, const char *const *const argv) {
_parameters.process(argc, argv);
}
-GameInfo *CoreApp::getGameInfo(const istring &game) const {
- GameMap::const_iterator i;
- i = _games.find(game);
-
- if (i != _games.end())
- return i->_value;
- else
- return nullptr;
-}
-
} // End of namespace Ultima8
} // End of namespace Ultima
diff --git a/engines/ultima/ultima8/kernel/core_app.h b/engines/ultima/ultima8/kernel/core_app.h
index 860b1e7217..8a8c754603 100644
--- a/engines/ultima/ultima8/kernel/core_app.h
+++ b/engines/ultima/ultima8/kernel/core_app.h
@@ -67,14 +67,8 @@ public:
return _gameInfo;
}
- //! Get GameInfo for other configured game, or 0 for an invalid name.
- GameInfo *getGameInfo(const istring &game) const;
-
protected:
bool _isRunning;
-
- typedef Std::map<Common::String, GameInfo *, Common::IgnoreCase_Hash> GameMap;
- GameMap _games;
GameInfo *_gameInfo;
// minimal system
@@ -105,15 +99,9 @@ private:
void loadConfig();
protected:
- void setupGameList();
-
- //! return default game
- //! \return nullptr if no default game (implies go to Pentagram Menu)
- GameInfo *getDefaultGame();
-
//! Setup up a game
- //! \return false if failed (implies go to Pentagram Menu)
- bool setupGame(GameInfo *info);
+ //! \return false if failed
+ bool setupGame();
//! kill current gameinfo
void killGame();
diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index 59053f2669..c6bda874f0 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -289,17 +289,13 @@ bool Ultima8Engine::startup() {
pout << "-- Pentagram Initialized -- " << Std::endl << Std::endl;
- // We Attempt to startup _game
- setupGameList();
- GameInfo *info = getDefaultGame();
-
- if (setupGame(info)) {
+ if (setupGame()) {
GraphicSysInit();
if (!startupGame())
return false;
} else {
// Couldn't setup the game, should never happen?
- CANT_HAPPEN_MSG("default game failed to initialize");
+ CANT_HAPPEN_MSG("game failed to initialize");
}
paint();
return true;
More information about the Scummvm-git-logs
mailing list