diff options
50 files changed, 965 insertions, 503 deletions
@@ -1,11 +1,17 @@ For a more comprehensive changelog of the latest experimental code, see: https://github.com/scummvm/scummvm/commits/ -1.9.0 (YYYY-MM-DD) +1.10.0 (YYYY-MM-DD) + + +1.9.0 (2016-10-17) New Games: - Added support for Myst. - Added support for Myst: Masterpiece Edition. - Added support for U.F.O.s. + - Added support for Hi-Res Adventure #0: Mission Asteroid. + - Added support for Hi-Res Adventure #1: Mystery House. + - Added support for Hi-Res Adventure #2: The Wizard and the Princess. General: - Fixed audio corruption in the MS ADPCM decoder. @@ -53,6 +59,7 @@ For a more comprehensive changelog of the latest experimental code, see: Sherlock: - Fixed a bug that could cause a crash in The Case of the Serrated Scalpel. + - Fixed an issue with item hotspots in The Case of the Serrated Scalpel. - Fixed a bug that caused game lockups in the inventory of The Case of the Rose Tattoo. Amiga port: @@ -2881,7 +2881,7 @@ if test -n "$_host"; then _mt32emu=no _seq_midi=no _timidity=no - _build_scalers=no + _build_scalers=yes _optimization_level=-O3 _vkeybd=yes _keymapper=yes diff --git a/devtools/convbdf.cpp b/devtools/convbdf.cpp index 59ea5cc4e5..5fbcd98b25 100644 --- a/devtools/convbdf.cpp +++ b/devtools/convbdf.cpp @@ -38,7 +38,10 @@ struct BdfBoundingBox { }; struct BdfFont { + char *familyName; + char *slant; int maxAdvance; + int size; int height; BdfBoundingBox defaultBox; int ascent; @@ -51,7 +54,7 @@ struct BdfFont { unsigned char *advances; BdfBoundingBox *boxes; - BdfFont() : bitmaps(0), advances(0), boxes(0) { + BdfFont() : bitmaps(0), advances(0), boxes(0), familyName(0), slant(0) { } ~BdfFont() { @@ -62,6 +65,8 @@ struct BdfFont { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; } }; @@ -138,7 +143,9 @@ int main(int argc, char *argv[]) { error("Premature end of file"); if (hasPrefix(line, "SIZE ")) { - // Ignore + int hDpi, vDpi; + if (sscanf(line.c_str(), "SIZE %d %d %d", &font.size, &hDpi, &vDpi) != 3) + error("Invalid SIZE"); } else if (hasPrefix(line, "FONT ")) { fontName = line.substr(5); } else if (hasPrefix(line, "COPYRIGHT ")) { @@ -159,6 +166,24 @@ int main(int argc, char *argv[]) { memset(font.bitmaps, 0, sizeof(unsigned char *) * font.numCharacters); font.advances = new unsigned char[font.numCharacters]; font.boxes = new BdfBoundingBox[font.numCharacters]; + } else if (hasPrefix(line, "FAMILY_NAME \"")) { + font.familyName = new char[line.size()]; // We will definitely fit here + strncpy(font.familyName, &line.c_str()[13], line.size() - 1); + char *p = &font.familyName[strlen(font.familyName)]; + while (p != font.familyName && *p != '"') + p--; + if (p == font.familyName) + error("Invalid FAMILY_NAME"); + *p = '\0'; // Remove last quote + } else if (hasPrefix(line, "SLANT \"")) { + font.familyName = new char[line.size()]; // We will definitely fit here + strncpy(font.familyName, &line.c_str()[7], line.size() - 1); + char *p = &font.slant[strlen(font.slant)]; + while (p != font.slant && *p != '"') + p--; + if (p == font.slant) + error("Invalid SLANT"); + *p = '\0'; // Remove last quote } else if (hasPrefix(line, "FONT_ASCENT ")) { if (sscanf(line.c_str(), "FONT_ASCENT %d", &font.ascent) != 1) error("Invalid FONT_ASCENT"); @@ -481,7 +506,10 @@ int main(int argc, char *argv[]) { printf("// Font structure\n" "static const BdfFontData desc = {\n" + "\t\"%s\", // Family name\n" + "\t\"%s\", // Slant\n" "\t%d, // Max advance\n" + "\t%d, // Size\n" "\t%d, // Height\n" "\t{ %d, %d, %d, %d }, // Bounding box\n" "\t%d, // Ascent\n" @@ -491,7 +519,7 @@ int main(int argc, char *argv[]) { "\t%d, // Characters\n" "\n" "\tbitmapTable, // Bitmaps\n", - font.maxAdvance, font.height, font.defaultBox.width, + font.familyName, font.slant, font.maxAdvance, font.size, font.height, font.defaultBox.width, font.defaultBox.height, font.defaultBox.xOffset, font.defaultBox.yOffset, font.ascent, font.firstCharacter, font.defaultCharacter, font.numCharacters); diff --git a/doc/de/NEUES b/doc/de/NEUES index a15895da1e..69c88d377c 100644 --- a/doc/de/NEUES +++ b/doc/de/NEUES @@ -2,11 +2,17 @@ Umfangreichere Informationen über die Änderungen des aktuellen experimentellen Programmcodes finden Sie auf Englisch unter: https://github.com/scummvm/scummvm/commits/ -1.9.0 (DD.MM.YYYY) +1.10.0 (DD.MM.YYYY) + + +1.9.0 (17.10.2016) Neue Spiele: - Unterstützung für Myst hinzugefügt. - Unterstützung für Myst: Masterpiece Edition hinzugefügt. - Unterstützung für U.F.O.s./Gnap: Der Schurke aus dem All hinzugefügt. + - Unterstützung für Hi-Res Adventure #0: Mission Asteroid hinzugefügt. + - Unterstützung für Hi-Res Adventure #1: Mystery House hinzugefügt. + - Unterstützung für Hi-Res Adventure #2: The Wizard and the Princess hinzugefügt. Allgemein: - Probleme mit dem MS ADPCM-Decoder behoben. @@ -55,6 +61,7 @@ Programmcodes finden Sie auf Englisch unter: Sherlock: - Fehler behoben, der einen Absturz in "The Case of the Serrated Scalpel" verursachen konnte. + - Problem mit Item-Hotspots in "The Case of the Serrated Scalpel" behoben. - Fehler behoben, der in "The Case of the Rose Tattoo" dazu führt, dass sich das Spiel aufhängt. Amiga-Portierung: diff --git a/engines/adl/configure.engine b/engines/adl/configure.engine index 844e2b8e6a..944b043af8 100644 --- a/engines/adl/configure.engine +++ b/engines/adl/configure.engine @@ -1,3 +1,3 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine adl "ADL" no +add_engine adl "ADL" yes diff --git a/engines/adl/detection.cpp b/engines/adl/detection.cpp index 2d568b28d7..1cfeb9a859 100644 --- a/engines/adl/detection.cpp +++ b/engines/adl/detection.cpp @@ -93,7 +93,7 @@ static const AdlGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformApple2, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO2(GAMEOPTION_COLOR_DEFAULT_OFF, GAMEOPTION_SCANLINES) }, GAME_TYPE_HIRES1 @@ -107,7 +107,7 @@ static const AdlGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformApple2, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO2(GAMEOPTION_COLOR_DEFAULT_OFF, GAMEOPTION_SCANLINES) }, GAME_TYPE_HIRES1 @@ -121,7 +121,7 @@ static const AdlGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformApple2, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO2(GAMEOPTION_COLOR_DEFAULT_ON, GAMEOPTION_SCANLINES) }, GAME_TYPE_HIRES2 @@ -135,7 +135,7 @@ static const AdlGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformApple2, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO2(GAMEOPTION_COLOR_DEFAULT_ON, GAMEOPTION_SCANLINES) }, GAME_TYPE_HIRES0 diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index d6f63a8584..2eaddc50f2 100644 --- a/engines/director/frame.cpp +++ b/engines/director/frame.cpp @@ -22,6 +22,7 @@ #include "common/system.h" #include "graphics/font.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" #include "image/bmp.h" @@ -606,16 +607,14 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID) { int height = _sprites[spriteID]->_height; int width = _sprites[spriteID]->_width; - const char *fontName; + Graphics::MacFont macFont(textCast->fontId, textCast->fontSize); if (_vm->_currentScore->_fontMap.contains(textCast->fontId)) { - fontName = _vm->_currentScore->_fontMap[textCast->fontId].c_str(); - } else if ((fontName = _vm->_wm->getFontName(textCast->fontId, textCast->fontSize)) == NULL) { - warning("Unknown font id %d, falling back to default", textCast->fontId); - fontName = _vm->_wm->getFontName(0, 12); + // Override + macFont.setName(_vm->_currentScore->_fontMap[textCast->fontId]); } - const Graphics::Font *font = _vm->_wm->getFont(fontName, Graphics::FontManager::kBigGUIFont); + const Graphics::Font *font = _vm->_wm->_fontMan->getFont(macFont); font->drawString(&surface, text, x, y, width, 0); diff --git a/engines/gnap/configure.engine b/engines/gnap/configure.engine index f3742ef0d2..8723ef501b 100644 --- a/engines/gnap/configure.engine +++ b/engines/gnap/configure.engine @@ -1,3 +1,3 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine gnap "UFOs" no "" "" "highres" +add_engine gnap "UFOs" yes "" "" "highres" diff --git a/engines/gnap/detection.cpp b/engines/gnap/detection.cpp index b1e9818d29..d19d420ff8 100644 --- a/engines/gnap/detection.cpp +++ b/engines/gnap/detection.cpp @@ -43,7 +43,7 @@ static const ADGameDescription gameDescriptions[] = { {"stock_n.dat", 0, "46819043d019a2f36b727cc2bdd6980f", 12515823}, AD_LISTEND }, - Common::EN_ANY, Common::kPlatformWindows, ADGF_TESTING, GUIO0() + Common::EN_ANY, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO0() }, { "gnap", "", @@ -51,7 +51,7 @@ static const ADGameDescription gameDescriptions[] = { {"stock_n.dat", 0, "46819043d019a2f36b727cc2bdd6980f", 13497301}, AD_LISTEND }, - Common::EN_ANY, Common::kPlatformWindows, ADGF_TESTING, GUIO0() + Common::EN_ANY, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO0() }, { "gnap", "", @@ -59,7 +59,7 @@ static const ADGameDescription gameDescriptions[] = { {"stock_n.dat", 0, "46819043d019a2f36b727cc2bdd6980f", 12995485}, AD_LISTEND }, - Common::RU_RUS, Common::kPlatformWindows, ADGF_TESTING, GUIO0() + Common::RU_RUS, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO0() }, { "gnap", "Fargus", @@ -67,7 +67,7 @@ static const ADGameDescription gameDescriptions[] = { {"stock_n.dat", 0, "46819043d019a2f36b727cc2bdd6980f", 12847726}, AD_LISTEND }, - Common::RU_RUS, Common::kPlatformWindows, ADGF_TESTING, GUIO0() + Common::RU_RUS, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO0() }, AD_TABLE_END_MARKER diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 9e0a6e9f00..3b7c3a244b 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -33,6 +33,7 @@ #include "common/debug-channels.h" #include "common/debug.h" #include "image/bmp.h" +#include "graphics/macgui/macfontmanager.h" #include "macventure/gui.h" #include "macventure/dialog.h" @@ -266,7 +267,7 @@ const WindowData &Gui::getWindowData(WindowReference reference) { } const Graphics::Font &Gui::getCurrentFont() { - return *_wm.getFont("Chicago-12", Graphics::FontManager::kBigGUIFont); + return *_wm._fontMan->getFont(Graphics::MacFont(Graphics::kMacFontChicago, 12)); } void Gui::bringToFront(WindowReference winID) { diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h index f481472bae..2636cc4434 100644 --- a/engines/mohawk/detection_tables.h +++ b/engines/mohawk/detection_tables.h @@ -40,7 +40,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "ae3258c9c90128d274aa6a790b3ad181"), Common::EN_ANY, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -58,7 +58,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("DEMO.DAT", "c39303dd53fb5c4e7f3c23231c606cd0"), Common::EN_ANY, Common::kPlatformWindows, - ADGF_DEMO | ADGF_TESTING, + ADGF_DEMO | ADGF_NO_FLAGS, GUI_OPTIONS_MYST_DEMO }, GType_MYST, @@ -76,7 +76,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "4beb3366ed3f3b9bfb6e81a14a43bdcc"), Common::DE_DEU, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -94,7 +94,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "e0937cca1ab125e48e30dc3cd5046ddf"), Common::DE_DEU, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -112,7 +112,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "f7e7d7ca69934f1351b5acd4fe4d44c2"), Common::ES_ESP, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -130,7 +130,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "a5795ce1751fc42525e4f9a1859181d5"), Common::IT_ITA, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -148,7 +148,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "032c88e3b7e8db4ca475e7b7db9a66bb"), Common::JA_JPN, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -166,7 +166,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "d631d42567a941c67c78f2e491f4ea58"), Common::FR_FRA, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -184,7 +184,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MAKING.DAT", "f6387e8f0f7b8a3e42c95294315d6a0e"), Common::EN_ANY, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_MAKING_OF }, GType_MAKINGOF, @@ -202,7 +202,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MAKING.DAT", "03ff62607e64419ab2b6ebf7b7bcdf63"), Common::JA_JPN, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_MAKING_OF }, GType_MAKINGOF, @@ -220,7 +220,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "c4cae9f143b5947262e6cb2397e1617e"), Common::EN_ANY, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, @@ -238,7 +238,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "f88e0ace66dbca78eebdaaa1d3314ceb"), Common::DE_DEU, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, @@ -256,7 +256,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "aea81633b2d2ae498f09072fb87263b6"), Common::FR_FRA, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, @@ -274,7 +274,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "4a05771b60f4a69869838d01e85c9e80"), Common::PL_POL, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, @@ -2754,7 +2754,7 @@ static const MohawkGameDescription fallbackDescs[] = { AD_ENTRY1(0, 0), Common::UNK_LANG, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -2769,7 +2769,7 @@ static const MohawkGameDescription fallbackDescs[] = { AD_ENTRY1(0, 0), Common::UNK_LANG, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_MAKING_OF }, GType_MAKINGOF, @@ -2784,7 +2784,7 @@ static const MohawkGameDescription fallbackDescs[] = { AD_ENTRY1(0, 0), Common::UNK_LANG, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 20889f230b..f01e2a677e 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -632,13 +632,16 @@ void SoundCommandParser::syncPlayList(Common::Serializer &s) { } void SoundCommandParser::reconstructPlayList() { - Common::StackLock lock(_music->_mutex); + _music->_mutex.lock(); // We store all songs here because starting songs may re-shuffle their order MusicList songs; for (MusicList::iterator i = _music->getPlayListStart(); i != _music->getPlayListEnd(); ++i) songs.push_back(*i); + // Done with main playlist, so release lock + _music->_mutex.unlock(); + for (MusicList::iterator i = songs.begin(); i != songs.end(); ++i) { initSoundResource(*i); diff --git a/engines/titanic/debugger.cpp b/engines/titanic/debugger.cpp index a9da83f724..086c6bfaaa 100644 --- a/engines/titanic/debugger.cpp +++ b/engines/titanic/debugger.cpp @@ -23,7 +23,9 @@ #include "titanic/debugger.h" #include "titanic/titanic.h" #include "titanic/core/tree_item.h" +#include "titanic/game/movie_tester.h" #include "titanic/pet_control/pet_control.h" +#include "titanic/support/movie.h" namespace Titanic { @@ -33,6 +35,7 @@ Debugger::Debugger(TitanicEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("room", WRAP_METHOD(Debugger, cmdRoom)); registerCmd("pet", WRAP_METHOD(Debugger, cmdPET)); registerCmd("item", WRAP_METHOD(Debugger, cmdItem)); + registerCmd("movie", WRAP_METHOD(Debugger, cmdMovie)); } int Debugger::strToInt(const char *s) { @@ -260,4 +263,35 @@ bool Debugger::cmdItem(int argc, const char **argv) { return true; } +bool Debugger::cmdMovie(int argc, const char **argv) { + if (argc < 2) { + debugPrintf("movie filename.avi [startFrame endFrame]\n"); + return true; + } + + CViewItem *view = g_vm->_window->_gameManager->getView(); + CMovieTester *tester = static_cast<CMovieTester *>( + view->findChildInstanceOf(CMovieTester::_type)); + if (!tester) { + // No movie tester present, so create one + tester = new CMovieTester(); + tester->addUnder(view); + } + + CString filename(argv[1]); + if (!filename.hasSuffix(".avi")) + filename += ".avi"; + tester->loadMovie(filename); + + if (argc == 2) { + tester->playMovie(MOVIE_STOP_PREVIOUS); + } else { + uint startFrame = strToInt(argv[2]); + uint endFrame = strToInt(argv[2]); + tester->playMovie(startFrame, endFrame, MOVIE_STOP_PREVIOUS); + } + + return false; +} + } // End of namespace Titanic diff --git a/engines/titanic/debugger.h b/engines/titanic/debugger.h index 5edb7cb324..cae8a07d80 100644 --- a/engines/titanic/debugger.h +++ b/engines/titanic/debugger.h @@ -89,6 +89,11 @@ private: * Item handling */ bool cmdItem(int argc, const char **argv); + + /** + * Shows a movie + */ + bool cmdMovie(int argc, const char **argv); protected: TitanicEngine *_vm; public: diff --git a/engines/titanic/game/movie_tester.h b/engines/titanic/game/movie_tester.h index 17a7d489d8..60eacee7e9 100644 --- a/engines/titanic/game/movie_tester.h +++ b/engines/titanic/game/movie_tester.h @@ -45,6 +45,14 @@ public: * Load the data for the class from file */ virtual void load(SimpleFile *file); + + /** + * Loads a movie + */ + void loadMovie(const CString &name, bool pendingFlag = true) { + CGameObject::loadMovie(name, pendingFlag); + _surface->flipVertically(); + } }; } // End of namespace Titanic diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index a45d586695..45c3ce94b3 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -223,10 +223,10 @@ void AVISurface::setupDecompressor() { bool flag = false; if (idx == 0 && _videoSurface && _videoSurface->getPitch() == _movieFrameSurface[idx]->pitch) { - const Graphics::PixelFormat &ff = _decoder->getVideoTrack(0).getPixelFormat(); + const uint bitCount = _decoder->getVideoTrack(0).getBitCount(); const int vDepth = _videoSurface->getPixelDepth(); - switch (ff.bpp()) { + switch (bitCount) { case 15: flag = vDepth == 1; break; @@ -248,6 +248,9 @@ void AVISurface::setupDecompressor() { _framePixels = new Graphics::ManagedSurface(_decoder->getWidth(), _decoder->getHeight(), _decoder->getVideoTrack(0).getPixelFormat()); } else if (idx == 0) { + // The original developers used a vertical flipped playback to indicate + // an incompatibility between source video and dest surface bit-depths, + // which would result in poor playback performance _videoSurface->_flipVertically = true; } } diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp index 39a0b777a1..45d593755e 100644 --- a/engines/titanic/support/font.cpp +++ b/engines/titanic/support/font.cpp @@ -292,13 +292,13 @@ void STFont::copyRect(CVideoSurface *surface, const Point &pt, Rect &rect) { if (surface->lock()) { uint16 *lineP = surface->getBasePtr(pt.x, pt.y); uint16 color = getColor(); - bool is16Bit = surface->getPixelDepth() == 2; for (int yp = rect.top; yp < rect.bottom; ++yp, lineP += surface->getWidth()) { uint16 *destP = lineP; for (int xp = rect.left; xp < rect.right; ++xp, ++destP) { const byte *transP = _dataPtr + yp * _dataWidth + xp; - surface->copyPixel(destP, &color, *transP >> 3, is16Bit, true); + surface->copyPixel(destP, &color, *transP >> 3, + surface->getRawSurface()->format, true); } } diff --git a/engines/titanic/support/mouse_cursor.cpp b/engines/titanic/support/mouse_cursor.cpp index 3983e9fe60..665ead3056 100644 --- a/engines/titanic/support/mouse_cursor.cpp +++ b/engines/titanic/support/mouse_cursor.cpp @@ -22,6 +22,7 @@ #include "graphics/cursorman.h" #include "titanic/support/mouse_cursor.h" +#include "titanic/support/transparency_surface.h" #include "titanic/support/video_surface.h" #include "titanic/titanic.h" @@ -107,12 +108,16 @@ void CMouseCursor::setCursor(CursorId cursorId) { Graphics::ManagedSurface surface(CURSOR_SIZE, CURSOR_SIZE, g_system->getScreenFormat()); const uint16 *srcP = srcSurface.getPixels(); - const byte *maskP = (const byte *)ce._transSurface->getPixels(); + CTransparencySurface transSurface(&ce._transSurface->rawSurface(), TRANS_DEFAULT); uint16 *destP = (uint16 *)surface.getPixels(); for (int y = 0; y < CURSOR_SIZE; ++y) { - for (int x = 0; x < CURSOR_SIZE; ++x, ++srcP, ++maskP, ++destP) { - *destP = ((*maskP >> 4) == 0) ? srcSurface.getTransparencyColor() : *srcP; + transSurface.setRow(y); + transSurface.setCol(0); + + for (int x = 0; x < CURSOR_SIZE; ++x, ++srcP, ++destP) { + *destP = transSurface.isPixelTransparent() ? srcSurface.getTransparencyColor() : *srcP; + transSurface.moveX(); } } diff --git a/engines/titanic/support/transparency_surface.cpp b/engines/titanic/support/transparency_surface.cpp index f917dfb48b..5ffa8b99b1 100644 --- a/engines/titanic/support/transparency_surface.cpp +++ b/engines/titanic/support/transparency_surface.cpp @@ -67,17 +67,7 @@ int CTransparencySurface::moveX() { uint CTransparencySurface::getPixel() const { const byte *pixelP = (const byte *)_surface->getBasePtr(_pos.x, _pos.y); - return _flag1 ? 0xFF - *pixelP : *pixelP; -} - -bool CTransparencySurface::isPixelTransparent1() const { - const byte *pixelP = (const byte *)_surface->getBasePtr(_pos.x, _pos.y); - return _flag1 ? *pixelP == 0xF0 : *pixelP == 0x10; -} - -bool CTransparencySurface::isPixelTransparent2() const { - const byte *pixelP = (const byte *)_surface->getBasePtr(_pos.x, _pos.y); - return _flag2 ? *pixelP == 0xF0 : *pixelP == 0x10; + return *pixelP; } } // End of namespace Titanic diff --git a/engines/titanic/support/transparency_surface.h b/engines/titanic/support/transparency_surface.h index 5593dfa66d..0391b6d5b7 100644 --- a/engines/titanic/support/transparency_surface.h +++ b/engines/titanic/support/transparency_surface.h @@ -43,19 +43,40 @@ private: bool _flag1; bool _flag2; public: + /** + * Constructor + */ CTransparencySurface(const Graphics::Surface *surface, TransparencyMode transMode); + /** + * Sets the row to get transparencies from + */ void setRow(int yp) { _pos.y = yp; } + /** + * Sets the column to get transparencies from + */ void setCol(int xp) { _pos.x = xp; } - uint getPixel() const; + /** + * Moves reading position horizontally by a single pixel + */ + int moveX(); - bool isPixelTransparent1() const; + /** + * Returns a byte from the transparency surface + */ + uint getPixel() const; - bool isPixelTransparent2() const; + /** + * Returns the alpha value for the pixel (0-31) + */ + uint getAlpha() const { return 31 - (getPixel() >> 3); } - int moveX(); + /** + * Returns true if the pixel is completely transparent + */ + bool isPixelTransparent() const { return getAlpha() == 31; } }; } // End of namespace Titanic diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp index 1991d7423f..c71f898889 100644 --- a/engines/titanic/support/video_surface.cpp +++ b/engines/titanic/support/video_surface.cpp @@ -52,16 +52,11 @@ CVideoSurface::~CVideoSurface() { void CVideoSurface::setupPalette(byte palette[32][32], byte val) { for (uint idx1 = 0; idx1 < 32; ++idx1) { for (uint idx2 = 0, base = 0; idx2 < 32; ++idx2, base += idx1) { - int64 v = 0x84210843; - v *= base; - uint v2 = (v >> 36); - v = ((v2 >> 31) + v2) & 0xff; - palette[idx1][idx2] = v << 3; + uint v = base / 31; + palette[idx1][idx2] = (byte)v; if (val != 0xff && v != idx2) { - v = 0x80808081 * v * val; - v2 = v >> 39; - palette[idx1][idx2] = ((v2 >> 31) + v2) << 3; + assert(0); } } } @@ -238,7 +233,6 @@ void CVideoSurface::transBlitRect(const Rect &srcRect, const Rect &destRect, CVi const uint16 *srcPtr = (const uint16 *)srcSurface->getBasePtr( srcRect.left, flipFlag ? srcRect.top : srcRect.bottom - 1); uint16 *destPtr = (uint16 *)destArea.getBasePtr(0, destArea.h - 1); - bool is16Bit = src->getPixelDepth() == 2; bool isAlpha = src->_transparencyMode == TRANS_ALPHA0 || src->_transparencyMode == TRANS_ALPHA255; @@ -252,15 +246,13 @@ void CVideoSurface::transBlitRect(const Rect &srcRect, const Rect &destRect, CVi transSurface.setCol(srcRect.left); for (int srcX = srcRect.left; srcX < srcRect.right; ++srcX) { - transSurface.moveX(); - - if (!transSurface.isPixelTransparent2()) { - copyPixel(lineDestP, lineSrcP, transSurface.getPixel() >> 3, - is16Bit, isAlpha); + if (!transSurface.isPixelTransparent()) { + copyPixel(lineDestP, lineSrcP, transSurface.getAlpha(), srcSurface->format, isAlpha); } ++lineSrcP; ++lineDestP; + transSurface.moveX(); } // Move to next line @@ -294,30 +286,37 @@ bool CVideoSurface::hasFrame() { } } -void CVideoSurface::copyPixel(uint16 *destP, const uint16 *srcP, byte transVal, bool is16Bit, bool isAlpha) { - const Graphics::PixelFormat srcFormat = is16Bit ? - Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0) : - Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); +#define RGB_SHIFT 3 +void CVideoSurface::copyPixel(uint16 *destP, const uint16 *srcP, byte alpha, + const Graphics::PixelFormat &srcFormat, bool isAlpha) { const Graphics::PixelFormat destFormat = _ddSurface->getFormat(); - transVal &= 0xff; - assert(transVal < 32); + alpha &= 0xff; + assert(alpha < 32); - // Get the color + // Get the source color byte r, g, b; srcFormat.colorToRGB(*srcP, r, g, b); + r >>= RGB_SHIFT; + g >>= RGB_SHIFT; + b >>= RGB_SHIFT; + if (isAlpha) { - r = _palette1[31 - transVal][r >> 3]; - g = _palette1[31 - transVal][g >> 3]; - b = _palette1[31 - transVal][b >> 3]; + r = _palette1[31 - alpha][r]; + g = _palette1[31 - alpha][g]; + b = _palette1[31 - alpha][b]; } byte r2, g2, b2; destFormat.colorToRGB(*destP, r2, g2, b2); - r2 = _palette1[transVal][r2 >> 3]; - g2 = _palette1[transVal][g2 >> 3]; - b2 = _palette1[transVal][b2 >> 3]; + r2 >>= RGB_SHIFT; + g2 >>= RGB_SHIFT; + b2 >>= RGB_SHIFT; + r2 = _palette1[alpha][r2]; + g2 = _palette1[alpha][g2]; + b2 = _palette1[alpha][b2]; - *destP = destFormat.RGBToColor(r + r2, g + g2, b + b2); + *destP = destFormat.RGBToColor((r + r2) << RGB_SHIFT, + (g + g2) << RGB_SHIFT, (b + b2) << RGB_SHIFT); } /*------------------------------------------------------------------------*/ @@ -517,7 +516,7 @@ uint16 OSVideoSurface::getPixel(const Common::Point &pt) { transSurface.setRow(_flipVertically ? getHeight() - pt.y - 1 : pt.y); transSurface.setCol(pt.x); - if (transSurface.isPixelTransparent2()) + if (transSurface.isPixelTransparent()) return getTransparencyColor(); } diff --git a/engines/titanic/support/video_surface.h b/engines/titanic/support/video_surface.h index 4a4ce1861a..690669b79b 100644 --- a/engines/titanic/support/video_surface.h +++ b/engines/titanic/support/video_surface.h @@ -58,7 +58,6 @@ public: */ static void setup() { setupPalette(_palette1, 0xff); - setupPalette(_palette2, 0xe0); } private: /** @@ -340,8 +339,16 @@ public: /** * Copies a pixel, handling transparency - */ - void copyPixel(uint16 *destP, const uint16 *srcP, byte transVal, bool is16Bit, bool isAlpha); + * @param destP Dest pointer to 16-bit pixel + * @param srcP Source pointer to 16-bit pixel + * @param alpha Alpha (0-31). At 0, it's completely opaque, + * and overwrites the dest pixel. Through to 31, which is completely + * transparent, and ignores the source pixel. + * @param srcFormat The source surface format + * @param isAlpha If true, has alpha channel + */ + void copyPixel(uint16 *destP, const uint16 *srcP, byte alpha, + const Graphics::PixelFormat &srcFormat, bool isAlpha); }; class OSVideoSurface : public CVideoSurface { diff --git a/engines/wage/dialog.cpp b/engines/wage/dialog.cpp index ffb4f9c93d..a8500a7ebe 100644 --- a/engines/wage/dialog.cpp +++ b/engines/wage/dialog.cpp @@ -48,6 +48,7 @@ #include "common/system.h" #include "common/events.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" #include "wage/wage.h" @@ -92,7 +93,7 @@ Dialog::~Dialog() { } const Graphics::Font *Dialog::getDialogFont() { - return _gui->_wm.getFont(_gui->_wm.getFontName(0, 12), Graphics::FontManager::kBigGUIFont); // Default is Chicago + return _gui->_wm._fontMan->getFont(Graphics::MacFont(Graphics::kMacFontChicago, 12)); } void Dialog::paint() { diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp index 5ec54493a7..90247a5b21 100644 --- a/engines/wage/entities.cpp +++ b/engines/wage/entities.cpp @@ -54,6 +54,7 @@ #include "common/memstream.h" #include "graphics/managed_surface.h" +#include "graphics/macgui/macfontmanager.h" namespace Wage { @@ -86,8 +87,7 @@ Scene::Scene() { _script = NULL; _design = NULL; _textBounds = NULL; - _fontSize = 0; - _fontType = 0; + _font = NULL; for (int i = 0; i < 4; i++) _blocked[i] = false; @@ -111,8 +111,7 @@ Scene::Scene(Common::String name, Common::SeekableReadStream *data) { _script = NULL; _textBounds = NULL; - _fontSize = 0; - _fontType = 0; + _font = NULL; setDesignBounds(readRect(data)); _worldY = data->readSint16BE(); @@ -138,6 +137,7 @@ Scene::Scene(Common::String name, Common::SeekableReadStream *data) { Scene::~Scene() { delete _script; delete _textBounds; + delete _font; } void Scene::paint(Graphics::ManagedSurface *surface, int x, int y) { @@ -157,15 +157,6 @@ void Scene::paint(Graphics::ManagedSurface *surface, int x, int y) { } } -const char *Scene::getFontName() { - const char *name = ((WageEngine *)g_engine)->_gui->_wm.getFontName(_fontType, _fontSize); - - if (!name) - return "Unknown"; - - return name; -} - Designed *Scene::lookUpEntity(int x, int y) { for (ObjList::const_iterator it = _objs.end(); it != _objs.begin(); ) { it--; diff --git a/engines/wage/entities.h b/engines/wage/entities.h index b7cafb2294..a755af5360 100644 --- a/engines/wage/entities.h +++ b/engines/wage/entities.h @@ -50,6 +50,7 @@ namespace Graphics { class ManagedSurface; + class MacFont; } namespace Wage { @@ -308,8 +309,7 @@ public: Script *_script; Common::String _text; Common::Rect *_textBounds; - int _fontSize; - int _fontType; // 3 => Geneva, 22 => Courier, param to TextFont() function + Graphics::MacFont *_font; bool _blocked[4]; Common::String _messages[4]; int _soundFrequency; // times a minute, max 3600 @@ -334,7 +334,7 @@ public: void paint(Graphics::ManagedSurface *screen, int x, int y); - const char *getFontName(); + const Graphics::MacFont *getFont() { return _font; } }; } // End of namespace Wage diff --git a/engines/wage/gui-console.cpp b/engines/wage/gui-console.cpp index a5e71463f7..37031f0dd9 100644 --- a/engines/wage/gui-console.cpp +++ b/engines/wage/gui-console.cpp @@ -51,6 +51,7 @@ #include "graphics/cursorman.h" #include "graphics/fonts/bdf.h" #include "graphics/palette.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindow.h" #include "graphics/macgui/macmenu.h" @@ -65,7 +66,7 @@ namespace Wage { const Graphics::Font *Gui::getConsoleFont() { Scene *scene = _engine->_world->_player->_currentScene; - return _wm.getFont(scene->getFontName(), Graphics::FontManager::kConsoleFont); + return _wm._fontMan->getFont(*scene->getFont()); } void Gui::clearOutput() { diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp index 3e56c0daa7..90d689720e 100644 --- a/engines/wage/world.cpp +++ b/engines/wage/world.cpp @@ -46,6 +46,7 @@ */ #include "common/file.h" +#include "graphics/macgui/macfontmanager.h" #include "wage/wage.h" #include "wage/entities.h" @@ -203,8 +204,9 @@ bool World::loadWorld(Common::MacResManager *resMan) { res = resMan->getResource(MKTAG('A','T','X','T'), *iter); if (res != NULL) { scene->_textBounds = readRect(res); - scene->_fontType = res->readUint16BE(); - scene->_fontSize = res->readUint16BE(); + int fontType = res->readUint16BE(); + int fontSize = res->readUint16BE(); + scene->_font = new Graphics::MacFont(fontType, fontSize, Graphics::kMacFontRegular, Graphics::FontManager::kConsoleFont); Common::String text; while (res->pos() < res->size()) { diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp index 1af7e2b56d..ef3cc2d84f 100644 --- a/engines/wintermute/base/base_game.cpp +++ b/engines/wintermute/base/base_game.cpp @@ -70,6 +70,7 @@ #include "common/keyboard.h" #include "common/system.h" #include "common/file.h" +#include "graphics/scaler.h" #if EXTENDED_DEBUGGER_ENABLED #include "engines/wintermute/base/scriptables/debuggable/debuggable_script_engine.h" @@ -171,7 +172,12 @@ BaseGame::BaseGame(const Common::String &targetName) : BaseObject(this), _target _forceNonStreamedSounds = false; - _thumbnailWidth = _thumbnailHeight = 0; + // These are NOT the actual engine defaults (they are 0, 0), + // but we have a use for thumbnails even for games that don't + // use them in-game, hence we set a default that is suitably + // sized for the GMM (expecting 4:3 ratio) + _thumbnailWidth = kThumbnailWidth; + _thumbnailHeight = kThumbnailHeight2; _localSaveDir = "saves"; diff --git a/engines/wintermute/detection_tables.h b/engines/wintermute/detection_tables.h index ca30204462..4d7c9e917e 100644 --- a/engines/wintermute/detection_tables.h +++ b/engines/wintermute/detection_tables.h @@ -148,6 +148,10 @@ static const WMEGameDescription gameDescriptions[] = { WME_WINENTRY("5ma", "", WME_ENTRY2s("english.dcp", "2f97bca09260ba23b645da9f0855ce7f", 893681, "data.dcp", "0134e92bcd5fd2837df3971087e96067", 163316498), Common::EN_ANY, ADGF_UNSTABLE, WME_1_7_0), + // Five Magical Amulets (German) + WME_WINENTRY("5ma", "", + WME_ENTRY2s("german.dcp", "bfa74aae81672803d0d0748ac0a532b7", 885150, + "data.dcp", "0134e92bcd5fd2837df3971087e96067", 163316498), Common::DE_DEU, ADGF_UNSTABLE, WME_1_7_0), // Five Magical Amulets (Polish) WME_WINENTRY("5ma", "", WME_ENTRY2s("polish.dcp", "bb877d48795471a17f25b0b5109100d1", 1132197, @@ -205,16 +209,16 @@ static const WMEGameDescription gameDescriptions[] = { WME_ENTRY1s("data.dcp", "2b343b48a7aee508d728a546b414a255", 620005266), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Chivalry is Not Dead WME_WINENTRY("chivalry", "", - WME_ENTRY1s("data.dcp", "ebd0915d9a12df5224be22f53bb23eb6", 7278306), Common::EN_ANY, ADGF_TESTING, LATEST_VERSION), + WME_ENTRY1s("data.dcp", "ebd0915d9a12df5224be22f53bb23eb6", 7278306), Common::EN_ANY, ADGF_NO_FLAGS, LATEST_VERSION), // Chivalry is Not Dead (Version from deirdrakai.com) WME_WINENTRY("chivalry", "", - WME_ENTRY1s("data.dcp", "ae6d91b9517f4d2851a8ad94c96951c8", 7278302), Common::EN_ANY, ADGF_TESTING, LATEST_VERSION), + WME_ENTRY1s("data.dcp", "ae6d91b9517f4d2851a8ad94c96951c8", 7278302), Common::EN_ANY, ADGF_NO_FLAGS, LATEST_VERSION), // Conspiracao Dumont WME_WINENTRY("conspiracao", "", WME_ENTRY1s("ConspiracaoDumont.exe", "106f3f2c8f18bb5ffffeed634ace256c", 32908032), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Corrosion: Cold Winter Waiting WME_WINENTRY("corrosion", "", - WME_ENTRY1s("data.dcp", "ae885b1a8faa0b27f43c0e8f0df02fc9", 525931618), Common::EN_ANY, ADGF_TESTING, LATEST_VERSION), + WME_ENTRY1s("data.dcp", "ae885b1a8faa0b27f43c0e8f0df02fc9", 525931618), Common::EN_ANY, ADGF_NO_FLAGS, LATEST_VERSION), // Dead City (Czech) // The Czech data are in data.dcp, so in this case we'll have to // just detect the english version twice, to give the user a choice. diff --git a/engines/wintermute/ui/ui_edit.cpp b/engines/wintermute/ui/ui_edit.cpp index ffe8d66b4d..81030e09c3 100644 --- a/engines/wintermute/ui/ui_edit.cpp +++ b/engines/wintermute/ui/ui_edit.cpp @@ -899,7 +899,7 @@ int UIEdit::deleteChars(int start, int end) { ////////////////////////////////////////////////////////////////////////// int UIEdit::insertChars(int pos, const byte *chars, int num) { - if ((int)strlen(_text) + num > _maxLength) { + if ((_maxLength != -1) && (int)strlen(_text) + num > _maxLength) { num -= (strlen(_text) + num - _maxLength); } diff --git a/graphics/fonts/bdf.cpp b/graphics/fonts/bdf.cpp index 3476838911..1a23133858 100644 --- a/graphics/fonts/bdf.cpp +++ b/graphics/fonts/bdf.cpp @@ -41,13 +41,27 @@ BdfFont::~BdfFont() { delete[] _data.bitmaps; delete[] _data.advances; delete[] _data.boxes; + delete[] _data.familyName; + delete[] _data.slant; } } +const char *BdfFont::getFamilyName() const { + return _data.familyName; +} + +const char *BdfFont::getFontSlant() const { + return _data.slant; +} + int BdfFont::getFontHeight() const { return _data.height; } +int BdfFont::getFontSize() const { + return _data.size; +} + int BdfFont::getMaxCharWidth() const { return _data.maxAdvance; } @@ -285,6 +299,7 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { memset(bitmaps, 0, sizeof(byte *) * font.numCharacters); byte *advances = new byte[font.numCharacters]; BdfBoundingBox *boxes = new BdfBoundingBox[font.numCharacters]; + char *familyName, *slant; int descent = -1; @@ -297,6 +312,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } @@ -310,6 +327,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } @@ -317,6 +336,18 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { font.defaultBox.height = height; font.defaultBox.xOffset = xOffset; font.defaultBox.yOffset = yOffset; + } else if (line.hasPrefix("SIZE ")) { + int hDpi, vDpi; + if (sscanf(line.c_str(), "SIZE %d %d %d", &font.size, &hDpi, &vDpi) != 3) { + warning("BdfFont::loadFont: Invalid SIZE"); + freeBitmaps(bitmaps, font.numCharacters); + delete[] bitmaps; + delete[] advances; + delete[] boxes; + delete[] familyName; + delete[] slant; + return 0; + } } else if (line.hasPrefix("FONT_ASCENT ")) { if (sscanf(line.c_str(), "FONT_ASCENT %d", &font.ascent) != 1) { warning("BdfFont::loadFont: Invalid FONT_ASCENT"); @@ -324,6 +355,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } } else if (line.hasPrefix("FONT_DESCENT ")) { @@ -333,6 +366,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } } else if (line.hasPrefix("DEFAULT_CHAR ")) { @@ -342,6 +377,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } } else if (line.hasPrefix("STARTCHAR ")) { @@ -366,6 +403,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } @@ -374,6 +413,40 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { advances[encoding] = advance; boxes[encoding] = box; } + } else if (line.hasPrefix("FAMILY_NAME \"")) { + familyName = new char[line.size()]; // We will definitely fit here + Common::strlcpy(familyName, &line.c_str()[13], line.size()); + char *p = &familyName[strlen(familyName)]; + while (p != familyName && *p != '"') + p--; + if (p == familyName) { + warning("BdfFont::loadFont: Invalid FAMILY_NAME"); + freeBitmaps(bitmaps, font.numCharacters); + delete[] bitmaps; + delete[] advances; + delete[] boxes; + delete[] familyName; + delete[] slant; + return 0; + } + *p = '\0'; // Remove last quote + } else if (line.hasPrefix("SLANT \"")) { + slant = new char[line.size()]; // We will definitely fit here + Common::strlcpy(slant, &line.c_str()[7], line.size()); + char *p = &slant[strlen(slant)]; + while (p != slant && *p != '"') + p--; + if (p == slant) { + warning("BdfFont::loadFont: Invalid SLANT"); + freeBitmaps(bitmaps, font.numCharacters); + delete[] bitmaps; + delete[] advances; + delete[] boxes; + delete[] familyName; + delete[] slant; + return 0; + } + *p = '\0'; // Remove last quote } else if (line == "ENDFONT") { break; } @@ -385,6 +458,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } @@ -393,6 +468,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { font.bitmaps = bitmaps; font.advances = advances; font.boxes = boxes; + font.familyName = familyName; + font.slant = slant; int firstCharacter = font.numCharacters; int lastCharacter = -1; @@ -425,6 +502,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] font.bitmaps; delete[] font.advances; delete[] font.boxes; + delete[] familyName; + delete[] slant; return 0; } diff --git a/graphics/fonts/bdf.h b/graphics/fonts/bdf.h index b91834785f..9a3b20e14c 100644 --- a/graphics/fonts/bdf.h +++ b/graphics/fonts/bdf.h @@ -40,8 +40,12 @@ struct BdfBoundingBox { }; struct BdfFontData { + const char *familyName; + const char *slant; + int maxAdvance; int height; + int size; BdfBoundingBox defaultBox; int ascent; @@ -65,6 +69,10 @@ public: virtual int getCharWidth(uint32 chr) const; virtual void drawChar(Surface *dst, uint32 chr, int x, int y, uint32 color) const; + const char *getFamilyName() const; + const char *getFontSlant() const; + int getFontSize() const; + static BdfFont *loadFont(Common::SeekableReadStream &stream); static bool cacheFontData(const BdfFont &font, const Common::String &filename); static BdfFont *loadFromCache(Common::SeekableReadStream &stream); diff --git a/graphics/fonts/consolefont.cpp b/graphics/fonts/consolefont.cpp index 748aa08a5c..9dcf1dc9f2 100644 --- a/graphics/fonts/consolefont.cpp +++ b/graphics/fonts/consolefont.cpp @@ -5850,7 +5850,10 @@ const byte *const bitmapTable[] = { // Font structure static const BdfFontData desc = { + "Fixed", // Family name + "R", // Slant 5, // Max advance + 8, // Size 8, // Height { 5, 8, 0, -1 }, // Bounding box 7, // Ascent diff --git a/graphics/fonts/newfont.cpp b/graphics/fonts/newfont.cpp index 4922e24676..ff06211ab3 100644 --- a/graphics/fonts/newfont.cpp +++ b/graphics/fonts/newfont.cpp @@ -7634,7 +7634,10 @@ const byte *const bitmapTable[] = { // Font structure static const BdfFontData desc = { + "Schumacher", // Family name + "R", // Slant 6, // Max advance + 12, // Size 12, // Height { 6, 12, 0, -3 }, // Bounding box 9, // Ascent diff --git a/graphics/fonts/newfont_big.cpp b/graphics/fonts/newfont_big.cpp index 550d6dbfa9..e44e2cee50 100644 --- a/graphics/fonts/newfont_big.cpp +++ b/graphics/fonts/newfont_big.cpp @@ -5829,7 +5829,10 @@ static const BdfBoundingBox boxes[] = { // Font structure static const BdfFontData desc = { + "Helvetica", // Family name + "R", // Slant 13, // Max advance + 12, // Size 14, // Height { 13, 15, -1, -3 }, // Bounding box 11, // Ascent diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp new file mode 100644 index 0000000000..bf3532dc51 --- /dev/null +++ b/graphics/macgui/macfontmanager.cpp @@ -0,0 +1,267 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "common/archive.h" +#include "common/stream.h" +#include "common/unzip.h" +#include "graphics/fonts/bdf.h" + +#include "graphics/macgui/macfontmanager.h" + +namespace Graphics { + +// Source: Apple IIGS Technical Note #41, "Font Family Numbers" +// http://apple2.boldt.ca/?page=til/tn.iigs.041 +static const char *const fontNames[] = { + "Chicago", // system font + "Geneva", // application font + "New York", + "Geneva", + + "Monaco", + "Venice", + "London", + "Athens", + + "San Francisco", + "Toronto", + NULL, + "Cairo", + "Los Angeles", // 12 + + "Zapf Dingbats", + "Bookman", + "Helvetica Narrow", + "Palatino", + NULL, + "Zapf Chancery", + NULL, + + "Times", // 20 + "Helvetica", + "Courier", + "Symbol", + "Taliesin", // mobile? + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // 30 + NULL, + NULL, + "Avant Garde", + "New Century Schoolbook" +}; + +MacFontManager::MacFontManager() { + for (uint i = 0; i < ARRAYSIZE(fontNames); i++) + if (fontNames[i]) + _fontNames.setVal(fontNames[i], i); + + loadFonts(); +} + +void MacFontManager::loadFonts() { + Common::Archive *dat; + + dat = Common::makeZipArchive("classicmacfonts.dat"); + + if (!dat) { + warning("Could not find classicmacfonts.dat. Falling back to built-in fonts"); + _builtInFonts = true; + + return; + } + + Common::ArchiveMemberList list; + dat->listMembers(list); + + for (Common::ArchiveMemberList::iterator it = list.begin(); it != list.end(); ++it) { + Common::SeekableReadStream *stream = dat->createReadStreamForMember((*it)->getName()); + + Graphics::BdfFont *font = Graphics::BdfFont::loadFont(*stream); + + delete stream; + + Common::String fontName; + MacFont *macfont; + + if (font->getFamilyName() && *font->getFamilyName()) { + fontName = Common::String::format("%s-%s-%d", font->getFamilyName(), font->getFontSlant(), font->getFontSize()); + + macfont = new MacFont(_fontNames.getVal(font->getFamilyName(), kMacFontNonStandard), font->getFontSize(), parseFontSlant(font->getFontSlant())); + } else { // Get it from the file name + fontName = (*it)->getName(); + + // Trim the .bdf extension + for (int i = fontName.size() - 1; i >= 0; --i) { + if (fontName[i] == '.') { + while ((uint)i < fontName.size()) { + fontName.deleteLastChar(); + } + break; + } + } + + macfont = new MacFont(kMacFontNonStandard); + macfont->setName(fontName); + } + + FontMan.assignFontToName(fontName, font); + _fontRegistry.setVal(fontName, macfont); + + debug(2, " %s", fontName.c_str()); + } + + _builtInFonts = false; + + delete dat; +} + +const Font *MacFontManager::getFont(MacFont macFont) { + const Font *font = 0; + + if (!_builtInFonts) { + if (macFont.getName().empty()) + macFont.setName(getFontName(macFont.getId(), macFont.getSize(), macFont.getSlant())); + + if (!_fontRegistry.contains(macFont.getName())) + generateFontSubstitute(macFont); + + font = FontMan.getFontByName(macFont.getName()); + + if (!font) { + warning("Cannot load font %s", macFont.getName().c_str()); + + font = FontMan.getFontByName(MacFont(kMacFontChicago, 12).getName()); + } + } + + if (_builtInFonts || !font) + font = FontMan.getFontByUsage(macFont.getFallback()); + + return font; +} + +int MacFontManager::parseFontSlant(Common::String slant) { + slant.toUppercase(); + + if (slant == "I") + return kMacFontItalic; + if (slant == "B") + return kMacFontBold; + if (slant == "R") + return kMacFontRegular; + + warning("Unknown font slant '%s'", slant.c_str()); + + return kMacFontRegular; +} + +const char *MacFontManager::getFontName(int id, int size, int slant) { + static char name[128]; + const char *sslant; + + switch (slant) { + case kMacFontItalic: + sslant = "I"; + break; + case kMacFontBold: + sslant = "B"; + break; + case kMacFontRegular: + default: + sslant = "R"; + break; + } + + if (id > ARRAYSIZE(fontNames)) + return NULL; + + snprintf(name, 128, "%s-%s-%d", fontNames[id], sslant, size); + + return name; +} + +const char *MacFontManager::getFontName(MacFont &font) { + return getFontName(font.getId(), font.getSize(), font.getSlant()); +} + +void MacFontManager::generateFontSubstitute(MacFont &macFont) { + Common::String name; + + // First we try twice size + name = getFontName(macFont.getId(), macFont.getSize() * 2, macFont.getSlant()); + if (_fontRegistry.contains(name) && !_fontRegistry[name]->isGenerated()) { + generateFont(macFont, *_fontRegistry[name]); + + return; + } + + // Now half size + name = getFontName(macFont.getId(), macFont.getSize() / 2, macFont.getSlant()); + if (_fontRegistry.contains(name)) { + generateFont(macFont, *_fontRegistry[name]); + + return; + } + + // No simple substitute was found. Looking for neighborhood fonts + + // First we gather all font sizes for this font + Common::Array<int> sizes; + for (Common::HashMap<Common::String, MacFont *>::iterator i = _fontRegistry.begin(); i != _fontRegistry.end(); ++i) { + if (i->_value->getId() == macFont.getId() && i->_value->getSlant() == macFont.getSlant()) + sizes.push_back(i->_value->getSize()); + } + + if (sizes.empty()) { + warning("No viable substitute found for font %s", getFontName(macFont)); + return; + } + + // Now looking next larger font, and store the largest one for next check + int candidate = 1000; + int maxSize = sizes[0]; + for (uint i = 0; i < sizes.size(); i++) { + if (sizes[i] > macFont.getSize() && sizes[i] < candidate) + candidate = sizes[i]; + + if (sizes[i] > maxSize) + maxSize = sizes[i]; + } + + if (candidate != 1000) { + generateFont(macFont, MacFont(macFont.getId(), candidate, macFont.getSlant())); + return; + } + + // Now next smaller font, which is the biggest we have + generateFont(macFont, MacFont(macFont.getId(), maxSize, macFont.getSlant())); +} + +void MacFontManager::generateFont(MacFont fromFont, MacFont toFont) { + debugN("Found font substitute for font %s ", getFontName(fromFont)); + debug("as %s", getFontName(toFont)); +} + +} // End of namespace Graphics diff --git a/graphics/macgui/macfontmanager.h b/graphics/macgui/macfontmanager.h new file mode 100644 index 0000000000..e09e1dc984 --- /dev/null +++ b/graphics/macgui/macfontmanager.h @@ -0,0 +1,116 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GRAPHICS_MACGUI_MACFONTMANAGER_H +#define GRAPHICS_MACGUI_MACFONTMANAGER_H + +#include "graphics/fontman.h" + +namespace Graphics { + +enum { + kMacFontNonStandard = -1, + kMacFontChicago = 0 +}; + +enum { + kMacFontRegular, + kMacFontBold, + kMacFontItalic +}; + +class BdfFont; + +class MacFont { +public: + MacFont(int id = kMacFontChicago, int size = 12, int slant = kMacFontRegular, FontManager::FontUsage fallback = Graphics::FontManager::kBigGUIFont) { + _id = id; + _size = size; + _slant = slant; + _fallback = fallback; + _generated = false; + } + + int getId() { return _id; }; + int getSize() { return _size; } + int getSlant() { return _slant; } + Common::String getName() { return _name; } + void setName(Common::String &name) { _name = name; } + void setName(const char *name) { _name = name; } + FontManager::FontUsage getFallback() { return _fallback; } + bool isGenerated() { return _generated; } + void setGenerated(bool gen) { _generated = gen; } + +private: + int _id; + int _size; + int _slant; + Common::String _name; + FontManager::FontUsage _fallback; + + bool _generated; +}; + +class MacFontManager { +public: + MacFontManager(); + + /** + * Accessor method to check the presence of built-in fonts. + * @return True if there are bult-in fonts. + */ + bool hasBuiltInFonts() { return _builtInFonts; } + /** + * Retrieve a font from the available ones. + * @param name Name of the desired font. + * @param fallback Fallback policy in case the desired font isn't there. + * @return The requested font or the fallback. + */ + const Font *getFont(MacFont macFont); + +private: + void loadFonts(); + + /** + * Return font name from standard ID + * @param id ID of the font + * @param size size of the font + * @return the font name or NULL if ID goes beyond the mapping + */ + const char *getFontName(int id, int size, int slant = kMacFontRegular); + const char *getFontName(MacFont &font); + + void generateFontSubstitute(MacFont &macFont); + void generateFont(MacFont fromFont, MacFont toFont); + +private: + bool _builtInFonts; + Common::HashMap<Common::String, MacFont *> _fontRegistry; + + Common::HashMap<Common::String, int> _fontNames; + + int parseFontSlant(Common::String slant); +}; + +} // End of namespace Graphics + +#endif diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index 4f8c6f32b9..449cf58335 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -25,6 +25,7 @@ #include "graphics/primitives.h" #include "graphics/font.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" #include "graphics/macgui/macwindow.h" #include "graphics/macgui/macmenu.h" @@ -112,7 +113,7 @@ Menu::~Menu() { } void Menu::addStaticMenus(const MenuData *data) { - MenuItem *about = new MenuItem(_wm->hasBuiltInFonts() ? "\xa9" : "\xf0"); // (c) Symbol as the most resembling apple + MenuItem *about = new MenuItem(_wm->_fontMan->hasBuiltInFonts() ? "\xa9" : "\xf0"); // (c) Symbol as the most resembling apple _items.push_back(about); for (int i = 0; data[i].menunum; i++) { @@ -154,7 +155,7 @@ void Menu::calcDimensions() { _items[i]->bbox.left = x - kMenuLeftMargin; _items[i]->bbox.top = y; _items[i]->bbox.right = x + w + kMenuSpacing - kMenuLeftMargin; - _items[i]->bbox.bottom = y + _font->getFontHeight() + (_wm->hasBuiltInFonts() ? 3 : 2); + _items[i]->bbox.bottom = y + _font->getFontHeight() + (_wm->_fontMan->hasBuiltInFonts() ? 3 : 2); } calcMenuBounds(_items[i]); @@ -244,7 +245,7 @@ void Menu::createSubMenuFromString(int id, const char *str) { } const Font *Menu::getMenuFont() { - return _wm->getFont("Chicago-12", FontManager::kBigGUIFont); + return _wm->_fontMan->getFont(Graphics::MacFont(kMacFontChicago, 12)); } const char *Menu::getAcceleratorString(MenuSubItem *item, const char *prefix) { @@ -252,7 +253,7 @@ const char *Menu::getAcceleratorString(MenuSubItem *item, const char *prefix) { *res = 0; if (item->shortcut != 0) - sprintf(res, "%s%c%c", prefix, (_wm->hasBuiltInFonts() ? '^' : '\x11'), item->shortcut); + sprintf(res, "%s%c%c", prefix, (_wm->_fontMan->hasBuiltInFonts() ? '^' : '\x11'), item->shortcut); return res; } @@ -339,7 +340,7 @@ bool Menu::draw(ManagedSurface *g, bool forceRedraw) { renderSubmenu(it); } - _font->drawString(&_screen, it->name, it->bbox.left + kMenuLeftMargin, it->bbox.top + (_wm->hasBuiltInFonts() ? 2 : 1), it->bbox.width(), color); + _font->drawString(&_screen, it->name, it->bbox.left + kMenuLeftMargin, it->bbox.top + (_wm->_fontMan->hasBuiltInFonts() ? 2 : 1), it->bbox.width(), color); } g->transBlitFrom(_screen, kColorGreen); @@ -372,7 +373,7 @@ void Menu::renderSubmenu(MenuItem *menu) { int color = kColorBlack; if (i == (uint)_activeSubItem && !text.empty() && menu->subitems[i]->enabled) { color = kColorWhite; - Common::Rect trect(r->left, y - (_wm->hasBuiltInFonts() ? 1 : 0), r->right, y + _font->getFontHeight()); + Common::Rect trect(r->left, y - (_wm->_fontMan->hasBuiltInFonts() ? 1 : 0), r->right, y + _font->getFontHeight()); _screen.fillRect(trect, kColorBlack); } diff --git a/graphics/macgui/macwindow.cpp b/graphics/macgui/macwindow.cpp index 2a6e191ded..0fce19e482 100644 --- a/graphics/macgui/macwindow.cpp +++ b/graphics/macgui/macwindow.cpp @@ -23,6 +23,7 @@ #include "graphics/font.h" #include "graphics/primitives.h" #include "common/events.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" #include "graphics/macgui/macwindow.h" #include "image/bmp.h" @@ -67,7 +68,7 @@ MacWindow::~MacWindow() { } const Font *MacWindow::getTitleFont() { - return _wm->getFont("Chicago-12", FontManager::kBigGUIFont); + return _wm->_fontMan->getFont(Graphics::MacFont(kMacFontChicago, 12)); } void MacWindow::setActive(bool active) { @@ -276,7 +277,7 @@ void MacWindow::drawSimpleBorder(ManagedSurface *g) { if (drawTitle) { const Graphics::Font *font = getTitleFont(); - int yOff = _wm->hasBuiltInFonts() ? 3 : 1; + int yOff = _wm->_fontMan->hasBuiltInFonts() ? 3 : 1; int w = font->getStringWidth(_title) + 10; int maxWidth = width - size * 2 - 7; diff --git a/graphics/macgui/macwindow.h b/graphics/macgui/macwindow.h index 5d06da383d..5446b65678 100644 --- a/graphics/macgui/macwindow.h +++ b/graphics/macgui/macwindow.h @@ -23,6 +23,8 @@ #ifndef GRAPHICS_MACGUI_MACWINDOW_H #define GRAPHICS_MACGUI_MACWINDOW_H +#include "common/stream.h" + #include "graphics/managed_surface.h" #include "graphics/transparent_surface.h" #include "graphics/nine_patch.h" diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index 9e40c368dc..42cab7cf8e 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -22,16 +22,14 @@ #include "common/array.h" #include "common/events.h" #include "common/list.h" -#include "common/unzip.h" #include "common/system.h" -#include "common/stream.h" #include "graphics/cursorman.h" -#include "graphics/fonts/bdf.h" #include "graphics/managed_surface.h" #include "graphics/palette.h" #include "graphics/primitives.h" #include "graphics/macgui/macwindowmanager.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindow.h" #include "graphics/macgui/macmenu.h" @@ -100,15 +98,13 @@ MacWindowManager::MacWindowManager() { _fullRefresh = true; - _builtInFonts = true; - for (int i = 0; i < ARRAYSIZE(fillPatterns); i++) _patterns.push_back(fillPatterns[i]); - loadFonts(); - g_system->getPaletteManager()->setPalette(palette, 0, ARRAYSIZE(palette) / 3); + _fontMan = new MacFontManager(); + CursorMan.replaceCursorPalette(palette, 0, ARRAYSIZE(palette) / 3); CursorMan.replaceCursor(macCursorArrow, 11, 16, 1, 1, 3); _cursorIsArrow = true; @@ -118,6 +114,8 @@ MacWindowManager::MacWindowManager() { MacWindowManager::~MacWindowManager() { for (int i = 0; i < _lastId; i++) delete _windows[i]; + + delete _fontMan; } MacWindow *MacWindowManager::addWindow(bool scrollable, bool resizable, bool editable) { @@ -322,124 +320,6 @@ void MacWindowManager::removeFromWindowList(BaseMacWindow *target) { _windows.remove_at(ndx); } -////////////////////// -// Font stuff -////////////////////// -void MacWindowManager::loadFonts() { - Common::Archive *dat; - - dat = Common::makeZipArchive("classicmacfonts.dat"); - - if (!dat) { - warning("Could not find classicmacfonts.dat. Falling back to built-in fonts"); - _builtInFonts = true; - - return; - } - - Common::ArchiveMemberList list; - dat->listMembers(list); - - for (Common::ArchiveMemberList::iterator it = list.begin(); it != list.end(); ++it) { - Common::SeekableReadStream *stream = dat->createReadStreamForMember((*it)->getName()); - - Graphics::BdfFont *font = Graphics::BdfFont::loadFont(*stream); - - delete stream; - - Common::String fontName = (*it)->getName(); - - // Trim the .bdf extension - for (int i = fontName.size() - 1; i >= 0; --i) { - if (fontName[i] == '.') { - while ((uint)i < fontName.size()) { - fontName.deleteLastChar(); - } - break; - } - } - - FontMan.assignFontToName(fontName, font); - - debug(2, " %s", fontName.c_str()); - } - - _builtInFonts = false; - - delete dat; -} - -const Graphics::Font *MacWindowManager::getFont(const char *name, Graphics::FontManager::FontUsage fallback) { - const Graphics::Font *font = 0; - - if (!_builtInFonts) { - font = FontMan.getFontByName(name); - - if (!font) - warning("Cannot load font %s", name); - } - - if (_builtInFonts || !font) - font = FontMan.getFontByUsage(fallback); - - return font; -} - -// Source: Apple IIGS Technical Note #41, "Font Family Numbers" -// http://apple2.boldt.ca/?page=til/tn.iigs.041 -static const char *const fontNames[] = { - "Chicago", // system font - "Geneva", // application font - "New York", - "Geneva", - - "Monaco", - "Venice", - "London", - "Athens", - - "San Francisco", - "Toronto", - NULL, - "Cairo", - "Los Angeles", // 12 - - "Zapf Dingbats", - "Bookman", - "Helvetica Narrow", - "Palatino", - NULL, - "Zapf Chancery", - NULL, - - "Times", // 20 - "Helvetica", - "Courier", - "Symbol", - "Taliesin", // mobile? - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, // 30 - NULL, - NULL, - "Avant Garde", - "New Century Schoolbook" -}; - -const char *MacWindowManager::getFontName(int id, int size) { - static char name[128]; - - if (id > ARRAYSIZE(fontNames)) - return NULL; - - snprintf(name, 128, "%s-%d", fontNames[id], size); - - return name; -} - ///////////////// // Cursor stuff ///////////////// diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h index 96cc1e73a5..3449ab13c2 100644 --- a/graphics/macgui/macwindowmanager.h +++ b/graphics/macgui/macwindowmanager.h @@ -26,7 +26,6 @@ #include "common/array.h" #include "common/list.h" #include "common/events.h" -#include "common/archive.h" #include "graphics/fontman.h" #include "graphics/macgui/macwindow.h" @@ -62,6 +61,8 @@ class ManagedSurface; class Menu; +class MacFontManager; + typedef Common::Array<byte *> MacPatterns; /** @@ -80,27 +81,6 @@ public: */ void setScreen(ManagedSurface *screen) { _screen = screen; } /** - * Accessor method to check the presence of built-in fonts. - * @return True if there are bult-in fonts. - */ - bool hasBuiltInFonts() { return _builtInFonts; } - /** - * Retrieve a font from the available ones. - * @param name Name of the desired font. - * @param fallback Fallback policy in case the desired font isn't there. - * @return The requested font or the fallback. - */ - const Font *getFont(const char *name, FontManager::FontUsage fallback); - - /** - * Return font name from standard ID - * @param id ID of the font - * @param size size of the font - * @return the font name or NULL if ID goes beyond the mapping - */ - const char *getFontName(int id, int size); - - /** * Create a window with the given parameters. * Note that this method allocates the necessary memory for the window. * @param scrollable True if the window has to be scrollable. @@ -168,9 +148,11 @@ public: void pushArrowCursor(); void popCursor(); +public: + MacFontManager *_fontMan; + private: void drawDesktop(); - void loadFonts(); void removeMarked(); void removeFromStack(BaseMacWindow *target); @@ -194,7 +176,6 @@ private: Menu *_menu; - bool _builtInFonts; bool _cursorIsArrow; }; diff --git a/graphics/module.mk b/graphics/module.mk index 1c87e74ba7..b6e704bc29 100644 --- a/graphics/module.mk +++ b/graphics/module.mk @@ -12,6 +12,7 @@ MODULE_OBJS := \ fonts/ttf.o \ fonts/winfont.o \ maccursor.o \ + macgui/macfontmanager.o \ macgui/macmenu.o \ macgui/macwindow.o \ macgui/macwindowborder.o \ diff --git a/gui/options.cpp b/gui/options.cpp index 35c9864718..6de808ce9c 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -238,11 +238,10 @@ void OptionsDialog::open() { #ifdef GUI_ONLY_FULLSCREEN _fullscreenCheckbox->setState(true); _fullscreenCheckbox->setEnabled(false); - _aspectCheckbox->setState(ConfMan.getBool("aspect_ratio", _domain)); - _aspectCheckbox->setEnabled(false); #else // !GUI_ONLY_FULLSCREEN // Fullscreen setting _fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain)); +#endif // GUI_ONLY_FULLSCREEN // Aspect ratio setting if (_guioptions.contains(GUIO_NOASPECT)) { @@ -252,7 +251,6 @@ void OptionsDialog::open() { _aspectCheckbox->setEnabled(true); _aspectCheckbox->setState(ConfMan.getBool("aspect_ratio", _domain)); } -#endif // GUI_ONLY_FULLSCREEN } diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex 468ae11879..9584d1227e 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat diff --git a/po/be_BY.po b/po/be_BY.po index 1d0ff0f615..54eaca64b6 100644 --- a/po/be_BY.po +++ b/po/be_BY.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.8.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" "POT-Creation-Date: 2016-10-04 13:52+0200\n" -"PO-Revision-Date: 2016-05-22 17:05+0300\n" +"PO-Revision-Date: 2016-10-07 19:14+0300\n" "Last-Translator: Ivan Lukyanov <greencis@mail.ru>\n" "Language-Team: Ivan Lukyanov <greencis@mail.ru>\n" "Language: Belarusian\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Poedit 1.8.7\n" +"X-Generator: Poedit 1.8.9\n" #: gui/about.cpp:94 #, c-format @@ -78,9 +78,8 @@ msgid "Choose" msgstr "°ÑàÐæì" #: gui/downloaddialog.cpp:48 -#, fuzzy msgid "Select directory where to download game data" -msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî × äÐÙÛÐÜö ÓãÛìÝö" +msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî ÔÛï áßÐÜßÐÒÐÝÝï ÔÐÔ×ÕÝëå ÓãÛìÝö" #: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:472 gui/launcher.cpp:173 msgid "Select directory with game data" @@ -88,30 +87,31 @@ msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî × äÐÙÛÐÜö ÓãÛìÝö" #: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263 msgid "From: " -msgstr "" +msgstr "°Ô:" #: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264 msgid "To: " -msgstr "" +msgstr "´Ð:" #: gui/downloaddialog.cpp:63 msgid "Cancel download" -msgstr "" +msgstr "°ÔÜïÝöæì ×ÐÓàã×Úã" #: gui/downloaddialog.cpp:65 msgctxt "lowres" msgid "Cancel download" -msgstr "" +msgstr "°ÔÜïÝöæì" #: gui/downloaddialog.cpp:67 msgid "Hide" -msgstr "" +msgstr "ÁåÐÒÐæì" #: gui/downloaddialog.cpp:117 msgid "" "It looks like your connection is limited. Do you really want to download " "files with it?" msgstr "" +"·ÔÐÕææÐ, èâÞ ÒÐèÐ ×ÛãçíÝÝÕ ÐÑÜÕÖÐÒÐÝÐ. ²ë áÐßàÐþÔë ÖÐÔÐÕæÕ ×ÐÓàã×öæì äÐÙÛë?" #: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152 #: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217 @@ -146,6 +146,8 @@ msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" +"½Õ ÐâàëÜÐÛÐáï áâÒÐàëæì ÔëàíÚâÞàëî ÔÛï ×ÐÓàã×Úö, ÑÞ Ð×ÝÐçÐÝÐï ÔëàíÚâÞàëï þÖÞ " +"ÜÐÕ äÐÙÛ × âëÜ ÖÐ öÜÕÜ." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:501 @@ -173,16 +175,18 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" +"\"%s\" ãÖÞ öáÝãÕ þ Ð×ÝÐçÐÝÐÙ ÔëàíÚâÞàëö.\n" +"²ë áÐßàÐþÔë ÖÐÔÐÕæÕ ×ÐÓàã×öæì äÐÙÛë þ Óíâã ÔëàíÚâÞàëî?" #: gui/downloaddialog.cpp:251 #, c-format msgid "Downloaded %s %s / %s %s" -msgstr "" +msgstr "·ÐÓàãÖÐÝÐ %s %s / %s %s" #: gui/downloaddialog.cpp:258 -#, fuzzy, c-format +#, c-format msgid "Download speed: %s %s" -msgstr "¿ÞèãÚ áÚÞÝçÐÝë!" +msgstr "ÅãâÚÐáæì ×ÐÓàã×Úö: %s %s" #: gui/editgamedialog.cpp:132 msgid "Game" @@ -411,6 +415,9 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"ÁöÝåàÐÝö×Ðæëï ×ÐåÐÒÐÝÝïþ ÓãÛìÝïþ ÝÕ ßàÐæãÕ × ÔëàíÚâÞàëïÜö ÝÕ ßÐ ×ÜÐþçÐÝÝö. " +"ºÐÛö Òë ÖÐÔÐÕæÕ, ÚÐÑ ÒÐèë ×ÐåÐÒÐÝÝö ÓãÛìÝïþ áöÝåàÐÝö×ÐÒÐÛöáï, " +"ÒëÚÐàëáâÞþÒÐÙæÕ ÔëàíÚâÞàëî ßÐ ×ÜÐþçÐÝÝö." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." @@ -696,6 +703,8 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" msgstr "" +"³íâÐ ÔëàíÚâÞàëï ßÐÚãÛì ÝÕ ÜÞÖÐ ÒëÚÐàëáâÞþÒÐææÐ, ã ïÕ æïßÕà ×ÐÓàãÖÐîææÐ " +"ÔÐÔ×ÕÝëï!" #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -1145,24 +1154,24 @@ msgstr "¿àÐÒÕàëæì æïßÕà" #: gui/options.cpp:1284 msgid "Cloud" -msgstr "" +msgstr "²ÞÑÛÐÚÐ" #: gui/options.cpp:1286 msgctxt "lowres" msgid "Cloud" -msgstr "" +msgstr "²ÞÑÛÐÚÐ" #: gui/options.cpp:1297 msgid "Storage:" -msgstr "" +msgstr "²ÞÑÛÐÚÐ:" #: gui/options.cpp:1297 msgid "Active cloud storage" -msgstr "" +msgstr "°ÚâëþÝÐÕ ÒÞÑÛÐçÝÐÕ áåÞÒöèçÐ" #: gui/options.cpp:1304 gui/options.cpp:1855 msgid "<none>" -msgstr "" +msgstr "<ÝïÜÐ>" #: gui/options.cpp:1308 backends/platform/wii/options.cpp:114 msgid "Username:" @@ -1170,101 +1179,96 @@ msgstr "ºÐàëáâÐç:" #: gui/options.cpp:1308 msgid "Username used by this storage" -msgstr "" +msgstr "¦Üï ÚÐàëáâÐçÐ þ ÓíâëÜ ÒÞÑÛÐÚã" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "" +msgstr "ºÐàëáâÐÝë ÐÑ'ñÜ" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "" +msgstr "°Ñ'ñÜ, ×ÐÝïâë ×ÐåÐÒÐÝÝïÜö ÓãÛìÝïþ ScummVM ÝÐ ÓíâëÜ ÒÞÑÛÐÚã" #: gui/options.cpp:1314 msgid "Last sync time:" -msgstr "" +msgstr "°ßÞèÝïï áöÝåàÐÝö×Ðæëï:" #: gui/options.cpp:1314 msgid "When the last saved games sync for this storage occured" -msgstr "" +msgstr "ºÐÛö àÐÑöÛÐáï ÐßÞèÝïï áöÝåàÐÝö×Ðæëï × ÓíâëÜ ÒÞÑÛÐÚÐÜ" #: gui/options.cpp:1317 gui/storagewizarddialog.cpp:71 msgid "Connect" -msgstr "" +msgstr "´ÐÛãçëæì" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" -msgstr "" +msgstr "°ÔÚàëÒÐÕ ÔëïÛÞÓ ÔÛï ÝÐÛÐÔë ÔÐÛãçíÝÝï ÔÐ ÒÞÑÛÐÚÐ" #: gui/options.cpp:1318 msgid "Refresh" -msgstr "" +msgstr "°ÑÝÐÒöæì" #: gui/options.cpp:1318 msgid "Refresh current cloud storage information (username and usage)" -msgstr "" +msgstr "°ÑÝÐþÛïÕ ÑïÓãçãî öÝäÐàÜÐæëî ßàÐ ÒÞÑÛÐÚÐ (öÜï ÚÐàëáâÐçÐ ö ÐÑ'ñÜ)" #: gui/options.cpp:1319 -#, fuzzy msgid "Download" -msgstr "ÃÝö×" +msgstr "·ÐÓàã×öæì" #: gui/options.cpp:1319 msgid "Open downloads manager dialog" -msgstr "" +msgstr "°ÔÚàëÒÐÕ ÜÕÝÕÔÖÐà ×ÐÓàã×ÐÚ" #: gui/options.cpp:1321 msgid "Run server" -msgstr "" +msgstr "·Ðßãáæöæì áÕàÒÕà" #: gui/options.cpp:1321 msgid "Run local webserver" -msgstr "" +msgstr "·ÐßãáÚÐÕ ÛÐÚÐÛìÝë ÒíÑ-áÕàÒÕà" #: gui/options.cpp:1322 gui/options.cpp:1965 -#, fuzzy msgid "Not running" -msgstr "¿ÐÜëÛÚÐ ×ÐßãáÚã ÓãÛìÝö:" +msgstr "½Õ ×ÐßãèçÐÝë" #: gui/options.cpp:1326 -#, fuzzy msgid "/root/ Path:" -msgstr "´ÐÔ. èÛïå:" +msgstr "ºÐàÐÝñÒÐï ÔëàíÚâÞàëï:" #: gui/options.cpp:1326 gui/options.cpp:1328 gui/options.cpp:1329 -#, fuzzy msgid "Specifies which directory the Files Manager can access" -msgstr "¿ÐÚÐ×ÒÐÕ èÛïå ÔÐ ×ÐåÐÒÐÝÝïþ ÓãÛìÝö" +msgstr "¿ÐÚÐ×ÒÐÕ èÛïå ÔÐ ÔëàíÚâÞàëö, ÚãÔë ÑãÔ×Õ ÜÕæì ÔÞáâãß ¼ÕÝÕÔÖÐà äÐÙÛÐþ" #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "´ÐÔ. èÛïå:" +msgstr "ºÞàÐÝì" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "ÁÕàÒÕà:" +msgstr "¿Þàâ áÕàÒÕàÐ:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"½ãÜÐà ßÞàâÐ, ÒëÚÐàëáâÞþÒÐÝë áÕàÒÕàÐÜ\n" +"ÃáâÐÛïÒÐÝÝÕ ÔÞáâãßã ßàÐæãÕ âÞÛìÚö × ßÞàâÐÜ ßÐ ×ÜÐþçÐÝÝö" #: gui/options.cpp:1498 msgid "You have to restart ScummVM before your changes will take effect." msgstr "²ë ßÐÒöÝÝë ßÕàÐ×Ðßãáæöæì ScummVM, ÚÐÑ ãÖëæì ×ÜÕÝë." #: gui/options.cpp:1521 -#, fuzzy msgid "Failed to change cloud storage!" -msgstr "½Õ ÐâàëÜÐÛÐáï ×ÐåÐÒÐæì ÓãÛìÝî" +msgstr "½Õ ÐâàëÜÐÛÐáï ×ÜïÝöæì ÒÞÑÛÐÚÐ!" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "ÃÖÞ ÐÚâëþÝÐ öÝèÐÕ ÒÞÑÛÐçÝÐÕ áåÞÒöèçÐ." #: gui/options.cpp:1562 msgid "The chosen directory cannot be written to. Please select another one." @@ -1283,9 +1287,8 @@ msgid "Select directory for plugins" msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî × ßÛÐÓöÝÐÜö" #: gui/options.cpp:1604 -#, fuzzy msgid "Select directory for Files Manager /root/" -msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî × ÔÐÔÐâÚÞÒëÜö äÐÙÛÐÜö" +msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî ÔÛï ÚÞàÐÝï þ ¼ÕÝÕÔÖÐàë äÐÙÛÐþ" #: gui/options.cpp:1666 msgid "" @@ -1298,31 +1301,31 @@ msgstr "" #: gui/options.cpp:1862 #, c-format msgid "%llu bytes" -msgstr "" +msgstr "%llu ÑÐÙâÐþ" #: gui/options.cpp:1870 msgid "<right now>" -msgstr "" +msgstr "<×ÐàÐ×>" #: gui/options.cpp:1872 -#, fuzzy msgid "<never>" -msgstr "½öÚÞÛö" +msgstr "<ÝöÚÞÛö>" #: gui/options.cpp:1956 -#, fuzzy msgid "Stop server" -msgstr "ÁÕàÒÕà:" +msgstr "ÁßëÝöæì áÕàÒÕà" #: gui/options.cpp:1957 msgid "Stop local webserver" -msgstr "" +msgstr "ÁßëÝïÕ ÛÐÚÐÛìÝë ÒíÑ-áÕàÒÕà" #: gui/options.cpp:2046 msgid "" "Request failed.\n" "Check your Internet connection." msgstr "" +"¿ÐÜëÛÚÐ ×Ðßëâã.\n" +"¿àÐÒÕàæÕ ÒÐèÐ ¦ÝâíàÝíâ-×ÛãçíÝÝÕ." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1396,9 +1399,8 @@ msgid "Unknown Author" msgstr "½ÕÒïÔÞÜë ÐþâÐà" #: gui/remotebrowser.cpp:128 -#, fuzzy msgid "ScummVM could not access the directory!" -msgstr "ScummVM ÝÕ ÜÞÖÐ ÐÔÚàëæì Ð×ÝÐçÐÝãî ÔëàíÚâÞàëî!" +msgstr "ScummVM ÝÕ ÜÐÕ ÔÞáâãßã ÔÐ Ð×ÝÐçÐÝÐÙ ÔëàíÚâÞàëö!" #: gui/saveload-dialog.cpp:334 msgid "List view" @@ -1468,73 +1470,73 @@ msgstr "ÃÒïÔ×öæÕ ÐßöáÐÝÝÕ áÛÞâÐ %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "´ëïÛÞÓ ÔÐÛãçíÝÝï ÔÐ ÒÞÑÛÐÚÐ %s" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "¿ÕàÐÙÔ×öæÕ ßÐ ÝÐáâãßÝëÜ URL:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "°âàëÜÐÙæÕ ÚÞÔ ÐÔ ÒÞÑÛÐÚÐ, Ð ßÞâëÜ ãÒïÔ×öæÕ ïÓÞ" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "þ ßÐÛö, àÐ×ÜÕèçÐÝëï ÝöÖíÙ, ö ÝÐæöáÝöæÕ '´ÐÛãçëæì'" #: gui/storagewizarddialog.cpp:69 -#, fuzzy msgid "Open URL" -msgstr "OpenGL" +msgstr "°ÔÚàëæì URL" #: gui/storagewizarddialog.cpp:70 msgid "Paste" -msgstr "" +msgstr "ÃáâÐÒöæì" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "ÃáâÐþÛïÕ ×ÜÕáæöÒÐ ÑãäÕàÐ ÐÑÜÕÝã þ ßÐÛö" #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "·ÐàÐ× Òë ÑãÔ×ÕæÕ ßÕàÐÝÐÚöàÐÒÐÝë ÝÐ áâÐàÞÝÚã ScummVM," #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "Ô×Õ ÒÐÜ âàíÑÐ ÑãÔ×Õ ÔÐ×ÒÞÛöæì ÔÞáâãß ÔÐ ÒÐèÐÓÐ ÒÞÑÛÐÚÐ." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "¦ÝèÐÕ ÒÞÑÛÐÚÐ þÖÞ ÐÚâëþÝÐ. ²ë ÖÐÔÐÕæÕ ßÕàÐßëÝöæì ßàÐæíá?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "" +msgstr "¿ÐçÐÚÐÙæÕ, ßÐÚãÛì ÑïÓãçÐÕ ÒÞÑÛÐÚÐ áÚÞÝçëæì àÐÑÞâã, ö ßÐáßàÐÑãÙæÕ ×ÝÞþ." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "¿ÞÛÕ %s ÜÐÕ ßÐÜëÛÚã." #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "¿ÐÛö %s ÜÐîæì ßÐÜëÛÚö." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" -msgstr "" +msgstr "Ãáñ OK!" #: gui/storagewizarddialog.cpp:201 -#, fuzzy msgid "Invalid code" -msgstr "½ÕÒÕàÝëÙ ßãâì" +msgstr "ºÞÔ ÝïßàÐÒöÛìÝë" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"½Õ ÐâàëÜÐÛÐáï ÐÔÚàëæì URL!\n" +"ºÐÛö ÛÐáÚÐ, ßÕàÐÙÔ×öæÕ ÝÐ áâÐàÞÝÚã àãçÝÐ." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -2015,19 +2017,20 @@ msgid "C64 Audio Emulator" msgstr "ÍÜãÛïâÐà ÓãÚã C64" #: backends/cloud/storage.cpp:210 -#, fuzzy msgid "Saved games sync complete." -msgstr "¿ÞèãÚ áÚÞÝçÐÝë!" +msgstr "ÁöÝåàÐÝö×Ðæëï ×ÐåÐÒÐÝÝïþ ÓãÛìÝïþ áÚÞÝçÐÝÐ." #: backends/cloud/storage.cpp:221 msgid "Saved games sync was cancelled." -msgstr "" +msgstr "ÁöÝåàÐÝö×Ðæëï ×ÐåÐÒÐÝÝïþ ÓãÛìÝïþ ÑëÛÐ ßÕàÐßëÝÕÝÐ." #: backends/cloud/storage.cpp:223 msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" +"¿ÐÜëÛÚÐ áöÝåàÐÝö×Ðæëö ×ÐåÐÒÐÝÝïþ ÓãÛìÝïþ.\n" +"¿àÐÒÕàæÕ ÒÐèÐ ×ÛãçíÝÝÕ × ¦ÝâíàÝíâÐÜ." #: backends/cloud/storage.cpp:327 #, c-format @@ -2035,16 +2038,16 @@ msgid "" "Download complete.\n" "Failed to download %u files." msgstr "" +"·ÐÓàã×ÚÐ áÚÞÝçÐÝÐ.\n" +"½Õ ÐâàëÜÐÛÐáï ×ÐÓàã×öæì %u äÐÙÛÐþ." #: backends/cloud/storage.cpp:329 -#, fuzzy msgid "Download complete." -msgstr "¿ÞèãÚ áÚÞÝçÐÝë!" +msgstr "·ÐÓàã×ÚÐ áÚÞÝçÐÝÐ." #: backends/cloud/storage.cpp:339 -#, fuzzy msgid "Download failed." -msgstr "·ÐÓàã×öæì äÐÙÛ" +msgstr "¿ÐÜëÛÚÐ ×ÐÓàã×Úö." #: backends/events/default/default-events.cpp:196 msgid "Do you really want to return to the Launcher?" @@ -2704,22 +2707,20 @@ msgid "Check for Updates..." msgstr "¿àÐÒïàÐî ÐÑÝÐþÛÕÝÝö..." #: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55 -#, fuzzy msgid "Color mode" -msgstr "ÀíÖëÜ ÑÕ× ÚÞÛÕàã" +msgstr "ÀíÖëÜ ÚÞÛÕàã" #: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56 msgid "Use color graphics" -msgstr "" +msgstr "²ëÚÐàëáâÞþÒÐæì ÚÐÛïàÞÒãî ÓàÐäöÚã" #: engines/adl/detection.cpp:65 msgid "Scanlines" -msgstr "" +msgstr "ÁÚÐÝ-ÛöÝöö" #: engines/adl/detection.cpp:66 -#, fuzzy msgid "Show scanlines" -msgstr "¿ÐÚÐ×ÒÐæì àÐÔÞÚ ÐÑ'ÕÚâÐþ" +msgstr "¿ÐÚÐ×ÒÐæì áÚÐÝ-ÛöÝöö" #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48 @@ -3107,9 +3108,8 @@ msgid "~W~ater Effect Enabled" msgstr "~Í~äÕÚâë ÒÐÔë þÚÛîçÐÝë" #: engines/mohawk/mohawk.cpp:61 -#, fuzzy msgid "The game is paused. Press any key to continue." -msgstr "³ãÛìÝï áßëÝÕÝÐ. ½ÐæöáÝöæÕ ßàÐÑÕÛ, ÚÐÑ ßàÐæïÓÝãæì." +msgstr "³ãÛìÝï áßëÝÕÝÐ. ½ÐæöáÝöæÕ ÛîÑãî ÚÝÞßÚã, ÚÐÑ ßàÐæïÓÝãæì." #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" @@ -3247,13 +3247,13 @@ msgid "Enable high resolution graphics/content" msgstr "ÃÚÛîçëæì ÓàÐäöÚã ö ÚÐÝâíÝâ ÒëáÞÚÐÓÐ ÐÔàÞ×ÝÕÝÝï" #: engines/sci/detection.cpp:410 -#, fuzzy msgid "Enable black-lined video" -msgstr "ÃÚÛîçëæì àíÖëÜ Roland GS" +msgstr "ÃÚÛîçëæì ÒöÔíÐ × ÛöÝöïÜö" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" msgstr "" +"¼ÐÛîÕ çÞàÝëï ÛöÝöö ßÐ-ÝÐÔ ÒöÔíÐ, ßÐÒïÛöçÒÐîçë âÐÚöÜ çëÝÐÜ ÑÐçÝãî ÒëàÐ×ÝÐáæì" #: engines/sci/detection.cpp:420 msgid "Prefer digital sound effects" diff --git a/po/fr_FR.po b/po/fr_FR.po index 87ee145067..4b45b4b667 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -3122,9 +3122,8 @@ msgid "~W~ater Effect Enabled" msgstr "~E~ffets de l'Eau Activés" #: engines/mohawk/mohawk.cpp:61 -#, fuzzy msgid "The game is paused. Press any key to continue." -msgstr "Jeu en pause. Appuyer sur Espace pour Reprendre." +msgstr "Jeu en pause. Appuyer sur une touche pour Reprendre." #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" diff --git a/po/ru_RU.po b/po/ru_RU.po index a3a6752e7b..0a1bb7d0f1 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.8.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" "POT-Creation-Date: 2016-10-04 13:52+0200\n" -"PO-Revision-Date: 2016-05-22 17:04+0300\n" +"PO-Revision-Date: 2016-10-07 19:14+0300\n" "Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n" "Language-Team: Russian\n" "Language: Russian\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Poedit 1.8.7\n" +"X-Generator: Poedit 1.8.9\n" #: gui/about.cpp:94 #, c-format @@ -147,7 +147,7 @@ msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" -"½Õ ãÔÐÛÞáì áÞ×ÔÐâì ÔØàÕÚâÞàØî ÔÛï ×ÐÓàã×ÚØ, âÐÚ ÚÐÚ ãÚÐ×ÐÝÝÐï ÔØàÕâÞàØï ãÖÕ " +"½Õ ãÔÐÛÞáì áÞ×ÔÐâì ÔØàÕÚâÞàØî ÔÛï ×ÐÓàã×ÚØ, âÐÚ ÚÐÚ ãÚÐ×ÐÝÝÐï ÔØàÕÚâÞàØï ãÖÕ " "áÞÔÕàÖØâ äÐÙÛ á âÐÚØÜ ÖÕ ØÜÕÝÕÜ." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 @@ -176,7 +176,7 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" -"\"%s\" ãÖÕ áãéÕáâÒãÕâ Ò ãÚÐ×ÐÝÝÞÙ ÔàÕÚâÞàØØ.\n" +"\"%s\" ãÖÕ áãéÕáâÒãÕâ Ò ãÚÐ×ÐÝÝÞÙ ÔØàÕÚâÞàØØ.\n" "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ×ÐÓàãרâì äÐÙÛë Ò íâã ÔØàÕÚâÞàØî?" #: gui/downloaddialog.cpp:251 @@ -1186,11 +1186,11 @@ msgstr "¸Üï ßÞÛì×ÞÒÐâÕÛï Ò íâÞÜ ÞÑÛÐÚÕ" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "¸áßÞÛì×ãÕÜë ÞÑêñÜ" +msgstr "¸áßÞÛì×ãÕÜëÙ ÞÑêñÜ" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "¾ÑêñÜ, ×ÐÝØÜÐÕÜëÙ áÞåàÐÝÕÝØïÜØ ØÓà ScumìVM ÝÐ íâÞÜ ÞÑÛÐÚÕ" +msgstr "¾ÑêñÜ, ×ÐÝØÜÐÕÜëÙ áÞåàÐÝÕÝØïÜØ ØÓà ScummVM ÝÐ íâÞÜ ÞÑÛÐÚÕ" #: gui/options.cpp:1314 msgid "Last sync time:" @@ -1328,7 +1328,7 @@ msgid "" "Check your Internet connection." msgstr "" "¾èØÑÚÐ ×ÐßàÞáÐ.\n" -"¿àÞÒÕàìâÕ ÒÐèÕ ØÝâÕàÝÕâ-áÞÕÔØÝÕÝØÕ." +"¿àÞÒÕàìâÕ ÒÐèÕ ¸ÝâÕàÝÕâ-áÞÕÔØÝÕÝØÕ." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1485,7 +1485,7 @@ msgstr "¿ÞÛãçØâÕ ÚÞÔ Þâ ÞÑÛÐÚÐ, Ð ×ÐâÕÜ ÒÒÕÔØâÕ ÕÓÞ" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "Ò ßÞÛï, àÐáßÞÛÞÖÕÝÝëÕ ÝØÖÕ Ø ÝÐÖÜØâÕ '¿ÞÔÚÛîçØâì':" +msgstr "Ò ßÞÛï, àÐáßÞÛÞÖÕÝÝëÕ ÝØÖÕ, Ø ÝÐÖÜØâÕ '¿ÞÔÚÛîçØâì':" #: gui/storagewizarddialog.cpp:69 msgid "Open URL" @@ -1513,12 +1513,12 @@ msgstr "´àãÓÞÕ ÞÑÛÐÚÞ ãÖÕ ÐÚâØÒÝÞ. ²ë åÞâØâÕ ßàÕàÒÐâì ßàÞæÕáá?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "¿ÞÔÞÖÔØâÕ, ßÞÚÐ âÕÚãéÕÕ ÞÑÛÐÚÞ ×ÐÒÕàèØâ àÐÑÞâã Ø ßÞßàÞÑãÙâÕ áÝÞÒÐ." +msgstr "¿ÞÔÞÖÔØâÕ, ßÞÚÐ âÕÚãéÕÕ ÞÑÛÐÚÞ ×ÐÒÕàèØâ àÐÑÞâã, Ø ßÞßàÞÑãÙâÕ áÝÞÒÐ." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "¿ÞÛÕ %s áÞÖÕàÖØâ ÞèØÑÚã" +msgstr "¿ÞÛÕ %s áÞÔÕàÖØâ ÞèØÑÚã." #: gui/storagewizarddialog.cpp:184 #, c-format @@ -1539,7 +1539,7 @@ msgid "" "Please navigate to this page manually." msgstr "" "½Õ ãÔÐÛÞáì ÞâÚàëâì URL!\n" -"¿ÞÖÐÛãÙáâÕ, ßÕàÕÙÔØâÕ ÒàãçÝãî ßÞ ãÚÐ×ÐÝÝÞÜã URL." +"¿ÞÖÐÛãÙáâÐ, ßÕàÕÙÔØâÕ ÒàãçÝãî ßÞ ãÚÐ×ÐÝÝÞÜã URL." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -2032,8 +2032,8 @@ msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" -"¾èØÑÚÐ áØÝåàÞÝØ×ÐæØØ áÞ×àÐÝÕÝØÙ ØÓà.\n" -"¿àÞÒÕàìâÕ ÒÐèÕ áÞÕÔØÝÕÝØÕ á ØÝâÕàÝÕâ." +"¾èØÑÚÐ áØÝåàÞÝØ×ÐæØØ áÞåàÐÝÕÝØÙ ØÓà.\n" +"¿àÞÒÕàìâÕ ÒÐèÕ áÞÕÔØÝÕÝØÕ á ¸ÝâÕàÝÕâÞÜ." #: backends/cloud/storage.cpp:327 #, c-format @@ -2041,7 +2041,7 @@ msgid "" "Download complete.\n" "Failed to download %u files." msgstr "" -"·ÐÓàã×ÚÐ ×ÐÒÕàéÕÝÐ.\n" +"·ÐÓàã×ÚÐ ×ÐÒÕàèÕÝÐ.\n" "½Õ ãÔÐÛÞáì ×ÐÓàãרâì %u äÐÙÛÞÒ." #: backends/cloud/storage.cpp:329 @@ -3255,7 +3255,7 @@ msgstr "²ÚÛîçØâì ÒØÔÕÞ á ÛØÝØïÜØ" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" msgstr "" -"ÀØáãÕâ çñàÝëÕ ÛØÝØØ ßÞÒÕàê ÒØÔÕÞ, ãÒÕÛØçØÒÐï âÐÚØÜ ÞÑàÐ×ÞÜ ÒØÔØÜãî çñâÚÞáâì" +"ÀØáãÕâ çñàÝëÕ ÛØÝØØ ßÞÒÕàå ÒØÔÕÞ, ãÒÕÛØçØÒÐï âÐÚØÜ ÞÑàÐ×ÞÜ ÒØÔØÜãî çñâÚÞáâì" #: engines/sci/detection.cpp:420 msgid "Prefer digital sound effects" diff --git a/po/sv_SE.po b/po/sv_SE.po index 01af81ec9d..cd47d75622 100644 --- a/po/sv_SE.po +++ b/po/sv_SE.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.5.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" "POT-Creation-Date: 2016-10-04 13:52+0200\n" -"PO-Revision-Date: 2016-02-25 23:06+0100\n" +"PO-Revision-Date: 2016-10-06 19:01+0200\n" "Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n" "Language-Team: \n" "Language: Svenska\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: iso-8859-1\n" -"X-Generator: Poedit 1.8.7\n" +"X-Generator: Poedit 1.8.9\n" #: gui/about.cpp:94 #, c-format @@ -78,9 +78,8 @@ msgid "Choose" msgstr "Välj" #: gui/downloaddialog.cpp:48 -#, fuzzy msgid "Select directory where to download game data" -msgstr "Välj katalog med speldata" +msgstr "Välj katalogen där du vill ladda ner speldata" #: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:472 gui/launcher.cpp:173 msgid "Select directory with game data" @@ -88,30 +87,32 @@ msgstr "Välj katalog med speldata" #: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263 msgid "From: " -msgstr "" +msgstr "Från:" #: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264 msgid "To: " -msgstr "" +msgstr "Till:" #: gui/downloaddialog.cpp:63 msgid "Cancel download" -msgstr "" +msgstr "Avbryt nedladdning" #: gui/downloaddialog.cpp:65 msgctxt "lowres" msgid "Cancel download" -msgstr "" +msgstr "Avbryt nedladdning " #: gui/downloaddialog.cpp:67 msgid "Hide" -msgstr "" +msgstr "Göm" #: gui/downloaddialog.cpp:117 msgid "" "It looks like your connection is limited. Do you really want to download " "files with it?" msgstr "" +"Det verkar som att din anslutning är begränsad. Vill du verkligen använda " +"den för att ladda ner filer?" #: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152 #: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217 @@ -146,6 +147,8 @@ msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" +"Kan inte skapa katalog för nedladdning - den angivna katalogen innehåller en " +"fil med samma namn." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:501 @@ -173,16 +176,18 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" +"\"%s\" existerar redan i den angivna katalogen. Vill du verkligen ladda ner " +"filer i den katalogen?" #: gui/downloaddialog.cpp:251 #, c-format msgid "Downloaded %s %s / %s %s" -msgstr "" +msgstr "Laddar ner %s %s / %s %s" #: gui/downloaddialog.cpp:258 -#, fuzzy, c-format +#, c-format msgid "Download speed: %s %s" -msgstr "Scanning färdig!" +msgstr "Nedladdningshastighet: %s %s" #: gui/editgamedialog.cpp:132 msgid "Game" @@ -411,6 +416,8 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"Synkfunktionen för sparade data fungerar endast med standardkataloger. Om du " +"vill synka dina sparade data måste du använda standardkatalogen." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." @@ -699,6 +706,7 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" msgstr "" +"Den här katalogen kan inte användas än, eftersom något laddas ner i den!" #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -1133,36 +1141,36 @@ msgstr "Språk för ScummVM:s användargränssnitt" #: gui/options.cpp:1264 msgid "Update check:" -msgstr "" +msgstr "Uppdateringskoll:" #: gui/options.cpp:1264 msgid "How often to check ScummVM updates" -msgstr "" +msgstr "Hur ofta ScummVM kollar efter uppdateringar" #: gui/options.cpp:1276 msgid "Check now" -msgstr "" +msgstr "Kolla nu" #: gui/options.cpp:1284 msgid "Cloud" -msgstr "" +msgstr "Moln" #: gui/options.cpp:1286 msgctxt "lowres" msgid "Cloud" -msgstr "" +msgstr "Moln" #: gui/options.cpp:1297 msgid "Storage:" -msgstr "" +msgstr "Lager:" #: gui/options.cpp:1297 msgid "Active cloud storage" -msgstr "" +msgstr "Aktivera molnlagring" #: gui/options.cpp:1304 gui/options.cpp:1855 msgid "<none>" -msgstr "" +msgstr "<ingen>" #: gui/options.cpp:1308 backends/platform/wii/options.cpp:114 msgid "Username:" @@ -1170,101 +1178,97 @@ msgstr "Anv. namn:" #: gui/options.cpp:1308 msgid "Username used by this storage" -msgstr "" +msgstr "Användarnamn som används av detta lager" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "" +msgstr "Utnyttjat utrymme:" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "" +msgstr "Utrymme som används av ScummVM:s sparade data på det här lagret" #: gui/options.cpp:1314 msgid "Last sync time:" -msgstr "" +msgstr "Senast synkad:" #: gui/options.cpp:1314 msgid "When the last saved games sync for this storage occured" -msgstr "" +msgstr "När sparade data synkades senast för det här lagret" #: gui/options.cpp:1317 gui/storagewizarddialog.cpp:71 msgid "Connect" -msgstr "" +msgstr "Anslut" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" -msgstr "" +msgstr "Öppna anslutningsguiden för att ansluta ditt molnlagerkonto" #: gui/options.cpp:1318 msgid "Refresh" -msgstr "" +msgstr "Uppdatera" #: gui/options.cpp:1318 msgid "Refresh current cloud storage information (username and usage)" msgstr "" +"Uppdaterar informationen om aktuellt molnlager (användarnamn och användning)" #: gui/options.cpp:1319 -#, fuzzy msgid "Download" -msgstr "Ned" +msgstr "Nedladdning" #: gui/options.cpp:1319 msgid "Open downloads manager dialog" -msgstr "" +msgstr "Öppna fönstret för nedladdningshantering" #: gui/options.cpp:1321 msgid "Run server" -msgstr "" +msgstr "Starta server" #: gui/options.cpp:1321 msgid "Run local webserver" -msgstr "" +msgstr "Starta lokal webbserver" #: gui/options.cpp:1322 gui/options.cpp:1965 -#, fuzzy msgid "Not running" -msgstr "Fel under körning av spel:" +msgstr "Ej aktiv" #: gui/options.cpp:1326 -#, fuzzy msgid "/root/ Path:" -msgstr "Sökv. extra:" +msgstr "/root/-sökväg:" #: gui/options.cpp:1326 gui/options.cpp:1328 gui/options.cpp:1329 -#, fuzzy msgid "Specifies which directory the Files Manager can access" -msgstr "Bestämmer var dina spardata lagras" +msgstr "Bestämmer vilken katalog filhanteraren har åtkomst till" #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "Sökv. extra:" +msgstr "/root/-sökväg:" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "Server:" +msgstr "Serverport:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"Vilken port används av servern\n" +"Serverautorisering är endast tillgänglig med standardporten" #: gui/options.cpp:1498 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Du måste starta om ScummVM för att ändringarna ska få effekt." #: gui/options.cpp:1521 -#, fuzzy msgid "Failed to change cloud storage!" -msgstr "Kunde inte spara spelet." +msgstr "Kunde inte ändra molnlager!" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "Ett annat molnlager är redan aktivt." #: gui/options.cpp:1562 msgid "The chosen directory cannot be written to. Please select another one." @@ -1284,9 +1288,8 @@ msgid "Select directory for plugins" msgstr "Välj katalog för tillägg" #: gui/options.cpp:1604 -#, fuzzy msgid "Select directory for Files Manager /root/" -msgstr "Välj katalog för extra filer" +msgstr "Välj katalog för filhanterarens /root/" #: gui/options.cpp:1666 msgid "" @@ -1299,31 +1302,31 @@ msgstr "" #: gui/options.cpp:1862 #, c-format msgid "%llu bytes" -msgstr "" +msgstr "%llu bytes" #: gui/options.cpp:1870 msgid "<right now>" -msgstr "" +msgstr "<nu direkt>" #: gui/options.cpp:1872 -#, fuzzy msgid "<never>" -msgstr "Aldrig" +msgstr "<aldrig>" #: gui/options.cpp:1956 -#, fuzzy msgid "Stop server" -msgstr "Server:" +msgstr "Stoppa server" #: gui/options.cpp:1957 msgid "Stop local webserver" -msgstr "" +msgstr "Stoppa lokal webbserver" #: gui/options.cpp:2046 msgid "" "Request failed.\n" "Check your Internet connection." msgstr "" +"Försöket misslyckades.\n" +"Kontrollera din internetanslutning." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1397,9 +1400,8 @@ msgid "Unknown Author" msgstr "Okänd skapare" #: gui/remotebrowser.cpp:128 -#, fuzzy msgid "ScummVM could not access the directory!" -msgstr "ScummVM kunde inte öppna den valda katalogen!" +msgstr "ScummVM kunde inte öppna katalogen!" #: gui/saveload-dialog.cpp:334 msgid "List view" @@ -1469,73 +1471,73 @@ msgstr "Ange en beskrivning för position %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "%s lageranslutningsguide" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "Navigera till följande webbadress:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "Hämta koden från lagret, ange den" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "i följande fält och tryck på \"Anslut\":" #: gui/storagewizarddialog.cpp:69 -#, fuzzy msgid "Open URL" -msgstr "OpenGL" +msgstr "Öppna adress" #: gui/storagewizarddialog.cpp:70 msgid "Paste" -msgstr "" +msgstr "Klistra in" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "Klistrar in innehållet från urklipp i fälten" #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "Du kommer att föras till ScummVM:s sida" #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "där du borde kunna komma åt ditt lager." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "Ett annat lager är aktivt. Vill du avbryta det?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "" +msgstr "Vänta tills det nuvarande lagret är färdigt och försök igen." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "%s-fältet innehåller ett misstag." #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "Följande fält innehåller misstag: %s." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" -msgstr "" +msgstr "Allt okej!" #: gui/storagewizarddialog.cpp:201 -#, fuzzy msgid "Invalid code" -msgstr "Ogiltig sökväg" +msgstr "Ogiltig kod" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"Kunde inte öppna adressen!\n" +"Var god navigera till sidan manuellt." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -1573,19 +1575,23 @@ msgid "" "\n" "Would you like to enable this feature?" msgstr "" +"ScummVM stöder nu automatisk uppdateringskontroll,\n" +"vilket kräver en internetanslutning.\n" +"\n" +"Vill du aktivera den här funktionen?" #: gui/updates-dialog.cpp:55 msgid "(You can always enable it in the options dialog on the Misc tab)" msgstr "" +"(Du kan alltid aktivera den under \"Diverse\"-fliken i inställningarna)" #: gui/updates-dialog.cpp:92 -#, fuzzy msgid "Check for updates automatically" -msgstr "Sök efter uppdateringar..." +msgstr "Kolla efter uppdateringar automatiskt" #: gui/updates-dialog.cpp:111 msgid "Proceed" -msgstr "" +msgstr "Fortsätt" #: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376 msgid "Clear value" @@ -1716,20 +1722,19 @@ msgstr "Herkules bärnsten" #: common/updates.cpp:58 msgid "Daily" -msgstr "" +msgstr "Dagligen" #: common/updates.cpp:60 msgid "Weekly" -msgstr "" +msgstr "Varje vecka" #: common/updates.cpp:62 msgid "Monthly" -msgstr "" +msgstr "Varje månad" #: common/updates.cpp:64 -#, fuzzy msgid "<Bad value>" -msgstr "Töm sökfältet" +msgstr "<Dåligt värde>" #: engines/advancedDetector.cpp:334 #, c-format @@ -2011,36 +2016,35 @@ msgid "C64 Audio Emulator" msgstr "C64 ljudemulator" #: backends/cloud/storage.cpp:210 -#, fuzzy msgid "Saved games sync complete." -msgstr "Scanning färdig!" +msgstr "Synkningen av sparade speldata är färdig." #: backends/cloud/storage.cpp:221 msgid "Saved games sync was cancelled." -msgstr "" +msgstr "Synkningen av sparade speldata avbröts." #: backends/cloud/storage.cpp:223 msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" +"Synkningen av sparade speldata misslyckades. Kontrollera din " +"internetanslutning." #: backends/cloud/storage.cpp:327 #, c-format msgid "" "Download complete.\n" "Failed to download %u files." -msgstr "" +msgstr "Nedladdningen är färdig. Kunde inte ladda ner %u filer." #: backends/cloud/storage.cpp:329 -#, fuzzy msgid "Download complete." -msgstr "Scanning färdig!" +msgstr "Nedladdning färdig!" #: backends/cloud/storage.cpp:339 -#, fuzzy msgid "Download failed." -msgstr "Ladda spel:" +msgstr "Nedladdningen misslyckades." #: backends/events/default/default-events.cpp:196 msgid "Do you really want to return to the Launcher?" @@ -2701,22 +2705,20 @@ msgid "Check for Updates..." msgstr "Sök efter uppdateringar..." #: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55 -#, fuzzy msgid "Color mode" -msgstr "Färgblint läge" +msgstr "Färgläge" #: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56 msgid "Use color graphics" -msgstr "" +msgstr "Använd färggrafik" #: engines/adl/detection.cpp:65 msgid "Scanlines" -msgstr "" +msgstr "Avsökningslinjer" #: engines/adl/detection.cpp:66 -#, fuzzy msgid "Show scanlines" -msgstr "Visa etiketter" +msgstr "Visa avsökningslinjer" #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48 @@ -2756,23 +2758,25 @@ msgstr "" "spelmenyer." #: engines/agi/detection.cpp:177 -#, fuzzy msgid "Use Hercules hires font" -msgstr "Herkules grön" +msgstr "Använd högupplöst typsnitt för Hercules" #: engines/agi/detection.cpp:178 msgid "Uses Hercules hires font, when font file is available." msgstr "" +"Använd högupplöst typsnitt för Herkules när typsnittsfilen är tillgänglig." #: engines/agi/detection.cpp:187 msgid "Pause when entering commands" -msgstr "" +msgstr "Pausa när kommandon anges" #: engines/agi/detection.cpp:188 msgid "" "Shows a command prompt window and pauses the game (like in SCI) instead of a " "real-time prompt." msgstr "" +"Visar ett fönster med en textruta och pausar spelet (som i SCI-spel) " +"istället för inmatning i realtid." #: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888 #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 @@ -3067,11 +3071,11 @@ msgstr "" #: engines/mohawk/detection.cpp:169 msgid "Play the Myst fly by movie" -msgstr "" +msgstr "Spela flygvideon i Myst" #: engines/mohawk/detection.cpp:170 msgid "The Myst fly by movie was not played by the original engine." -msgstr "" +msgstr "Flygvideon i Myst visades inte i originalspelet." #. I18N: Option for fast scene switching #: engines/mohawk/dialogs.cpp:181 engines/mohawk/dialogs.cpp:267 @@ -3088,12 +3092,10 @@ msgid "~D~rop Page" msgstr "Släpp si~d~a" #: engines/mohawk/dialogs.cpp:188 -#, fuzzy msgid "Show ~M~ap" msgstr "~V~isa karta" #: engines/mohawk/dialogs.cpp:194 -#, fuzzy msgid "Main Men~u~" msgstr "Huvud~m~eny" @@ -3102,9 +3104,8 @@ msgid "~W~ater Effect Enabled" msgstr "~V~atteneffekt aktiverad" #: engines/mohawk/mohawk.cpp:61 -#, fuzzy msgid "The game is paused. Press any key to continue." -msgstr "Spelet pausat. Tryck MELLANSLAG för att fortsätta." +msgstr "Spelet pausat. Tryck på valfri tangent för att fortsätta." #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" @@ -3132,18 +3133,16 @@ msgstr "" "\n" #: engines/parallaction/saveload.cpp:194 -#, fuzzy msgid "Load file" -msgstr "Ladda spel:" +msgstr "Ladda fil" #: engines/parallaction/saveload.cpp:201 msgid "Loading game..." msgstr "Laddar speldata..." #: engines/parallaction/saveload.cpp:209 -#, fuzzy msgid "Save file" -msgstr "Spara spelet:" +msgstr "Spara fil" #: engines/parallaction/saveload.cpp:216 msgid "Saving game..." @@ -3243,13 +3242,12 @@ msgid "Enable high resolution graphics/content" msgstr "Aktivera högupplöst grafik/innehåll" #: engines/sci/detection.cpp:410 -#, fuzzy msgid "Enable black-lined video" -msgstr "Aktivera Roland GS-läge" +msgstr "Aktivera videoränder" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" -msgstr "" +msgstr "Rita svarta linjer över videor för att få dem att se skarpare ut" #: engines/sci/detection.cpp:420 msgid "Prefer digital sound effects" @@ -3300,13 +3298,12 @@ msgstr "" "Använd de alternativa silverpekarna istället för de normala guldpekarna" #: engines/scumm/detection.cpp:1341 -#, fuzzy msgid "Show Object Line" -msgstr "Visa etiketter" +msgstr "Visa objektrad" #: engines/scumm/detection.cpp:1342 msgid "Show the names of objects at the bottom of the screen" -msgstr "" +msgstr "Visa namnen på objekt på botten av skärmen" #: engines/scumm/dialogs.cpp:172 #, c-format @@ -4163,12 +4160,12 @@ msgstr "Visar etiketter för objekten som musen pekar på" #: engines/sword25/detection.cpp:46 msgid "Use English speech" -msgstr "" +msgstr "Använd engelskt tal" #: engines/sword25/detection.cpp:47 msgid "" "Use English speech instead of German for every language other than German" -msgstr "" +msgstr "Använd engelskt tal istället för tyska för alla språk utom tyska" #: engines/teenagent/resources.cpp:96 msgid "" diff --git a/video/avi_decoder.h b/video/avi_decoder.h index 3581b65409..db9928d444 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -189,6 +189,7 @@ protected: uint16 getWidth() const { return _bmInfo.width; } uint16 getHeight() const { return _bmInfo.height; } + uint16 getBitCount() const { return _bmInfo.bitCount; } Graphics::PixelFormat getPixelFormat() const; int getCurFrame() const { return _curFrame; } int getFrameCount() const { return _frameCount; } |