diff options
725 files changed, 24430 insertions, 10225 deletions
diff --git a/.gitignore b/.gitignore index 03e3393220..2ad104214e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ lib*.a /config.log /scummvm /scummvm-static +/ScummVMDockTilePlugin* /config.h /config.mk /.gdb_history @@ -19,6 +20,7 @@ lib*.a /MT32_CONTROL.ROM /MT32_PCM.ROM /ScummVM.app +/scummvm.docktileplugin /scummvm-ps3.pkg /*.ipk /.project @@ -164,6 +166,7 @@ ipch/ *.vcxproj* *.bat *.tss +*.VC.db #Ignore default Visual Studio build folders [Dd]ebug/ @@ -447,6 +447,7 @@ Other contributions Mac OS X: Max Horn - (retired) Oystein Eftevaag + Thierry Crozat Mandriva: Dominik Scherer - (retired) @@ -14,6 +14,7 @@ For a more comprehensive changelog of the latest experimental code, see: General: - Removed TESTING flag from several supported games. - Added Chinese Pinyin translation. + - Fixed cursor stuttering in the launcher that occured on some systems. BBVS: - Fixed game restart. @@ -21,9 +22,29 @@ For a more comprehensive changelog of the latest experimental code, see: CinE: - Fixed sound effect loading. + Drascula: + - Fixed text alignment to be faithful to the original. + - Fixed character walking off screen. + - Fixed loading savegames in the Pendulum scene. + - Fixed wrong background for inventory items during chapter 6 in the + Spanish version. + - Fixed animations speed (they were running two times slower than in the + original engine). + - Fixed noise at start and/or end of speech. This was most noticeable + with the Spanish speech. + - Fixed delay when interacting with the verb menu and the inventory. + - Fixed possibility to pick up the axe in the castle multiple times. + Gob: - Fixed lock up for some games during sound initialization. + KYRA: + - Fixed potential crash when using swamp snake potion on the rat in Hand + of Fate. (NOTE: This fix was included in version 1.8.0, but it was not + added to the NEWS file). + - Fixed missing voice reactions when hitting enemies in CD version of + Lands of Lore. + Lab: - Fixed lock-up during ending sequence. - Improved internal game controls. @@ -32,6 +53,15 @@ For a more comprehensive changelog of the latest experimental code, see: - Fixed user interface colors in the French and German versions of I Have No Mouth and I Must Scream. + SCI: + - Make cursor workarounds work properly on OpenPandora (and other devices, that + support touch screen and analog sticks/mouse at the same time) + - Script patch to fix broken ending battle in multilingual King's Quest 5 + (French, German + Spanish versions are all broken) + - Fixed invalid memory access, when loading broken King's Quest 5 credit music track + - Fixed lowres/hires issues in King's Quest 6 when saving, changing the lowres/hires + setting and restoring the saved game afterwards. + SCUMM: - Fixed detection of Maniac Mansion from Day of the Tentacle in the Windows version of ScummVM. @@ -43,11 +73,20 @@ For a more comprehensive changelog of the latest experimental code, see: - Fixed resource releasing on game exit. - Fixed game restart after language change in-game. - Fixed flickering in main Menu. + - Fixed long save time on Windows. Windows port: - Fixed bug in MIDI device listing affecting cases where MIDI devices were not usable. + Mac OS X port: + - Dock menu for ScummVM now lists recently played games when ScummVM is + not running and allows starting those games. + - Enabled Sparkle application updater. + + GCW0 port: + - Improved support for built-in ScummVM documentation. + 1.8.0 (2016-03-04) New Games: - Added support for Rex Nebular and the Cosmic Gender Bender. @@ -835,7 +835,7 @@ then consult: <http://wiki.scummvm.org/index.php/HOWTO-Mac_Games> Although it primarily talks about SCUMM games, it mentions the -"HFVExplorer" utility which you need to extract the files. Note that you +"HFSExplorer" utility which you need to extract the files. Note that you have to put the speech data "Inherit the Earth Voices" in the same directory as the game data which is stored in: @@ -1205,7 +1205,7 @@ a Macintosh for this, accessing the CD/floppy data might be tricky. The reason for this is that the mac uses a special disk format called HFS which other systems usually do not support. However, there are various free tools which allow reading such HFS volumes. For example -"HFVExplorer" for Windows and "hfsutils" for Linux and other Unix-like +"HFSExplorer" for Windows and "hfsutils" for Linux and other Unix-like operating systems. Most of the newer games on the Macintosh shipped with only a single data @@ -1742,8 +1742,8 @@ The platforms that currently have a different default directory are: $HOME/Documents/ScummVM Savegames/ Other unices: - We follow the XDG Base Directory Specification. This means our - configuration can be found in: + We follow the XDG Base Directory Specification. This means by default + saved games can be found in: $XDG_DATA_HOME/scummvm/saves/ If XDG_DATA_HOME is not defined or empty, ~/.local/share will be used diff --git a/audio/adlib.cpp b/audio/adlib.cpp index f609164495..3e3f5c047c 100644 --- a/audio/adlib.cpp +++ b/audio/adlib.cpp @@ -20,7 +20,6 @@ * */ -#include "audio/softsynth/emumidi.h" #include "common/debug.h" #include "common/error.h" #include "common/scummsys.h" diff --git a/audio/decoders/3do.cpp b/audio/decoders/3do.cpp index 6d558d4c8c..60cc515fdd 100644 --- a/audio/decoders/3do.cpp +++ b/audio/decoders/3do.cpp @@ -25,7 +25,6 @@ #include "common/util.h" #include "audio/decoders/3do.h" -#include "audio/decoders/raw.h" #include "audio/decoders/adpcm_intern.h" namespace Audio { diff --git a/audio/decoders/3do.h b/audio/decoders/3do.h index 7524358543..7f617c6643 100644 --- a/audio/decoders/3do.h +++ b/audio/decoders/3do.h @@ -31,19 +31,12 @@ #include "common/scummsys.h" #include "common/types.h" -#include "common/substream.h" +#include "common/stream.h" #include "audio/audiostream.h" -#include "audio/decoders/raw.h" - -namespace Common { -class SeekableReadStream; -} namespace Audio { -class SeekableAudioStream; - // amount of bytes to be used within the decoder classes as buffers #define AUDIO_3DO_CACHE_SIZE 1024 diff --git a/audio/decoders/aiff.cpp b/audio/decoders/aiff.cpp index e1949ebb07..253b36dec0 100644 --- a/audio/decoders/aiff.cpp +++ b/audio/decoders/aiff.cpp @@ -129,6 +129,8 @@ RewindableAudioStream *makeAIFFStream(Common::SeekableReadStream *stream, Dispos foundSSND = true; /* uint32 offset = */ stream->readUint32BE(); /* uint32 blockAlign = */ stream->readUint32BE(); + if (dataStream) + delete dataStream; dataStream = new Common::SeekableSubReadStream(stream, stream->pos(), stream->pos() + length - 8, disposeAfterUse); break; case MKTAG('F', 'V', 'E', 'R'): @@ -154,7 +156,7 @@ RewindableAudioStream *makeAIFFStream(Common::SeekableReadStream *stream, Dispos return 0; default: debug(1, "Skipping AIFF '%s' chunk", tag2str(tag)); - break; + break; } stream->seek(pos + length + (length & 1)); // ensure we're also word-aligned @@ -203,7 +205,7 @@ RewindableAudioStream *makeAIFFStream(Common::SeekableReadStream *stream, Dispos if (codec == MKTAG('s', 'o', 'w', 't')) rawFlags |= Audio::FLAG_LITTLE_ENDIAN; - return makeRawStream(dataStream, rate, rawFlags); + return makeRawStream(dataStream, rate, rawFlags); } case MKTAG('i', 'm', 'a', '4'): // TODO: Use QT IMA ADPCM @@ -212,7 +214,7 @@ RewindableAudioStream *makeAIFFStream(Common::SeekableReadStream *stream, Dispos case MKTAG('Q', 'D', 'M', '2'): // TODO: Need to figure out how to integrate this // (But hopefully never needed) - warning("Unhandled AIFF-C QDM2 compression"); + warning("Unhandled AIFF-C QDM2 compression"); break; case MKTAG('A', 'D', 'P', '4'): // ADP4 on 3DO diff --git a/audio/decoders/vorbis.h b/audio/decoders/vorbis.h index 2b9f6c3df9..49f770269b 100644 --- a/audio/decoders/vorbis.h +++ b/audio/decoders/vorbis.h @@ -35,6 +35,7 @@ * - sword25 * - touche * - tucker + * - wintermute */ #ifndef AUDIO_VORBIS_H diff --git a/audio/miles_adlib.cpp b/audio/miles_adlib.cpp index bf5c9d4a73..0693d1e7ac 100644 --- a/audio/miles_adlib.cpp +++ b/audio/miles_adlib.cpp @@ -27,7 +27,6 @@ #include "common/textconsole.h" #include "audio/fmopl.h" -#include "audio/softsynth/emumidi.h" namespace Audio { diff --git a/audio/mods/protracker.cpp b/audio/mods/protracker.cpp index 2578e9488a..ce52b61e04 100644 --- a/audio/mods/protracker.cpp +++ b/audio/mods/protracker.cpp @@ -24,8 +24,6 @@ #include "audio/mods/paula.h" #include "audio/mods/module.h" -#include "audio/audiostream.h" - #include "common/textconsole.h" namespace Modules { diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.h b/audio/softsynth/fmtowns_pc98/towns_audio.h index 93eeafb046..0003f02777 100644 --- a/audio/softsynth/fmtowns_pc98/towns_audio.h +++ b/audio/softsynth/fmtowns_pc98/towns_audio.h @@ -23,7 +23,9 @@ #ifndef TOWNS_AUDIO_H #define TOWNS_AUDIO_H -#include "audio/mixer.h" +namespace Audio { +class Mixer; +} class TownsAudioInterfaceInternal; diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp index 685ee99e6f..d536429f4e 100644 --- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp +++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp @@ -1043,12 +1043,12 @@ void TownsPC98_FmSynth::writeReg(uint8 part, uint8 regAddress, uint8 value) { if (value & 0x10) { _timers[0].smpTillCb = _timers[0].smpPerCb; - _timers[0].smpTillCbRem = _timers[0].smpTillCbRem; + _timers[0].smpTillCbRem = _timers[0].smpPerCbRem; } if (value & 0x20) { _timers[1].smpTillCb = _timers[1].smpPerCb; - _timers[1].smpTillCbRem = _timers[1].smpTillCbRem; + _timers[1].smpTillCbRem = _timers[1].smpPerCbRem; } } else if (l == 2) { // LFO diff --git a/backends/audiocd/audiocd-stream.cpp b/backends/audiocd/audiocd-stream.cpp new file mode 100644 index 0000000000..3c0d0957da --- /dev/null +++ b/backends/audiocd/audiocd-stream.cpp @@ -0,0 +1,199 @@ +/* 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. + * + * Original license header: + * + * Cabal - Legacy Game Implementations + * + * Cabal 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 "backends/audiocd/audiocd-stream.h" +#include "common/textconsole.h" + +AudioCDStream::AudioCDStream() : _buffer(), _frame(0), _bufferPos(0), _bufferFrame(0), _forceStop(false) { +} + +AudioCDStream::~AudioCDStream() { + // Stop the timer; the subclass needs to do this, + // so this is just a last resort. + stopTimer(); + + // Clear any buffered frames + emptyQueue(); +} + +int AudioCDStream::readBuffer(int16 *buffer, const int numSamples) { + int samples = 0; + + // See if any data is left first + while (_bufferPos < kSamplesPerFrame && samples < numSamples) + buffer[samples++] = _buffer[_bufferPos++]; + + // Bail out if done + if (endOfData()) + return samples; + + while (samples < numSamples && !endOfData()) { + if (!readNextFrame()) + return samples; + + // Copy the samples over + for (_bufferPos = 0; _bufferPos < kSamplesPerFrame && samples < numSamples;) + buffer[samples++] = _buffer[_bufferPos++]; + } + + return samples; +} + +bool AudioCDStream::readNextFrame() { + // Fetch a frame from the queue + int16 *buffer; + + { + Common::StackLock lock(_mutex); + + // Nothing we can do if it's empty + if (_bufferQueue.empty()) + return false; + + buffer = _bufferQueue.pop(); + } + + memcpy(_buffer, buffer, kSamplesPerFrame * 2); + delete[] buffer; + _frame++; + return true; +} + +bool AudioCDStream::endOfData() const { + return !shouldForceStop() && getStartFrame() + _frame >= getEndFrame() && _bufferPos == kSamplesPerFrame; +} + +bool AudioCDStream::seek(const Audio::Timestamp &where) { + // Stop the timer + stopTimer(); + + // Clear anything out of the queue + emptyQueue(); + + // Convert to the frame number + // Really not much else needed + _bufferPos = kSamplesPerFrame; + _frame = where.convertToFramerate(kFramesPerSecond).totalNumberOfFrames(); + _bufferFrame = _frame; + + // Start the timer again + startTimer(); + return true; +} + +Audio::Timestamp AudioCDStream::getLength() const { + return Audio::Timestamp(0, getEndFrame() - getStartFrame(), kFramesPerSecond); +} + +void AudioCDStream::timerProc(void *refCon) { + static_cast<AudioCDStream *>(refCon)->onTimer(); +} + +void AudioCDStream::onTimer() { + // The goal here is to do as much work in this timer instead + // of doing it in the readBuffer() call, which is the mixer. + + // If we're done, bail. + if (shouldForceStop() || getStartFrame() + _bufferFrame >= getEndFrame()) + return; + + // Get a quick count of the number of items in the queue + // We don't care that much; we only need a quick estimate + _mutex.lock(); + uint32 queueCount = _bufferQueue.size(); + _mutex.unlock(); + + // If we have enough audio buffered, bail out + if (queueCount >= kBufferThreshold) + return; + + while (!shouldForceStop() && queueCount < kBufferThreshold && getStartFrame() + _bufferFrame < getEndFrame()) { + int16 *buffer = new int16[kSamplesPerFrame]; + + // Figure out the MSF of the frame we're looking for + int frame = _bufferFrame + getStartFrame(); + + // Request to read that frame + if (!readFrame(frame, buffer)) { + warning("Failed to read CD audio"); + forceStop(); + return; + } + + _bufferFrame++; + + // Now push the buffer onto the queue + Common::StackLock lock(_mutex); + _bufferQueue.push(buffer); + queueCount = _bufferQueue.size(); + } +} + +void AudioCDStream::startTimer(bool fillBuffer) { + _forceStop = false; + if (fillBuffer) { + onTimer(); + } + g_system->getTimerManager()->installTimerProc(timerProc, 10 * 1000, this, "AudioCDStream"); +} + +void AudioCDStream::stopTimer() { + forceStop(); + g_system->getTimerManager()->removeTimerProc(timerProc); +} + +void AudioCDStream::emptyQueue() { + while (!_bufferQueue.empty()) + delete[] _bufferQueue.pop(); +} + +bool AudioCDStream::shouldForceStop() const { + Common::StackLock lock(_forceStopMutex); + return _forceStop; +} + +void AudioCDStream::forceStop() { + Common::StackLock lock(_forceStopMutex); + _forceStop = true; +} diff --git a/backends/audiocd/audiocd-stream.h b/backends/audiocd/audiocd-stream.h new file mode 100644 index 0000000000..dbc6a6321b --- /dev/null +++ b/backends/audiocd/audiocd-stream.h @@ -0,0 +1,108 @@ +/* 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. + * + * Original license header: + * + * Cabal - Legacy Game Implementations + * + * Cabal 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 BACKENDS_AUDIOCD_AUDIOCD_STREAM_H +#define BACKENDS_AUDIOCD_AUDIOCD_STREAM_H + +#include "audio/audiostream.h" +#include "common/mutex.h" +#include "common/queue.h" +#include "common/timer.h" + +class AudioCDStream : public Audio::SeekableAudioStream { +public: + AudioCDStream(); + ~AudioCDStream(); + + int readBuffer(int16 *buffer, const int numSamples); + bool isStereo() const { return true; } + int getRate() const { return 44100; } + bool endOfData() const; + bool seek(const Audio::Timestamp &where); + Audio::Timestamp getLength() const; + +protected: + virtual uint getStartFrame() const = 0; + virtual uint getEndFrame() const = 0; + virtual bool readFrame(int frame, int16 *buffer) = 0; + + void startTimer(bool fillBuffer = false); + void stopTimer(); + + enum { + kBytesPerFrame = 2352, + kSamplesPerFrame = kBytesPerFrame / 2 + }; + + enum { + kSecondsPerMinute = 60, + kFramesPerSecond = 75 + }; + + enum { + // Keep about a second's worth of audio in the buffer + kBufferThreshold = kFramesPerSecond + }; + +private: + int16 _buffer[kSamplesPerFrame]; + int _frame; + uint _bufferPos; + + Common::Queue<int16 *> _bufferQueue; + int _bufferFrame; + Common::Mutex _mutex; + + bool _forceStop; + bool shouldForceStop() const; + void forceStop(); + Common::Mutex _forceStopMutex; + + bool readNextFrame(); + static void timerProc(void *refCon); + void onTimer(); + void emptyQueue(); +}; + +#endif diff --git a/backends/audiocd/audiocd.h b/backends/audiocd/audiocd.h index 6eae8e096b..b3674f2570 100644 --- a/backends/audiocd/audiocd.h +++ b/backends/audiocd/audiocd.h @@ -48,26 +48,31 @@ public: }; /** - * @name Emulated playback functions - * Engines should call these functions. Not all platforms - * support cd playback, and these functions should try to - * emulate it. + * Initialize the specified CD drive for audio playback. + * @return true if the CD drive was inited successfully + */ + virtual bool open() = 0; + + /** + * Close the currently open CD drive */ - //@{ + virtual void close() = 0; /** * Start audio CD playback - * @param track the track to play. - * @param numLoops how often playback should be repeated (-1 = infinitely often). - * @param startFrame the frame at which playback should start (75 frames = 1 second). - * @param duration the number of frames to play. - * @param only_emulate determines if the track should be emulated only + * @param track the track to play. + * @param numLoops how often playback should be repeated (<=0 means infinitely often). + * @param startFrame the frame at which playback should start (75 frames = 1 second). + * @param duration the number of frames to play. + * @param onlyEmulate determines if the track should be emulated only + * @note The @c onlyEmulate parameter is deprecated. + * @return @c true if the track started playing, @c false otherwise */ - virtual void play(int track, int numLoops, int startFrame, int duration, bool only_emulate = false) = 0; + virtual bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false) = 0; /** * Get if audio is being played. - * @return true if CD or emulated audio is playing + * @return true if CD audio is playing */ virtual bool isPlaying() const = 0; @@ -82,12 +87,12 @@ public: virtual void setBalance(int8 balance) = 0; /** - * Stop CD or emulated audio playback. + * Stop audio playback. */ virtual void stop() = 0; /** - * Update CD or emulated audio status. + * Update audio status. */ virtual void update() = 0; @@ -96,50 +101,6 @@ public: * @return a Status struct with playback data. */ virtual Status getStatus() const = 0; - - //@} - - - /** - * @name Real CD audio methods - * These functions should be called from the emulated - * ones if they can't emulate the audio playback. - */ - //@{ - - /** - * Initialize the specified CD drive for audio playback. - * @param drive the drive id - * @return true if the CD drive was inited successfully - */ - virtual bool openCD(int drive) = 0; - - /** - * Poll CD status. - * @return true if CD audio is playing - */ - virtual bool pollCD() const = 0; - - /** - * Start CD audio playback. - * @param track the track to play. - * @param num_loops how often playback should be repeated (-1 = infinitely often). - * @param start_frame the frame at which playback should start (75 frames = 1 second). - * @param duration the number of frames to play. - */ - virtual void playCD(int track, int num_loops, int start_frame, int duration) = 0; - - /** - * Stop CD audio playback. - */ - virtual void stopCD() = 0; - - /** - * Update CD audio status. - */ - virtual void updateCD() = 0; - - //@} }; #endif diff --git a/backends/audiocd/default/default-audiocd.cpp b/backends/audiocd/default/default-audiocd.cpp index abf80ac4cd..c2ce7cedcc 100644 --- a/backends/audiocd/default/default-audiocd.cpp +++ b/backends/audiocd/default/default-audiocd.cpp @@ -22,6 +22,7 @@ #include "backends/audiocd/default/default-audiocd.h" #include "audio/audiostream.h" +#include "common/config-manager.h" #include "common/system.h" DefaultAudioCDManager::DefaultAudioCDManager() { @@ -37,7 +38,25 @@ DefaultAudioCDManager::DefaultAudioCDManager() { assert(_mixer); } -void DefaultAudioCDManager::play(int track, int numLoops, int startFrame, int duration, bool only_emulate) { +DefaultAudioCDManager::~DefaultAudioCDManager() { + // Subclasses should call close as well + close(); +} + +bool DefaultAudioCDManager::open() { + // For emulation, opening is always valid + close(); + return true; +} + +void DefaultAudioCDManager::close() { + // Only need to stop for emulation + stop(); +} + +bool DefaultAudioCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) { + stop(); + if (numLoops != 0 || startFrame != 0) { _cd.track = track; _cd.numLoops = numLoops; @@ -55,9 +74,6 @@ void DefaultAudioCDManager::play(int track, int numLoops, int startFrame, int du for (int i = 0; !stream && i < 2; ++i) stream = Audio::SeekableAudioStream::openStreamFile(trackName[i]); - // Stop any currently playing emulated track - _mixer->stopHandle(_handle); - if (stream != 0) { Audio::Timestamp start = Audio::Timestamp(0, startFrame, 75); Audio::Timestamp end = duration ? Audio::Timestamp(0, startFrame + duration, 75) : stream->getLength(); @@ -70,12 +86,11 @@ void DefaultAudioCDManager::play(int track, int numLoops, int startFrame, int du _emulating = true; _mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, Audio::makeLoopingAudioStream(stream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), -1, _cd.volume, _cd.balance); - } else { - _emulating = false; - if (!only_emulate) - playCD(track, numLoops, startFrame, duration); + return true; } } + + return false; } void DefaultAudioCDManager::stop() { @@ -83,52 +98,32 @@ void DefaultAudioCDManager::stop() { // Audio CD emulation _mixer->stopHandle(_handle); _emulating = false; - } else { - // Real Audio CD - stopCD(); } } bool DefaultAudioCDManager::isPlaying() const { - if (_emulating) { - // Audio CD emulation + // Audio CD emulation + if (_emulating) return _mixer->isSoundHandleActive(_handle); - } else { - // Real Audio CD - return pollCD(); - } + + // The default class only handles emulation + return false; } void DefaultAudioCDManager::setVolume(byte volume) { _cd.volume = volume; - if (_emulating) { - // Audio CD emulation - if (_mixer->isSoundHandleActive(_handle)) - _mixer->setChannelVolume(_handle, _cd.volume); - } else { - // Real Audio CD - // Unfortunately I can't implement this atm - // since SDL doesn't seem to offer an interface method for this. - - // g_system->setVolumeCD(_cd.volume); - } + // Audio CD emulation + if (_emulating && isPlaying()) + _mixer->setChannelVolume(_handle, _cd.volume); } void DefaultAudioCDManager::setBalance(int8 balance) { _cd.balance = balance; - if (_emulating) { - // Audio CD emulation - if (isPlaying()) - _mixer->setChannelBalance(_handle, _cd.balance); - } else { - // Real Audio CD - // Unfortunately I can't implement this atm - // since SDL doesn't seem to offer an interface method for this. - - // g_system->setBalanceCD(_cd.balance); - } + // Audio CD emulation + if (_emulating && isPlaying()) + _mixer->setChannelBalance(_handle, _cd.balance); } void DefaultAudioCDManager::update() { @@ -142,8 +137,6 @@ void DefaultAudioCDManager::update() { // or not. _emulating = false; } - } else { - updateCD(); } } @@ -152,3 +145,21 @@ DefaultAudioCDManager::Status DefaultAudioCDManager::getStatus() const { info.playing = isPlaying(); return info; } + +bool DefaultAudioCDManager::openRealCD() { + Common::String cdrom = ConfMan.get("cdrom"); + + // Try to parse it as an int + char *endPos; + int drive = strtol(cdrom.c_str(), &endPos, 0); + + // If not an integer, treat as a drive path + if (endPos == cdrom.c_str()) + return openCD(cdrom); + + if (drive < 0) + return false; + + return openCD(drive); +} + diff --git a/backends/audiocd/default/default-audiocd.h b/backends/audiocd/default/default-audiocd.h index 9e4ba6b33e..e3fbb4b5a1 100644 --- a/backends/audiocd/default/default-audiocd.h +++ b/backends/audiocd/default/default-audiocd.h @@ -26,29 +26,48 @@ #include "backends/audiocd/audiocd.h" #include "audio/mixer.h" +namespace Common { +class String; +} // End of namespace Common + /** * The default audio cd manager. Implements emulation of audio cd playback. */ class DefaultAudioCDManager : public AudioCDManager { public: DefaultAudioCDManager(); - virtual ~DefaultAudioCDManager() {} - - void play(int track, int numLoops, int startFrame, int duration, bool only_emulate = false); - void stop(); - bool isPlaying() const; - void setVolume(byte volume); - void setBalance(int8 balance); - void update(); + virtual ~DefaultAudioCDManager(); + + virtual bool open(); + virtual void close(); + virtual bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false); + virtual void stop(); + virtual bool isPlaying() const; + virtual void setVolume(byte volume); + virtual void setBalance(int8 balance); + virtual void update(); virtual Status getStatus() const; // Subclasses should override for better status results +protected: + /** + * Open a CD using the cdrom config variable + */ + bool openRealCD(); + + /** + * Open a CD using the specified drive index + * @param drive The index of the drive + * @note The index is implementation-defined, but 0 is always the best choice + */ virtual bool openCD(int drive) { return false; } - virtual void updateCD() {} - virtual bool pollCD() const { return false; } - virtual void playCD(int track, int num_loops, int start_frame, int duration) {} - virtual void stopCD() {} -protected: + /** + * Open a CD from a specific drive + * @param drive The name of the drive/path + * @note The drive parameter is platform-specific + */ + virtual bool openCD(const Common::String &drive) { return false; } + Audio::SoundHandle _handle; bool _emulating; diff --git a/backends/audiocd/linux/linux-audiocd.cpp b/backends/audiocd/linux/linux-audiocd.cpp new file mode 100644 index 0000000000..caa0265637 --- /dev/null +++ b/backends/audiocd/linux/linux-audiocd.cpp @@ -0,0 +1,471 @@ +/* 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. + * + * Original license header: + * + * Cabal - Legacy Game Implementations + * + * Cabal 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. + * + */ + +// Enable all forbidden symbols to allow us to include and use necessary APIs. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include "backends/audiocd/linux/linux-audiocd.h" + +#ifdef USE_LINUXCD + +#include "backends/audiocd/audiocd-stream.h" +#include "backends/audiocd/default/default-audiocd.h" +#include "common/array.h" +#include "common/config-manager.h" +#include "common/str.h" +#include "common/debug.h" + +#include <errno.h> +#include <fcntl.h> +#include <unistd.h> +#include <linux/cdrom.h> +#include <sys/ioctl.h> +#include <sys/stat.h> +#include <sys/types.h> + +enum { + kLeadoutTrack = 0xAA +}; + +enum { + kBytesPerFrame = 2352, + kSamplesPerFrame = kBytesPerFrame / 2 +}; + +enum { + kSecondsPerMinute = 60, + kFramesPerSecond = 75 +}; + +enum { + // Keep about a second's worth of audio in the buffer + kBufferThreshold = kFramesPerSecond +}; + +static int getFrameCount(const cdrom_msf0 &msf) { + int time = msf.minute; + time *= kSecondsPerMinute; + time += msf.second; + time *= kFramesPerSecond; + time += msf.frame; + return time; +} + +// Helper function to convert an error code into a human-readable message +static Common::String getErrorMessage(int errorCode) { + char buf[256]; + buf[0] = 0; + +#ifdef _GNU_SOURCE + // glibc sucks + return Common::String(strerror_r(errorCode, buf, sizeof(buf))); +#else + strerror_r(errorCode, buf, sizeof(buf)); + return Common::String(buf); +#endif +} + +class LinuxAudioCDStream : public AudioCDStream { +public: + LinuxAudioCDStream(int fd, const cdrom_tocentry &startEntry, const cdrom_tocentry &endEntry); + ~LinuxAudioCDStream(); + +protected: + uint getStartFrame() const; + uint getEndFrame() const; + bool readFrame(int frame, int16 *buffer); + +private: + int _fd; + const cdrom_tocentry &_startEntry, &_endEntry; +}; + +LinuxAudioCDStream::LinuxAudioCDStream(int fd, const cdrom_tocentry &startEntry, const cdrom_tocentry &endEntry) : + _fd(fd), _startEntry(startEntry), _endEntry(endEntry) { + // We fill the buffer here already to prevent any out of sync issues due + // to the CD not yet having spun up. + startTimer(true); +} + +LinuxAudioCDStream::~LinuxAudioCDStream() { + stopTimer(); +} + +bool LinuxAudioCDStream::readFrame(int frame, int16 *buffer) { + // Create the argument + union { + cdrom_msf msf; + char buffer[kBytesPerFrame]; + } arg; + + int seconds = frame / kFramesPerSecond; + frame %= kFramesPerSecond; + int minutes = seconds / kSecondsPerMinute; + seconds %= kSecondsPerMinute; + + // Request to read that frame + // We don't use CDROMREADAUDIO, as it seems to cause kernel + // panics on ejecting discs. Probably bad to eject the disc + // while playing, but at least let's try to prevent that case. + arg.msf.cdmsf_min0 = minutes; + arg.msf.cdmsf_sec0 = seconds; + arg.msf.cdmsf_frame0 = frame; + // The "end" part is irrelevant (why isn't cdrom_msf0 the type + // instead?) + + if (ioctl(_fd, CDROMREADRAW, &arg) < 0) { + warning("Failed to CD read audio: %s", getErrorMessage(errno).c_str()); + return false; + } + + memcpy(buffer, arg.buffer, kBytesPerFrame); + return true; +} + +uint LinuxAudioCDStream::getStartFrame() const { + return getFrameCount(_startEntry.cdte_addr.msf); +} + +uint LinuxAudioCDStream::getEndFrame() const { + return getFrameCount(_endEntry.cdte_addr.msf); +} + + +class LinuxAudioCDManager : public DefaultAudioCDManager { +public: + LinuxAudioCDManager(); + ~LinuxAudioCDManager(); + + bool open(); + void close(); + bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false); + +protected: + bool openCD(int drive); + bool openCD(const Common::String &drive); + +private: + struct Device { + Device(const Common::String &n, dev_t d) : name(n), device(d) {} + Common::String name; + dev_t device; + }; + + typedef Common::Array<Device> DeviceList; + DeviceList scanDevices(); + bool tryAddDrive(DeviceList &devices, const Common::String &drive); + bool tryAddDrive(DeviceList &devices, const Common::String &drive, dev_t device); + bool tryAddDrive(DeviceList &devices, dev_t device); + bool tryAddPath(DeviceList &devices, const Common::String &path); + bool tryAddGamePath(DeviceList &devices); + bool loadTOC(); + static bool hasDevice(const DeviceList &devices, dev_t device); + + int _fd; + cdrom_tochdr _tocHeader; + Common::Array<cdrom_tocentry> _tocEntries; +}; + +static bool isTrayEmpty(int errorNumber) { + switch (errorNumber) { + case EIO: + case ENOENT: + case EINVAL: +#ifdef ENOMEDIUM + case ENOMEDIUM: +#endif + return true; + } + + return false; +} + +LinuxAudioCDManager::LinuxAudioCDManager() { + _fd = -1; + memset(&_tocHeader, 0, sizeof(_tocHeader)); +} + +LinuxAudioCDManager::~LinuxAudioCDManager() { + close(); +} + +bool LinuxAudioCDManager::open() { + close(); + + if (openRealCD()) + return true; + + return DefaultAudioCDManager::open(); +} + +void LinuxAudioCDManager::close() { + DefaultAudioCDManager::close(); + + if (_fd < 0) + return; + + ::close(_fd); + memset(&_tocHeader, 0, sizeof(_tocHeader)); + _tocEntries.clear(); +} + +bool LinuxAudioCDManager::openCD(int drive) { + DeviceList devices = scanDevices(); + if (drive >= (int)devices.size()) + return false; + + _fd = ::open(devices[drive].name.c_str(), O_RDONLY | O_NONBLOCK, 0); + if (_fd < 0) + return false; + + if (!loadTOC()) { + close(); + return false; + } + + return true; +} + +bool LinuxAudioCDManager::openCD(const Common::String &drive) { + DeviceList devices; + if (!tryAddDrive(devices, drive) && !tryAddPath(devices, drive)) + return false; + + _fd = ::open(devices[0].name.c_str(), O_RDONLY | O_NONBLOCK, 0); + if (_fd < 0) + return false; + + if (!loadTOC()) { + close(); + return false; + } + + return true; +} + +bool LinuxAudioCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) { + // Prefer emulation + if (DefaultAudioCDManager::play(track, numLoops, startFrame, duration, onlyEmulate)) + return true; + + // If we're set to only emulate, or have no CD drive, return here + if (onlyEmulate || _fd < 0) + return false; + + // HACK: For now, just assume that track number is right + // That only works because ScummVM uses the wrong track number anyway + + if (track >= (int)_tocEntries.size() - 1) { + warning("No such track %d", track); + return false; + } + + // Bail if the track isn't an audio track + if ((_tocEntries[track].cdte_ctrl & 0x04) != 0) { + warning("Track %d is not audio", track); + return false; + } + + // Create the AudioStream and play it + debug(1, "Playing CD track %d", track); + + Audio::SeekableAudioStream *audioStream = new LinuxAudioCDStream(_fd, _tocEntries[track], _tocEntries[track + 1]); + + Audio::Timestamp start = Audio::Timestamp(0, startFrame, 75); + Audio::Timestamp end = (duration == 0) ? audioStream->getLength() : Audio::Timestamp(0, startFrame + duration, 75); + + // Fake emulation since we're really playing an AudioStream + _emulating = true; + + _mixer->playStream( + Audio::Mixer::kMusicSoundType, + &_handle, + Audio::makeLoopingAudioStream(audioStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), + -1, + _cd.volume, + _cd.balance, + DisposeAfterUse::YES, + true); + + return true; +} + +LinuxAudioCDManager::DeviceList LinuxAudioCDManager::scanDevices() { + DeviceList devices; + + // Try to use the game's path first as the device + tryAddGamePath(devices); + + // Try adding the default CD-ROM + tryAddDrive(devices, "/dev/cdrom"); + + // TODO: Try others? + + return devices; +} + +bool LinuxAudioCDManager::tryAddDrive(DeviceList &devices, const Common::String &drive) { + struct stat stbuf; + if (stat(drive.c_str(), &stbuf) < 0) + return false; + + // Must be a character or block device + if (!S_ISCHR(stbuf.st_mode) && !S_ISBLK(stbuf.st_mode)) + return false; + + return tryAddDrive(devices, drive, stbuf.st_rdev); +} + +bool LinuxAudioCDManager::tryAddDrive(DeviceList &devices, const Common::String &drive, dev_t device) { + if (hasDevice(devices, device)) + return true; + + // Try opening the device and seeing if it is a CD-ROM drve + int fd = ::open(drive.c_str(), O_RDONLY | O_NONBLOCK, 0); + if (fd >= 0) { + cdrom_subchnl info; + info.cdsc_format = CDROM_MSF; + + bool isCD = ioctl(fd, CDROMSUBCHNL, &info) == 0 || isTrayEmpty(errno); + ::close(fd); + if (isCD) { + devices.push_back(Device(drive, device)); + return true; + } + } + + return false; +} + +bool LinuxAudioCDManager::tryAddDrive(DeviceList &devices, dev_t device) { + // Construct the block name + // TODO: libblkid's blkid_devno_to_devname is exactly what we look for. + // This requires an external dependency though. + Common::String name = Common::String::format("/dev/block/%d:%d", major(device), minor(device)); + + return tryAddDrive(devices, name, device); +} + +bool LinuxAudioCDManager::tryAddPath(DeviceList &devices, const Common::String &path) { + struct stat stbuf; + if (stat(path.c_str(), &stbuf) < 0) + return false; + + return tryAddDrive(devices, stbuf.st_dev); +} + +bool LinuxAudioCDManager::tryAddGamePath(DeviceList &devices) { + if (!ConfMan.hasKey("path")) + return false; + + return tryAddPath(devices, ConfMan.get("path")); +} + +bool LinuxAudioCDManager::loadTOC() { + if (_fd < 0) + return false; + + if (ioctl(_fd, CDROMREADTOCHDR, &_tocHeader) < 0) + return false; + + debug(4, "CD: Start Track: %d, End Track %d", _tocHeader.cdth_trk0, _tocHeader.cdth_trk1); + + for (int i = _tocHeader.cdth_trk0; i <= _tocHeader.cdth_trk1; i++) { + cdrom_tocentry entry; + memset(&entry, 0, sizeof(entry)); + entry.cdte_track = i; + entry.cdte_format = CDROM_MSF; + + if (ioctl(_fd, CDROMREADTOCENTRY, &entry) < 0) + return false; + +#if 0 + debug("Entry:"); + debug("\tTrack: %d", entry.cdte_track); + debug("\tAdr: %d", entry.cdte_adr); + debug("\tCtrl: %d", entry.cdte_ctrl); + debug("\tFormat: %d", entry.cdte_format); + debug("\tMSF: %d:%d:%d", entry.cdte_addr.msf.minute, entry.cdte_addr.msf.second, entry.cdte_addr.msf.frame); + debug("\tMode: %d\n", entry.cdte_datamode); +#endif + + _tocEntries.push_back(entry); + } + + // Fetch the leadout so we can get the length of the last frame + cdrom_tocentry entry; + memset(&entry, 0, sizeof(entry)); + entry.cdte_track = kLeadoutTrack; + entry.cdte_format = CDROM_MSF; + + if (ioctl(_fd, CDROMREADTOCENTRY, &entry) < 0) + return false; + +#if 0 + debug("Lead out:"); + debug("\tTrack: %d", entry.cdte_track); + debug("\tAdr: %d", entry.cdte_adr); + debug("\tCtrl: %d", entry.cdte_ctrl); + debug("\tFormat: %d", entry.cdte_format); + debug("\tMSF: %d:%d:%d", entry.cdte_addr.msf.minute, entry.cdte_addr.msf.second, entry.cdte_addr.msf.frame); + debug("\tMode: %d\n", entry.cdte_datamode); +#endif + + _tocEntries.push_back(entry); + return true; +} + +bool LinuxAudioCDManager::hasDevice(const DeviceList &devices, dev_t device) { + for (DeviceList::const_iterator it = devices.begin(); it != devices.end(); it++) + if (it->device == device) + return true; + + return false; +} + +AudioCDManager *createLinuxAudioCDManager() { + return new LinuxAudioCDManager(); +} + +#endif // USE_LINUXCD diff --git a/backends/audiocd/linux/linux-audiocd.h b/backends/audiocd/linux/linux-audiocd.h new file mode 100644 index 0000000000..09d6353991 --- /dev/null +++ b/backends/audiocd/linux/linux-audiocd.h @@ -0,0 +1,62 @@ +/* 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. + * + * Original license header: + * + * Cabal - Legacy Game Implementations + * + * Cabal 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 BACKENDS_AUDIOCD_LINUX_H +#define BACKENDS_AUDIOCD_LINUX_H + +#include "common/scummsys.h" + +#ifdef USE_LINUXCD + +class AudioCDManager; + +/** + * Create an audio CD manager using the Linux CDROM API + */ +AudioCDManager *createLinuxAudioCDManager(); + +#endif + +#endif + diff --git a/backends/audiocd/macosx/macosx-audiocd.cpp b/backends/audiocd/macosx/macosx-audiocd.cpp new file mode 100644 index 0000000000..e8d41c3e10 --- /dev/null +++ b/backends/audiocd/macosx/macosx-audiocd.cpp @@ -0,0 +1,306 @@ +/* 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. + * + * Original license header: + * + * Cabal - Legacy Game Implementations + * + * Cabal 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. + * + */ + +#ifdef MACOSX + +#include <sys/stat.h> +#include <sys/mount.h> +#include <limits.h> + +#include "common/scummsys.h" + +#include "audio/audiostream.h" +#include "audio/decoders/aiff.h" +#include "audio/timestamp.h" +#include "common/config-manager.h" +#include "common/debug.h" +#include "common/fs.h" +#include "common/hashmap.h" +#include "common/textconsole.h" +#include "backends/audiocd/default/default-audiocd.h" +#include "backends/audiocd/macosx/macosx-audiocd.h" +#include "backends/fs/stdiostream.h" + +// Partially based on SDL's code + +/** + * The Mac OS X audio cd manager. Implements real audio cd playback. + */ +class MacOSXAudioCDManager : public DefaultAudioCDManager { +public: + MacOSXAudioCDManager() {} + ~MacOSXAudioCDManager(); + + bool open(); + void close(); + bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false); + +protected: + bool openCD(int drive); + bool openCD(const Common::String &drive); + +private: + struct Drive { + Drive(const Common::String &m, const Common::String &d, const Common::String &f) : + mountPoint(m), deviceName(d), fsType(f) {} + + Common::String mountPoint; + Common::String deviceName; + Common::String fsType; + }; + + typedef Common::Array<Drive> DriveList; + DriveList detectAllDrives(); + DriveList detectCDDADrives(); + + bool findTrackNames(const Common::String &drivePath); + + Common::HashMap<uint, Common::String> _trackMap; +}; + +MacOSXAudioCDManager::~MacOSXAudioCDManager() { + close(); +} + +bool MacOSXAudioCDManager::open() { + close(); + + if (openRealCD()) + return true; + + return DefaultAudioCDManager::open(); +} + +/** + * Find the base disk number of device name. + * Returns -1 if mount point is not /dev/disk* + */ +static int findBaseDiskNumber(const Common::String &diskName) { + if (!diskName.hasPrefix("/dev/disk")) + return -1; + + const char *startPtr = diskName.c_str() + 9; + char *endPtr; + int baseDiskNumber = strtol(startPtr, &endPtr, 10); + if (startPtr == endPtr) + return -1; + + return baseDiskNumber; +} + +bool MacOSXAudioCDManager::openCD(int drive) { + DriveList allDrives = detectAllDrives(); + if (allDrives.empty()) + return false; + + DriveList cddaDrives; + + // Try to get the volume related to the game's path + if (ConfMan.hasKey("path")) { + Common::String gamePath = ConfMan.get("path"); + struct statfs gamePathStat; + if (statfs(gamePath.c_str(), &gamePathStat) == 0) { + int baseDiskNumber = findBaseDiskNumber(gamePathStat.f_mntfromname); + if (baseDiskNumber >= 0) { + // Look for a CDDA drive with the same base disk number + for (uint32 i = 0; i < allDrives.size(); i++) { + if (allDrives[i].fsType == "cddafs" && findBaseDiskNumber(allDrives[i].deviceName) == baseDiskNumber) { + debug(1, "Preferring drive '%s'", allDrives[i].mountPoint.c_str()); + cddaDrives.push_back(allDrives[i]); + allDrives.remove_at(i); + break; + } + } + } + } + } + + // Add the remaining CDDA drives to the CDDA list + for (uint32 i = 0; i < allDrives.size(); i++) + if (allDrives[i].fsType == "cddafs") + cddaDrives.push_back(allDrives[i]); + + if (drive >= (int)cddaDrives.size()) + return false; + + debug(1, "Using '%s' as the CD drive", cddaDrives[drive].mountPoint.c_str()); + + return findTrackNames(cddaDrives[drive].mountPoint); +} + +bool MacOSXAudioCDManager::openCD(const Common::String &drive) { + DriveList drives = detectAllDrives(); + + for (uint32 i = 0; i < drives.size(); i++) { + if (drives[i].fsType != "cddafs") + continue; + + if (drives[i].mountPoint == drive || drives[i].deviceName == drive) { + debug(1, "Using '%s' as the CD drive", drives[i].mountPoint.c_str()); + return findTrackNames(drives[i].mountPoint); + } + } + + return false; +} + +void MacOSXAudioCDManager::close() { + DefaultAudioCDManager::close(); + _trackMap.clear(); +} + +enum { + // Some crazy high number that we'll never actually hit + kMaxDriveCount = 256 +}; + +MacOSXAudioCDManager::DriveList MacOSXAudioCDManager::detectAllDrives() { + // Fetch the lists of drives + struct statfs driveStats[kMaxDriveCount]; + int foundDrives = getfsstat(driveStats, sizeof(driveStats), MNT_WAIT); + if (foundDrives <= 0) + return DriveList(); + + DriveList drives; + for (int i = 0; i < foundDrives; i++) + drives.push_back(Drive(driveStats[i].f_mntonname, driveStats[i].f_mntfromname, driveStats[i].f_fstypename)); + + return drives; +} + +bool MacOSXAudioCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) { + // Prefer emulation + if (DefaultAudioCDManager::play(track, numLoops, startFrame, duration, onlyEmulate)) + return true; + + // If we're set to only emulate, or have no CD drive, return here + if (onlyEmulate || !_trackMap.contains(track)) + return false; + + if (!numLoops && !startFrame) + return false; + + // Now load the AIFF track from the name + Common::String fileName = _trackMap[track]; + Common::SeekableReadStream *stream = StdioStream::makeFromPath(fileName.c_str(), false); + + if (!stream) { + warning("Failed to open track '%s'", fileName.c_str()); + return false; + } + + Audio::AudioStream *audioStream = Audio::makeAIFFStream(stream, DisposeAfterUse::YES); + if (!audioStream) { + warning("Track '%s' is not an AIFF track", fileName.c_str()); + return false; + } + + Audio::SeekableAudioStream *seekStream = dynamic_cast<Audio::SeekableAudioStream *>(audioStream); + if (!seekStream) { + warning("Track '%s' is not seekable", fileName.c_str()); + return false; + } + + Audio::Timestamp start = Audio::Timestamp(0, startFrame, 75); + Audio::Timestamp end = duration ? Audio::Timestamp(0, startFrame + duration, 75) : seekStream->getLength(); + + // Fake emulation since we're really playing an AIFF file + _emulating = true; + + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, + Audio::makeLoopingAudioStream(seekStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), -1, _cd.volume, _cd.balance); + return true; +} + +bool MacOSXAudioCDManager::findTrackNames(const Common::String &drivePath) { + Common::FSNode directory(drivePath); + + if (!directory.exists()) { + warning("Directory '%s' does not exist", drivePath.c_str()); + return false; + } + + if (!directory.isDirectory()) { + warning("'%s' is not a directory", drivePath.c_str()); + return false; + } + + Common::FSList children; + if (!directory.getChildren(children, Common::FSNode::kListFilesOnly)) { + warning("Failed to find children for '%s'", drivePath.c_str()); + return false; + } + + for (uint32 i = 0; i < children.size(); i++) { + if (!children[i].isDirectory()) { + Common::String fileName = children[i].getName(); + + if (fileName.hasSuffix(".aiff") || fileName.hasSuffix(".cdda")) { + uint j = 0; + + // Search for the track ID in the file name. + for (; j < fileName.size() && !Common::isDigit(fileName[j]); j++) + ; + + const char *trackIDString = fileName.c_str() + j; + char *endPtr = nullptr; + long trackID = strtol(trackIDString, &endPtr, 10); + + if (trackIDString != endPtr && trackID > 0 && trackID < UINT_MAX) { + _trackMap[trackID - 1] = drivePath + '/' + fileName; + } else { + warning("Invalid track file name: '%s'", fileName.c_str()); + } + } + } + } + + return true; +} + +AudioCDManager *createMacOSXAudioCDManager() { + return new MacOSXAudioCDManager(); +} + +#endif // MACOSX diff --git a/backends/audiocd/macosx/macosx-audiocd.h b/backends/audiocd/macosx/macosx-audiocd.h new file mode 100644 index 0000000000..55b8c7b8c6 --- /dev/null +++ b/backends/audiocd/macosx/macosx-audiocd.h @@ -0,0 +1,61 @@ +/* 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. + * + * Original license header: + * + * Cabal - Legacy Game Implementations + * + * Cabal 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 BACKENDS_AUDIOCD_MACOSX_H +#define BACKENDS_AUDIOCD_MACOSX_H + +#include "common/scummsys.h" + +#ifdef MACOSX + +class AudioCDManager; + +/** + * Create an audio CD manager for Mac OS X + */ +AudioCDManager *createMacOSXAudioCDManager(); + +#endif + +#endif // diff --git a/backends/audiocd/sdl/sdl-audiocd.cpp b/backends/audiocd/sdl/sdl-audiocd.cpp index ff50c56af3..3558fb5671 100644 --- a/backends/audiocd/sdl/sdl-audiocd.cpp +++ b/backends/audiocd/sdl/sdl-audiocd.cpp @@ -43,10 +43,16 @@ SdlAudioCDManager::SdlAudioCDManager() } SdlAudioCDManager::~SdlAudioCDManager() { - if (_cdrom) { - SDL_CDStop(_cdrom); - SDL_CDClose(_cdrom); - } + close(); +} + +bool SdlAudioCDManager::open() { + close(); + + if (openRealCD()) + return true; + + return DefaultAudioCDManager::open(); } bool SdlAudioCDManager::openCD(int drive) { @@ -67,44 +73,69 @@ bool SdlAudioCDManager::openCD(int drive) { return (_cdrom != NULL); } -void SdlAudioCDManager::stopCD() { +void SdlAudioCDManager::close() { + DefaultAudioCDManager::close(); + + if (_cdrom) { + SDL_CDStop(_cdrom); + SDL_CDClose(_cdrom); + _cdrom = 0; + } +} + +void SdlAudioCDManager::stop() { + DefaultAudioCDManager::stop(); + // Stop CD Audio in 1/10th of a second _cdStopTime = SDL_GetTicks() + 100; _cdNumLoops = 0; } -void SdlAudioCDManager::playCD(int track, int num_loops, int start_frame, int duration) { - if (!num_loops && !start_frame) - return; +bool SdlAudioCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) { + // Prefer emulation + if (DefaultAudioCDManager::play(track, numLoops, startFrame, duration, onlyEmulate)) + return true; - if (!_cdrom) - return; + // If we're set to only emulate, or have no CD, return here + if (onlyEmulate || !_cdrom) + return false; + if (!numLoops && !startFrame) + return false; + + // FIXME: Explain this. if (duration > 0) duration += 5; _cdTrack = track; - _cdNumLoops = num_loops; - _cdStartFrame = start_frame; + _cdNumLoops = numLoops; + _cdStartFrame = startFrame; SDL_CDStatus(_cdrom); - if (start_frame == 0 && duration == 0) + if (startFrame == 0 && duration == 0) SDL_CDPlayTracks(_cdrom, track, 0, 1, 0); else - SDL_CDPlayTracks(_cdrom, track, start_frame, 0, duration); + SDL_CDPlayTracks(_cdrom, track, startFrame, 0, duration); _cdDuration = duration; _cdStopTime = 0; _cdEndTime = SDL_GetTicks() + _cdrom->track[track].length * 1000 / CD_FPS; + + return true; } -bool SdlAudioCDManager::pollCD() const { +bool SdlAudioCDManager::isPlaying() const { + if (DefaultAudioCDManager::isPlaying()) + return true; + if (!_cdrom) return false; return (_cdNumLoops != 0 && (SDL_GetTicks() < _cdEndTime || SDL_CDStatus(_cdrom) == CD_PLAYING)); } -void SdlAudioCDManager::updateCD() { +void SdlAudioCDManager::update() { + DefaultAudioCDManager::update(); + if (!_cdrom) return; diff --git a/backends/audiocd/sdl/sdl-audiocd.h b/backends/audiocd/sdl/sdl-audiocd.h index bfad7b6805..91895dac99 100644 --- a/backends/audiocd/sdl/sdl-audiocd.h +++ b/backends/audiocd/sdl/sdl-audiocd.h @@ -37,12 +37,15 @@ public: SdlAudioCDManager(); virtual ~SdlAudioCDManager(); + virtual bool open(); + virtual void close(); + virtual bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false); + virtual void stop(); + virtual bool isPlaying() const; + virtual void update(); + protected: virtual bool openCD(int drive); - virtual void updateCD(); - virtual bool pollCD() const; - virtual void playCD(int track, int num_loops, int start_frame, int duration); - virtual void stopCD(); SDL_CD *_cdrom; int _cdTrack, _cdNumLoops, _cdStartFrame, _cdDuration; diff --git a/backends/audiocd/win32/msvc/ntddcdrm.h b/backends/audiocd/win32/msvc/ntddcdrm.h new file mode 100644 index 0000000000..18527e2675 --- /dev/null +++ b/backends/audiocd/win32/msvc/ntddcdrm.h @@ -0,0 +1,362 @@ +/** + * @file ntddcdrm.h + * Copyright 2012, 2013 MinGW.org project + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/* Created by Casper S. Hornstrup <chorns@users.sourceforge.net> */ +#ifndef __NTDDCDRM_H +#define __NTDDCDRM_H +#if 0 // Added to make MSVC happy. +#pragma GCC system_header +#include <_mingw.h> +#endif + +/* + * CDROM IOCTL interface. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if 0 // Added to make MSVC happy. +#include "ntddk.h" +#include "ntddstor.h" +#endif + +#define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM + +#define IOCTL_CDROM_CHECK_VERIFY \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_FIND_NEW_DEVICES \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_GET_CONTROL \ + CTL_CODE(IOCTL_CDROM_BASE, 0x000D, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_GET_DRIVE_GEOMETRY \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_GET_LAST_SESSION \ + CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_GET_VOLUME \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_PAUSE_AUDIO \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_PLAY_AUDIO_MSF \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_RAW_READ \ + CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS) + +#define IOCTL_CDROM_READ_Q_CHANNEL \ + CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_READ_TOC \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_READ_TOC_EX \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_RESUME_AUDIO \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_SEEK_AUDIO_MSF \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_SET_VOLUME \ + CTL_CODE(IOCTL_CDROM_BASE, 0x000A, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_SIMBAD \ + CTL_CODE(IOCTL_CDROM_BASE, 0x1003, METHOD_BUFFERED, FILE_READ_ACCESS) + +#define IOCTL_CDROM_STOP_AUDIO \ + CTL_CODE(IOCTL_CDROM_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS) + + +#define MAXIMUM_NUMBER_TRACKS 100 +#define MAXIMUM_CDROM_SIZE 804 +#define MINIMUM_CDROM_READ_TOC_EX_SIZE 2 + +typedef struct _TRACK_DATA { + UCHAR Reserved; + UCHAR Control : 4; + UCHAR Adr : 4; + UCHAR TrackNumber; + UCHAR Reserved1; + UCHAR Address[4]; +} TRACK_DATA, *PTRACK_DATA; + +/* CDROM_DISK_DATA.DiskData flags */ +#define CDROM_DISK_AUDIO_TRACK 0x00000001 +#define CDROM_DISK_DATA_TRACK 0x00000002 + +typedef struct _CDROM_DISK_DATA { + ULONG DiskData; +} CDROM_DISK_DATA, *PCDROM_DISK_DATA; + +typedef struct _CDROM_PLAY_AUDIO_MSF { + UCHAR StartingM; + UCHAR StartingS; + UCHAR StartingF; + UCHAR EndingM; + UCHAR EndingS; + UCHAR EndingF; +} CDROM_PLAY_AUDIO_MSF, *PCDROM_PLAY_AUDIO_MSF; + +/* CDROM_READ_TOC_EX.Format constants */ +#define CDROM_READ_TOC_EX_FORMAT_TOC 0x00 +#define CDROM_READ_TOC_EX_FORMAT_SESSION 0x01 +#define CDROM_READ_TOC_EX_FORMAT_FULL_TOC 0x02 +#define CDROM_READ_TOC_EX_FORMAT_PMA 0x03 +#define CDROM_READ_TOC_EX_FORMAT_ATIP 0x04 +#define CDROM_READ_TOC_EX_FORMAT_CDTEXT 0x05 + +typedef struct _CDROM_READ_TOC_EX { + UCHAR Format : 4; + UCHAR Reserved1 : 3; + UCHAR Msf : 1; + UCHAR SessionTrack; + UCHAR Reserved2; + UCHAR Reserved3; +} CDROM_READ_TOC_EX, *PCDROM_READ_TOC_EX; + +typedef struct _CDROM_SEEK_AUDIO_MSF { + UCHAR M; + UCHAR S; + UCHAR F; +} CDROM_SEEK_AUDIO_MSF, *PCDROM_SEEK_AUDIO_MSF; + +/* CDROM_SUB_Q_DATA_FORMAT.Format constants */ +#define IOCTL_CDROM_SUB_Q_CHANNEL 0x00 +#define IOCTL_CDROM_CURRENT_POSITION 0x01 +#define IOCTL_CDROM_MEDIA_CATALOG 0x02 +#define IOCTL_CDROM_TRACK_ISRC 0x03 + +typedef struct _CDROM_SUB_Q_DATA_FORMAT { + UCHAR Format; + UCHAR Track; +} CDROM_SUB_Q_DATA_FORMAT, *PCDROM_SUB_Q_DATA_FORMAT; + +typedef struct _CDROM_TOC { + UCHAR Length[2]; + UCHAR FirstTrack; + UCHAR LastTrack; + TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS]; +} CDROM_TOC, *PCDROM_TOC; + +#define CDROM_TOC_SIZE sizeof(CDROM_TOC) + +typedef struct _CDROM_TOC_ATIP_DATA_BLOCK { + UCHAR CdrwReferenceSpeed : 3; + UCHAR Reserved3 : 1; + UCHAR WritePower : 3; + UCHAR True1 : 1; + UCHAR Reserved4 : 6; + UCHAR UnrestrictedUse : 1; + UCHAR Reserved5 : 1; + UCHAR A3Valid : 1; + UCHAR A2Valid : 1; + UCHAR A1Valid : 1; + UCHAR Reserved6 : 3; + UCHAR IsCdrw : 1; + UCHAR True2 : 1; + UCHAR Reserved7; + UCHAR LeadInMsf[3]; + UCHAR Reserved8; + UCHAR LeadOutMsf[3]; + UCHAR Reserved9; + UCHAR A1Values[3]; + UCHAR Reserved10; + UCHAR A2Values[3]; + UCHAR Reserved11; + UCHAR A3Values[3]; + UCHAR Reserved12; +} CDROM_TOC_ATIP_DATA_BLOCK, *PCDROM_TOC_ATIP_DATA_BLOCK; + +#if 0 // Added to make MSVC happy. +typedef struct _CDROM_TOC_ATIP_DATA { + UCHAR Length[2]; + UCHAR Reserved1; + UCHAR Reserved2; + CDROM_TOC_ATIP_DATA_BLOCK Descriptors[0]; + CDROM_TOC_ATIP_DATA_BLOCK Descriptors[1]; +} CDROM_TOC_ATIP_DATA, *PCDROM_TOC_ATIP_DATA; +#endif + +/* CDROM_TOC_CD_TEXT_DATA_BLOCK.PackType constants */ +#define CDROM_CD_TEXT_PACK_ALBUM_NAME 0x80 +#define CDROM_CD_TEXT_PACK_PERFORMER 0x81 +#define CDROM_CD_TEXT_PACK_SONGWRITER 0x82 +#define CDROM_CD_TEXT_PACK_COMPOSER 0x83 +#define CDROM_CD_TEXT_PACK_ARRANGER 0x84 +#define CDROM_CD_TEXT_PACK_MESSAGES 0x85 +#define CDROM_CD_TEXT_PACK_DISC_ID 0x86 +#define CDROM_CD_TEXT_PACK_GENRE 0x87 +#define CDROM_CD_TEXT_PACK_TOC_INFO 0x88 +#define CDROM_CD_TEXT_PACK_TOC_INFO2 0x89 +#define CDROM_CD_TEXT_PACK_UPC_EAN 0x8e +#define CDROM_CD_TEXT_PACK_SIZE_INFO 0x8f + +#if 0 // Added to make MSVC happy. +typedef struct _CDROM_TOC_CD_TEXT_DATA_BLOCK { + UCHAR PackType; + UCHAR TrackNumber : 7; + UCHAR ExtensionFlag : 1; + UCHAR SequenceNumber; + UCHAR CharacterPosition : 4; + UCHAR BlockNumber : 3; + UCHAR Unicode : 1; + _ANONYMOUS_UNION union { + UCHAR Text[12]; + WCHAR WText[6]; + } DUMMYUNIONNAME; + UCHAR CRC[2]; +} CDROM_TOC_CD_TEXT_DATA_BLOCK, *PCDROM_TOC_CD_TEXT_DATA_BLOCK; + +typedef struct _CDROM_TOC_CD_TEXT_DATA { + UCHAR Length[2]; + UCHAR Reserved1; + UCHAR Reserved2; + CDROM_TOC_CD_TEXT_DATA_BLOCK Descriptors[0]; +} CDROM_TOC_CD_TEXT_DATA, *PCDROM_TOC_CD_TEXT_DATA; +#endif + +/* CDROM_TOC_FULL_TOC_DATA_BLOCK.Adr constants */ +#define ADR_NO_MODE_INFORMATION 0x0 +#define ADR_ENCODES_CURRENT_POSITION 0x1 +#define ADR_ENCODES_MEDIA_CATALOG 0x2 +#define ADR_ENCODES_ISRC 0x3 + +typedef struct _CDROM_TOC_FULL_TOC_DATA_BLOCK { + UCHAR SessionNumber; + UCHAR Control : 4; + UCHAR Adr : 4; + UCHAR Reserved1; + UCHAR Point; + UCHAR MsfExtra[3]; + UCHAR Zero; + UCHAR Msf[3]; +} CDROM_TOC_FULL_TOC_DATA_BLOCK, *PCDROM_TOC_FULL_TOC_DATA_BLOCK; + +#if 0 // Added to make MSVC happy. +typedef struct _CDROM_TOC_FULL_TOC_DATA { + UCHAR Length[2]; + UCHAR FirstCompleteSession; + UCHAR LastCompleteSession; + CDROM_TOC_FULL_TOC_DATA_BLOCK Descriptors[0]; +} CDROM_TOC_FULL_TOC_DATA, *PCDROM_TOC_FULL_TOC_DATA; + +typedef struct _CDROM_TOC_PMA_DATA { + UCHAR Length[2]; + UCHAR Reserved1; + UCHAR Reserved2; + CDROM_TOC_FULL_TOC_DATA_BLOCK Descriptors[0]; +} CDROM_TOC_PMA_DATA, *PCDROM_TOC_PMA_DATA; +#endif + +/* SUB_Q_HEADER.AudioStatus constants */ +#define AUDIO_STATUS_NOT_SUPPORTED 0x00 +#define AUDIO_STATUS_IN_PROGRESS 0x11 +#define AUDIO_STATUS_PAUSED 0x12 +#define AUDIO_STATUS_PLAY_COMPLETE 0x13 +#define AUDIO_STATUS_PLAY_ERROR 0x14 +#define AUDIO_STATUS_NO_STATUS 0x15 + +typedef struct _SUB_Q_HEADER { + UCHAR Reserved; + UCHAR AudioStatus; + UCHAR DataLength[2]; +} SUB_Q_HEADER, *PSUB_Q_HEADER; + +typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER { + SUB_Q_HEADER Header; + UCHAR FormatCode; + UCHAR Reserved[3]; + UCHAR Reserved1 : 7; + UCHAR Mcval :1; + UCHAR MediaCatalog[15]; +} SUB_Q_MEDIA_CATALOG_NUMBER, *PSUB_Q_MEDIA_CATALOG_NUMBER; + +typedef struct _SUB_Q_TRACK_ISRC { + SUB_Q_HEADER Header; + UCHAR FormatCode; + UCHAR Reserved0; + UCHAR Track; + UCHAR Reserved1; + UCHAR Reserved2 : 7; + UCHAR Tcval : 1; + UCHAR TrackIsrc[15]; +} SUB_Q_TRACK_ISRC, *PSUB_Q_TRACK_ISRC; + +typedef struct _SUB_Q_CURRENT_POSITION { + SUB_Q_HEADER Header; + UCHAR FormatCode; + UCHAR Control : 4; + UCHAR ADR : 4; + UCHAR TrackNumber; + UCHAR IndexNumber; + UCHAR AbsoluteAddress[4]; + UCHAR TrackRelativeAddress[4]; +} SUB_Q_CURRENT_POSITION, *PSUB_Q_CURRENT_POSITION; + +typedef union _SUB_Q_CHANNEL_DATA { + SUB_Q_CURRENT_POSITION CurrentPosition; + SUB_Q_MEDIA_CATALOG_NUMBER MediaCatalog; + SUB_Q_TRACK_ISRC TrackIsrc; +} SUB_Q_CHANNEL_DATA, *PSUB_Q_CHANNEL_DATA; + +/* CDROM_AUDIO_CONTROL.LbaFormat constants */ +#define AUDIO_WITH_PREEMPHASIS 0x1 +#define DIGITAL_COPY_PERMITTED 0x2 +#define AUDIO_DATA_TRACK 0x4 +#define TWO_FOUR_CHANNEL_AUDIO 0x8 + +typedef struct _CDROM_AUDIO_CONTROL { + UCHAR LbaFormat; + USHORT LogicalBlocksPerSecond; +} CDROM_AUDIO_CONTROL, *PCDROM_AUDIO_CONTROL; + +typedef struct _VOLUME_CONTROL { + UCHAR PortVolume[4]; +} VOLUME_CONTROL, *PVOLUME_CONTROL; + +typedef enum _TRACK_MODE_TYPE { + YellowMode2, + XAForm2, + CDDA +} TRACK_MODE_TYPE, *PTRACK_MODE_TYPE; + +typedef struct __RAW_READ_INFO { + LARGE_INTEGER DiskOffset; + ULONG SectorCount; + TRACK_MODE_TYPE TrackMode; +} RAW_READ_INFO, *PRAW_READ_INFO; + +#ifdef __cplusplus +} +#endif + +#endif /* __NTDDCDRM_H */ diff --git a/backends/audiocd/win32/win32-audiocd.cpp b/backends/audiocd/win32/win32-audiocd.cpp new file mode 100644 index 0000000000..6c057efdb7 --- /dev/null +++ b/backends/audiocd/win32/win32-audiocd.cpp @@ -0,0 +1,388 @@ +/* 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. + * + * Original license header: + * + * Cabal - Legacy Game Implementations + * + * Cabal 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. + * + */ + +#ifdef WIN32 + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#undef ARRAYSIZE // winnt.h defines ARRAYSIZE, but we want our own one... + +#include "backends/audiocd/win32/win32-audiocd.h" + +#include "audio/audiostream.h" +#include "backends/audiocd/audiocd-stream.h" +#include "backends/audiocd/default/default-audiocd.h" +#include "common/array.h" +#include "common/config-manager.h" +#include "common/debug.h" +#include "common/mutex.h" +#include "common/queue.h" +#include "common/str.h" +#include "common/timer.h" + +#include <winioctl.h> +#if _MSC_VER < 1900 +// WORKAROUND: Older versions of MSVC might not supply DDK headers by default. +// Visual Studio 2015 contains the required headers. We use a compatability +// header from MinGW's w32api for all older versions. +// TODO: Limit this to the Visual Studio versions which actually require this. +#include "msvc/ntddcdrm.h" +#elif defined(__MINGW32__) && !defined(__MINGW64__) +// Classic MinGW uses non standard paths for DDK headers. +#include <ddk/ntddcdrm.h> +#else +#include <ntddcdrm.h> +#endif + +class Win32AudioCDStream : public AudioCDStream { +public: + Win32AudioCDStream(HANDLE handle, const TRACK_DATA &startEntry, const TRACK_DATA &endEntry); + ~Win32AudioCDStream(); + +protected: + uint getStartFrame() const; + uint getEndFrame() const; + bool readFrame(int frame, int16 *buffer); + +private: + HANDLE _driveHandle; + const TRACK_DATA &_startEntry, &_endEntry; + + enum { + // The CD-ROM pre-gap is 2s + kPreGapFrames = kFramesPerSecond * 2 + }; + + static int getFrameCount(const TRACK_DATA &data) { + int time = data.Address[1]; + time *= kSecondsPerMinute; + time += data.Address[2]; + time *= kFramesPerSecond; + time += data.Address[3]; + return time; + } +}; + +Win32AudioCDStream::Win32AudioCDStream(HANDLE handle, const TRACK_DATA &startEntry, const TRACK_DATA &endEntry) : + _driveHandle(handle), _startEntry(startEntry), _endEntry(endEntry) { + // We fill the buffer here already to prevent any out of sync issues due + // to the CD not yet having spun up. + startTimer(true); +} + +Win32AudioCDStream::~Win32AudioCDStream() { + stopTimer(); +} + +uint Win32AudioCDStream::getStartFrame() const { + return getFrameCount(_startEntry); +} + +uint Win32AudioCDStream::getEndFrame() const { + return getFrameCount(_endEntry); +} + +bool Win32AudioCDStream::readFrame(int frame, int16 *buffer) { + // Request to read that frame + RAW_READ_INFO readAudio; + memset(&readAudio, 0, sizeof(readAudio)); + readAudio.DiskOffset.QuadPart = (frame - kPreGapFrames) * 2048; + readAudio.SectorCount = 1; + readAudio.TrackMode = CDDA; + + DWORD bytesReturned; + return DeviceIoControl( + _driveHandle, + IOCTL_CDROM_RAW_READ, + &readAudio, + sizeof(readAudio), + buffer, + kBytesPerFrame, + &bytesReturned, + NULL); +} + + +class Win32AudioCDManager : public DefaultAudioCDManager { +public: + Win32AudioCDManager(); + ~Win32AudioCDManager(); + + bool open(); + void close(); + bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false); + +protected: + bool openCD(int drive); + bool openCD(const Common::String &drive); + +private: + bool loadTOC(); + + typedef Common::Array<char> DriveList; + DriveList detectDrives(); + bool tryAddDrive(char drive, DriveList &drives); + + HANDLE _driveHandle; + int _firstTrack, _lastTrack; + Common::Array<TRACK_DATA> _tocEntries; +}; + +Win32AudioCDManager::Win32AudioCDManager() { + _driveHandle = INVALID_HANDLE_VALUE; + _firstTrack = _lastTrack = 0; +} + +Win32AudioCDManager::~Win32AudioCDManager() { + close(); +} + +bool Win32AudioCDManager::open() { + close(); + + if (openRealCD()) + return true; + + return DefaultAudioCDManager::open(); +} + +bool Win32AudioCDManager::openCD(int drive) { + // Fetch the drive list + DriveList drives = detectDrives(); + if (drive >= (int)drives.size()) + return false; + + debug(1, "Opening CD drive %c:\\", drives[drive]); + + // Construct the drive path and try to open it + Common::String drivePath = Common::String::format("\\\\.\\%c:", drives[drive]); + _driveHandle = CreateFileA(drivePath.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); + if (_driveHandle == INVALID_HANDLE_VALUE) { + warning("Failed to open drive %c:\\, error %d", drives[drive], (int)GetLastError()); + return false; + } + + if (!loadTOC()) { + close(); + return false; + } + + return true; +} + +bool Win32AudioCDManager::openCD(const Common::String &drive) { + // Just some bounds checking + if (drive.empty() || drive.size() > 3) + return false; + + if (!Common::isAlpha(drive[0]) || drive[1] != ':') + return false; + + if (drive[2] != 0 && drive[2] != '\\') + return false; + + DriveList drives; + if (!tryAddDrive(toupper(drive[0]), drives)) + return false; + + // Construct the drive path and try to open it + Common::String drivePath = Common::String::format("\\\\.\\%c:", drives[0]); + _driveHandle = CreateFileA(drivePath.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); + if (_driveHandle == INVALID_HANDLE_VALUE) { + warning("Failed to open drive %c:\\, error %d", drives[0], (int)GetLastError()); + return false; + } + + if (!loadTOC()) { + close(); + return false; + } + + return true; +} + +void Win32AudioCDManager::close() { + DefaultAudioCDManager::close(); + + if (_driveHandle != INVALID_HANDLE_VALUE) { + CloseHandle(_driveHandle); + _driveHandle = INVALID_HANDLE_VALUE; + } + + _firstTrack = _lastTrack = 0; + _tocEntries.clear(); +} + +bool Win32AudioCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) { + // Prefer emulation + if (DefaultAudioCDManager::play(track, numLoops, startFrame, duration, onlyEmulate)) + return true; + + // If we're set to only emulate, or have no CD drive, return here + if (onlyEmulate || _driveHandle == INVALID_HANDLE_VALUE) + return false; + + // HACK: For now, just assume that track number is right + // That only works because ScummVM uses the wrong track number anyway + + if (track >= (int)_tocEntries.size() - 1) { + warning("No such track %d", track); + return false; + } + + // Bail if the track isn't an audio track + if ((_tocEntries[track].Control & 0x04) != 0) { + warning("Track %d is not audio", track); + return false; + } + + // Create the AudioStream and play it + debug(1, "Playing CD track %d", track); + + Audio::SeekableAudioStream *audioStream = new Win32AudioCDStream(_driveHandle, _tocEntries[track], _tocEntries[track + 1]); + + Audio::Timestamp start = Audio::Timestamp(0, startFrame, 75); + Audio::Timestamp end = (duration == 0) ? audioStream->getLength() : Audio::Timestamp(0, startFrame + duration, 75); + + // Fake emulation since we're really playing an AudioStream + _emulating = true; + + _mixer->playStream( + Audio::Mixer::kMusicSoundType, + &_handle, + Audio::makeLoopingAudioStream(audioStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), + -1, + _cd.volume, + _cd.balance, + DisposeAfterUse::YES, + true); + return true; +} + +bool Win32AudioCDManager::loadTOC() { + CDROM_READ_TOC_EX tocRequest; + memset(&tocRequest, 0, sizeof(tocRequest)); + tocRequest.Format = CDROM_READ_TOC_EX_FORMAT_TOC; + tocRequest.Msf = 1; + tocRequest.SessionTrack = 0; + + DWORD bytesReturned; + CDROM_TOC tocData; + bool result = DeviceIoControl( + _driveHandle, + IOCTL_CDROM_READ_TOC_EX, + &tocRequest, + sizeof(tocRequest), + &tocData, + sizeof(tocData), + &bytesReturned, + NULL); + if (!result) { + debug("Failed to query the CD TOC: %d", (int)GetLastError()); + return false; + } + + _firstTrack = tocData.FirstTrack; + _lastTrack = tocData.LastTrack; +#if 0 + debug("First Track: %d", tocData.FirstTrack); + debug("Last Track: %d", tocData.LastTrack); +#endif + + for (uint32 i = 0; i < (bytesReturned - 4) / sizeof(TRACK_DATA); i++) + _tocEntries.push_back(tocData.TrackData[i]); + +#if 0 + for (uint32 i = 0; i < _tocEntries.size(); i++) { + const TRACK_DATA &entry = _tocEntries[i]; + debug("Entry:"); + debug("\tTrack: %d", entry.TrackNumber); + debug("\tAdr: %d", entry.Adr); + debug("\tCtrl: %d", entry.Control); + debug("\tMSF: %d:%d:%d\n", entry.Address[1], entry.Address[2], entry.Address[3]); + } +#endif + + return true; +} + +Win32AudioCDManager::DriveList Win32AudioCDManager::detectDrives() { + DriveList drives; + + // Try to get the game path's drive + char gameDrive = 0; + if (ConfMan.hasKey("path")) { + Common::String gamePath = ConfMan.get("path"); + char fullPath[MAX_PATH]; + DWORD result = GetFullPathNameA(gamePath.c_str(), sizeof(fullPath), fullPath, 0); + + if (result > 0 && result < sizeof(fullPath) && Common::isAlpha(fullPath[0]) && fullPath[1] == ':' && tryAddDrive(toupper(fullPath[0]), drives)) + gameDrive = drives[0]; + } + + // Try adding the rest of the drives + for (char drive = 'A'; drive <= 'Z'; drive++) + if (drive != gameDrive) + tryAddDrive(drive, drives); + + return drives; +} + +bool Win32AudioCDManager::tryAddDrive(char drive, DriveList &drives) { + Common::String drivePath = Common::String::format("%c:\\", drive); + + // Ensure it's an actual CD drive + if (GetDriveTypeA(drivePath.c_str()) != DRIVE_CDROM) + return false; + + debug(2, "Detected drive %c:\\ as a CD drive", drive); + drives.push_back(drive); + return true; +} + +AudioCDManager *createWin32AudioCDManager() { + return new Win32AudioCDManager(); +} + +#endif // WIN32
\ No newline at end of file diff --git a/backends/audiocd/win32/win32-audiocd.h b/backends/audiocd/win32/win32-audiocd.h new file mode 100644 index 0000000000..0c103641ef --- /dev/null +++ b/backends/audiocd/win32/win32-audiocd.h @@ -0,0 +1,60 @@ +/* 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. + * + * Original license header: + * + * Cabal - Legacy Game Implementations + * + * Cabal 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 BACKENDS_AUDIOCD_WIN32_H +#define BACKENDS_AUDIOCD_WIN32_H + +#ifdef WIN32 + +class AudioCDManager; + +/** + * Create an AudioCDManager using the Win32 API + */ +AudioCDManager *createWin32AudioCDManager(); + +#endif + +#endif + diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp index 0b9cc0c7e8..7a248f1859 100644 --- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp +++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp @@ -35,6 +35,10 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = { {0, 0, 0} }; +#ifndef USE_SCALERS +#define DownscaleAllByHalf 0 +#endif + DINGUXSdlGraphicsManager::DINGUXSdlGraphicsManager(SdlEventSource *boss, SdlWindow *window) : SurfaceSdlGraphicsManager(boss, window) { } @@ -61,9 +65,11 @@ bool DINGUXSdlGraphicsManager::setGraphicsMode(int mode) { case GFX_NORMAL: newScaleFactor = 1; break; +#ifdef USE_SCALERS case GFX_HALF: newScaleFactor = 1; break; +#endif default: warning("unknown gfx mode %d", mode); return false; @@ -89,9 +95,11 @@ void DINGUXSdlGraphicsManager::setGraphicsModeIntern() { case GFX_NORMAL: newScalerProc = Normal1x; break; +#ifdef USE_SCALERS case GFX_HALF: newScalerProc = DownscaleAllByHalf; break; +#endif default: error("Unknown gfx mode %d", _videoMode.mode); diff --git a/backends/graphics/opengl/context.cpp b/backends/graphics/opengl/context.cpp new file mode 100644 index 0000000000..a7f640d37e --- /dev/null +++ b/backends/graphics/opengl/context.cpp @@ -0,0 +1,182 @@ +/* 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 "backends/graphics/opengl/opengl-sys.h" +#include "backends/graphics/opengl/opengl-graphics.h" +#include "backends/graphics/opengl/shader.h" +#include "backends/graphics/opengl/pipelines/pipeline.h" +#include "backends/graphics/opengl/framebuffer.h" + +#include "common/tokenizer.h" +#include "common/debug.h" + +namespace OpenGL { + +void Context::reset() { + maxTextureSize = 0; + + NPOTSupported = false; + shadersSupported = false; + multitextureSupported = false; + framebufferObjectSupported = false; + +#define GL_FUNC_DEF(ret, name, param) name = nullptr; +#include "backends/graphics/opengl/opengl-func.h" +#undef GL_FUNC_DEF + + activePipeline = nullptr; +} + +Pipeline *Context::setPipeline(Pipeline *pipeline) { + Pipeline *oldPipeline = activePipeline; + if (oldPipeline) { + oldPipeline->deactivate(); + } + + activePipeline = pipeline; + if (activePipeline) { + activePipeline->activate(); + } + + return oldPipeline; +} + +Context g_context; + +void OpenGLGraphicsManager::setContextType(ContextType type) { +#if USE_FORCED_GL + type = kContextGL; +#elif USE_FORCED_GLES + type = kContextGLES; +#elif USE_FORCED_GLES2 + type = kContextGLES2; +#endif + + g_context.type = type; +} + +void OpenGLGraphicsManager::initializeGLContext() { + // Initialize default state. + g_context.reset(); + + // Load all functions. + // We use horrible trickery to silence C++ compilers. + // See backends/plugins/sdl/sdl-provider.cpp for more information. + assert(sizeof(void (*)()) == sizeof(void *)); + void *fn = nullptr; + +#define LOAD_FUNC(name, loadName) \ + fn = getProcAddress(#loadName); \ + memcpy(&g_context.name, &fn, sizeof(fn)) + +#define GL_EXT_FUNC_DEF(ret, name, param) LOAD_FUNC(name, name) + +#ifdef USE_BUILTIN_OPENGL +#define GL_FUNC_DEF(ret, name, param) g_context.name = &name +#define GL_FUNC_2_DEF GL_FUNC_DEF +#else +#define GL_FUNC_DEF GL_EXT_FUNC_DEF +#define GL_FUNC_2_DEF(ret, name, extName, param) \ + if (g_context.type == kContextGL) { \ + LOAD_FUNC(name, extName); \ + } else { \ + LOAD_FUNC(name, name); \ + } +#endif +#include "backends/graphics/opengl/opengl-func.h" +#undef GL_FUNC_2_DEF +#undef GL_FUNC_DEF +#undef GL_EXT_FUNC_DEF +#undef LOAD_FUNC + + // Obtain maximum texture size. + GL_CALL(glGetIntegerv(GL_MAX_TEXTURE_SIZE, &g_context.maxTextureSize)); + debug(5, "OpenGL maximum texture size: %d", g_context.maxTextureSize); + + const char *extString = (const char *)g_context.glGetString(GL_EXTENSIONS); + debug(5, "OpenGL extensions: %s", extString); + + bool ARBShaderObjects = false; + bool ARBShadingLanguage100 = false; + bool ARBVertexShader = false; + bool ARBFragmentShader = false; + + Common::StringTokenizer tokenizer(extString, " "); + while (!tokenizer.empty()) { + Common::String token = tokenizer.nextToken(); + + if (token == "GL_ARB_texture_non_power_of_two" || token == "GL_OES_texture_npot") { + g_context.NPOTSupported = true; + } else if (token == "GL_ARB_shader_objects") { + ARBShaderObjects = true; + } else if (token == "GL_ARB_shading_language_100") { + ARBShadingLanguage100 = true; + } else if (token == "GL_ARB_vertex_shader") { + ARBVertexShader = true; + } else if (token == "GL_ARB_fragment_shader") { + ARBFragmentShader = true; + } else if (token == "GL_ARB_multitexture") { + g_context.multitextureSupported = true; + } else if (token == "GL_EXT_framebuffer_object") { + g_context.framebufferObjectSupported = true; + } + } + + if (g_context.type == kContextGLES2) { + // GLES2 always has (limited) NPOT support. + g_context.NPOTSupported = true; + + // GLES2 always has shader support. + g_context.shadersSupported = true; + + // GLES2 always has multi texture support. + g_context.multitextureSupported = true; + + // GLES2 always has FBO support. + g_context.framebufferObjectSupported = true; + } else { + g_context.shadersSupported = ARBShaderObjects & ARBShadingLanguage100 & ARBVertexShader & ARBFragmentShader; + } + + // Log context type. + switch (g_context.type) { + case kContextGL: + debug(5, "OpenGL: GL context initialized"); + break; + + case kContextGLES: + debug(5, "OpenGL: GLES context initialized"); + break; + + case kContextGLES2: + debug(5, "OpenGL: GLES2 context initialized"); + break; + } + + // Log features supported by GL context. + debug(5, "OpenGL: NPOT texture support: %d", g_context.NPOTSupported); + debug(5, "OpenGL: Shader support: %d", g_context.shadersSupported); + debug(5, "OpenGL: Multitexture support: %d", g_context.multitextureSupported); + debug(5, "OpenGL: FBO support: %d", g_context.framebufferObjectSupported); +} + +} // End of namespace OpenGL diff --git a/backends/graphics/opengl/debug.cpp b/backends/graphics/opengl/debug.cpp index d5d73fb5ec..c4319f5e36 100644 --- a/backends/graphics/opengl/debug.cpp +++ b/backends/graphics/opengl/debug.cpp @@ -54,7 +54,7 @@ Common::String getGLErrStr(GLenum error) { void checkGLError(const char *expr, const char *file, int line) { GLenum error; - while ((error = glGetError()) != GL_NO_ERROR) { + while ((error = g_context.glGetError()) != GL_NO_ERROR) { // We cannot use error here because we do not know whether we have a // working screen or not. warning("GL ERROR: %s on %s (%s:%d)", getGLErrStr(error).c_str(), expr, file, line); diff --git a/backends/graphics/opengl/debug.h b/backends/graphics/opengl/debug.h index ff6b678870..abaa6544dc 100644 --- a/backends/graphics/opengl/debug.h +++ b/backends/graphics/opengl/debug.h @@ -31,9 +31,9 @@ namespace OpenGL { void checkGLError(const char *expr, const char *file, int line); } // End of namespace OpenGL -#define GLCALL(x) do { (x); OpenGL::checkGLError(#x, __FILE__, __LINE__); } while (false) +#define GL_WRAP_DEBUG(call, name) do { (call); OpenGL::checkGLError(#name, __FILE__, __LINE__); } while (false) #else -#define GLCALL(x) do { (x); } while (false) +#define GL_WRAP_DEBUG(call, name) do { (call); } while (false) #endif #endif diff --git a/backends/graphics/opengl/framebuffer.cpp b/backends/graphics/opengl/framebuffer.cpp new file mode 100644 index 0000000000..7191aab8bc --- /dev/null +++ b/backends/graphics/opengl/framebuffer.cpp @@ -0,0 +1,259 @@ +/* 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 "backends/graphics/opengl/framebuffer.h" +#include "backends/graphics/opengl/texture.h" +#include "backends/graphics/opengl/pipelines/pipeline.h" + +namespace OpenGL { + +Framebuffer::Framebuffer() + : _viewport(), _projectionMatrix(), _isActive(false), _clearColor(), + _blendState(false), _scissorTestState(false), _scissorBox() { +} + +void Framebuffer::activate() { + _isActive = true; + + applyViewport(); + applyProjectionMatrix(); + applyClearColor(); + applyBlendState(); + applyScissorTestState(); + applyScissorBox(); + + activateInternal(); +} + +void Framebuffer::deactivate() { + _isActive = false; + + deactivateInternal(); +} + +void Framebuffer::setClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) { + _clearColor[0] = r; + _clearColor[1] = g; + _clearColor[2] = b; + _clearColor[3] = a; + + // Directly apply changes when we are active. + if (isActive()) { + applyClearColor(); + } +} + +void Framebuffer::enableBlend(bool enable) { + _blendState = enable; + + // Directly apply changes when we are active. + if (isActive()) { + applyBlendState(); + } +} + +void Framebuffer::enableScissorTest(bool enable) { + _scissorTestState = enable; + + // Directly apply changes when we are active. + if (isActive()) { + applyScissorTestState(); + } +} + +void Framebuffer::setScissorBox(GLint x, GLint y, GLsizei w, GLsizei h) { + _scissorBox[0] = x; + _scissorBox[1] = y; + _scissorBox[2] = w; + _scissorBox[3] = h; + + // Directly apply changes when we are active. + if (isActive()) { + applyScissorBox(); + } +} + +void Framebuffer::applyViewport() { + GL_CALL(glViewport(_viewport[0], _viewport[1], _viewport[2], _viewport[3])); +} + +void Framebuffer::applyProjectionMatrix() { + g_context.getActivePipeline()->setProjectionMatrix(_projectionMatrix); +} + +void Framebuffer::applyClearColor() { + GL_CALL(glClearColor(_clearColor[0], _clearColor[1], _clearColor[2], _clearColor[3])); +} + +void Framebuffer::applyBlendState() { + if (_blendState) { + GL_CALL(glEnable(GL_BLEND)); + } else { + GL_CALL(glDisable(GL_BLEND)); + } +} + +void Framebuffer::applyScissorTestState() { + if (_scissorTestState) { + GL_CALL(glEnable(GL_SCISSOR_TEST)); + } else { + GL_CALL(glDisable(GL_SCISSOR_TEST)); + } +} + +void Framebuffer::applyScissorBox() { + GL_CALL(glScissor(_scissorBox[0], _scissorBox[1], _scissorBox[2], _scissorBox[3])); +} + +// +// Backbuffer implementation +// + +void Backbuffer::activateInternal() { +#if !USE_FORCED_GLES + if (g_context.framebufferObjectSupported) { + GL_CALL(glBindFramebuffer(GL_FRAMEBUFFER, 0)); + } +#endif +} + +void Backbuffer::setDimensions(uint width, uint height) { + // Set viewport dimensions. + _viewport[0] = 0; + _viewport[1] = 0; + _viewport[2] = width; + _viewport[3] = height; + + // Setup orthogonal projection matrix. + _projectionMatrix[ 0] = 2.0f / width; + _projectionMatrix[ 1] = 0.0f; + _projectionMatrix[ 2] = 0.0f; + _projectionMatrix[ 3] = 0.0f; + + _projectionMatrix[ 4] = 0.0f; + _projectionMatrix[ 5] = -2.0f / height; + _projectionMatrix[ 6] = 0.0f; + _projectionMatrix[ 7] = 0.0f; + + _projectionMatrix[ 8] = 0.0f; + _projectionMatrix[ 9] = 0.0f; + _projectionMatrix[10] = 0.0f; + _projectionMatrix[11] = 0.0f; + + _projectionMatrix[12] = -1.0f; + _projectionMatrix[13] = 1.0f; + _projectionMatrix[14] = 0.0f; + _projectionMatrix[15] = 1.0f; + + // Directly apply changes when we are active. + if (isActive()) { + applyViewport(); + applyProjectionMatrix(); + } +} + +// +// Render to texture target implementation +// + +#if !USE_FORCED_GLES +TextureTarget::TextureTarget() + : _texture(new GLTexture(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE)), _glFBO(0), _needUpdate(true) { +} + +TextureTarget::~TextureTarget() { + delete _texture; + GL_CALL_SAFE(glDeleteFramebuffers, (1, &_glFBO)); +} + +void TextureTarget::activateInternal() { + // Allocate framebuffer object if necessary. + if (!_glFBO) { + GL_CALL(glGenFramebuffers(1, &_glFBO)); + _needUpdate = true; + } + + // Attach destination texture to FBO. + GL_CALL(glBindFramebuffer(GL_FRAMEBUFFER, _glFBO)); + + // If required attach texture to FBO. + if (_needUpdate) { + GL_CALL(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture->getGLTexture(), 0)); + _needUpdate = false; + } +} + +void TextureTarget::destroy() { + GL_CALL(glDeleteFramebuffers(1, &_glFBO)); + _glFBO = 0; + + _texture->destroy(); +} + +void TextureTarget::create() { + _texture->create(); + + _needUpdate = true; +} + +void TextureTarget::setSize(uint width, uint height) { + _texture->setSize(width, height); + + const uint texWidth = _texture->getWidth(); + const uint texHeight = _texture->getHeight(); + + // Set viewport dimensions. + _viewport[0] = 0; + _viewport[1] = 0; + _viewport[2] = texWidth; + _viewport[3] = texHeight; + + // Setup orthogonal projection matrix. + _projectionMatrix[ 0] = 2.0f / texWidth; + _projectionMatrix[ 1] = 0.0f; + _projectionMatrix[ 2] = 0.0f; + _projectionMatrix[ 3] = 0.0f; + + _projectionMatrix[ 4] = 0.0f; + _projectionMatrix[ 5] = 2.0f / texHeight; + _projectionMatrix[ 6] = 0.0f; + _projectionMatrix[ 7] = 0.0f; + + _projectionMatrix[ 8] = 0.0f; + _projectionMatrix[ 9] = 0.0f; + _projectionMatrix[10] = 0.0f; + _projectionMatrix[11] = 0.0f; + + _projectionMatrix[12] = -1.0f; + _projectionMatrix[13] = -1.0f; + _projectionMatrix[14] = 0.0f; + _projectionMatrix[15] = 1.0f; + + // Directly apply changes when we are active. + if (isActive()) { + applyViewport(); + applyProjectionMatrix(); + } +} +#endif // !USE_FORCED_GLES + +} // End of namespace OpenGL diff --git a/backends/graphics/opengl/framebuffer.h b/backends/graphics/opengl/framebuffer.h new file mode 100644 index 0000000000..c44c98ddc4 --- /dev/null +++ b/backends/graphics/opengl/framebuffer.h @@ -0,0 +1,175 @@ +/* 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 BACKENDS_GRAPHICS_OPENGL_FRAMEBUFFER_H +#define BACKENDS_GRAPHICS_OPENGL_FRAMEBUFFER_H + +#include "backends/graphics/opengl/opengl-sys.h" + +namespace OpenGL { + +/** + * Object describing a framebuffer OpenGL can render to. + */ +class Framebuffer { + friend class Pipeline; +public: + Framebuffer(); + virtual ~Framebuffer() {}; + +public: + /** + * Set the clear color of the framebuffer. + */ + void setClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a); + + /** + * Enable/disable GL_BLEND. + */ + void enableBlend(bool enable); + + /** + * Enable/disable GL_SCISSOR_TEST. + */ + void enableScissorTest(bool enable); + + /** + * Set scissor box dimensions. + */ + void setScissorBox(GLint x, GLint y, GLsizei w, GLsizei h); + + /** + * Obtain projection matrix of the framebuffer. + */ + const GLfloat *getProjectionMatrix() const { return _projectionMatrix; } +protected: + bool isActive() const { return _isActive; } + + GLint _viewport[4]; + void applyViewport(); + + GLfloat _projectionMatrix[4*4]; + void applyProjectionMatrix(); + + /** + * Activate framebuffer. + * + * This is supposed to set all state associated with the framebuffer. + */ + virtual void activateInternal() = 0; + + /** + * Deactivate framebuffer. + * + * This is supposed to make any cleanup required when unbinding the + * framebuffer. + */ + virtual void deactivateInternal() {} + +private: + /** + * Accessor to activate framebuffer for pipeline. + */ + void activate(); + + /** + * Accessor to deactivate framebuffer from pipeline. + */ + void deactivate(); + +private: + bool _isActive; + + GLfloat _clearColor[4]; + void applyClearColor(); + + bool _blendState; + void applyBlendState(); + + bool _scissorTestState; + void applyScissorTestState(); + + GLint _scissorBox[4]; + void applyScissorBox(); +}; + +/** + * Default back buffer implementation. + */ +class Backbuffer : public Framebuffer { +public: + /** + * Set the dimensions (a.k.a. size) of the back buffer. + */ + void setDimensions(uint width, uint height); + +protected: + virtual void activateInternal(); +}; + +#if !USE_FORCED_GLES +class GLTexture; + +/** + * Render to texture framebuffer implementation. + * + * This target allows to render to a texture, which can then be used for + * further rendering. + */ +class TextureTarget : public Framebuffer { +public: + TextureTarget(); + virtual ~TextureTarget(); + + /** + * Notify that the GL context is about to be destroyed. + */ + void destroy(); + + /** + * Notify that the GL context has been created. + */ + void create(); + + /** + * Set size of the texture target. + */ + void setSize(uint width, uint height); + + /** + * Query pointer to underlying GL texture. + */ + GLTexture *getTexture() const { return _texture; } + +protected: + virtual void activateInternal(); + +private: + GLTexture *_texture; + GLuint _glFBO; + bool _needUpdate; +}; +#endif + +} // End of namespace OpenGL + +#endif diff --git a/backends/graphics/opengl/opengl-defs.h b/backends/graphics/opengl/opengl-defs.h new file mode 100644 index 0000000000..733fc2933c --- /dev/null +++ b/backends/graphics/opengl/opengl-defs.h @@ -0,0 +1,262 @@ +/* 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. + * + */ + +/* This file is based on Mesa 3-D's gl.h and GLES/gl.h from Khronos Registry. + * + * Mesa 3-D's gl.h file is distributed under the following license: + * Mesa 3-D graphics library + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * + * GLES/gl.h from Khronos Registry is distributed under the following license: + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +#ifndef BACKENDS_GRAPHICS_OPENGL_OPENGL_DEFS_H +#define BACKENDS_GRAPHICS_OPENGL_OPENGL_DEFS_H + +#include "common/scummsys.h" + +/* + * Datatypes + */ +typedef uint GLenum; +typedef uint8 GLboolean; +typedef uint GLbitfield; +typedef void GLvoid; +typedef int8 GLbyte; /* 1-byte signed */ +typedef int16 GLshort; /* 2-byte signed */ +typedef int32 GLint; /* 4-byte signed */ +typedef uint8 GLubyte; /* 1-byte unsigned */ +typedef uint16 GLushort; /* 2-byte unsigned */ +typedef uint32 GLuint; /* 4-byte unsigned */ +typedef int32 GLsizei; /* 4-byte signed */ +typedef float GLfloat; /* single precision float */ +typedef float GLclampf; /* single precision float in [0,1] */ +typedef double GLdouble; /* double precision float */ +typedef double GLclampd; /* double precision float in [0,1] */ +typedef char GLchar; +#if defined(MACOSX) +typedef void *GLhandleARB; +#else +typedef uint GLhandleARB; +#endif + +// This is an addition from us to alias ARB shader object extensions to +// OpenGL (ES) 2.0 style functions. It only works when GLhandleARB and GLuint +// are type compatible. +typedef GLhandleARB GLprogram; +typedef GLhandleARB GLshader; + +/* + * Constants + */ + +/* Boolean constants */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Scissor box */ +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 + +/* MatrixMode */ +#define GL_MATRIX_MODE 0x0BA0 +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 + +/* EnableCap */ +#define GL_FOG 0x0B60 +#define GL_LIGHTING 0x0B50 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_ALPHA_TEST 0x0BC0 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_DEPTH_TEST 0x0B71 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_COLOR_ARRAY 0x8076 +#define GL_TEXTURE_COORD_ARRAY 0x8078 + +/* ShadingModel */ +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_FOG_HINT 0x0C54 +#define GL_GENERATE_MIPMAP_HINT 0x8192 + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 + +/* BlendingFactorSrc */ +/* GL_ZERO */ +/* GL_ONE */ +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + +/* PixelFormat */ +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 + +#define GL_RED 0x1903 +#define GL_R8 0x8229 + +/* PixelStoreParameter */ +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C + +/* PixelType */ +/* GL_UNSIGNED_BYTE */ +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 + +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 + +/* Implementation limits */ +#define GL_MAX_TEXTURE_SIZE 0x0D33 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* Shaders */ +#define GL_FRAGMENT_SHADER 0x8B30 + +#define GL_VERTEX_SHADER 0x8B31 + +/* Programs */ +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_CURRENT_PROGRAM 0x8B8D + +/* Textures */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 + +/* GetPName */ +#define GL_VIEWPORT 0x0BA2 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 + +/* Framebuffer objects */ +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_FRAMEBUFFER 0x8D40 + +#endif diff --git a/backends/graphics/opengl/opengl-func.h b/backends/graphics/opengl/opengl-func.h new file mode 100644 index 0000000000..4e44c13d0f --- /dev/null +++ b/backends/graphics/opengl/opengl-func.h @@ -0,0 +1,153 @@ +/* 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. + * + */ + +/* This file is based on Mesa 3-D's gl.h and GLES/gl.h from Khronos Registry. + * + * Mesa 3-D's gl.h file is distributed under the following license: + * Mesa 3-D graphics library + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * + * GLES/gl.h from Khronos Registry is distributed under the following license: + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/* + * This file is a template file to be used inside specific locations in the + * OpenGL graphics code. It is not to be included otherwise. It intentionally + * does not contain include guards because it can be required to include it + * multiple times in a source file. + * + * Functions are defined by three different user supplied macros: + * GL_FUNC_DEF: Define a (builtin) OpenGL (ES) function. + * GL_FUNC_2_DEF: Define a OpenGL (ES) 2.0 function which can be provided by + * extensions in OpenGL 1.x contexts. + * GL_EXT_FUNC_DEF: Define an OpenGL (ES) extension function. + */ + +#if !defined(GL_FUNC_2_DEF) +#define GL_FUNC_2_DEF(ret, name, extName, param) GL_FUNC_DEF(ret, name, param) +#define DEFINED_GL_FUNC_2_DEF +#endif + +#if !defined(GL_EXT_FUNC_DEF) +#define GL_EXT_FUNC_DEF(ret, name, param) GL_FUNC_DEF(ret, name, param) +#define DEFINED_GL_EXT_FUNC_DEF +#endif + +GL_FUNC_DEF(void, glEnable, (GLenum cap)); +GL_FUNC_DEF(void, glDisable, (GLenum cap)); +GL_FUNC_DEF(GLboolean, glIsEnabled, (GLenum cap)); +GL_FUNC_DEF(void, glClear, (GLbitfield mask)); +GL_FUNC_DEF(void, glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)); +GL_FUNC_DEF(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height)); +GL_FUNC_DEF(void, glMatrixMode, (GLenum mode)); +GL_FUNC_DEF(void, glLoadIdentity, ()); +GL_FUNC_DEF(void, glLoadMatrixf, (const GLfloat *m)); +GL_FUNC_DEF(void, glShadeModel, (GLenum mode)); +GL_FUNC_DEF(void, glHint, (GLenum target, GLenum mode)); +GL_FUNC_DEF(void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)); +GL_FUNC_DEF(void, glBlendFunc, (GLenum sfactor, GLenum dfactor)); +GL_FUNC_DEF(void, glEnableClientState, (GLenum array)); +GL_FUNC_DEF(void, glPixelStorei, (GLenum pname, GLint param)); +GL_FUNC_DEF(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height)); +GL_FUNC_DEF(void, glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)); +GL_FUNC_DEF(void, glGetIntegerv, (GLenum pname, GLint *params)); +GL_FUNC_DEF(void, glDeleteTextures, (GLsizei n, const GLuint *textures)); +GL_FUNC_DEF(void, glGenTextures, (GLsizei n, GLuint *textures)); +GL_FUNC_DEF(void, glBindTexture, (GLenum target, GLuint texture)); +GL_FUNC_DEF(void, glTexParameteri, (GLenum target, GLenum pname, GLint param)); +GL_FUNC_DEF(void, glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)); +GL_FUNC_DEF(void, glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)); +GL_FUNC_DEF(void, glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)); +GL_FUNC_DEF(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count)); +GL_FUNC_DEF(void, glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)); +GL_FUNC_DEF(const GLubyte *, glGetString, (GLenum name)); +GL_FUNC_DEF(GLenum, glGetError, ()); + +#if !USE_FORCED_GLES +GL_FUNC_2_DEF(void, glEnableVertexAttribArray, glEnableVertexAttribArrayARB, (GLuint index)); +GL_FUNC_2_DEF(void, glDisableVertexAttribArray, glDisableVertexAttribArrayARB, (GLuint index)); +GL_FUNC_2_DEF(void, glUniform1i, glUniform1iARB, (GLint location, GLint v0)); +GL_FUNC_2_DEF(void, glUniform1f, glUniform1fARB, (GLint location, GLfloat v0)); +GL_FUNC_2_DEF(void, glUniformMatrix4fv, glUniformMatrix4fvARB, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)); +GL_FUNC_2_DEF(void, glVertexAttrib4f, glVertexAttrib4fARB, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)); +GL_FUNC_2_DEF(void, glVertexAttribPointer, glVertexAttribPointerARB, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer)); + +GL_FUNC_2_DEF(GLprogram, glCreateProgram, glCreateProgramObjectARB, ()); +GL_FUNC_2_DEF(void, glDeleteProgram, glDeleteObjectARB, (GLprogram program)); +GL_FUNC_2_DEF(void, glAttachShader, glAttachObjectARB, (GLprogram program, GLshader shader)); +GL_FUNC_2_DEF(void, glDetachShader, glDetachObjectARB, (GLprogram program, GLshader shader)); +GL_FUNC_2_DEF(void, glLinkProgram, glLinkProgramARB, (GLprogram program)); +GL_FUNC_2_DEF(void, glUseProgram, glUseProgramObjectARB, (GLprogram program)); +GL_FUNC_2_DEF(void, glGetProgramiv, glGetObjectParameterivARB, (GLprogram program, GLenum pname, GLint *params)); +GL_FUNC_2_DEF(void, glGetProgramInfoLog, glGetInfoLogARB, (GLprogram program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)); +GL_FUNC_2_DEF(void, glBindAttribLocation, glBindAttribLocationARB, (GLprogram program, GLuint index, const GLchar *name)); +GL_FUNC_2_DEF(GLint, glGetAttribLocation, glGetAttribLocationARB, (GLprogram program, const GLchar *name)); +GL_FUNC_2_DEF(GLint, glGetUniformLocation, glGetUniformLocationARB, (GLprogram program, const GLchar *name)); + +GL_FUNC_2_DEF(GLshader, glCreateShader, glCreateShaderObjectARB, (GLenum type)); +GL_FUNC_2_DEF(void, glDeleteShader, glDeleteObjectARB, (GLshader shader)); +GL_FUNC_2_DEF(void, glGetShaderiv, glGetObjectParameterivARB, (GLshader shader, GLenum pname, GLint *params)); +GL_FUNC_2_DEF(void, glGetShaderInfoLog, glGetInfoLogARB, (GLshader shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)); +GL_FUNC_2_DEF(void, glShaderSource, glShaderSourceARB, (GLshader shader, GLsizei count, const GLchar *const *string, const GLint *length)); +GL_FUNC_2_DEF(void, glCompileShader, glCompileShaderARB, (GLshader shader)); + +GL_FUNC_2_DEF(void, glBindFramebuffer, glBindFramebufferEXT, (GLenum target, GLuint renderbuffer)); +GL_FUNC_2_DEF(void, glDeleteFramebuffers, glDeleteFramebuffersEXT, (GLsizei n, const GLuint *framebuffers)); +GL_FUNC_2_DEF(void, glGenFramebuffers, glGenFramebuffersEXT, (GLsizei n, GLuint *renderbuffers)); +GL_FUNC_2_DEF(void, glFramebufferTexture2D, glFramebufferTexture2DEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)); +GL_FUNC_2_DEF(GLenum, glCheckFramebufferStatus, glCheckFramebufferStatusEXT, (GLenum target)); + +GL_FUNC_2_DEF(void, glActiveTexture, glActiveTextureARB, (GLenum texture)); +#endif + +#ifdef DEFINED_GL_EXT_FUNC_DEF +#undef DEFINED_GL_EXT_FUNC_DEF +#undef GL_EXT_FUNC_DEF +#endif + +#ifdef DEFINED_GL_FUNC_2_DEF +#undef DEFINED_GL_FUNC_2_DEF +#undef GL_FUNC_2_DEF +#endif diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index ac6d41d47d..4d6a00a3b3 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -23,8 +23,10 @@ #include "backends/graphics/opengl/opengl-graphics.h" #include "backends/graphics/opengl/texture.h" -#include "backends/graphics/opengl/debug.h" -#include "backends/graphics/opengl/extensions.h" +#include "backends/graphics/opengl/pipelines/pipeline.h" +#include "backends/graphics/opengl/pipelines/fixed.h" +#include "backends/graphics/opengl/pipelines/shader.h" +#include "backends/graphics/opengl/shader.h" #include "common/textconsole.h" #include "common/translation.h" @@ -45,6 +47,7 @@ namespace OpenGL { OpenGLGraphicsManager::OpenGLGraphicsManager() : _currentState(), _oldState(), _transactionMode(kTransactionNone), _screenChangeID(1 << (sizeof(int) * 8 - 2)), + _pipeline(nullptr), _outputScreenWidth(0), _outputScreenHeight(0), _displayX(0), _displayY(0), _displayWidth(0), _displayHeight(0), _defaultFormat(), _defaultFormatAlpha(), _gameScreen(nullptr), _gameScreenShakeOffset(0), _overlay(nullptr), @@ -58,6 +61,7 @@ OpenGLGraphicsManager::OpenGLGraphicsManager() #endif { memset(_gamePalette, 0, sizeof(_gamePalette)); + g_context.reset(); } OpenGLGraphicsManager::~OpenGLGraphicsManager() { @@ -67,6 +71,9 @@ OpenGLGraphicsManager::~OpenGLGraphicsManager() { #ifdef USE_OSD delete _osd; #endif +#if !USE_FORCED_GLES + ShaderManager::destroy(); +#endif } bool OpenGLGraphicsManager::hasFeature(OSystem::Feature f) { @@ -215,8 +222,8 @@ OSystem::TransactionError OpenGLGraphicsManager::endGFXTransaction() { // a context existing before, which means we don't know the maximum // supported texture size before this. Thus, we check whether the // requested game resolution is supported over here. - || ( _currentState.gameWidth > (uint)Texture::getMaximumTextureSize() - || _currentState.gameHeight > (uint)Texture::getMaximumTextureSize())) { + || ( _currentState.gameWidth > (uint)g_context.maxTextureSize + || _currentState.gameHeight > (uint)g_context.maxTextureSize)) { if (_transactionMode == kTransactionActive) { // Try to setup the old state in case its valid and is // actually different from the new one. @@ -267,9 +274,9 @@ OSystem::TransactionError OpenGLGraphicsManager::endGFXTransaction() { _gameScreen = nullptr; #ifdef USE_RGB_COLOR - _gameScreen = createTexture(_currentState.gameFormat); + _gameScreen = createSurface(_currentState.gameFormat); #else - _gameScreen = createTexture(Graphics::PixelFormat::createFormatCLUT8()); + _gameScreen = createSurface(Graphics::PixelFormat::createFormatCLUT8()); #endif assert(_gameScreen); if (_gameScreen->hasPalette()) { @@ -365,29 +372,37 @@ void OpenGLGraphicsManager::updateScreen() { } _forceRedraw = false; + // Update changes to textures. + _gameScreen->updateGLTexture(); + if (_cursor) { + _cursor->updateGLTexture(); + } + _overlay->updateGLTexture(); + _osd->updateGLTexture(); + // Clear the screen buffer. if (_scissorOverride && !_overlayVisible) { // In certain cases we need to assure that the whole screen area is // cleared. For example, when switching from overlay visible to // invisible, we need to assure that all contents are cleared to // properly remove all overlay contents. - GLCALL(glDisable(GL_SCISSOR_TEST)); - GLCALL(glClear(GL_COLOR_BUFFER_BIT)); - GLCALL(glEnable(GL_SCISSOR_TEST)); + _backBuffer.enableScissorTest(false); + GL_CALL(glClear(GL_COLOR_BUFFER_BIT)); + _backBuffer.enableScissorTest(true); --_scissorOverride; } else { - GLCALL(glClear(GL_COLOR_BUFFER_BIT)); + GL_CALL(glClear(GL_COLOR_BUFFER_BIT)); } const GLfloat shakeOffset = _gameScreenShakeOffset * (GLfloat)_displayHeight / _gameScreen->getHeight(); // First step: Draw the (virtual) game screen. - _gameScreen->draw(_displayX, _displayY + shakeOffset, _displayWidth, _displayHeight); + g_context.getActivePipeline()->drawTexture(_gameScreen->getGLTexture(), _displayX, _displayY + shakeOffset, _displayWidth, _displayHeight); // Second step: Draw the overlay if visible. if (_overlayVisible) { - _overlay->draw(0, 0, _outputScreenWidth, _outputScreenHeight); + g_context.getActivePipeline()->drawTexture(_overlay->getGLTexture(), 0, 0, _outputScreenWidth, _outputScreenHeight); } // Third step: Draw the cursor if visible. @@ -396,9 +411,10 @@ void OpenGLGraphicsManager::updateScreen() { // visible. const GLfloat cursorOffset = _overlayVisible ? 0 : shakeOffset; - _cursor->draw(_cursorDisplayX - _cursorHotspotXScaled, - _cursorDisplayY - _cursorHotspotYScaled + cursorOffset, - _cursorWidthScaled, _cursorHeightScaled); + g_context.getActivePipeline()->drawTexture(_cursor->getGLTexture(), + _cursorDisplayX - _cursorHotspotXScaled, + _cursorDisplayY - _cursorHotspotYScaled + cursorOffset, + _cursorWidthScaled, _cursorHeightScaled); } #ifdef USE_OSD @@ -419,13 +435,13 @@ void OpenGLGraphicsManager::updateScreen() { } // Set the OSD transparency. - GLCALL(glColor4f(1.0f, 1.0f, 1.0f, _osdAlpha / 100.0f)); + g_context.getActivePipeline()->setColor(1.0f, 1.0f, 1.0f, _osdAlpha / 100.0f); // Draw the OSD texture. - _osd->draw(0, 0, _outputScreenWidth, _outputScreenHeight); + g_context.getActivePipeline()->drawTexture(_osd->getGLTexture(), 0, 0, _outputScreenWidth, _outputScreenHeight); // Reset color. - GLCALL(glColor4f(1.0f, 1.0f, 1.0f, 1.0f)); + g_context.getActivePipeline()->setColor(1.0f, 1.0f, 1.0f, 1.0f); } #endif @@ -467,7 +483,7 @@ void OpenGLGraphicsManager::showOverlay() { _forceRedraw = true; // Allow drawing inside full screen area. - GLCALL(glDisable(GL_SCISSOR_TEST)); + _backBuffer.enableScissorTest(false); // Update cursor position. setMousePosition(_cursorX, _cursorY); @@ -478,7 +494,7 @@ void OpenGLGraphicsManager::hideOverlay() { _forceRedraw = true; // Limit drawing to screen area. - GLCALL(glEnable(GL_SCISSOR_TEST)); + _backBuffer.enableScissorTest(true); _scissorOverride = 3; // Update cursor position. @@ -609,7 +625,7 @@ void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int } else { textureFormat = _defaultFormatAlpha; } - _cursor = createTexture(textureFormat, true); + _cursor = createSurface(textureFormat, true); assert(_cursor); _cursor->enableLinearFiltering(_currentState.graphicsMode == GFX_LINEAR); } @@ -755,18 +771,8 @@ void OpenGLGraphicsManager::setActualScreenSize(uint width, uint height) { _outputScreenWidth = width; _outputScreenHeight = height; - // Setup coordinates system. - GLCALL(glViewport(0, 0, _outputScreenWidth, _outputScreenHeight)); - - GLCALL(glMatrixMode(GL_PROJECTION)); - GLCALL(glLoadIdentity()); -#ifdef USE_GLES - GLCALL(glOrthof(0, _outputScreenWidth, _outputScreenHeight, 0, -1, 1)); -#else - GLCALL(glOrtho(0, _outputScreenWidth, _outputScreenHeight, 0, -1, 1)); -#endif - GLCALL(glMatrixMode(GL_MODELVIEW)); - GLCALL(glLoadIdentity()); + // Setup backbuffer size. + _backBuffer.setDimensions(width, height); uint overlayWidth = width; uint overlayHeight = height; @@ -777,15 +783,15 @@ void OpenGLGraphicsManager::setActualScreenSize(uint width, uint height) { // possible and then scale it to the physical display size. This sounds // bad but actually all recent chips should support full HD resolution // anyway. Thus, it should not be a real issue for modern hardware. - if ( overlayWidth > (uint)Texture::getMaximumTextureSize() - || overlayHeight > (uint)Texture::getMaximumTextureSize()) { + if ( overlayWidth > (uint)g_context.maxTextureSize + || overlayHeight > (uint)g_context.maxTextureSize) { const frac_t outputAspect = intToFrac(_outputScreenWidth) / _outputScreenHeight; if (outputAspect > (frac_t)FRAC_ONE) { - overlayWidth = Texture::getMaximumTextureSize(); + overlayWidth = g_context.maxTextureSize; overlayHeight = intToFrac(overlayWidth) / outputAspect; } else { - overlayHeight = Texture::getMaximumTextureSize(); + overlayHeight = g_context.maxTextureSize; overlayWidth = fracToInt(overlayHeight * outputAspect); } } @@ -801,7 +807,7 @@ void OpenGLGraphicsManager::setActualScreenSize(uint width, uint height) { delete _overlay; _overlay = nullptr; - _overlay = createTexture(_defaultFormatAlpha); + _overlay = createSurface(_defaultFormatAlpha); assert(_overlay); // We always filter the overlay with GL_LINEAR. This assures it's // readable in case it needs to be scaled and does not affect it @@ -816,7 +822,7 @@ void OpenGLGraphicsManager::setActualScreenSize(uint width, uint height) { delete _osd; _osd = nullptr; - _osd = createTexture(_defaultFormatAlpha); + _osd = createSurface(_defaultFormatAlpha); assert(_osd); // We always filter the osd with GL_LINEAR. This assures it's // readable in case it needs to be scaled and does not affect it @@ -836,38 +842,48 @@ void OpenGLGraphicsManager::setActualScreenSize(uint width, uint height) { } void OpenGLGraphicsManager::notifyContextCreate(const Graphics::PixelFormat &defaultFormat, const Graphics::PixelFormat &defaultFormatAlpha) { - // Initialize all extensions. - initializeGLExtensions(); + // Initialize context for use. + initializeGLContext(); - // Disable 3D properties. - GLCALL(glDisable(GL_CULL_FACE)); - GLCALL(glDisable(GL_DEPTH_TEST)); - GLCALL(glDisable(GL_LIGHTING)); - GLCALL(glDisable(GL_FOG)); - GLCALL(glDisable(GL_DITHER)); - GLCALL(glShadeModel(GL_FLAT)); - GLCALL(glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST)); + // Initialize pipeline. + delete _pipeline; + _pipeline = nullptr; - // Default to black as clear color. - GLCALL(glClearColor(0.0f, 0.0f, 0.0f, 0.0f)); - GLCALL(glColor4f(1.0f, 1.0f, 1.0f, 1.0f)); +#if !USE_FORCED_GLES + if (g_context.shadersSupported) { + ShaderMan.notifyCreate(); + _pipeline = new ShaderPipeline(ShaderMan.query(ShaderManager::kDefault)); + } +#endif - // Setup alpha blend (for overlay and cursor). - GLCALL(glEnable(GL_BLEND)); - GLCALL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)); +#if !USE_FORCED_GLES2 + if (_pipeline == nullptr) { + _pipeline = new FixedPipeline(); + } +#endif + + g_context.setPipeline(_pipeline); + + // Disable 3D properties. + GL_CALL(glDisable(GL_CULL_FACE)); + GL_CALL(glDisable(GL_DEPTH_TEST)); + GL_CALL(glDisable(GL_DITHER)); - // Enable rendering with vertex and coord arrays. - GLCALL(glEnableClientState(GL_VERTEX_ARRAY)); - GLCALL(glEnableClientState(GL_TEXTURE_COORD_ARRAY)); + g_context.getActivePipeline()->setColor(1.0f, 1.0f, 1.0f, 1.0f); - GLCALL(glEnable(GL_TEXTURE_2D)); + GL_CALL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)); + // Setup backbuffer state. + + // Default to black as clear color. + _backBuffer.setClearColor(0.0f, 0.0f, 0.0f, 0.0f); + // Setup alpha blend (for overlay and cursor). + _backBuffer.enableBlend(true); // Setup scissor state accordingly. - if (_overlayVisible) { - GLCALL(glDisable(GL_SCISSOR_TEST)); - } else { - GLCALL(glEnable(GL_SCISSOR_TEST)); - } + _backBuffer.enableScissorTest(!_overlayVisible); + + g_context.getActivePipeline()->setFramebuffer(&_backBuffer); + // Clear the whole screen for the first three frames to assure any // leftovers are cleared. _scissorOverride = 3; @@ -875,10 +891,7 @@ void OpenGLGraphicsManager::notifyContextCreate(const Graphics::PixelFormat &def // We use a "pack" alignment (when reading from textures) to 4 here, // since the only place where we really use it is the BMP screenshot // code and that requires the same alignment too. - GLCALL(glPixelStorei(GL_PACK_ALIGNMENT, 4)); - - // Query information needed by textures. - Texture::queryTextureInformation(); + GL_CALL(glPixelStorei(GL_PACK_ALIGNMENT, 4)); // Refresh the output screen dimensions if some are set up. if (_outputScreenWidth != 0 && _outputScreenHeight != 0) { @@ -892,42 +905,56 @@ void OpenGLGraphicsManager::notifyContextCreate(const Graphics::PixelFormat &def _defaultFormatAlpha = defaultFormatAlpha; if (_gameScreen) { - _gameScreen->recreateInternalTexture(); + _gameScreen->recreate(); } if (_overlay) { - _overlay->recreateInternalTexture(); + _overlay->recreate(); } if (_cursor) { - _cursor->recreateInternalTexture(); + _cursor->recreate(); } #ifdef USE_OSD if (_osd) { - _osd->recreateInternalTexture(); + _osd->recreate(); } #endif } void OpenGLGraphicsManager::notifyContextDestroy() { if (_gameScreen) { - _gameScreen->releaseInternalTexture(); + _gameScreen->destroy(); } if (_overlay) { - _overlay->releaseInternalTexture(); + _overlay->destroy(); } if (_cursor) { - _cursor->releaseInternalTexture(); + _cursor->destroy(); } #ifdef USE_OSD if (_osd) { - _osd->releaseInternalTexture(); + _osd->destroy(); } #endif + +#if !USE_FORCED_GLES + if (g_context.shadersSupported) { + ShaderMan.notifyDestroy(); + } +#endif + + // Destroy rendering pipeline. + g_context.setPipeline(nullptr); + delete _pipeline; + _pipeline = nullptr; + + // Rest our context description since the context is gone soon. + g_context.reset(); } void OpenGLGraphicsManager::adjustMousePosition(int16 &x, int16 &y) { @@ -970,9 +997,15 @@ void OpenGLGraphicsManager::setMousePosition(int x, int y) { } } -Texture *OpenGLGraphicsManager::createTexture(const Graphics::PixelFormat &format, bool wantAlpha) { +Surface *OpenGLGraphicsManager::createSurface(const Graphics::PixelFormat &format, bool wantAlpha) { GLenum glIntFormat, glFormat, glType; if (format.bytesPerPixel == 1) { +#if !USE_FORCED_GLES + if (TextureCLUT8GPU::isSupportedByContext()) { + return new TextureCLUT8GPU(); + } +#endif + const Graphics::PixelFormat &virtFormat = wantAlpha ? _defaultFormatAlpha : _defaultFormat; const bool supported = getGLPixelFormat(virtFormat, glIntFormat, glFormat, glType); if (!supported) { @@ -980,6 +1013,15 @@ Texture *OpenGLGraphicsManager::createTexture(const Graphics::PixelFormat &forma } else { return new TextureCLUT8(glIntFormat, glFormat, glType, virtFormat); } +#if !USE_FORCED_GL + } else if (isGLESContext() && format == Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)) { + // OpenGL ES does not support a texture format usable for RGB555. + // Since SCUMM uses this pixel format for some games (and there is no + // hope for this to change anytime soon) we use pixel format + // conversion to a supported texture format. However, this is a one + // time exception. + return new TextureRGB555(); +#endif // !USE_FORCED_GL } else { const bool supported = getGLPixelFormat(format, glIntFormat, glFormat, glType); if (!supported) { @@ -1015,7 +1057,11 @@ bool OpenGLGraphicsManager::getGLPixelFormat(const Graphics::PixelFormat &pixelF glFormat = GL_RGBA; glType = GL_UNSIGNED_SHORT_4_4_4_4; return true; -#ifndef USE_GLES +#if !USE_FORCED_GLES && !USE_FORCED_GLES2 + // The formats below are not supported by every GLES implementation. + // Thus, we do not mark them as supported when a GLES context is setup. + } else if (isGLESContext()) { + return false; #ifdef SCUMM_LITTLE_ENDIAN } else if (pixelFormat == Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0)) { // RGBA8888 glIntFormat = GL_RGBA; @@ -1024,17 +1070,10 @@ bool OpenGLGraphicsManager::getGLPixelFormat(const Graphics::PixelFormat &pixelF return true; #endif } else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)) { // RGB555 - // GL_BGRA does not exist in every GLES implementation so should not be configured if - // USE_GLES is set. glIntFormat = GL_RGB; glFormat = GL_BGRA; glType = GL_UNSIGNED_SHORT_1_5_5_5_REV; return true; - } else if (pixelFormat == Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24)) { // ARGB8888 - glIntFormat = GL_RGBA; - glFormat = GL_BGRA; - glType = GL_UNSIGNED_INT_8_8_8_8_REV; - return true; } else if (pixelFormat == Graphics::PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12)) { // ARGB4444 glIntFormat = GL_RGBA; glFormat = GL_BGRA; @@ -1054,8 +1093,8 @@ bool OpenGLGraphicsManager::getGLPixelFormat(const Graphics::PixelFormat &pixelF return true; } else if (pixelFormat == Graphics::PixelFormat(2, 5, 6, 5, 0, 0, 5, 11, 0)) { // BGR565 glIntFormat = GL_RGB; - glFormat = GL_BGR; - glType = GL_UNSIGNED_SHORT_5_6_5; + glFormat = GL_RGB; + glType = GL_UNSIGNED_SHORT_5_6_5_REV; return true; } else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 1, 1, 6, 11, 0)) { // BGRA5551 glIntFormat = GL_RGBA; @@ -1072,7 +1111,7 @@ bool OpenGLGraphicsManager::getGLPixelFormat(const Graphics::PixelFormat &pixelF glFormat = GL_BGRA; glType = GL_UNSIGNED_SHORT_4_4_4_4; return true; -#endif +#endif // !USE_FORCED_GLES && !USE_FORCED_GLES2 } else { return false; } @@ -1119,10 +1158,10 @@ void OpenGLGraphicsManager::recalculateDisplayArea() { // Setup drawing limitation for game graphics. // This invovles some trickery because OpenGL's viewport coordinate system // is upside down compared to ours. - GLCALL(glScissor(_displayX, - _outputScreenHeight - _displayHeight - _displayY, - _displayWidth, - _displayHeight)); + _backBuffer.setScissorBox(_displayX, + _outputScreenHeight - _displayHeight - _displayY, + _displayWidth, + _displayHeight); // Clear the whole screen for the first three frames to remove leftovers. _scissorOverride = 3; @@ -1144,20 +1183,7 @@ void OpenGLGraphicsManager::updateCursorPalette() { _cursor->setPalette(0, 256, _gamePalette); } - // We remove all alpha bits from the palette entry of the color key. - // This makes sure its properly handled as color key. - const Graphics::PixelFormat &hardwareFormat = _cursor->getHardwareFormat(); - const uint32 aMask = (0xFF >> hardwareFormat.aLoss) << hardwareFormat.aShift; - - if (hardwareFormat.bytesPerPixel == 2) { - uint16 *palette = (uint16 *)_cursor->getPalette() + _cursorKeyColor; - *palette &= ~aMask; - } else if (hardwareFormat.bytesPerPixel == 4) { - uint32 *palette = (uint32 *)_cursor->getPalette() + _cursorKeyColor; - *palette &= ~aMask; - } else { - warning("OpenGLGraphicsManager::updateCursorPalette: Unsupported pixel depth %d", hardwareFormat.bytesPerPixel); - } + _cursor->setColorKey(_cursorKeyColor); } void OpenGLGraphicsManager::recalculateCursorScaling() { @@ -1207,7 +1233,7 @@ void OpenGLGraphicsManager::saveScreenshot(const Common::String &filename) const uint8 *pixels = new uint8[lineSize * height]; // Get pixel data from OpenGL buffer - GLCALL(glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels)); + GL_CALL(glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels)); // BMP stores as BGR. Since we can't assume that GL_BGR is supported we // will swap the components from the RGB we read to BGR on our own. diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index 9578839383..35435c156e 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -24,6 +24,7 @@ #define BACKENDS_GRAPHICS_OPENGL_OPENGL_GRAPHICS_H #include "backends/graphics/opengl/opengl-sys.h" +#include "backends/graphics/opengl/framebuffer.h" #include "backends/graphics/graphics.h" #include "common/frac.h" @@ -40,7 +41,11 @@ namespace OpenGL { // SurfaceSDL backend enables it and disabling it can cause issues in sdl.cpp. #define USE_OSD 1 -class Texture; +class Surface; +class Pipeline; +#if !USE_FORCED_GLES +class Shader; +#endif enum { GFX_LINEAR = 0, @@ -117,6 +122,11 @@ public: protected: /** + * Whether an GLES or GLES2 context is active. + */ + bool isGLESContext() const { return g_context.type == kContextGLES || g_context.type == kContextGLES2; } + + /** * Set up the actual screen size available for the OpenGL code to do any * drawing. * @@ -126,6 +136,16 @@ protected: void setActualScreenSize(uint width, uint height); /** + * Sets the OpenGL (ES) type the graphics manager shall work with. + * + * This needs to be called at least once (and before ever calling + * notifyContextCreate). + * + * @param type Type of the OpenGL (ES) contexts to be created. + */ + void setContextType(ContextType type); + + /** * Notify the manager of a OpenGL context change. This should be the first * thing to call after you created an OpenGL (ES) context! * @@ -172,15 +192,15 @@ protected: private: /** - * Create a texture with the specified pixel format. + * Create a surface with the specified pixel format. * - * @param format The pixel format the Texture object should accept as + * @param format The pixel format the Surface object should accept as * input. - * @param wantAlpha For CLUT8 textures this marks whether an alpha + * @param wantAlpha For CLUT8 surfaces this marks whether an alpha * channel should be used. - * @return A pointer to the texture or nullptr on failure. + * @return A pointer to the surface or nullptr on failure. */ - Texture *createTexture(const Graphics::PixelFormat &format, bool wantAlpha = false); + Surface *createSurface(const Graphics::PixelFormat &format, bool wantAlpha = false); // // Transaction support @@ -281,6 +301,36 @@ private: // /** + * Initialize the active context for use. + */ + void initializeGLContext(); + + /** + * Render back buffer. + */ + Backbuffer _backBuffer; + + /** + * OpenGL pipeline used for rendering. + */ + Pipeline *_pipeline; + +protected: + /** + * Query the address of an OpenGL function by name. + * + * This can only be used after a context has been created. + * Please note that this function can return valid addresses even if the + * OpenGL context does not support the function. + * + * @param name The name of the OpenGL function. + * @return An function pointer for the requested OpenGL function or + * nullptr in case of failure. + */ + virtual void *getProcAddress(const char *name) const = 0; + +private: + /** * Try to determine the internal parameters for a given pixel format. * * @return true when the format can be used, false otherwise. @@ -348,7 +398,7 @@ private: /** * The virtual game screen. */ - Texture *_gameScreen; + Surface *_gameScreen; /** * The game palette if in CLUT8 mode. @@ -367,7 +417,7 @@ private: /** * The overlay screen. */ - Texture *_overlay; + Surface *_overlay; /** * Whether the overlay is visible or not. @@ -386,7 +436,7 @@ private: /** * The cursor image. */ - Texture *_cursor; + Surface *_cursor; /** * X coordinate of the cursor in phyiscal coordinates. @@ -497,7 +547,7 @@ private: /** * The OSD's contents. */ - Texture *_osd; + Surface *_osd; /** * Current opacity level of the OSD. diff --git a/backends/graphics/opengl/opengl-sys.h b/backends/graphics/opengl/opengl-sys.h index 4e21894380..4495128f32 100644 --- a/backends/graphics/opengl/opengl-sys.h +++ b/backends/graphics/opengl/opengl-sys.h @@ -23,35 +23,147 @@ #ifndef BACKENDS_GRAPHICS_OPENGL_OPENGL_SYS_H #define BACKENDS_GRAPHICS_OPENGL_OPENGL_SYS_H -// The purpose of this header is to include the OpenGL headers in an uniform -// fashion. A notable example for a non standard port is the Tizen port. - #include "common/scummsys.h" -#ifdef WIN32 -#if defined(ARRAYSIZE) && !defined(_WINDOWS_) -#undef ARRAYSIZE -#endif -#define WIN32_LEAN_AND_MEAN -#include <windows.h> -#undef ARRAYSIZE +#include "backends/graphics/opengl/debug.h" +#ifdef SDL_BACKEND +#include "backends/platform/sdl/sdl-sys.h" #endif -// HACK: In case common/util.h has been included already we need to make sure -// to define ARRAYSIZE again in case of Windows. -#if !defined(ARRAYSIZE) && defined(COMMON_UTIL_H) -#define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0]))) +// On OS X we only support GL contexts. The reason is that Apple's GL interface +// uses "void *" for GLhandleARB which is not type compatible with GLint. This +// kills our aliasing trick for extension functions and thus would force us to +// supply two different Shader class implementations or introduce other +// wrappers. OS X only supports GL contexts right now anyway (at least +// according to SDL2 sources), thus it is not much of an issue. +#if defined(MACOSX) && (!defined(USE_GLES_MODE) || USE_GLES_MODE != 0) +//#warning "Only forced OpenGL mode is supported on Mac OS X. Overriding settings." +#undef USE_GLES_MODE +#define USE_GLES_MODE 0 #endif +// We allow to force GL or GLES modes on compile time. +// For this the USE_GLES_MODE define is used. The following values represent +// the given selection choices: +// 0 - Force OpenGL context +// 1 - Force OpenGL ES context +// 2 - Force OpenGL ES 2.0 context +#define USE_FORCED_GL (defined(USE_GLES_MODE) && USE_GLES_MODE == 0) +#define USE_FORCED_GLES (defined(USE_GLES_MODE) && USE_GLES_MODE == 1) +#define USE_FORCED_GLES2 (defined(USE_GLES_MODE) && USE_GLES_MODE == 2) + +// On Tizen we include the toolchain's OpenGL file. This is something we +// actually want to avoid. However, since Tizen uses eglGetProcAddress which +// is not required to return valid function pointers to non OpenGL extension +// functions, we need the system's definitions to resolve all OpenGL +// functions. +// TODO: See if there is an alternative which allows us to avoid including +// Tizen's OpenGL header here. #if defined(TIZEN) -#include <FGraphicsOpengl.h> -using namespace Tizen::Graphics::Opengl; -#elif defined(USE_GLES) -#include <GLES/gl.h> -#elif defined(SDL_BACKEND) -#include <SDL_opengl.h> + #include <FGraphicsOpengl.h> + using namespace Tizen::Graphics::Opengl; + #define USE_BUILTIN_OPENGL #else -#include <GL/gl.h> + #include "backends/graphics/opengl/opengl-defs.h" #endif +#ifdef SDL_BACKEND + // Win32 needs OpenGL functions declared with APIENTRY. + // However, SDL does not define APIENTRY in it's SDL.h file on non-Windows + // targets, thus if it is not available, we just dummy define it. + #ifndef APIENTRY + #define APIENTRY + #endif + #define GL_CALL_CONV APIENTRY +#else + #define GL_CALL_CONV +#endif + +namespace OpenGL { + +enum ContextType { + kContextGL, + kContextGLES, + kContextGLES2 +}; + +class Pipeline; +class Framebuffer; + +/** + * Description structure of the OpenGL (ES) context. + */ +struct Context { + /** The type of the active context. */ + ContextType type; + + /** + * Reset context. + * + * This marks all extensions as unavailable and clears all function + * pointers. + */ + void reset(); + + /** The maximum texture size supported by the context. */ + GLint maxTextureSize; + + /** Whether GL_ARB_texture_non_power_of_two is available or not. */ + bool NPOTSupported; + + /** Whether shader support is available or not. */ + bool shadersSupported; + + /** Whether multi texture support is available or not. */ + bool multitextureSupported; + + /** Whether FBO support is available or not. */ + bool framebufferObjectSupported; + +#define GL_FUNC_DEF(ret, name, param) ret (GL_CALL_CONV *name)param +#include "backends/graphics/opengl/opengl-func.h" +#undef GL_FUNC_DEF + + // + // Wrapper functionality to handle fixed-function pipelines and + // programmable pipelines in the same fashion. + // + +private: + /** Currently active rendering pipeline. */ + Pipeline *activePipeline; + +public: + /** + * Set new pipeline. + * + * Client is responsible for any memory management related to pipelines. + * + * @param pipeline Pipeline to activate. + * @return Formerly active pipeline. + */ + Pipeline *setPipeline(Pipeline *pipeline); + + /** + * Query the currently active rendering pipeline. + */ + Pipeline *getActivePipeline() const { return activePipeline; } +}; + +/** + * The (active) OpenGL context. + */ +extern Context g_context; + +} // End of namespace OpenGL + +#define GL_CALL(x) GL_WRAP_DEBUG(g_context.x, x) +#define GL_CALL_SAFE(func, params) \ + do { \ + if (g_context.func) { \ + GL_CALL(func params); \ + } \ + } while (0) +#define GL_ASSIGN(var, x) GL_WRAP_DEBUG(var = g_context.x, x) + #endif diff --git a/backends/graphics/opengl/pipelines/clut8.cpp b/backends/graphics/opengl/pipelines/clut8.cpp new file mode 100644 index 0000000000..fca40074f0 --- /dev/null +++ b/backends/graphics/opengl/pipelines/clut8.cpp @@ -0,0 +1,46 @@ +/* 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 "backends/graphics/opengl/pipelines/clut8.h" +#include "backends/graphics/opengl/shader.h" +#include "backends/graphics/opengl/framebuffer.h" + +namespace OpenGL { + +#if !USE_FORCED_GLES +CLUT8LookUpPipeline::CLUT8LookUpPipeline() + : ShaderPipeline(ShaderMan.query(ShaderManager::kCLUT8LookUp)), _paletteTexture(nullptr) { +} + +void CLUT8LookUpPipeline::drawTexture(const GLTexture &texture, const GLfloat *coordinates) { + // Set the palette texture. + GL_CALL(glActiveTexture(GL_TEXTURE1)); + if (_paletteTexture) { + _paletteTexture->bind(); + } + + GL_CALL(glActiveTexture(GL_TEXTURE0)); + ShaderPipeline::drawTexture(texture, coordinates); +} +#endif // !USE_FORCED_GLES + +} // End of namespace OpenGL diff --git a/backends/graphics/opengl/extensions.cpp b/backends/graphics/opengl/pipelines/clut8.h index 4482ef82b5..16724e4652 100644 --- a/backends/graphics/opengl/extensions.cpp +++ b/backends/graphics/opengl/pipelines/clut8.h @@ -20,29 +20,27 @@ * */ -#include "backends/graphics/opengl/extensions.h" -#include "backends/graphics/opengl/opengl-sys.h" +#ifndef BACKENDS_GRAPHICS_OPENGL_PIPELINES_CLUT8_H +#define BACKENDS_GRAPHICS_OPENGL_PIPELINES_CLUT8_H -#include "common/tokenizer.h" +#include "backends/graphics/opengl/pipelines/shader.h" namespace OpenGL { -bool g_extNPOTSupported = false; +#if !USE_FORCED_GLES +class CLUT8LookUpPipeline : public ShaderPipeline { +public: + CLUT8LookUpPipeline(); -void initializeGLExtensions() { - const char *extString = (const char *)glGetString(GL_EXTENSIONS); + void setPaletteTexture(const GLTexture *paletteTexture) { _paletteTexture = paletteTexture; } - // Initialize default state. - g_extNPOTSupported = false; + virtual void drawTexture(const GLTexture &texture, const GLfloat *coordinates); - Common::StringTokenizer tokenizer(extString, " "); - while (!tokenizer.empty()) { - Common::String token = tokenizer.nextToken(); - - if (token == "GL_ARB_texture_non_power_of_two") { - g_extNPOTSupported = true; - } - } -} +private: + const GLTexture *_paletteTexture; +}; +#endif // !USE_FORCED_GLES } // End of namespace OpenGL + +#endif diff --git a/backends/graphics/opengl/pipelines/fixed.cpp b/backends/graphics/opengl/pipelines/fixed.cpp new file mode 100644 index 0000000000..8e3bd7eaee --- /dev/null +++ b/backends/graphics/opengl/pipelines/fixed.cpp @@ -0,0 +1,70 @@ +/* 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 "backends/graphics/opengl/pipelines/fixed.h" + +namespace OpenGL { + +#if !USE_FORCED_GLES2 +void FixedPipeline::activateInternal() { + GL_CALL(glDisable(GL_LIGHTING)); + GL_CALL(glDisable(GL_FOG)); + GL_CALL(glShadeModel(GL_FLAT)); + GL_CALL(glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST)); + + GL_CALL(glEnableClientState(GL_VERTEX_ARRAY)); + GL_CALL(glEnableClientState(GL_TEXTURE_COORD_ARRAY)); + +#if !USE_FORCED_GLES + if (g_context.multitextureSupported) { + GL_CALL(glActiveTexture(GL_TEXTURE0)); + } +#endif + GL_CALL(glEnable(GL_TEXTURE_2D)); +} + +void FixedPipeline::setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) { + GL_CALL(glColor4f(r, g, b, a)); +} + +void FixedPipeline::drawTexture(const GLTexture &texture, const GLfloat *coordinates) { + texture.bind(); + + GL_CALL(glTexCoordPointer(2, GL_FLOAT, 0, texture.getTexCoords())); + GL_CALL(glVertexPointer(2, GL_FLOAT, 0, coordinates)); + GL_CALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)); +} + +void FixedPipeline::setProjectionMatrix(const GLfloat *projectionMatrix) { + if (!isActive()) { + return; + } + + GL_CALL(glMatrixMode(GL_PROJECTION)); + GL_CALL(glLoadMatrixf(projectionMatrix)); + + GL_CALL(glMatrixMode(GL_MODELVIEW)); + GL_CALL(glLoadIdentity()); +} +#endif // !USE_FORCED_GLES2 + +} // End of namespace OpenGL diff --git a/backends/graphics/opengl/pipelines/fixed.h b/backends/graphics/opengl/pipelines/fixed.h new file mode 100644 index 0000000000..6bfe140c19 --- /dev/null +++ b/backends/graphics/opengl/pipelines/fixed.h @@ -0,0 +1,46 @@ +/* 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 BACKENDS_GRAPHICS_OPENGL_PIPELINES_FIXED_H +#define BACKENDS_GRAPHICS_OPENGL_PIPELINES_FIXED_H + +#include "backends/graphics/opengl/pipelines/pipeline.h" + +namespace OpenGL { + +#if !USE_FORCED_GLES2 +class FixedPipeline : public Pipeline { +public: + virtual void setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a); + + virtual void drawTexture(const GLTexture &texture, const GLfloat *coordinates); + + virtual void setProjectionMatrix(const GLfloat *projectionMatrix); + +protected: + virtual void activateInternal(); +}; +#endif // !USE_FORCED_GLES2 + +} // End of namespace OpenGL + +#endif diff --git a/backends/graphics/opengl/pipelines/pipeline.cpp b/backends/graphics/opengl/pipelines/pipeline.cpp new file mode 100644 index 0000000000..6a59cd28e7 --- /dev/null +++ b/backends/graphics/opengl/pipelines/pipeline.cpp @@ -0,0 +1,66 @@ +/* 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 "backends/graphics/opengl/pipelines/pipeline.h" +#include "backends/graphics/opengl/framebuffer.h" + +namespace OpenGL { + +Pipeline::Pipeline() + : _activeFramebuffer(nullptr), _isActive(false) { +} + +void Pipeline::activate() { + _isActive = true; + + if (_activeFramebuffer) { + _activeFramebuffer->activate(); + } + + activateInternal(); +} + +void Pipeline::deactivate() { + deactivateInternal(); + + if (_activeFramebuffer) { + _activeFramebuffer->deactivate(); + } + + _isActive = false; +} + +Framebuffer *Pipeline::setFramebuffer(Framebuffer *framebuffer) { + Framebuffer *oldFramebuffer = _activeFramebuffer; + if (_isActive && oldFramebuffer) { + oldFramebuffer->deactivate(); + } + + _activeFramebuffer = framebuffer; + if (_isActive && _activeFramebuffer) { + _activeFramebuffer->activate(); + } + + return oldFramebuffer; +} + +} // End of namespace OpenGL diff --git a/backends/graphics/opengl/pipelines/pipeline.h b/backends/graphics/opengl/pipelines/pipeline.h new file mode 100644 index 0000000000..9f32d33b95 --- /dev/null +++ b/backends/graphics/opengl/pipelines/pipeline.h @@ -0,0 +1,126 @@ +/* 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 BACKENDS_GRAPHICS_OPENGL_PIPELINES_PIPELINE_H +#define BACKENDS_GRAPHICS_OPENGL_PIPELINES_PIPELINE_H + +#include "backends/graphics/opengl/opengl-sys.h" +#include "backends/graphics/opengl/texture.h" + +namespace OpenGL { + +class Framebuffer; + +/** + * Interface for OpenGL pipeline functionality. + * + * This encapsulates differences in various rendering pipelines used for + * OpenGL, OpenGL ES 1, and OpenGL ES 2. + */ +class Pipeline { +public: + Pipeline(); + virtual ~Pipeline() {} + + /** + * Activate the pipeline. + * + * This sets the OpenGL state to make use of drawing with the given + * OpenGL pipeline. + */ + void activate(); + + /** + * Deactivate the pipeline. + */ + void deactivate(); + + /** + * Set framebuffer to render to. + * + * Client is responsible for any memory management related to framebuffer. + * + * @param framebuffer Framebuffer to activate. + * @return Formerly active framebuffer. + */ + Framebuffer *setFramebuffer(Framebuffer *framebuffer); + + /** + * Set modulation color. + * + * @param r Red component in [0,1]. + * @param g Green component in [0,1]. + * @param b Blue component in [0,1]. + * @param a Alpha component in [0,1]. + */ + virtual void setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) = 0; + + /** + * Draw a texture rectangle to the currently active framebuffer. + * + * @param texture Texture to use for drawing. + * @param coordinates x1, y1, x2, y2 coordinates where to draw the texture. + */ + virtual void drawTexture(const GLTexture &texture, const GLfloat *coordinates) = 0; + + void drawTexture(const GLTexture &texture, GLfloat x, GLfloat y, GLfloat w, GLfloat h) { + const GLfloat coordinates[4*2] = { + x, y, + x + w, y, + x, y + h, + x + w, y + h + }; + drawTexture(texture, coordinates); + } + + /** + * Set the projection matrix. + * + * This is intended to be only ever be used by Framebuffer subclasses. + */ + virtual void setProjectionMatrix(const GLfloat *projectionMatrix) = 0; + +protected: + /** + * Activate the pipeline. + * + * This sets the OpenGL state to make use of drawing with the given + * OpenGL pipeline. + */ + virtual void activateInternal() = 0; + + /** + * Deactivate the pipeline. + */ + virtual void deactivateInternal() {} + + bool isActive() const { return _isActive; } + + Framebuffer *_activeFramebuffer; + +private: + bool _isActive; +}; + +} // End of namespace OpenGL + +#endif diff --git a/backends/graphics/opengl/pipelines/shader.cpp b/backends/graphics/opengl/pipelines/shader.cpp new file mode 100644 index 0000000000..a2dabb7c22 --- /dev/null +++ b/backends/graphics/opengl/pipelines/shader.cpp @@ -0,0 +1,94 @@ +/* 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 "backends/graphics/opengl/pipelines/shader.h" +#include "backends/graphics/opengl/shader.h" +#include "backends/graphics/opengl/framebuffer.h" + +namespace OpenGL { + +#if !USE_FORCED_GLES +ShaderPipeline::ShaderPipeline(Shader *shader) + : _activeShader(shader), _colorAttributes() { + _vertexAttribLocation = shader->getAttributeLocation("position"); + _texCoordAttribLocation = shader->getAttributeLocation("texCoordIn"); + _colorAttribLocation = shader->getAttributeLocation("blendColorIn"); + + assert(_vertexAttribLocation != -1); + assert(_texCoordAttribLocation != -1); + assert(_colorAttribLocation != -1); + + // One of the attributes needs to be passed through location 0, otherwise + // we get no output for GL contexts due to GL compatibility reasons. Let's + // check whether this ever happens. If this ever gets hit, we need to + // enable location 0 and pass some dummy values through it to fix output. + assert( _vertexAttribLocation == 0 + || _texCoordAttribLocation == 0 + || _colorAttribLocation == 0); +} + +void ShaderPipeline::activateInternal() { + GL_CALL(glEnableVertexAttribArray(_vertexAttribLocation)); + GL_CALL(glEnableVertexAttribArray(_texCoordAttribLocation)); + GL_CALL(glEnableVertexAttribArray(_colorAttribLocation)); + + if (g_context.multitextureSupported) { + GL_CALL(glActiveTexture(GL_TEXTURE0)); + } + + _activeShader->activate(); + + GL_CALL(glVertexAttribPointer(_colorAttribLocation, 4, GL_FLOAT, GL_FALSE, 0, _colorAttributes)); +} + +void ShaderPipeline::deactivateInternal() { + GL_CALL(glDisableVertexAttribArray(_vertexAttribLocation)); + GL_CALL(glDisableVertexAttribArray(_texCoordAttribLocation)); + GL_CALL(glDisableVertexAttribArray(_colorAttribLocation)); + + _activeShader->deactivate(); +} + +void ShaderPipeline::setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) { + GLfloat *dst = _colorAttributes; + for (uint i = 0; i < 4; ++i) { + *dst++ = r; + *dst++ = g; + *dst++ = b; + *dst++ = a; + } +} + +void ShaderPipeline::drawTexture(const GLTexture &texture, const GLfloat *coordinates) { + texture.bind(); + + GL_CALL(glVertexAttribPointer(_texCoordAttribLocation, 2, GL_FLOAT, GL_FALSE, 0, texture.getTexCoords())); + GL_CALL(glVertexAttribPointer(_vertexAttribLocation, 2, GL_FLOAT, GL_FALSE, 0, coordinates)); + GL_CALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)); +} + +void ShaderPipeline::setProjectionMatrix(const GLfloat *projectionMatrix) { + _activeShader->setUniform("projection", new ShaderUniformMatrix44(projectionMatrix)); +} +#endif // !USE_FORCED_GLES + +} // End of namespace OpenGL diff --git a/backends/graphics/opengl/pipelines/shader.h b/backends/graphics/opengl/pipelines/shader.h new file mode 100644 index 0000000000..6159607099 --- /dev/null +++ b/backends/graphics/opengl/pipelines/shader.h @@ -0,0 +1,59 @@ +/* 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 BACKENDS_GRAPHICS_OPENGL_PIPELINES_SHADER_H +#define BACKENDS_GRAPHICS_OPENGL_PIPELINES_SHADER_H + +#include "backends/graphics/opengl/pipelines/pipeline.h" + +namespace OpenGL { + +#if !USE_FORCED_GLES +class Shader; + +class ShaderPipeline : public Pipeline { +public: + ShaderPipeline(Shader *shader); + + virtual void setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a); + + virtual void drawTexture(const GLTexture &texture, const GLfloat *coordinates); + + virtual void setProjectionMatrix(const GLfloat *projectionMatrix); + +protected: + virtual void activateInternal(); + virtual void deactivateInternal(); + + GLint _vertexAttribLocation; + GLint _texCoordAttribLocation; + GLint _colorAttribLocation; + + GLfloat _colorAttributes[4*4]; + + Shader *const _activeShader; +}; +#endif // !USE_FORCED_GLES + +} // End of namespace OpenGL + +#endif diff --git a/backends/graphics/opengl/shader.cpp b/backends/graphics/opengl/shader.cpp new file mode 100644 index 0000000000..0b4c677d70 --- /dev/null +++ b/backends/graphics/opengl/shader.cpp @@ -0,0 +1,335 @@ +/* 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 "backends/graphics/opengl/shader.h" + +#if !USE_FORCED_GLES + +#include "common/textconsole.h" +#include "common/util.h" + +namespace Common { +DECLARE_SINGLETON(OpenGL::ShaderManager); +} + +namespace OpenGL { + +namespace { + +#pragma mark - Builtin Shader Sources - + +const char *const g_defaultVertexShader = + "attribute vec4 position;\n" + "attribute vec2 texCoordIn;\n" + "attribute vec4 blendColorIn;\n" + "\n" + "uniform mat4 projection;\n" + "\n" + "varying vec2 texCoord;\n" + "varying vec4 blendColor;\n" + "\n" + "void main(void) {\n" + "\ttexCoord = texCoordIn;\n" + "\tblendColor = blendColorIn;\n" + "\tgl_Position = projection * position;\n" + "}\n"; + +const char *const g_defaultFragmentShader = + "varying vec2 texCoord;\n" + "varying vec4 blendColor;\n" + "\n" + "uniform sampler2D texture;\n" + "\n" + "void main(void) {\n" + "\tgl_FragColor = blendColor * texture2D(texture, texCoord);\n" + "}\n"; + +const char *const g_lookUpFragmentShader = + "varying vec2 texCoord;\n" + "varying vec4 blendColor;\n" + "\n" + "uniform sampler2D texture;\n" + "uniform sampler2D palette;\n" + "\n" + "const float adjustFactor = 255.0 / 256.0 + 1.0 / (2.0 * 256.0);" + "\n" + "void main(void) {\n" + "\tvec4 index = texture2D(texture, texCoord);\n" + "\tgl_FragColor = blendColor * texture2D(palette, vec2(index.a * adjustFactor, 0.0));\n" + "}\n"; + + +// Taken from: https://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_03#OpenGL_ES_2_portability +const char *const g_precisionDefines = + "#ifdef GL_ES\n" + "\t#if defined(GL_FRAGMENT_PRECISION_HIGH) && GL_FRAGMENT_PRECISION_HIGH == 1\n" + "\t\tprecision highp float;\n" + "\t#else\n" + "\t\tprecision mediump float;\n" + "\t#endif\n" + "#else\n" + "\t#define highp\n" + "\t#define mediump\n" + "\t#define lowp\n" + "#endif\n"; + +} // End of anonymous namespace + +#pragma mark - Uniform Values - + +void ShaderUniformInteger::set(GLint location) const { + GL_CALL(glUniform1i(location, _value)); +} + +void ShaderUniformFloat::set(GLint location) const { + GL_CALL(glUniform1f(location, _value)); +} + +void ShaderUniformMatrix44::set(GLint location) const { + GL_CALL(glUniformMatrix4fv(location, 1, GL_FALSE, _matrix)); +} + +#pragma mark - Shader Implementation - + +Shader::Shader(const Common::String &vertex, const Common::String &fragment) + : _vertex(vertex), _fragment(fragment), _isActive(false), _program(0), _uniforms() { + recreate(); +} + +Shader::~Shader() { + // According to extension specification glDeleteObjectARB silently ignores + // 0. However, with nVidia drivers this can cause GL_INVALID_VALUE, thus + // we do not call it with 0 as parameter to avoid warnings. + if (_program) { + GL_CALL_SAFE(glDeleteProgram, (_program)); + } +} + +void Shader::destroy() { + // According to extension specification glDeleteObjectARB silently ignores + // 0. However, with nVidia drivers this can cause GL_INVALID_VALUE, thus + // we do not call it with 0 as parameter to avoid warnings. + if (_program) { + GL_CALL(glDeleteProgram(_program)); + _program = 0; + } +} + +bool Shader::recreate() { + // Make sure any old programs are destroyed properly. + destroy(); + + GLshader vertexShader = compileShader(_vertex.c_str(), GL_VERTEX_SHADER); + if (!vertexShader) { + return false; + } + + GLshader fragmentShader = compileShader(_fragment.c_str(), GL_FRAGMENT_SHADER); + if (!fragmentShader) { + GL_CALL(glDeleteShader(vertexShader)); + return false; + } + + GL_ASSIGN(_program, glCreateProgram()); + if (!_program) { + GL_CALL(glDeleteShader(vertexShader)); + GL_CALL(glDeleteShader(fragmentShader)); + return false; + } + + GL_CALL(glAttachShader(_program, vertexShader)); + GL_CALL(glAttachShader(_program, fragmentShader)); + + GL_CALL(glLinkProgram(_program)); + + GL_CALL(glDetachShader(_program, fragmentShader)); + GL_CALL(glDeleteShader(fragmentShader)); + + GL_CALL(glDetachShader(_program, vertexShader)); + GL_CALL(glDeleteShader(vertexShader)); + + GLint result; + GL_CALL(glGetProgramiv(_program, GL_LINK_STATUS, &result)); + if (result == GL_FALSE) { + GLint logSize; + GL_CALL(glGetProgramiv(_program, GL_INFO_LOG_LENGTH, &logSize)); + + GLchar *log = new GLchar[logSize]; + GL_CALL(glGetProgramInfoLog(_program, logSize, nullptr, log)); + warning("Could not link shader: \"%s\"", log); + delete[] log; + + destroy(); + return false; + } + + // Set program object in case shader is active during recreation. + if (_isActive) { + GL_CALL(glUseProgram(_program)); + } + + for (UniformMap::iterator i = _uniforms.begin(), end = _uniforms.end(); i != end; ++i) { + i->_value.location = getUniformLocation(i->_key.c_str()); + i->_value.altered = true; + if (_isActive) { + i->_value.set(); + } + } + + return true; +} + +void Shader::activate() { + // Activate program. + GL_CALL(glUseProgram(_program)); + + // Reset changed uniform values. + for (UniformMap::iterator i = _uniforms.begin(), end = _uniforms.end(); i != end; ++i) { + i->_value.set(); + } + + _isActive = true; +} + +void Shader::deactivate() { + _isActive = false; +} + +GLint Shader::getAttributeLocation(const char *name) const { + GLint result = -1; + GL_ASSIGN(result, glGetAttribLocation(_program, name)); + return result; +} + +GLint Shader::getUniformLocation(const char *name) const { + GLint result = -1; + GL_ASSIGN(result, glGetUniformLocation(_program, name)); + return result; +} + +bool Shader::setUniform(const Common::String &name, ShaderUniformValue *value) { + UniformMap::iterator uniformIter = _uniforms.find(name); + Uniform *uniform; + + if (uniformIter == _uniforms.end()) { + const GLint location = getUniformLocation(name.c_str()); + if (location == -1) { + delete value; + return false; + } + + uniform = &_uniforms[name]; + uniform->location = location; + } else { + uniform = &uniformIter->_value; + } + + uniform->value = Common::SharedPtr<ShaderUniformValue>(value); + uniform->altered = true; + if (_isActive) { + uniform->set(); + } + + return true; +} + +GLshader Shader::compileShader(const char *source, GLenum shaderType) { + GLshader handle; + GL_ASSIGN(handle, glCreateShader(shaderType)); + if (!handle) { + return 0; + } + + const char *const sources[2] = { + g_precisionDefines, + source + }; + + GL_CALL(glShaderSource(handle, ARRAYSIZE(sources), sources, nullptr)); + GL_CALL(glCompileShader(handle)); + + GLint result; + GL_CALL(glGetShaderiv(handle, GL_COMPILE_STATUS, &result)); + if (result == GL_FALSE) { + GLint logSize; + GL_CALL(glGetShaderiv(handle, GL_INFO_LOG_LENGTH, &logSize)); + + GLchar *log = new GLchar[logSize]; + GL_CALL(glGetShaderInfoLog(handle, logSize, nullptr, log)); + warning("Could not compile shader \"%s\": \"%s\"", source, log); + delete[] log; + + GL_CALL(glDeleteShader(handle)); + return 0; + } + + return handle; +} + +ShaderManager::ShaderManager() : _initializeShaders(true) { + for (int i = 0; i < ARRAYSIZE(_builtIn); ++i) { + _builtIn[i] = nullptr; + } +} + +ShaderManager::~ShaderManager() { + for (int i = 0; i < ARRAYSIZE(_builtIn); ++i) { + delete _builtIn[i]; + } +} + +void ShaderManager::notifyDestroy() { + for (int i = 0; i < ARRAYSIZE(_builtIn); ++i) { + _builtIn[i]->destroy(); + } +} + +void ShaderManager::notifyCreate() { + if (_initializeShaders) { + _initializeShaders = false; + + _builtIn[kDefault] = new Shader(g_defaultVertexShader, g_defaultFragmentShader); + _builtIn[kCLUT8LookUp] = new Shader(g_defaultVertexShader, g_lookUpFragmentShader); + _builtIn[kCLUT8LookUp]->setUniform1I("palette", 1); + + for (uint i = 0; i < kMaxUsages; ++i) { + _builtIn[i]->setUniform1I("texture", 0); + } + } else { + for (int i = 0; i < ARRAYSIZE(_builtIn); ++i) { + _builtIn[i]->recreate(); + } + } +} + +Shader *ShaderManager::query(ShaderUsage shader) const { + if (shader == kMaxUsages) { + warning("OpenGL: ShaderManager::query used with kMaxUsages"); + return nullptr; + } + + return _builtIn[shader]; +} + +} // End of namespace OpenGL + +#endif // !USE_FORCED_GLES diff --git a/backends/graphics/opengl/shader.h b/backends/graphics/opengl/shader.h new file mode 100644 index 0000000000..ec1e516d14 --- /dev/null +++ b/backends/graphics/opengl/shader.h @@ -0,0 +1,288 @@ +/* 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 BACKENDS_GRAPHICS_OPENGL_SHADER_H +#define BACKENDS_GRAPHICS_OPENGL_SHADER_H + +#include "backends/graphics/opengl/opengl-sys.h" + +#if !USE_FORCED_GLES + +#include "common/singleton.h" +#include "common/hash-str.h" +#include "common/ptr.h" + +namespace OpenGL { + +/** + * A generic uniform value interface for a shader program. + */ +class ShaderUniformValue { +public: + virtual ~ShaderUniformValue() {} + + /** + * Setup the the value to the given location. + * + * @param location Location of the uniform. + */ + virtual void set(GLint location) const = 0; +}; + +/** + * Integer value for a shader uniform. + */ +class ShaderUniformInteger : public ShaderUniformValue { +public: + ShaderUniformInteger(GLint value) : _value(value) {} + + virtual void set(GLint location) const override; + +private: + const GLint _value; +}; + +/** + * Float value for a shader uniform. + */ +class ShaderUniformFloat : public ShaderUniformValue { +public: + ShaderUniformFloat(GLfloat value) : _value(value) {} + + virtual void set(GLint location) const override; + +private: + const GLfloat _value; +}; + +/** + * 4x4 Matrix value for a shader uniform. + */ +class ShaderUniformMatrix44 : public ShaderUniformValue { +public: + ShaderUniformMatrix44(const GLfloat *mat44) { + memcpy(_matrix, mat44, sizeof(_matrix)); + } + + virtual void set(GLint location) const override; + +private: + GLfloat _matrix[4*4]; +}; + +class Shader { +public: + Shader(const Common::String &vertex, const Common::String &fragment); + ~Shader(); + + /** + * Destroy the shader program. + * + * This keeps the vertex and fragment shader sources around and thus + * allows for recreating the shader on context recreation. It also keeps + * the uniform state around. + */ + void destroy(); + + /** + * Recreate shader program. + * + * @return true on success, false on failure. + */ + bool recreate(); + + /** + * Make shader active. + */ + void activate(); + + /** + * Make shader inactive. + */ + void deactivate(); + + /** + * Return location for attribute with given name. + * + * @param name Name of the attribute to look up in the shader. + * @return The loctaion of -1 if attribute was not found. + */ + GLint getAttributeLocation(const char *name) const; + GLint getAttributeLocation(const Common::String &name) const { + return getAttributeLocation(name.c_str()); + } + + /** + * Return location for uniform with given name. + * + * @param name Name of the uniform to look up in the shader. + * @return The location or -1 if uniform was not found. + */ + GLint getUniformLocation(const char *name) const; + GLint getUniformLocation(const Common::String &name) const { + return getUniformLocation(name.c_str()); + } + + /** + * Bind value to uniform. + * + * @param name The name of the uniform to be set. + * @param value The value to be set. + * @return 'false' on error (i.e. uniform unknown or otherwise), + * 'true' otherwise. + */ + bool setUniform(const Common::String &name, ShaderUniformValue *value); + + /** + * Bind integer value to uniform. + * + * @param name The name of the uniform to be set. + * @param value The value to be set. + * @return 'false' on error (i.e. uniform unknown or otherwise), + * 'true' otherwise. + */ + bool setUniform1I(const Common::String &name, GLint value) { + return setUniform(name, new ShaderUniformInteger(value)); + } +protected: + /** + * Vertex shader sources. + */ + const Common::String _vertex; + + /** + * Fragment shader sources. + */ + const Common::String _fragment; + + /** + * Whether the shader is active or not. + */ + bool _isActive; + + /** + * Shader program handle. + */ + GLprogram _program; + + /** + * A uniform descriptor. + * + * This stores the state of a shader uniform. The state is made up of the + * uniform location, whether the state was altered since last set, and the + * value of the uniform. + */ + struct Uniform { + Uniform() : location(-1), altered(false), value() {} + Uniform(GLint loc, ShaderUniformValue *val) + : location(loc), altered(true), value(val) {} + + /** + * Write uniform value into currently active shader. + */ + void set() { + if (altered && value) { + value->set(location); + altered = false; + } + } + + /** + * The location of the uniform or -1 in case it does not exist. + */ + GLint location; + + /** + * Whether the uniform state was aletered since last 'set'. + */ + bool altered; + + /** + * The value of the uniform. + */ + Common::SharedPtr<ShaderUniformValue> value; + }; + + typedef Common::HashMap<Common::String, Uniform> UniformMap; + + /** + * Map from uniform name to associated uniform description. + */ + UniformMap _uniforms; + + /** + * Compile a vertex or fragment shader. + * + * @param source Sources to the shader. + * @param shaderType Type of shader to compile (GL_FRAGMENT_SHADER_ARB or + * GL_VERTEX_SHADER_ARB) + * @return The shader object or 0 on failure. + */ + static GLshader compileShader(const char *source, GLenum shaderType); +}; + +class ShaderManager : public Common::Singleton<ShaderManager> { +public: + enum ShaderUsage { + /** Default shader implementing the GL fixed-function pipeline. */ + kDefault = 0, + + /** CLUT8 look up shader. */ + kCLUT8LookUp, + + /** Number of built-in shaders. Should not be used for query. */ + kMaxUsages + }; + + /** + * Notify shader manager about context destruction. + */ + void notifyDestroy(); + + /** + * Notify shader manager about context creation. + */ + void notifyCreate(); + + /** + * Query a built-in shader. + */ + Shader *query(ShaderUsage shader) const; + +private: + friend class Common::Singleton<SingletonBaseType>; + ShaderManager(); + ~ShaderManager(); + + bool _initializeShaders; + + Shader *_builtIn[kMaxUsages]; +}; + +} // End of namespace OpenGL + +/** Shortcut for accessing the font manager. */ +#define ShaderMan (OpenGL::ShaderManager::instance()) + +#endif // !USE_FORCED_GLES + +#endif diff --git a/backends/graphics/opengl/texture.cpp b/backends/graphics/opengl/texture.cpp index 7b0b22d630..33598b5488 100644 --- a/backends/graphics/opengl/texture.cpp +++ b/backends/graphics/opengl/texture.cpp @@ -21,8 +21,10 @@ */ #include "backends/graphics/opengl/texture.h" -#include "backends/graphics/opengl/extensions.h" -#include "backends/graphics/opengl/debug.h" +#include "backends/graphics/opengl/shader.h" +#include "backends/graphics/opengl/pipelines/pipeline.h" +#include "backends/graphics/opengl/pipelines/clut8.h" +#include "backends/graphics/opengl/framebuffer.h" #include "common/rect.h" #include "common/textconsole.h" @@ -41,94 +43,140 @@ static GLuint nextHigher2(GLuint v) { return ++v; } -GLint Texture::_maxTextureSize = 0; -void Texture::queryTextureInformation() { - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &_maxTextureSize); - debug(5, "OpenGL maximum texture size: %d", _maxTextureSize); +GLTexture::GLTexture(GLenum glIntFormat, GLenum glFormat, GLenum glType) + : _glIntFormat(glIntFormat), _glFormat(glFormat), _glType(glType), + _width(0), _height(0), _logicalWidth(0), _logicalHeight(0), + _texCoords(), _glFilter(GL_NEAREST), + _glTexture(0) { + create(); } -Texture::Texture(GLenum glIntFormat, GLenum glFormat, GLenum glType, const Graphics::PixelFormat &format) - : _glIntFormat(glIntFormat), _glFormat(glFormat), _glType(glType), _format(format), _glFilter(GL_NEAREST), - _glTexture(0), _textureData(), _userPixelData(), _allDirty(false) { - recreateInternalTexture(); +GLTexture::~GLTexture() { + GL_CALL_SAFE(glDeleteTextures, (1, &_glTexture)); } -Texture::~Texture() { - releaseInternalTexture(); - _textureData.free(); +void GLTexture::enableLinearFiltering(bool enable) { + if (enable) { + _glFilter = GL_LINEAR; + } else { + _glFilter = GL_NEAREST; + } + + bind(); + + GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _glFilter)); + GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _glFilter)); } -void Texture::releaseInternalTexture() { - GLCALL(glDeleteTextures(1, &_glTexture)); +void GLTexture::destroy() { + GL_CALL(glDeleteTextures(1, &_glTexture)); _glTexture = 0; } -void Texture::recreateInternalTexture() { +void GLTexture::create() { // Release old texture name in case it exists. - releaseInternalTexture(); + destroy(); // Get a new texture name. - GLCALL(glGenTextures(1, &_glTexture)); + GL_CALL(glGenTextures(1, &_glTexture)); // Set up all texture parameters. - GLCALL(glBindTexture(GL_TEXTURE_2D, _glTexture)); - GLCALL(glPixelStorei(GL_UNPACK_ALIGNMENT, 1)); - GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _glFilter)); - GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _glFilter)); - GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)); - GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)); - - // In case there is an actual texture setup we reinitialize it. - if (_textureData.getPixels()) { + bind(); + GL_CALL(glPixelStorei(GL_UNPACK_ALIGNMENT, 1)); + GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _glFilter)); + GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _glFilter)); + GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)); + GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)); + + // If a size is specified, allocate memory for it. + if (_width != 0 && _height != 0) { // Allocate storage for OpenGL texture. - GLCALL(glTexImage2D(GL_TEXTURE_2D, 0, _glIntFormat, _textureData.w, - _textureData.h, 0, _glFormat, _glType, NULL)); - - // Mark dirts such that it will be completely refreshed the next time. - flagDirty(); + GL_CALL(glTexImage2D(GL_TEXTURE_2D, 0, _glIntFormat, _width, _height, + 0, _glFormat, _glType, NULL)); } } -void Texture::enableLinearFiltering(bool enable) { - if (enable) { - _glFilter = GL_LINEAR; +void GLTexture::bind() const { + GL_CALL(glBindTexture(GL_TEXTURE_2D, _glTexture)); +} + +void GLTexture::setSize(uint width, uint height) { + const uint oldWidth = _width; + const uint oldHeight = _height; + + if (!g_context.NPOTSupported) { + _width = nextHigher2(width); + _height = nextHigher2(height); } else { - _glFilter = GL_NEAREST; + _width = width; + _height = height; } - GLCALL(glBindTexture(GL_TEXTURE_2D, _glTexture)); + _logicalWidth = width; + _logicalHeight = height; - GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _glFilter)); - GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _glFilter)); -} + // If a size is specified, allocate memory for it. + if (width != 0 && height != 0) { + const GLfloat texWidth = (GLfloat)width / _width; + const GLfloat texHeight = (GLfloat)height / _height; -void Texture::allocate(uint width, uint height) { - uint texWidth = width, texHeight = height; - if (!g_extNPOTSupported) { - texWidth = nextHigher2(texWidth); - texHeight = nextHigher2(texHeight); - } + _texCoords[0] = 0; + _texCoords[1] = 0; - // In case the needed texture dimension changed we will reinitialize the - // texture. - if (texWidth != _textureData.w || texHeight != _textureData.h) { - // Create a buffer for the texture data. - _textureData.create(texWidth, texHeight, _format); + _texCoords[2] = texWidth; + _texCoords[3] = 0; - // Set the texture. - GLCALL(glBindTexture(GL_TEXTURE_2D, _glTexture)); + _texCoords[4] = 0; + _texCoords[5] = texHeight; - // Allocate storage for OpenGL texture. - GLCALL(glTexImage2D(GL_TEXTURE_2D, 0, _glIntFormat, _textureData.w, - _textureData.h, 0, _glFormat, _glType, NULL)); + _texCoords[6] = texWidth; + _texCoords[7] = texHeight; + + // Allocate storage for OpenGL texture if necessary. + if (oldWidth != _width || oldHeight != _height) { + bind(); + GL_CALL(glTexImage2D(GL_TEXTURE_2D, 0, _glIntFormat, _width, + _height, 0, _glFormat, _glType, NULL)); + } } +} - // Create a sub-buffer for raw access. - _userPixelData = _textureData.getSubArea(Common::Rect(width, height)); +void GLTexture::updateArea(const Common::Rect &area, const Graphics::Surface &src) { + // Set the texture on the active texture unit. + bind(); + + // Update the actual texture. + // Although we have the area of the texture buffer we want to update we + // cannot take advantage of the left/right boundries here because it is + // not possible to specify a pitch to glTexSubImage2D. To be precise, with + // plain OpenGL we could set GL_UNPACK_ROW_LENGTH to achieve this. However, + // OpenGL ES 1.0 does not support GL_UNPACK_ROW_LENGTH. Thus, we are left + // with the following options: + // + // 1) (As we do right now) Simply always update the whole texture lines of + // rect changed. This is simplest to implement. In case performance is + // really an issue we can think of switching to another method. + // + // 2) Copy the dirty rect to a temporary buffer and upload that by using + // glTexSubImage2D. This is what the Android backend does. It is more + // complicated though. + // + // 3) Use glTexSubImage2D per line changed. This is what the old OpenGL + // graphics manager did but it is much slower! Thus, we do not use it. + GL_CALL(glTexSubImage2D(GL_TEXTURE_2D, 0, 0, area.top, src.w, area.height(), + _glFormat, _glType, src.getBasePtr(0, area.top))); +} + +// +// Surface +// + +Surface::Surface() + : _allDirty(false), _dirtyArea() { } -void Texture::copyRectToTexture(uint x, uint y, uint w, uint h, const void *srcPtr, uint srcPitch) { +void Surface::copyRectToTexture(uint x, uint y, uint w, uint h, const void *srcPtr, uint srcPitch) { Graphics::Surface *dstSurf = getSurface(); assert(x + w <= dstSurf->w); assert(y + h <= dstSurf->h); @@ -159,50 +207,74 @@ void Texture::copyRectToTexture(uint x, uint y, uint w, uint h, const void *srcP } } -void Texture::fill(uint32 color) { +void Surface::fill(uint32 color) { Graphics::Surface *dst = getSurface(); dst->fillRect(Common::Rect(dst->w, dst->h), color); flagDirty(); } -void Texture::draw(GLfloat x, GLfloat y, GLfloat w, GLfloat h) { - // Only do any processing when the Texture is initialized. - if (!_textureData.getPixels()) { - return; +Common::Rect Surface::getDirtyArea() const { + if (_allDirty) { + return Common::Rect(getWidth(), getHeight()); + } else { + return _dirtyArea; + } +} + +// +// Surface implementations +// + +Texture::Texture(GLenum glIntFormat, GLenum glFormat, GLenum glType, const Graphics::PixelFormat &format) + : Surface(), _format(format), _glTexture(glIntFormat, glFormat, glType), + _textureData(), _userPixelData() { +} + +Texture::~Texture() { + _textureData.free(); +} + +void Texture::destroy() { + _glTexture.destroy(); +} + +void Texture::recreate() { + _glTexture.create(); + + // In case image date exists assure it will be completely refreshed next + // time. + if (_textureData.getPixels()) { + flagDirty(); + } +} + +void Texture::enableLinearFiltering(bool enable) { + _glTexture.enableLinearFiltering(enable); +} + +void Texture::allocate(uint width, uint height) { + // Assure the texture can contain our user data. + _glTexture.setSize(width, height); + + // In case the needed texture dimension changed we will reinitialize the + // texture data buffer. + if (_glTexture.getWidth() != _textureData.w || _glTexture.getHeight() != _textureData.h) { + // Create a buffer for the texture data. + _textureData.create(_glTexture.getWidth(), _glTexture.getHeight(), _format); } - // First update any potentional changes. - updateTexture(); - - // Set the texture. - GLCALL(glBindTexture(GL_TEXTURE_2D, _glTexture)); - - // Calculate the texture rect that will be drawn. - const GLfloat texWidth = (GLfloat)_userPixelData.w / _textureData.w; - const GLfloat texHeight = (GLfloat)_userPixelData.h / _textureData.h; - const GLfloat texcoords[4*2] = { - 0, 0, - texWidth, 0, - 0, texHeight, - texWidth, texHeight - }; - GLCALL(glTexCoordPointer(2, GL_FLOAT, 0, texcoords)); - - // Calculate the screen rect where the texture will be drawn. - const GLfloat vertices[4*2] = { - x, y, - x + w, y, - x, y + h, - x + w, y + h - }; - GLCALL(glVertexPointer(2, GL_FLOAT, 0, vertices)); - - // Draw the texture to the screen buffer. - GLCALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)); -} - -void Texture::updateTexture() { + // Create a sub-buffer for raw access. + _userPixelData = _textureData.getSubArea(Common::Rect(width, height)); + + // The whole texture is dirty after we changed the size. This fixes + // multiple texture size changes without any actual update in between. + // Without this we might try to write a too big texture into the GL + // texture. + flagDirty(); +} + +void Texture::updateGLTexture() { if (!isDirty()) { return; } @@ -211,7 +283,7 @@ void Texture::updateTexture() { // In case we use linear filtering we might need to duplicate the last // pixel row/column to avoid glitches with filtering. - if (_glFilter == GL_LINEAR) { + if (_glTexture.isLinearFilteringEnabled()) { if (dirtyArea.right == _userPixelData.w && _userPixelData.w != _textureData.w) { uint height = dirtyArea.height(); @@ -238,42 +310,12 @@ void Texture::updateTexture() { } } - // Set the texture. - GLCALL(glBindTexture(GL_TEXTURE_2D, _glTexture)); - - // Update the actual texture. - // Although we keep track of the dirty part of the texture buffer we - // cannot take advantage of the left/right boundries here because it is - // not possible to specify a pitch to glTexSubImage2D. To be precise, with - // plain OpenGL we could set GL_UNPACK_ROW_LENGTH to achieve this. However, - // OpenGL ES 1.0 does not support GL_UNPACK_ROW_LENGTH. Thus, we are left - // with the following options: - // - // 1) (As we do right now) Simply always update the whole texture lines of - // rect changed. This is simplest to implement. In case performance is - // really an issue we can think of switching to another method. - // - // 2) Copy the dirty rect to a temporary buffer and upload that by using - // glTexSubImage2D. This is what the Android backend does. It is more - // complicated though. - // - // 3) Use glTexSubImage2D per line changed. This is what the old OpenGL - // graphics manager did but it is much slower! Thus, we do not use it. - GLCALL(glTexSubImage2D(GL_TEXTURE_2D, 0, 0, dirtyArea.top, _textureData.w, dirtyArea.height(), - _glFormat, _glType, _textureData.getBasePtr(0, dirtyArea.top))); + _glTexture.updateArea(dirtyArea, _textureData); // We should have handled everything, thus not dirty anymore. clearDirty(); } -Common::Rect Texture::getDirtyArea() const { - if (_allDirty) { - return Common::Rect(_userPixelData.w, _userPixelData.h); - } else { - return _dirtyArea; - } -} - TextureCLUT8::TextureCLUT8(GLenum glIntFormat, GLenum glFormat, GLenum glType, const Graphics::PixelFormat &format) : Texture(glIntFormat, glFormat, glType, format), _clut8Data(), _palette(new byte[256 * format.bytesPerPixel]) { memset(_palette, 0, sizeof(byte) * format.bytesPerPixel); @@ -301,6 +343,25 @@ Graphics::PixelFormat TextureCLUT8::getFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } +void TextureCLUT8::setColorKey(uint colorKey) { + // We remove all alpha bits from the palette entry of the color key. + // This makes sure its properly handled as color key. + const uint32 aMask = (0xFF >> _format.aLoss) << _format.aShift; + + if (_format.bytesPerPixel == 2) { + uint16 *palette = (uint16 *)_palette + colorKey; + *palette &= ~aMask; + } else if (_format.bytesPerPixel == 4) { + uint32 *palette = (uint32 *)_palette + colorKey; + *palette &= ~aMask; + } else { + warning("TextureCLUT8::setColorKey: Unsupported pixel depth %d", _format.bytesPerPixel); + } + + // A palette changes means we need to refresh the whole surface. + flagDirty(); +} + namespace { template<typename ColorType> inline void convertPalette(ColorType *dst, const byte *src, uint colors, const Graphics::PixelFormat &format) { @@ -312,14 +373,12 @@ inline void convertPalette(ColorType *dst, const byte *src, uint colors, const G } // End of anonymous namespace void TextureCLUT8::setPalette(uint start, uint colors, const byte *palData) { - const Graphics::PixelFormat &hardwareFormat = getHardwareFormat(); - - if (hardwareFormat.bytesPerPixel == 2) { - convertPalette<uint16>((uint16 *)_palette + start, palData, colors, hardwareFormat); - } else if (hardwareFormat.bytesPerPixel == 4) { - convertPalette<uint32>((uint32 *)_palette + start, palData, colors, hardwareFormat); + if (_format.bytesPerPixel == 2) { + convertPalette<uint16>((uint16 *)_palette + start, palData, colors, _format); + } else if (_format.bytesPerPixel == 4) { + convertPalette<uint32>((uint32 *)_palette + start, palData, colors, _format); } else { - warning("TextureCLUT8::setPalette: Unsupported pixel depth: %d", hardwareFormat.bytesPerPixel); + warning("TextureCLUT8::setPalette: Unsupported pixel depth: %d", _format.bytesPerPixel); } // A palette changes means we need to refresh the whole surface. @@ -343,7 +402,7 @@ inline void doPaletteLookUp(PixelType *dst, const byte *src, uint width, uint he } } // End of anonymous namespace -void TextureCLUT8::updateTexture() { +void TextureCLUT8::updateGLTexture() { if (!isDirty()) { return; } @@ -368,7 +427,223 @@ void TextureCLUT8::updateTexture() { } // Do generic handling of updating the texture. - Texture::updateTexture(); + Texture::updateGLTexture(); +} + +#if !USE_FORCED_GL +TextureRGB555::TextureRGB555() + : Texture(GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0)), + _rgb555Data() { +} + +TextureRGB555::~TextureRGB555() { + _rgb555Data.free(); +} + +void TextureRGB555::allocate(uint width, uint height) { + Texture::allocate(width, height); + + // We only need to reinitialize our RGB555 surface when the output size + // changed. + if (width == _rgb555Data.w && height == _rgb555Data.h) { + return; + } + + _rgb555Data.create(width, height, Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)); +} + +Graphics::PixelFormat TextureRGB555::getFormat() const { + return Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); +} + +void TextureRGB555::updateTexture() { + if (!isDirty()) { + return; + } + + // Convert color space. + Graphics::Surface *outSurf = Texture::getSurface(); + + const Common::Rect dirtyArea = getDirtyArea(); + + uint16 *dst = (uint16 *)outSurf->getBasePtr(dirtyArea.left, dirtyArea.top); + const uint dstAdd = outSurf->pitch - 2 * dirtyArea.width(); + + const uint16 *src = (const uint16 *)_rgb555Data.getBasePtr(dirtyArea.left, dirtyArea.top); + const uint srcAdd = _rgb555Data.pitch - 2 * dirtyArea.width(); + + for (int height = dirtyArea.height(); height > 0; --height) { + for (int width = dirtyArea.width(); width > 0; --width) { + const uint16 color = *src++; + + *dst++ = ((color & 0x7C00) << 1) // R + | (((color & 0x03E0) << 1) | ((color & 0x0200) >> 4)) // G + | (color & 0x001F); // B + } + + src = (const uint16 *)((const byte *)src + srcAdd); + dst = (uint16 *)((byte *)dst + dstAdd); + } + + // Do generic handling of updating the texture. + Texture::updateGLTexture(); +} +#endif // !USE_FORCED_GL + +#if !USE_FORCED_GLES + +// _clut8Texture needs 8 bits internal precision, otherwise graphics glitches +// can occur. GL_ALPHA does not have any internal precision requirements. +// However, in practice (according to fuzzie) it's 8bit. If we run into +// problems, we need to switch to GL_R8 and GL_RED, but that is only supported +// for ARB_texture_rg and GLES3+ (EXT_rexture_rg does not support GL_R8). +TextureCLUT8GPU::TextureCLUT8GPU() + : _clut8Texture(GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE), + _paletteTexture(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE), + _target(new TextureTarget()), _clut8Pipeline(new CLUT8LookUpPipeline()), + _clut8Vertices(), _clut8Data(), _userPixelData(), _palette(), + _paletteDirty(false) { + // Allocate space for 256 colors. + _paletteTexture.setSize(256, 1); + + // Setup pipeline. + _clut8Pipeline->setFramebuffer(_target); + _clut8Pipeline->setPaletteTexture(&_paletteTexture); + _clut8Pipeline->setColor(1.0f, 1.0f, 1.0f, 1.0f); +} + +TextureCLUT8GPU::~TextureCLUT8GPU() { + delete _clut8Pipeline; + delete _target; + _clut8Data.free(); +} + +void TextureCLUT8GPU::destroy() { + _clut8Texture.destroy(); + _paletteTexture.destroy(); + _target->destroy(); +} + +void TextureCLUT8GPU::recreate() { + _clut8Texture.create(); + _paletteTexture.create(); + _target->create(); + + // In case image date exists assure it will be completely refreshed next + // time. + if (_clut8Data.getPixels()) { + flagDirty(); + _paletteDirty = true; + } +} + +void TextureCLUT8GPU::enableLinearFiltering(bool enable) { + _target->getTexture()->enableLinearFiltering(enable); +} + +void TextureCLUT8GPU::allocate(uint width, uint height) { + // Assure the texture can contain our user data. + _clut8Texture.setSize(width, height); + _target->setSize(width, height); + + // In case the needed texture dimension changed we will reinitialize the + // texture data buffer. + if (_clut8Texture.getWidth() != _clut8Data.w || _clut8Texture.getHeight() != _clut8Data.h) { + // Create a buffer for the texture data. + _clut8Data.create(_clut8Texture.getWidth(), _clut8Texture.getHeight(), Graphics::PixelFormat::createFormatCLUT8()); + } + + // Create a sub-buffer for raw access. + _userPixelData = _clut8Data.getSubArea(Common::Rect(width, height)); + + // Setup structures for internal rendering to _glTexture. + _clut8Vertices[0] = 0; + _clut8Vertices[1] = 0; + + _clut8Vertices[2] = width; + _clut8Vertices[3] = 0; + + _clut8Vertices[4] = 0; + _clut8Vertices[5] = height; + + _clut8Vertices[6] = width; + _clut8Vertices[7] = height; + + // The whole texture is dirty after we changed the size. This fixes + // multiple texture size changes without any actual update in between. + // Without this we might try to write a too big texture into the GL + // texture. + flagDirty(); +} + +Graphics::PixelFormat TextureCLUT8GPU::getFormat() const { + return Graphics::PixelFormat::createFormatCLUT8(); +} + +void TextureCLUT8GPU::setColorKey(uint colorKey) { + _palette[colorKey * 4 + 3] = 0x00; + + _paletteDirty = true; +} + +void TextureCLUT8GPU::setPalette(uint start, uint colors, const byte *palData) { + byte *dst = _palette + start * 4; + + while (colors-- > 0) { + memcpy(dst, palData, 3); + dst[3] = 0xFF; + + dst += 4; + palData += 3; + } + + _paletteDirty = true; +} + +const GLTexture &TextureCLUT8GPU::getGLTexture() const { + return *_target->getTexture(); +} + +void TextureCLUT8GPU::updateGLTexture() { + const bool needLookUp = Surface::isDirty() || _paletteDirty; + + // Update CLUT8 texture if necessary. + if (Surface::isDirty()) { + _clut8Texture.updateArea(getDirtyArea(), _clut8Data); + clearDirty(); + } + + // Update palette if necessary. + if (_paletteDirty) { + Graphics::Surface palSurface; + palSurface.init(256, 1, 256, _palette, +#ifdef SCUMM_LITTLE_ENDIAN + Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24) // ABGR8888 +#else + Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0) // RGBA8888 +#endif + ); + + _paletteTexture.updateArea(Common::Rect(256, 1), palSurface); + _paletteDirty = false; + } + + // In case any data changed, do color look up and store result in _target. + if (needLookUp) { + lookUpColors(); + } +} + +void TextureCLUT8GPU::lookUpColors() { + // Setup pipeline to do color look up. + Pipeline *oldPipeline = g_context.setPipeline(_clut8Pipeline); + + // Do color look up. + g_context.getActivePipeline()->drawTexture(_clut8Texture, _clut8Vertices); + + // Restore old state. + g_context.setPipeline(oldPipeline); } +#endif // !USE_FORCED_GLES } // End of namespace OpenGL diff --git a/backends/graphics/opengl/texture.h b/backends/graphics/opengl/texture.h index ad70833544..3be09cb9f9 100644 --- a/backends/graphics/opengl/texture.h +++ b/backends/graphics/opengl/texture.h @@ -32,115 +32,267 @@ namespace OpenGL { +class Shader; + /** - * An OpenGL texture wrapper. It automatically takes care of all OpenGL - * texture handling issues and also provides access to the texture data. + * A simple GL texture object abstraction. + * + * This is used for low-level GL texture handling. */ -class Texture { +class GLTexture { public: /** - * Create a new texture with the specific internal format. + * Constrcut a new GL texture object. * * @param glIntFormat The internal format to use. * @param glFormat The input format. * @param glType The input type. - * @param format The format used for the texture input. */ - Texture(GLenum glIntFormat, GLenum glFormat, GLenum glType, const Graphics::PixelFormat &format); - virtual ~Texture(); + GLTexture(GLenum glIntFormat, GLenum glFormat, GLenum glType); + ~GLTexture(); + + /** + * Enable or disable linear texture filtering. + * + * @param enable true to enable and false to disable. + */ + void enableLinearFiltering(bool enable); + + /** + * Test whether linear filtering is enabled. + */ + bool isLinearFilteringEnabled() const { return (_glFilter == GL_LINEAR); } /** * Destroy the OpenGL texture name. */ - void releaseInternalTexture(); + void destroy(); + + /** + * Create the OpenGL texture name. + */ + void create(); + + /** + * Bind the texture to the active texture unit. + */ + void bind() const; + + /** + * Sets the size of the texture in pixels. + * + * The internal OpenGL texture might have a different size. To query the + * actual size use getWidth()/getHeight(). + * + * @param width The desired logical width. + * @param height The desired logical height. + */ + void setSize(uint width, uint height); + + /** + * Copy image data to the texture. + * + * @param area The area to update. + * @param src Surface for the whole texture containing the pixel data + * to upload. Only the area described by area will be + * uploaded. + */ + void updateArea(const Common::Rect &area, const Graphics::Surface &src); /** - * Create the OpenGL texture name and flag the whole texture as dirty. + * Query the GL texture's width. */ - void recreateInternalTexture(); + uint getWidth() const { return _width; } + + /** + * Query the GL texture's height. + */ + uint getHeight() const { return _height; } + + /** + * Query the logical texture's width. + */ + uint getLogicalWidth() const { return _logicalWidth; } + + /** + * Query the logical texture's height. + */ + uint getLogicalHeight() const { return _logicalHeight; } + + /** + * Obtain texture coordinates for rectangular drawing. + */ + const GLfloat *getTexCoords() const { return _texCoords; } + + /** + * Obtain texture name. + * + * Beware that the texture name changes whenever create is used. + * destroy will invalidate the texture name. + */ + GLuint getGLTexture() const { return _glTexture; } +private: + const GLenum _glIntFormat; + const GLenum _glFormat; + const GLenum _glType; + + uint _width, _height; + uint _logicalWidth, _logicalHeight; + GLfloat _texCoords[4*2]; + + GLint _glFilter; + + GLuint _glTexture; +}; + +/** + * Interface for OpenGL implementations of a 2D surface. + */ +class Surface { +public: + Surface(); + virtual ~Surface() {} + + /** + * Destroy OpenGL description of surface. + */ + virtual void destroy() = 0; + + /** + * Recreate OpenGL description of surface. + */ + virtual void recreate() = 0; /** * Enable or disable linear texture filtering. * * @param enable true to enable and false to disable. */ - void enableLinearFiltering(bool enable); + virtual void enableLinearFiltering(bool enable) = 0; /** - * Allocate texture space for the desired dimensions. This wraps any - * handling of requirements for POT textures. + * Allocate storage for surface. * * @param width The desired logical width. * @param height The desired logical height. */ - virtual void allocate(uint width, uint height); + virtual void allocate(uint width, uint height) = 0; + /** + * Copy image data to the surface. + * + * The format of the input data needs to match the format returned by + * getFormat. + * + * @param x X coordinate of upper left corner to copy data to. + * @param y Y coordinate of upper left corner to copy data to. + * @param w Width of the image data to copy. + * @param h Height of the image data to copy. + * @param src Pointer to image data. + * @param srcPitch The number of bytes in a row of the image data. + */ void copyRectToTexture(uint x, uint y, uint w, uint h, const void *src, uint srcPitch); + /** + * Fill the surface with a fixed color. + * + * @param color Color value in format returned by getFormat. + */ void fill(uint32 color); - void draw(GLfloat x, GLfloat y, GLfloat w, GLfloat h); - void flagDirty() { _allDirty = true; } - bool isDirty() const { return _allDirty || !_dirtyArea.isEmpty(); } - - uint getWidth() const { return _userPixelData.w; } - uint getHeight() const { return _userPixelData.h; } + virtual bool isDirty() const { return _allDirty || !_dirtyArea.isEmpty(); } - /** - * @return The hardware format of the texture data. - */ - const Graphics::PixelFormat &getHardwareFormat() const { return _format; } + virtual uint getWidth() const = 0; + virtual uint getHeight() const = 0; /** * @return The logical format of the texture data. */ - virtual Graphics::PixelFormat getFormat() const { return _format; } + virtual Graphics::PixelFormat getFormat() const = 0; - virtual Graphics::Surface *getSurface() { return &_userPixelData; } - virtual const Graphics::Surface *getSurface() const { return &_userPixelData; } + virtual Graphics::Surface *getSurface() = 0; + virtual const Graphics::Surface *getSurface() const = 0; /** - * @return Whether the texture data is using a palette. + * @return Whether the surface is having a palette. */ virtual bool hasPalette() const { return false; } + /** + * Set color key for paletted textures. + * + * This needs to be called after any palette update affecting the color + * key. Calling this multiple times will result in multiple color indices + * to be treated as color keys. + */ + virtual void setColorKey(uint colorKey) {} virtual void setPalette(uint start, uint colors, const byte *palData) {} - virtual void *getPalette() { return 0; } - virtual const void *getPalette() const { return 0; } - /** - * Query texture related OpenGL information from the context. This only - * queries the maximum texture size for now. + * Update underlying OpenGL texture to reflect current state. */ - static void queryTextureInformation(); + virtual void updateGLTexture() = 0; /** - * @return Return the maximum texture dimensions supported. + * Obtain underlying OpenGL texture. */ - static GLint getMaximumTextureSize() { return _maxTextureSize; } + virtual const GLTexture &getGLTexture() const = 0; protected: - virtual void updateTexture(); + void clearDirty() { _allDirty = false; _dirtyArea = Common::Rect(); } Common::Rect getDirtyArea() const; private: - const GLenum _glIntFormat; - const GLenum _glFormat; - const GLenum _glType; + bool _allDirty; + Common::Rect _dirtyArea; +}; + +/** + * An OpenGL texture wrapper. It automatically takes care of all OpenGL + * texture handling issues and also provides access to the texture data. + */ +class Texture : public Surface { +public: + /** + * Create a new texture with the specific internal format. + * + * @param glIntFormat The internal format to use. + * @param glFormat The input format. + * @param glType The input type. + * @param format The format used for the texture input. + */ + Texture(GLenum glIntFormat, GLenum glFormat, GLenum glType, const Graphics::PixelFormat &format); + virtual ~Texture(); + + virtual void destroy(); + + virtual void recreate(); + + virtual void enableLinearFiltering(bool enable); + + virtual void allocate(uint width, uint height); + + virtual uint getWidth() const { return _userPixelData.w; } + virtual uint getHeight() const { return _userPixelData.h; } + + /** + * @return The logical format of the texture data. + */ + virtual Graphics::PixelFormat getFormat() const { return _format; } + + virtual Graphics::Surface *getSurface() { return &_userPixelData; } + virtual const Graphics::Surface *getSurface() const { return &_userPixelData; } + + virtual void updateGLTexture(); + virtual const GLTexture &getGLTexture() const { return _glTexture; } +protected: const Graphics::PixelFormat _format; - GLint _glFilter; - GLuint _glTexture; +private: + GLTexture _glTexture; Graphics::Surface _textureData; Graphics::Surface _userPixelData; - - bool _allDirty; - Common::Rect _dirtyArea; - void clearDirty() { _allDirty = false; _dirtyArea = Common::Rect(); } - - static GLint _maxTextureSize; }; class TextureCLUT8 : public Texture { @@ -154,21 +306,95 @@ public: virtual bool hasPalette() const { return true; } + virtual void setColorKey(uint colorKey); virtual void setPalette(uint start, uint colors, const byte *palData); - virtual void *getPalette() { return _palette; } - virtual const void *getPalette() const { return _palette; } - virtual Graphics::Surface *getSurface() { return &_clut8Data; } virtual const Graphics::Surface *getSurface() const { return &_clut8Data; } -protected: + virtual void updateGLTexture(); +private: + Graphics::Surface _clut8Data; + byte *_palette; +}; + +#if !USE_FORCED_GL +class TextureRGB555 : public Texture { +public: + TextureRGB555(); + virtual ~TextureRGB555(); + + virtual void allocate(uint width, uint height); + + virtual Graphics::PixelFormat getFormat() const; + + virtual Graphics::Surface *getSurface() { return &_rgb555Data; } + virtual const Graphics::Surface *getSurface() const { return &_rgb555Data; } + virtual void updateTexture(); +private: + Graphics::Surface _rgb555Data; +}; +#endif // !USE_FORCED_GL + +#if !USE_FORCED_GLES +class TextureTarget; +class CLUT8LookUpPipeline; + +class TextureCLUT8GPU : public Surface { +public: + TextureCLUT8GPU(); + virtual ~TextureCLUT8GPU(); + + virtual void destroy(); + + virtual void recreate(); + virtual void enableLinearFiltering(bool enable); + + virtual void allocate(uint width, uint height); + + virtual bool isDirty() const { return _paletteDirty || Surface::isDirty(); } + + virtual uint getWidth() const { return _userPixelData.w; } + virtual uint getHeight() const { return _userPixelData.h; } + + virtual Graphics::PixelFormat getFormat() const; + + virtual bool hasPalette() const { return true; } + + virtual void setColorKey(uint colorKey); + virtual void setPalette(uint start, uint colors, const byte *palData); + + virtual Graphics::Surface *getSurface() { return &_userPixelData; } + virtual const Graphics::Surface *getSurface() const { return &_userPixelData; } + + virtual void updateGLTexture(); + virtual const GLTexture &getGLTexture() const; + + static bool isSupportedByContext() { + return g_context.shadersSupported + && g_context.multitextureSupported + && g_context.framebufferObjectSupported; + } private: + void lookUpColors(); + + GLTexture _clut8Texture; + GLTexture _paletteTexture; + + TextureTarget *_target; + CLUT8LookUpPipeline *_clut8Pipeline; + + GLfloat _clut8Vertices[4*2]; + Graphics::Surface _clut8Data; - byte *_palette; + Graphics::Surface _userPixelData; + + byte _palette[4 * 256]; + bool _paletteDirty; }; +#endif // !USE_FORCED_GLES } // End of namespace OpenGL diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 0d140ee4d7..7ea1860d93 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -45,6 +45,100 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(uint desktopWidth, uint deskt SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + // Setup proper SDL OpenGL context creation. +#if SDL_VERSION_ATLEAST(2, 0, 0) + OpenGL::ContextType glContextType; + + // Context version 1.4 is choosen arbitrarily based on what most shader + // extensions were written against. +#define DEFAULT_GL_MAJOR 1 +#define DEFAULT_GL_MINOR 4 + +#define DEFAULT_GLES_MAJOR 1 +#define DEFAULT_GLES_MINOR 1 + +#define DEFAULT_GLES2_MAJOR 2 +#define DEFAULT_GLES2_MINOR 0 + +#if USE_FORCED_GL + glContextType = OpenGL::kContextGL; + _glContextProfileMask = 0; + _glContextMajor = DEFAULT_GL_MAJOR; + _glContextMinor = DEFAULT_GL_MINOR; +#elif USE_FORCED_GLES + glContextType = OpenGL::kContextGLES; + _glContextProfileMask = SDL_GL_CONTEXT_PROFILE_ES; + _glContextMajor = DEFAULT_GLES_MAJOR; + _glContextMinor = DEFAULT_GLES_MINOR; +#elif USE_FORCED_GLES2 + glContextType = OpenGL::kContextGLES2; + _glContextProfileMask = SDL_GL_CONTEXT_PROFILE_ES; + _glContextMajor = DEFAULT_GLES2_MAJOR; + _glContextMinor = DEFAULT_GLES2_MINOR; +#else + bool noDefaults = false; + + // Obtain the default GL(ES) context SDL2 tries to setup. + // + // Please note this might not actually be SDL2's defaults when multiple + // instances of this object have been created. But that is no issue + // because then we already set up what we want to use. + // + // In case no defaults are given we prefer OpenGL over OpenGL ES. + if (SDL_GL_GetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, &_glContextProfileMask) != 0) { + _glContextProfileMask = 0; + noDefaults = true; + } + + if (SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &_glContextMajor) != 0) { + noDefaults = true; + } + + if (SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &_glContextMinor) != 0) { + noDefaults = true; + } + + if (noDefaults) { + if (_glContextProfileMask == SDL_GL_CONTEXT_PROFILE_ES) { + _glContextMajor = DEFAULT_GLES_MAJOR; + _glContextMinor = DEFAULT_GLES_MINOR; + } else { + _glContextProfileMask = 0; + _glContextMajor = DEFAULT_GL_MAJOR; + _glContextMinor = DEFAULT_GL_MINOR; + } + } + + if (_glContextProfileMask == SDL_GL_CONTEXT_PROFILE_ES) { + if (_glContextMajor >= 2) { + glContextType = OpenGL::kContextGLES2; + } else { + glContextType = OpenGL::kContextGLES; + } + } else if (_glContextProfileMask == SDL_GL_CONTEXT_PROFILE_CORE) { + glContextType = OpenGL::kContextGL; + + // Core profile does not allow legacy functionality, which we use. + // Thus we request a standard OpenGL context. + _glContextProfileMask = 0; + _glContextMajor = DEFAULT_GL_MAJOR; + _glContextMinor = DEFAULT_GL_MINOR; + } else { + glContextType = OpenGL::kContextGL; + } +#undef DEFAULT_GL_MAJOR +#undef DEFAULT_GL_MINOR +#undef DEFAULT_GLES_MAJOR +#undef DEFAULT_GLES_MINOR +#undef DEFAULT_GLES2_MAJOR +#undef DEFAULT_GLES2_MINOR +#endif + + setContextType(glContextType); +#else + setContextType(OpenGL::kContextGL); +#endif + // Retrieve a list of working fullscreen modes #if SDL_VERSION_ATLEAST(2, 0, 0) const int numModes = SDL_GetNumDisplayModes(0); @@ -100,6 +194,10 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(uint desktopWidth, uint deskt } OpenGLSdlGraphicsManager::~OpenGLSdlGraphicsManager() { +#if SDL_VERSION_ATLEAST(2, 0, 0) + notifyContextDestroy(); + SDL_GL_DeleteContext(_glContext); +#endif } void OpenGLSdlGraphicsManager::activateManager() { @@ -210,20 +308,26 @@ Common::List<Graphics::PixelFormat> OpenGLSdlGraphicsManager::getSupportedFormat // RGBA4444 formats.push_back(Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0)); -#ifndef USE_GLES +#if !USE_FORCED_GLES && !USE_FORCED_GLES2 +#if !USE_FORCED_GL + if (!isGLESContext()) { +#endif #ifdef SCUMM_LITTLE_ENDIAN - // RGBA8888 - formats.push_back(Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0)); + // RGBA8888 + formats.push_back(Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0)); #else - // ABGR8888 - formats.push_back(Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24)); + // ABGR8888 + formats.push_back(Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24)); +#endif +#if !USE_FORCED_GL + } +#endif #endif - // ARGB8888, this should not be here, but Sword25 requires it. :-/ - formats.push_back(Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24)); // RGB555, this is used by SCUMM HE 16 bit games. + // This is not natively supported by OpenGL ES implementations, we convert + // the pixel format internally. formats.push_back(Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)); -#endif formats.push_back(Graphics::PixelFormat::createFormatCLUT8()); @@ -305,6 +409,10 @@ void OpenGLSdlGraphicsManager::refreshScreen() { #endif } +void *OpenGLSdlGraphicsManager::getProcAddress(const char *name) const { + return SDL_GL_GetProcAddress(name); +} + bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) { // In case we request a fullscreen mode we will use the mode the user // has chosen last time or the biggest mode available. @@ -378,6 +486,11 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) { flags |= SDL_WINDOW_RESIZABLE; } + // Request a OpenGL (ES) context we can use. + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, _glContextProfileMask); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, _glContextMajor); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, _glContextMinor); + if (!_window->createWindow(width, height, flags)) { // We treat fullscreen requests as a "hint" for now. This means in // case it is not available we simply ignore it. @@ -390,13 +503,6 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) { } } -#ifdef USE_GLES - // SDL2 will create a GLES2 context by default, so this is needed for GLES1-profile - // functions to work. - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); -#endif _glContext = SDL_GL_CreateContext(_window->getSDLWindow()); if (!_glContext) { return false; diff --git a/backends/graphics/openglsdl/openglsdl-graphics.h b/backends/graphics/openglsdl/openglsdl-graphics.h index 1552593575..51edcb4363 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.h +++ b/backends/graphics/openglsdl/openglsdl-graphics.h @@ -67,10 +67,13 @@ protected: virtual bool loadVideoMode(uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format); virtual void refreshScreen(); + + virtual void *getProcAddress(const char *name) const; private: bool setupMode(uint width, uint height); #if SDL_VERSION_ATLEAST(2, 0, 0) + int _glContextProfileMask, _glContextMajor, _glContextMinor; SDL_GLContext _glContext; #else uint32 _lastVideoModeLoad; diff --git a/backends/module.mk b/backends/module.mk index 3d412c031a..2e100d215d 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -3,6 +3,7 @@ MODULE := backends MODULE_OBJS := \ base-backend.o \ modular-backend.o \ + audiocd/audiocd-stream.o \ audiocd/default/default-audiocd.o \ events/default/default-events.o \ fs/abstract-fs.o \ @@ -52,10 +53,16 @@ endif # OpenGL specific source files. ifdef USE_OPENGL MODULE_OBJS += \ + graphics/opengl/context.o \ graphics/opengl/debug.o \ - graphics/opengl/extensions.o \ + graphics/opengl/framebuffer.o \ graphics/opengl/opengl-graphics.o \ - graphics/opengl/texture.o + graphics/opengl/shader.o \ + graphics/opengl/texture.o \ + graphics/opengl/pipelines/clut8.o \ + graphics/opengl/pipelines/fixed.o \ + graphics/opengl/pipelines/pipeline.o \ + graphics/opengl/pipelines/shader.o endif # SDL specific source files. @@ -97,6 +104,7 @@ endif ifdef MACOSX MODULE_OBJS += \ + audiocd/macosx/macosx-audiocd.o \ midi/coreaudio.o \ midi/coremidi.o \ updates/macosx/macosx-updates.o \ @@ -105,6 +113,7 @@ endif ifdef WIN32 MODULE_OBJS += \ + audiocd/win32/win32-audiocd.o \ fs/windows/windows-fs.o \ fs/windows/windows-fs-factory.o \ midi/windows.o \ @@ -128,6 +137,11 @@ MODULE_OBJS += \ events/ps3sdl/ps3sdl-events.o endif +ifdef USE_LINUXCD +MODULE_OBJS += \ + audiocd/linux/linux-audiocd.o +endif + ifeq ($(BACKEND),tizen) MODULE_OBJS += \ timer/tizen/timer.o diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index d8ab549c3a..6cd938ec9c 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -57,21 +57,16 @@ class DCHardware { }; class DCCDManager : public DefaultAudioCDManager { - // Initialize the specified CD drive for audio playback. - bool openCD(int drive); - - // Poll cdrom status - // Returns true if cd audio is playing - bool pollCD(); - - // Play cdrom audio track - void playCD(int track, int num_loops, int start_frame, int duration); +public: + // Poll cdrom status + // Returns true if cd audio is playing + bool isPlaying() const; - // Stop cdrom audio track - void stopCD(); + // Play cdrom audio track + bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false); - // Update cdrom audio status - void updateCD(); + // Stop cdrom audio track + void stop(); }; class OSystem_Dreamcast : private DCHardware, public EventsBaseBackend, public PaletteManager, public FilesystemFactory diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp index eede796991..c84aef9c47 100644 --- a/backends/platform/dc/dcmain.cpp +++ b/backends/platform/dc/dcmain.cpp @@ -90,43 +90,53 @@ static bool find_track(int track, int &first_sec, int &last_sec) return false; } -void DCCDManager::playCD(int track, int num_loops, int start_frame, int duration) -{ - int first_sec, last_sec; +bool DCCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) { + DefaultAudioCDManager::play(track, numLoops, startFrame, duration, onlyEmulate); + + // If we're playing now return here + if (isPlaying()) { + return true; + } + + // If we should only play emulated tracks stop here. + if (onlyEmulate) { + return false; + } + + int firstSec, lastSec; #if 1 - if (num_loops) - --num_loops; + if (numLoops) + --numLoops; #endif - if (num_loops>14) num_loops=14; - else if (num_loops<0) num_loops=15; // infinity - if (!find_track(track, first_sec, last_sec)) - return; - if (duration) - last_sec = first_sec + start_frame + duration; - first_sec += start_frame; - play_cdda_sectors(first_sec, last_sec, num_loops); -} -void DCCDManager::stopCD() -{ - stop_cdda(); -} + if (numLoops > 14) + numLoops = 14; + else if (numLoops < 0) + numLoops = 15; // infinity -bool DCCDManager::pollCD() -{ - extern int getCdState(); - return getCdState() == 3; + if (!find_track(track, firstSec, lastSec)) + return false; + + if (duration) + lastSec = firstSec + startFrame + duration; + + firstSec += startFrame; + play_cdda_sectors(firstSec, lastSec, numLoops); + + return true; } -void DCCDManager::updateCD() -{ - // Dummy. The CD drive takes care of itself. +void DCCDManager::stop() { + DefaultAudioCDManager::stop(); + stop_cdda(); } -bool DCCDManager::openCD(int drive) -{ - // Dummy. - return true; +bool DCCDManager::isPlaying() const { + if (DefaultAudioCDManager::isPlaying()) + return true; + + extern int getCdState(); + return getCdState() == 3; } void OSystem_Dreamcast::setWindowCaption(const char *caption) diff --git a/backends/platform/dingux/README.GCW0 b/backends/platform/dingux/README.GCW0 index 1875e5323a..1b7e30e266 100644 --- a/backends/platform/dingux/README.GCW0 +++ b/backends/platform/dingux/README.GCW0 @@ -24,3 +24,12 @@ It's pretty simple if you are running Linux on an x86/amd64 machine: 3. Run backends/platform/dingux/build.gcw0.sh script 4. Copy the resulting file scummvm.opk to your device 5. Enjoy + +Troubleshooting +=============== +In case you need to submit a bugreport, you may find the log file at the +following path: + + /var/tmp/scummvm.log + +The log file is being overwritten at every ScummVM run. diff --git a/backends/platform/dingux/build.gcw0.sh b/backends/platform/dingux/build.gcw0.sh index c1a4fa29c2..7a31d4fd27 100755 --- a/backends/platform/dingux/build.gcw0.sh +++ b/backends/platform/dingux/build.gcw0.sh @@ -3,4 +3,4 @@ export PATH=/opt/gcw0-toolchain/usr/bin:$PATH # Disable high resolution engines since we have 320x240 hardware -./configure --host=gcw0 --enable-plugins --default-dynamic --enable-release --disable-mt32emu --disable-hq-scalers && make -j6 gcw-opk && ls -l scummvm.opk +./configure --host=gcw0 --enable-plugins --default-dynamic --enable-release && make -j6 gcw-opk && ls -l scummvm.opk diff --git a/backends/platform/dingux/dingux.mk b/backends/platform/dingux/dingux.mk index 56c26c3be1..dc87e41241 100644 --- a/backends/platform/dingux/dingux.mk +++ b/backends/platform/dingux/dingux.mk @@ -59,19 +59,20 @@ endif echo >> $(gcw0_bundle)/README.man.txt echo '[General README]' >> $(gcw0_bundle)/README.man.txt echo >> $(gcw0_bundle)/README.man.txt - cat README >> $(gcw0_bundle)/README.man.txt + cat $(srcdir)/README | sed -e 's/\[/ā¦/g' -e 's/\]/ā§/g' -e '/^1\.1)/,$$ s/^[0-9][0-9]*\.[0-9][0-9]*.*/\[&\]/' >> $(gcw0_bundle)/README.man.txt + # $(CP) GeneralUser\ GS\ FluidSynth\ v1.44.sf2 $(gcw0_bundle)/ gcw0-opk-unstripped: $(gcw0_bundle) $(CP) $(PLUGINS) $(gcw0_bundle)/plugins/ $(CP) $(EXECUTABLE) $(gcw0_bundle)/scummvm - ./dists/gcw0/opk_make.sh -d $(gcw0_bundle) -o scummvm + $(srcdir)/dists/gcw0/opk_make.sh -d $(gcw0_bundle) -o scummvm gcw-opk: $(gcw0_bundle) $(STRIP) $(gcw0_bundle)/plugins/* $(STRIP) $(gcw0_bundle)/scummvm - ./dists/gcw0/opk_make.sh -d $(gcw0_bundle) -o scummvm + $(srcdir)/dists/gcw0/opk_make.sh -d $(gcw0_bundle) -o scummvm GeneralUser_GS_1.44-FluidSynth.zip: curl -s http://www.scummvm.org/frs/extras/SoundFont/GeneralUser_GS_1.44-FluidSynth.zip -o GeneralUser_GS_1.44-FluidSynth.zip diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index c53f57523d..f23192cd9d 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -715,7 +715,7 @@ void OSystem_DS::deleteMutex(MutexRef mutex) { // and should be replaced by an AudioCDManager subclass, // see backends/audiocd/ and common/system.h -bool OSystem_DS::openCD(int drive) { +bool OSystem_DS::openCD() { return DS::CD::checkCD(); } diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index f4dbac66f7..9f73e125c2 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -130,7 +130,8 @@ public: // FIXME/TODO: The CD API as follows is *obsolete* // and should be replaced by an AudioCDManager subclass, // see backends/audiocd/ and common/system.h - virtual bool openCD(int drive); + virtual bool openCD(); + virtual void closeCD() {} virtual bool pollCD(); virtual void playCD(int track, int num_loops, int start_frame, int duration); virtual void stopCD(); diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp index 65da6bbf85..7bbf8d1fff 100644 --- a/backends/platform/sdl/amigaos/amigaos-main.cpp +++ b/backends/platform/sdl/amigaos/amigaos-main.cpp @@ -24,13 +24,44 @@ #if defined(__amigaos4__) +#include "backends/fs/amigaos4/amigaos4-fs.h" #include "backends/platform/sdl/amigaos/amigaos.h" #include "backends/plugins/sdl/sdl-provider.h" #include "base/main.h" int main(int argc, char *argv[]) { - // Set up a stack cookie to avoid crashes due to too few stack set by users + // The following will gather the application name and add the install path + // to a variable in AmigaOS4's ENV(ARC) system. It will be placed in AppPaths + // so that ScummVM can become AmiUpdate aware + const char *const appname = "ScummVM"; + + BPTR lock; + APTR oldwin; + + // Obtain a lock to the home directory + if ((lock = IDOS->GetProgramDir())) { + TEXT progpath[2048]; + TEXT apppath[1024] = "AppPaths"; + + if (IDOS->DevNameFromLock(lock, + progpath, + sizeof(progpath), + DN_FULLPATH)) { + + // Stop any "Insert volume..." type requesters + oldwin = IDOS->SetProcWindow((APTR)-1); + + // Finally, set the variable to the path the executable was run from + IDOS->AddPart( apppath, appname, 1024); + IDOS->SetVar( apppath, progpath, -1, GVF_GLOBAL_ONLY|GVF_SAVE_VAR ); + + // Turn system requesters back on + IDOS->SetProcWindow( oldwin ); + } + } + + // Set up a stack cookie to avoid crashes from a stack set too low static const char *stack_cookie __attribute__((used)) = "$STACK: 600000"; // Create our OSystem instance @@ -44,7 +75,7 @@ int main(int argc, char *argv[]) { PluginManager::instance().addPluginProvider(new SDLPluginProvider()); #endif - // Invoke the actual ScummVM main entry point: + // Invoke the actual ScummVM main entry point int res = scummvm_main(argc, argv); // Free OSystem diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index 38a2d7441c..7652c0d833 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -27,9 +27,10 @@ #ifdef MACOSX -#include "backends/platform/sdl/macosx/macosx.h" +#include "backends/audiocd/macosx/macosx-audiocd.h" #include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h" #include "backends/platform/sdl/macosx/appmenu_osx.h" +#include "backends/platform/sdl/macosx/macosx.h" #include "backends/updates/macosx/macosx-updates.h" #include "backends/taskbar/macosx/macosx-taskbar.h" @@ -170,4 +171,8 @@ Common::String OSystem_MacOSX::getSystemLanguage() const { #endif // USE_DETECTLANG } +AudioCDManager *OSystem_MacOSX::createAudioCDManager() { + return createMacOSXAudioCDManager(); +} + #endif diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h index c8b4beaeec..6905284a5f 100644 --- a/backends/platform/sdl/macosx/macosx.h +++ b/backends/platform/sdl/macosx/macosx.h @@ -38,6 +38,11 @@ public: virtual void init(); virtual void initBackend(); virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0); + +protected: + // Override createAudioCDManager() to get our Mac-specific + // version. + virtual AudioCDManager *createAudioCDManager(); }; #endif diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp index 525c74a91a..e2a642b288 100644 --- a/backends/platform/sdl/posix/posix.cpp +++ b/backends/platform/sdl/posix/posix.cpp @@ -36,6 +36,11 @@ #include "backends/fs/posix/posix-fs.h" #include "backends/taskbar/unity/unity-taskbar.h" +#ifdef USE_LINUXCD +#include "backends/audiocd/linux/linux-audiocd.h" +#endif + +#include <errno.h> #include <sys/stat.h> #include <sys/wait.h> #include <unistd.h> @@ -239,4 +244,12 @@ bool OSystem_POSIX::displayLogFile() { } +AudioCDManager *OSystem_POSIX::createAudioCDManager() { +#ifdef USE_LINUXCD + return createLinuxAudioCDManager(); +#else + return OSystem_SDL::createAudioCDManager(); +#endif +} + #endif diff --git a/backends/platform/sdl/posix/posix.h b/backends/platform/sdl/posix/posix.h index f67515ddb3..0514d30191 100644 --- a/backends/platform/sdl/posix/posix.h +++ b/backends/platform/sdl/posix/posix.h @@ -59,6 +59,8 @@ protected: virtual Common::String getDefaultConfigFileName(); virtual Common::WriteStream *createLogFile(); + + virtual AudioCDManager *createAudioCDManager(); }; #endif diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index fffb9d56d9..c55753194b 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -245,15 +245,7 @@ void OSystem_SDL::initBackend() { _timerManager = new SdlTimerManager(); #endif - if (_audiocdManager == 0) { - // Audio CD support was removed with SDL 2.0 -#if SDL_VERSION_ATLEAST(2, 0, 0) - _audiocdManager = new DefaultAudioCDManager(); -#else - _audiocdManager = new SdlAudioCDManager(); -#endif - - } + _audiocdManager = createAudioCDManager(); // Setup a custom program icon. _window->setupIcon(); @@ -491,6 +483,15 @@ Common::TimerManager *OSystem_SDL::getTimerManager() { #endif } +AudioCDManager *OSystem_SDL::createAudioCDManager() { + // Audio CD support was removed with SDL 2.0 +#if SDL_VERSION_ATLEAST(2, 0, 0) + return new DefaultAudioCDManager(); +#else + return new SdlAudioCDManager(); +#endif +} + #ifdef USE_OPENGL const OSystem::GraphicsMode *OSystem_SDL::getSupportedGraphicsModes() const { diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 5ee56d0568..c93c8308a7 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -104,6 +104,11 @@ protected: */ virtual void initSDL(); + /** + * Create the audio CD manager + */ + virtual AudioCDManager *createAudioCDManager(); + // Logging virtual Common::WriteStream *createLogFile() { return 0; } Backends::Log::Log *_logger; diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp index 0f70c00b40..fbab7eb782 100644 --- a/backends/platform/sdl/win32/win32.cpp +++ b/backends/platform/sdl/win32/win32.cpp @@ -35,6 +35,7 @@ #include "common/error.h" #include "common/textconsole.h" +#include "backends/audiocd/win32/win32-audiocd.h" #include "backends/platform/sdl/win32/win32.h" #include "backends/platform/sdl/win32/win32-window.h" #include "backends/saves/windows/windows-saves.h" @@ -318,4 +319,8 @@ void OSystem_Win32::addSysArchivesToSearchSet(Common::SearchSet &s, int priority OSystem_SDL::addSysArchivesToSearchSet(s, priority); } +AudioCDManager *OSystem_Win32::createAudioCDManager() { + return createWin32AudioCDManager(); +} + #endif diff --git a/backends/platform/sdl/win32/win32.h b/backends/platform/sdl/win32/win32.h index 473e78ff0b..ca0843e834 100644 --- a/backends/platform/sdl/win32/win32.h +++ b/backends/platform/sdl/win32/win32.h @@ -49,6 +49,10 @@ protected: virtual Common::String getDefaultConfigFileName(); virtual Common::WriteStream *createLogFile(); + + // Override createAudioCDManager() to get our Mac-specific + // version. + virtual AudioCDManager *createAudioCDManager(); }; #endif diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h index f9da09d3eb..e2465e4767 100644 --- a/backends/platform/symbian/src/portdefs.h +++ b/backends/platform/symbian/src/portdefs.h @@ -65,7 +65,8 @@ typedef signed long int int32; #undef remove #endif -#define SMALL_SCREEN_DEVICE +#define GUI_ONLY_FULLSCREEN +#define GUI_ENABLE_KEYSDIALOG #define DISABLE_COMMAND_LINE #define USE_RGB_COLOR diff --git a/backends/platform/tizen/graphics.cpp b/backends/platform/tizen/graphics.cpp index 759c4e519d..61dbfc38fb 100644 --- a/backends/platform/tizen/graphics.cpp +++ b/backends/platform/tizen/graphics.cpp @@ -56,6 +56,7 @@ result TizenGraphicsManager::Construct() { loadEgl(); // Notify the OpenGL code about our context. + setContextType(OpenGL::kContextGLES); // We default to RGB565 and RGBA5551 which is closest to the actual output // mode we setup. @@ -206,3 +207,7 @@ bool TizenGraphicsManager::loadVideoMode(uint requestedWidth, uint requestedHeig void TizenGraphicsManager::refreshScreen() { eglSwapBuffers(_eglDisplay, _eglSurface); } + +void *TizenGraphicsManager::getProcAddress(const char *name) const { + return eglGetProcAddress(name); +} diff --git a/backends/platform/tizen/graphics.h b/backends/platform/tizen/graphics.h index 1522d66bbe..1798b078d8 100644 --- a/backends/platform/tizen/graphics.h +++ b/backends/platform/tizen/graphics.h @@ -63,6 +63,8 @@ protected: void refreshScreen(); + void *getProcAddress(const char *name) const; + const Graphics::Font *getFontOSD(); private: diff --git a/backends/platform/wince/portdefs.h b/backends/platform/wince/portdefs.h index 3304ee0893..c74fc39169 100644 --- a/backends/platform/wince/portdefs.h +++ b/backends/platform/wince/portdefs.h @@ -30,7 +30,8 @@ // Missing string/stdlib/assert declarations for WinCE 2.xx #if _WIN32_WCE < 300 - #define SMALL_SCREEN_DEVICE + #define GUI_ONLY_FULLSCREEN + #define GUI_ENABLE_KEYSDIALOG void *calloc(size_t n, size_t s); int isalnum(int c); diff --git a/backends/taskbar/macosx/dockplugin/dockplugin.m b/backends/taskbar/macosx/dockplugin/dockplugin.m new file mode 100644 index 0000000000..9d864ef2a8 --- /dev/null +++ b/backends/taskbar/macosx/dockplugin/dockplugin.m @@ -0,0 +1,125 @@ +/* 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 <Cocoa/Cocoa.h> + +@interface ScummVMDockTilePlugIn : NSObject <NSDockTilePlugIn> { + NSMenu *recentGamesMenu; +} +@end + +@interface StartGameMenuItem : NSMenuItem { + NSString *game; +} +- (IBAction) startGame; +- (NSMenuItem*)initWithGame:(NSString *)gameId description:(NSString*)desc icon:(NSString*)iconFile; +@end + +@implementation ScummVMDockTilePlugIn + +- (id)init { + self = [super init]; + if (self) { + recentGamesMenu = nil; + } + return self; +} + +- (void)dealloc { + [recentGamesMenu release]; + [super dealloc]; +} + + +- (void)setDockTile:(NSDockTile *)dockTile { +} + +- (NSMenu*)dockMenu { + // Get the list or recent games + CFPreferencesAppSynchronize(CFSTR("org.scummvm.scummvm")); + NSArray *array = CFPreferencesCopyAppValue(CFSTR("recentGames"), CFSTR("org.scummvm.scummvm")); + if (array == nil) + return nil; + + // Create the menu + if (recentGamesMenu == nil) + recentGamesMenu = [[NSMenu alloc] init]; + else + [recentGamesMenu removeAllItems]; + + NSEnumerator *enumerator = [array objectEnumerator]; + NSDictionary *recentGame; + while (recentGame = [enumerator nextObject]) { + NSString *gameId = [recentGame valueForKey:@"game"]; + NSString *desc = [recentGame valueForKey:@"description"]; + NSString *iconFile = [recentGame valueForKey:@"icon"]; + + StartGameMenuItem *menuItem = [[StartGameMenuItem alloc] initWithGame:gameId description:desc icon:iconFile]; + [recentGamesMenu addItem:menuItem]; + [menuItem release]; + } + + return recentGamesMenu; +} + +@end + +@implementation StartGameMenuItem + +- (NSMenuItem*)initWithGame:(NSString *)gameId description:(NSString*)desc icon:(NSString*)iconFile { + self = [super initWithTitle:(desc == nil ? gameId : desc) action:@selector(startGame) keyEquivalent:@""]; + [self setTarget:self]; + + if (iconFile != nil) { + NSImage *image = [[NSImage alloc] initWithContentsOfFile:iconFile]; + [self setImage:image]; + [image release]; + } + + game = gameId; + [game retain]; + + return self; +} + +- (void)dealloc { + [game release]; + [super dealloc]; +} + +- (IBAction) startGame { + NSLog(@"Starting Game %@...", game); + + NSString *scummVMPath = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:@"org.scummvm.scummvm"]; + if (scummVMPath == nil) { + NSLog(@"Cannot find ScummVM.app!"); + return; + } + // Start ScummVM.app with the game ID as argument + NSURL *url = [NSURL fileURLWithPath:scummVMPath]; + NSMutableDictionary *args = [[NSMutableDictionary alloc] init]; + [args setObject:[NSArray arrayWithObject:game] forKey:NSWorkspaceLaunchConfigurationArguments]; + [[NSWorkspace sharedWorkspace] launchApplicationAtURL:url options:NSWorkspaceLaunchDefault configuration:args error:nil]; + [args release]; +} + +@end diff --git a/backends/taskbar/macosx/macosx-taskbar.h b/backends/taskbar/macosx/macosx-taskbar.h index 5d5b9d02cd..55bb97a691 100644 --- a/backends/taskbar/macosx/macosx-taskbar.h +++ b/backends/taskbar/macosx/macosx-taskbar.h @@ -37,6 +37,7 @@ public: virtual void setProgressValue(int completed, int total); virtual void setProgressState(TaskbarProgressState state); virtual void setCount(int count); + virtual void addRecent(const Common::String &name, const Common::String &description); virtual void notifyError(); virtual void clearError(); diff --git a/backends/taskbar/macosx/macosx-taskbar.mm b/backends/taskbar/macosx/macosx-taskbar.mm index ae087dfb85..577320b79d 100644 --- a/backends/taskbar/macosx/macosx-taskbar.mm +++ b/backends/taskbar/macosx/macosx-taskbar.mm @@ -29,9 +29,6 @@ // NSDockTile was introduced with Mac OS X 10.5. // Try provide backward compatibility by avoiding NSDockTile symbols. -// TODO: Implement recent list, maybe as a custom menu on dock tile when app is not running -// See Dock Tile plug-in at https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/customizing_docktile/CreatingaDockTilePlug-in/CreatingaDockTilePlug-in.html - #include "backends/taskbar/macosx/macosx-taskbar.h" #include "common/config-manager.h" #include "common/file.h" @@ -39,6 +36,9 @@ #include <AppKit/NSApplication.h> #include <AppKit/NSImage.h> #include <Foundation/NSString.h> +#include <Foundation/NSDictionary.h> +#include <Foundation/NSArray.h> +#include <Foundation/NSUserDefaults.h> #include <AppKit/NSImageView.h> #include <AppKit/NSColor.h> #include <AppKit/NSBezierPath.h> @@ -120,7 +120,7 @@ void MacOSXTaskbarManager::setOverlayIcon(const Common::String &name, const Comm initOverlayIconView(); CFStringRef imageFile = CFStringCreateWithCString(0, path.c_str(), kCFStringEncodingASCII); - NSImage* image = [[NSImage alloc] initWithContentsOfFile:(NSString *)imageFile]; + NSImage *image = [[NSImage alloc] initWithContentsOfFile:(NSString *)imageFile]; [_overlayIconView setImage:image]; [image release]; CFRelease(imageFile); @@ -234,5 +234,64 @@ return (path); \ return ""; } +void MacOSXTaskbarManager::addRecent(const Common::String &name, const Common::String &description) { + //warning("[MacOSXTaskbarManager::addRecent] Adding recent list entry: %s (%s)", name.c_str(), description.c_str()); + + if (_dockTile == nil) + return; + + // Store the game, description and icon in user preferences. + // The NSDockTilePlugin will retrieve them there to list them in the dock tile menu. + + CFStringRef gameName = CFStringCreateWithCString(0, name.c_str(), kCFStringEncodingASCII); + CFStringRef desc = CFStringCreateWithCString(0, description.c_str(), kCFStringEncodingASCII); + + // First build the dictionary for this game. + NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; + [dict setObject:(NSString *)gameName forKey:@"game"]; + [dict setObject:(NSString *)desc forKey:@"description"]; + + // Icon + Common::String iconPath = getIconPath(name); + if (!iconPath.empty()) { + CFStringRef icon = CFStringCreateWithCString(0, iconPath.c_str(), kCFStringEncodingASCII); + [dict setObject:(NSString *)icon forKey:@"icon"]; + CFRelease(icon); + } + + // Retrieve the current list of recent items and update it. + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSArray *oldArray = [defaults arrayForKey:@"recentGames"]; + if (oldArray == nil) { + [defaults setObject:[NSArray arrayWithObject:dict] forKey:@"recentGames"]; + } else { + NSMutableArray *newArray = [[NSMutableArray alloc] initWithArray:oldArray]; + // Insert the new game at the start + [newArray insertObject:dict atIndex:0]; + // If the game was already present in the array, remove it + for (int i = 1 ; i < [newArray count] ; ++i) { + NSDictionary *oldDict = [newArray objectAtIndex:i]; + if (oldDict == nil) + continue; + NSString *oldGame = [oldDict valueForKey:@"game"]; + if (oldGame != nil && [oldGame isEqualToString:(NSString*)gameName]) { + [newArray removeObjectAtIndex:i]; + break; + } + } + // And make sure we limit the size of the array to 5 games + if ([newArray count] > 5) + [newArray removeLastObject]; + [defaults setObject:newArray forKey:@"recentGames"]; + [newArray release]; + } + + // Finally release the dictionary + [dict release]; + CFRelease(gameName); + CFRelease(desc); +} + + #endif diff --git a/backends/updates/macosx/macosx-updates.h b/backends/updates/macosx/macosx-updates.h index fd2d1f46f5..6fb9af7712 100644 --- a/backends/updates/macosx/macosx-updates.h +++ b/backends/updates/macosx/macosx-updates.h @@ -39,8 +39,10 @@ public: virtual void setAutomaticallyChecksForUpdates(UpdateState state); virtual UpdateState getAutomaticallyChecksForUpdates(); - virtual void setUpdateCheckInterval(UpdateInterval interval); - virtual UpdateInterval getUpdateCheckInterval(); + virtual void setUpdateCheckInterval(int interval); + virtual int getUpdateCheckInterval(); + + virtual bool getLastUpdateCheckTimeAndDate(TimeDate &t); }; #endif diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm index a94f1c21fd..db9362a459 100644 --- a/backends/updates/macosx/macosx-updates.mm +++ b/backends/updates/macosx/macosx-updates.mm @@ -23,14 +23,18 @@ // Disable symbol overrides so that we can use system headers. #define FORBIDDEN_SYMBOL_ALLOW_ALL +#include "common/system.h" #include "backends/updates/macosx/macosx-updates.h" #ifdef USE_SPARKLE #include "common/translation.h" +#include "common/config-manager.h" #include <Cocoa/Cocoa.h> #include <Sparkle/Sparkle.h> +#include <AvailabilityMacros.h> + SUUpdater *sparkleUpdater; /** @@ -45,14 +49,22 @@ SUUpdater *sparkleUpdater; * */ MacOSXUpdateManager::MacOSXUpdateManager() { + NSBundle* mainBundle = [NSBundle mainBundle]; + + NSString *version = [mainBundle objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey]; + if (!version || [version isEqualToString:@""]) { + warning("Running not in bundle, skipping Sparkle initialization"); + + sparkleUpdater = nullptr; + return; + } + NSMenuItem *menuItem = [[NSApp mainMenu] itemAtIndex:0]; NSMenu *applicationMenu = [menuItem submenu]; // Init Sparkle sparkleUpdater = [SUUpdater sharedUpdater]; - NSBundle* mainBundle = [NSBundle mainBundle]; - NSString* feedbackURL = [mainBundle objectForInfoDictionaryKey:@"SUFeedURL"]; // Set appcast URL @@ -74,11 +86,13 @@ MacOSXUpdateManager::MacOSXUpdateManager() { // Finally give up our references to the objects [menuItem release]; - // Enable automatic update checking once a day (alternatively use - // checkForUpdates() here to check for updates on every startup) - // TODO: Should be removed when an update settings gui is implemented - setAutomaticallyChecksForUpdates(kUpdateStateEnabled); - setUpdateCheckInterval(kUpdateIntervalOneDay); + if (!ConfMan.hasKey("updates_check") + || ConfMan.getInt("updates_check") == Common::UpdateManager::kUpdateIntervalNotSupported) { + setAutomaticallyChecksForUpdates(kUpdateStateDisabled); + } else { + setAutomaticallyChecksForUpdates(kUpdateStateEnabled); + setUpdateCheckInterval(normalizeInterval(ConfMan.getInt("updates_check"))); + } } MacOSXUpdateManager::~MacOSXUpdateManager() { @@ -86,6 +100,9 @@ MacOSXUpdateManager::~MacOSXUpdateManager() { } void MacOSXUpdateManager::checkForUpdates() { + if (sparkleUpdater == nullptr) + return; + [sparkleUpdater checkForUpdatesInBackground]; } @@ -93,24 +110,38 @@ void MacOSXUpdateManager::setAutomaticallyChecksForUpdates(UpdateManager::Update if (state == kUpdateStateNotSupported) return; + if (sparkleUpdater == nullptr) + return; + [sparkleUpdater setAutomaticallyChecksForUpdates:(state == kUpdateStateEnabled ? YES : NO)]; } Common::UpdateManager::UpdateState MacOSXUpdateManager::getAutomaticallyChecksForUpdates() { + if (sparkleUpdater == nullptr) + return kUpdateStateDisabled; + if ([sparkleUpdater automaticallyChecksForUpdates]) return kUpdateStateEnabled; else return kUpdateStateDisabled; } -void MacOSXUpdateManager::setUpdateCheckInterval(UpdateInterval interval) { +void MacOSXUpdateManager::setUpdateCheckInterval(int interval) { + if (sparkleUpdater == nullptr) + return; + if (interval == kUpdateIntervalNotSupported) return; + interval = normalizeInterval(interval); + [sparkleUpdater setUpdateCheckInterval:(NSTimeInterval)interval]; } -Common::UpdateManager::UpdateInterval MacOSXUpdateManager::getUpdateCheckInterval() { +int MacOSXUpdateManager::getUpdateCheckInterval() { + if (sparkleUpdater == nullptr) + return kUpdateIntervalOneDay; + // This is kind of a hack but necessary, as the value stored by Sparkle // might have been changed outside of ScummVM (in which case we return the // default interval of one day) @@ -128,4 +159,30 @@ Common::UpdateManager::UpdateInterval MacOSXUpdateManager::getUpdateCheckInterva } } +bool MacOSXUpdateManager::getLastUpdateCheckTimeAndDate(TimeDate &t) { + if (sparkleUpdater == nullptr) + return false; + + NSDate *date = [sparkleUpdater lastUpdateCheckDate]; +#ifdef MAC_OS_X_VERSION_10_10 + NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + NSDateComponents *components = [gregorian components:(NSCalendarUnitDay | NSCalendarUnitWeekday) fromDate:date]; +#else + NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + NSDateComponents *components = [gregorian components:(NSDayCalendarUnit | NSWeekdayCalendarUnit) fromDate:date]; +#endif + + t.tm_wday = [components weekday]; + t.tm_year = [components year]; + t.tm_mon = [components month]; + t.tm_mday = [components day]; + t.tm_hour = [components hour]; + t.tm_min = [components minute]; + t.tm_sec = [components second]; + + [gregorian release]; + + return true; +} + #endif diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 1d4204352d..2c24c018ee 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -100,8 +100,9 @@ static const char HELP_STRING[] = " -u, --dump-scripts Enable script dumping if a directory called 'dumps'\n" " exists in the current directory\n" "\n" - " --cdrom=NUM CD drive to play CD audio from (default: 0 = first\n" - " drive)\n" + " --cdrom=DRIVE CD drive to play CD audio from; can either be a\n" + " drive, path, or numeric index (default: 0 = best\n" + " choice drive)\n" " --joystick[=NUM] Enable joystick input (default: 0 = first joystick)\n" " --platform=WORD Specify platform of game (allowed values: 2gs, 3do,\n" " acorn, amiga, atari, c64, fmtowns, nes, mac, pc, pc98,\n" diff --git a/base/main.cpp b/base/main.cpp index ff441df49c..587e32804f 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -75,6 +75,9 @@ #include "gui/launcher.h" #endif +#ifdef USE_UPDATES +#include "gui/updates-dialog.h" +#endif static bool launcherDialog() { @@ -458,6 +461,13 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { // Now as the event manager is created, setup the keymapper setupKeymapper(system); +#ifdef USE_UPDATES + if (!ConfMan.hasKey("updates_check")) { + GUI::UpdatesDialog dlg; + dlg.runModal(); + } +#endif + // Unless a game was specified, show the launcher dialog if (0 == ConfMan.getActiveDomain()) launcherDialog(); diff --git a/common/memstream.h b/common/memstream.h index 5ecc553454..a01973c6fa 100644 --- a/common/memstream.h +++ b/common/memstream.h @@ -25,6 +25,7 @@ #include "common/stream.h" #include "common/types.h" +#include "common/util.h" namespace Common { @@ -170,7 +171,7 @@ private: byte *old_data = _data; - _capacity = new_len + 32; + _capacity = MAX(new_len + 32, _capacity * 2); _data = (byte *)malloc(_capacity); _ptr = _data + _pos; diff --git a/common/module.mk b/common/module.mk index 67c498df00..570040c8e1 100644 --- a/common/module.mk +++ b/common/module.mk @@ -56,5 +56,10 @@ MODULE_OBJS += \ recorderfile.o endif +ifdef USE_UPDATES +MODULE_OBJS += \ + updates.o +endif + # Include common rules include $(srcdir)/rules.mk diff --git a/common/platform.cpp b/common/platform.cpp index 636c1ddb52..280185d862 100644 --- a/common/platform.cpp +++ b/common/platform.cpp @@ -27,6 +27,7 @@ namespace Common { const PlatformDescription g_platforms[] = { { "2gs", "2gs", "2gs", "Apple IIgs", kPlatformApple2GS }, + { "apple2", "apple2", "apple2", "Apple II", kPlatformApple2 }, { "3do", "3do", "3do", "3DO", kPlatform3DO }, { "acorn", "acorn", "acorn", "Acorn", kPlatformAcorn }, { "amiga", "ami", "amiga", "Amiga", kPlatformAmiga }, diff --git a/common/platform.h b/common/platform.h index 17a332b851..15bcddb62e 100644 --- a/common/platform.h +++ b/common/platform.h @@ -50,6 +50,7 @@ enum Platform { kPlatformSegaCD, kPlatform3DO, kPlatformPCEngine, + kPlatformApple2, kPlatformApple2GS, kPlatformPC98, kPlatformWii, diff --git a/common/updates.cpp b/common/updates.cpp new file mode 100644 index 0000000000..087002a7d3 --- /dev/null +++ b/common/updates.cpp @@ -0,0 +1,68 @@ +/* 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/system.h" +#include "common/updates.h" +#include "common/translation.h" + +namespace Common { + +static const int updateIntervals[] = { + UpdateManager::kUpdateIntervalNotSupported, + UpdateManager::kUpdateIntervalOneDay, + UpdateManager::kUpdateIntervalOneWeek, + UpdateManager::kUpdateIntervalOneMonth, + -1 +}; + +const int *UpdateManager::getUpdateIntervals() { + return updateIntervals; +} + +int UpdateManager::normalizeInterval(int interval) { + const int *val = updateIntervals; + + while (*val != -1) { + if (*val >= interval) + return *val; + val++; + } + + return val[-1]; // Return maximal acceptable value +} + +const char *UpdateManager::updateIntervalToString(int interval) { + switch (interval) { + case kUpdateIntervalNotSupported: + return _("Never"); + case kUpdateIntervalOneDay: + return _("Daily"); + case kUpdateIntervalOneWeek: + return _("Weekly"); + case kUpdateIntervalOneMonth: + return _("Monthly"); + default: + return _("<Bad value>"); + } +} + +} // End of namespace Common diff --git a/common/updates.h b/common/updates.h index 4c30987c38..3a3049d4df 100644 --- a/common/updates.h +++ b/common/updates.h @@ -20,8 +20,8 @@ * */ -#ifndef BACKENDS_UPDATES_ABSTRACT_H -#define BACKENDS_UPDATES_ABSTRACT_H +#ifndef COMMON_UPDATES_H +#define COMMON_UPDATES_H #if defined(USE_UPDATES) @@ -85,18 +85,50 @@ public: * * @param interval The interval. */ - virtual void setUpdateCheckInterval(UpdateInterval interval) {} + virtual void setUpdateCheckInterval(int interval) {} /** * Gets the update check interval. * * @return the update check interval. */ - virtual UpdateInterval getUpdateCheckInterval() { return kUpdateIntervalNotSupported; } + virtual int getUpdateCheckInterval() { return kUpdateIntervalNotSupported; } + + /** + * Gets last update check time + * + * @param t TimeDate struct to fill out + * @return flag indicating success + */ + virtual bool getLastUpdateCheckTimeAndDate(TimeDate &t) { return false; } + + /** + * Returns list of supported uptate intervals. + * Ending with '-1' which is not acceptable value. + * + * @return list of integer values representing update intervals in seconds. + */ + static const int *getUpdateIntervals(); + + /** + * Returns string representation of a given interval. + * + * @param interval The interval. + * @return pointer to localized string of given interval. + */ + static const char *updateIntervalToString(int interval); + + /** + * Rounds up the given interval to acceptable value. + * + * @param interval The interval. + * @return rounded up interval + */ + static int normalizeInterval(int interval); }; } // End of namespace Common #endif -#endif // BACKENDS_UPDATES_ABSTRACT_H +#endif // COMMON_UPDATES_H diff --git a/config.guess b/config.guess index 6c32c8645c..0967f2afa9 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2014-11-04' +timestamp='2016-04-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ timestamp='2014-11-04' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to <config-patches@gnu.org>. @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -168,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -197,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -207,13 +221,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -223,6 +237,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -235,6 +253,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -251,42 +272,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -359,16 +380,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -393,7 +414,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -618,13 +639,13 @@ EOF sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -663,11 +684,11 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -680,12 +701,12 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -790,14 +811,14 @@ EOF echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -879,7 +900,7 @@ EOF exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix @@ -902,7 +923,7 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) @@ -933,6 +954,9 @@ EOF crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -945,6 +969,9 @@ EOF ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -1021,7 +1048,7 @@ EOF echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} @@ -1100,7 +1127,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1249,6 +1276,9 @@ EOF SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1262,9 +1292,9 @@ EOF UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in @@ -1286,7 +1316,7 @@ EOF exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1317,7 +1347,7 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1359,7 +1389,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1370,6 +1400,9 @@ EOF x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac cat >&2 <<EOF @@ -1379,9 +1412,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config.sub b/config.sub index 7ffe373784..8d39c4ba39 100755 --- a/config.sub +++ b/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2014-12-03' +timestamp='2016-03-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ timestamp='2014-12-03' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,8 +53,7 @@ timestamp='2014-12-03' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -117,7 +116,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -255,12 +254,13 @@ case $basic_machine in | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ @@ -305,7 +305,7 @@ case $basic_machine in | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -376,12 +376,13 @@ case $basic_machine in | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ @@ -428,12 +429,13 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -518,6 +520,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -1373,11 +1378,11 @@ case $os in | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ @@ -1393,7 +1398,8 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1525,6 +1531,8 @@ case $os in ;; -nacl*) ;; + -ios) + ;; -none) ;; *) @@ -128,13 +128,13 @@ _timidity=auto _zlib=auto _mpeg2=auto _sparkle=auto +_osxdockplugin=auto _jpeg=auto _png=auto _theoradec=auto _faad=auto _fluidsynth=auto -_opengl=auto -_opengles=auto +_opengl_mode=auto _readline=auto _freetype2=auto _taskbar=auto @@ -183,6 +183,7 @@ _win32path="c:/scummvm" _amigaospath="Games:ScummVM" _staticlibpath= _xcodetoolspath= +_sparklepath= _sdlconfig=sdl-config _freetypeconfig=freetype-config _sdlpath="$PATH" @@ -941,6 +942,15 @@ Optional Features: --enable-verbose-build enable regular echoing of commands during build process --disable-bink don't build with Bink video support + --opengl-mode=MODE OpenGL (ES) mode to use for OpenGL output [auto] + available modes: auto for autodetection + none for disabling any OpenGL usage + any for runtime detection + gl for forcing OpenGL + gles for forcing OpenGL ES + gles2 for forcing OpenGL ES 2 + WARNING: only specify this manually if you know what + you are doing! Optional Libraries: --with-alsa-prefix=DIR Prefix where alsa is installed (optional) @@ -965,9 +975,6 @@ Optional Libraries: --with-mpeg2-prefix=DIR Prefix where libmpeg2 is installed (optional) --enable-mpeg2 enable mpeg2 codec for cutscenes [autodetect] - --with-opengl-prefix=DIR Prefix where OpenGL (ES) is installed (optional) - --disable-opengl disable OpenGL (ES) support [autodetect] - --with-jpeg-prefix=DIR Prefix where libjpeg is installed (optional) --disable-jpeg disable JPEG decoder [autodetect] @@ -987,6 +994,8 @@ Optional Libraries: --with-sparkle-prefix=DIR Prefix where sparkle is installed (Mac OS X only - optional) --disable-sparkle disable sparkle automatic update support [Mac OS X only - autodetect] + --disable-osx-dock-plugin disable the NSDockTilePlugin support [Mac OS X only - autodetect] + --with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional) @@ -1049,6 +1058,8 @@ for ac_option in $@; do --disable-zlib) _zlib=no ;; --enable-sparkle) _sparkle=yes ;; --disable-sparkle) _sparkle=no ;; + --enable-osx-dock-plugin) _osxdockplugin=yes;; + --disable-osx-dock-plugin) _osxdockplugin=no;; --enable-nasm) _nasm=yes ;; --disable-nasm) _nasm=no ;; --enable-mpeg2) _mpeg2=yes ;; @@ -1072,10 +1083,11 @@ for ac_option in $@; do --disable-updates) _updates=no ;; --enable-libunity) _libunity=yes ;; --disable-libunity) _libunity=no ;; - --enable-opengl) _opengl=yes ;; - --disable-opengl) _opengl=no ;; --enable-bink) _bink=yes ;; --disable-bink) _bink=no ;; + --opengl-mode=*) + _opengl_mode=`echo $ac_option | cut -d '=' -f 2` + ;; --enable-verbose-build) _verbose_build=yes ;; --enable-plugins) _dynamic_modules=yes ;; --default-dynamic) _plugins_default=dynamic ;; @@ -1163,8 +1175,7 @@ for ac_option in $@; do ;; --with-sparkle-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` - SPARKLE_CFLAGS="-F$arg" - SPARKLE_LIBS="-F$arg" + _sparklepath=$arg ;; --with-readline-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` @@ -1176,11 +1187,6 @@ for ac_option in $@; do LIBUNITY_CFLAGS="-I$arg/include" LIBUNITY_LIBS="-L$arg/lib" ;; - --with-opengl-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - OPENGL_CFLAGS="-I$arg/include" - OPENGL_LIBS="-L$arg/lib" - ;; --backend=*) _backend=`echo $ac_option | cut -d '=' -f 2` ;; @@ -2698,10 +2704,11 @@ if test -n "$_host"; then # since SDL2 manages dispmanx/GLES2 very well internally. # SDL1 is bit-rotten on this platform. _sdlconfig=sdl2-config - # OpenGL(ES) support is mature enough as to be the best option on + # OpenGL ES support is mature enough as to be the best option on # the Raspberry Pi, so it's enabled by default. - _opengl=yes - _opengles=yes + # The Raspberry Pi always supports OpenGL ES 2.0 contexts, thus we + # take advantage of those. + _opengl_mode=gles2 ;; dreamcast) append_var DEFINES "-DDISABLE_DEFAULT_SAVEFILEMANAGER" @@ -2762,21 +2769,19 @@ if test -n "$_host"; then gcw0) _sysroot=`$CXX --print-sysroot` _sdlpath=$_sysroot/usr/bin - append_var DEFINES "-DDINGUX -DGCW0" + append_var DEFINES "-DDINGUX -DGCW0 -DGUI_ONLY_FULLSCREEN" append_var DEFINES "-DREDUCE_MEMORY_USAGE" append_var CXXFLAGS "-mips32" _backend="dingux" + _alsa=no _mt32emu=no + _seq_midi=no + _timidity=no + _build_scalers=no _optimization_level=-O3 - # Disable alsa midi to get the port build on OpenDingux toolchain - _alsa=no _vkeybd=yes - _build_hq_scalers=no _keymapper=yes - # Force disable vorbis on dingux, it has terrible performance compared to tremor _vorbis=no - # Force disable seq on dingux, no way to use it and it would get enabled by default with configure - _seq_midi=no _port_mk="backends/platform/dingux/dingux.mk" ;; gp2x) @@ -3029,6 +3034,8 @@ if test -n "$_host"; then _mt32emu=no _timidity=no _vkeybd=yes + # Tizen relies on the OpenGL ES output thus we always enable it. + _opengl_mode=gles ;; webos) _backend="webos" @@ -3969,26 +3976,65 @@ echo "$_mpeg2" # # Check for Sparkle if updates support is enabled # -echocheck "Sparkle" -if test "$_updates" = no; then - _sparkle=no -else -if test "$_sparkle" = auto ; then - _sparkle=no - cat > $TMPC << EOF +# +# Check is NSDockTilePlugIn protocol is supported +# +case $_host_os in + darwin*) + echocheck "Sparkle" + if test "$_updates" = no; then + _sparkle=no + else + if test ! -z $_sparklepath ; then + SPARKLE_CFLAGS="-F$_sparklepath" + SPARKLE_LIBS="-F$_sparklepath" + fi + if test "$_sparkle" = auto ; then + _sparkle=no + cat > $TMPC << EOF #include <Cocoa/Cocoa.h> #include <Sparkle/Sparkle.h> int main(void) { SUUpdater *updater = [SUUpdater sharedUpdater]; return 0; } EOF - cc_check $SPARKLE_CFLAGS $SPARKLE_LIBS -framework Sparkle -ObjC++ -lobjc && _sparkle=yes -fi -if test "$_sparkle" = yes ; then - append_var LIBS "$SPARKLE_LIBS -framework Sparkle" - append_var INCLUDES "$SPARKLE_CFLAGS" -fi -define_in_config_if_yes "$_sparkle" 'USE_SPARKLE' -fi -echo "$_sparkle" + cc_check $SPARKLE_CFLAGS $SPARKLE_LIBS -framework Sparkle -ObjC++ -lobjc && _sparkle=yes + fi + if test "$_sparkle" = yes ; then + append_var LIBS "$SPARKLE_LIBS -framework Sparkle" + append_var INCLUDES "$SPARKLE_CFLAGS" + fi + define_in_config_if_yes "$_sparkle" 'USE_SPARKLE' + fi + echo "$_sparkle" + ;; + *) + _sparkle=no + ;; +esac + +# +# Check is NSDockTilePlugIn protocol is supported +# +case $_host_os in + darwin*) + # NSDockTilePlugIn was added in OS X 10.6, so will not be available when compiling on older OS X versions. + echocheck "DockTilePlugin" + if test "$_osxdockplugin" = auto ; then + _osxdockplugin=no + cat > $TMPC << EOF +#include <Cocoa/Cocoa.h> +@interface ScummVMDockTilePlugIn : NSObject <NSDockTilePlugIn> { +} +@end +EOF + cc_check -c -ObjC++ && _osxdockplugin=yes + fi + define_in_config_if_yes "$_osxdockplugin" 'USE_DOCKTILEPLUGIN' + echo "$_osxdockplugin" + ;; + *) + _osxdockplugin=no + ;; +esac # # Check for FluidSynth @@ -4191,113 +4237,115 @@ echocheck "OpenGL" case $_backend in openpandora) - # Only enable OpenGL ES on the OpanPandora if --enable-opengl is passed in explicitly. - if test "$_opengl" = yes ; then - _opengl=yes - _opengles=yes - OPENGL_LIBS="-lGLES_CM -lEGL -lX11" - OPENGL_CFLAGS="$OPENGL_LIBS" - append_var LIBS "$OPENGL_LIBS" - append_var INCLUDES "$OPENGL_CFLAGS" + # Only enable OpenGL ES on the OpanPandora if --opengl-mode=gles is passed in explicitly. + if test "$_opengl_mode" = "gles" ; then + append_var LIBS "-lGLES_CM -lEGL -lX11" + else + _opengl_mode=none fi ;; esac -if test "$_opengl" = auto ; then - _opengl=no - if test "$_backend" = "sdl" ; then - # Try different header filenames - # 1) GL/gl.h This is usually used on POSIX and Windows systems - # 2) OpenGL/gl.h This is used on Mac OS X - # 3) GLES/gl.h This is used for OpenGL ES 1.x - for i in "GL/gl.h" "OpenGL/gl.h" "GLES/gl.h"; do - # Test the current header for OpenGL - cat > $TMPC << EOF -#include <$i> -#include <stdio.h> -int main(void) { printf("ANTIVIRUS FALSE POSITIVE WORKAROUND"); return GL_VERSION_1_1; } -EOF - cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && break +if test "$_opengl_mode" = auto ; then + case $_backend in + sdl) + case $_sdlversion in + 1.2.*) + # Stock SDL 1.2 only supports OpenGL contexts. + _opengl_mode=gl + ;; - # Test the current header for OpenGL ES - cat > $TMPC << EOF -#include <$i> -int main(void) { return GL_OES_VERSION_1_1; } -EOF - cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && _opengles=yes && break + 2.0.*) + # SDL2 supports both OpenGL + OpenGL ES contexts. + # However, Mac OS X only allows OpenGL context creation at + # this time, thus we limit us to OpenGL on that platform. + case $_host_os in + darwin*) + _opengl_mode=gl + ;; + + *) + _opengl_mode=any + ;; + esac + ;; + esac + ;; - # Test the current header for OpenGL ES on SBCs (Raspberry Pi, Cubieboard, etc) - cat > $TMPC << EOF -#include <$i> -int main(void) { return GL_VERSION_ES_CM_1_1; } -EOF - cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && _opengles=yes && break - done - fi + tizen) + # Tizen always runs in GLES mode + _opengl_mode=gles + ;; + + *) + _opengl_mode=none + ;; + esac fi -if test "$_opengl" = yes ; then - # Our simple test case - cat > $TMPC << EOF -int main(void) { return 0; } -EOF - _opengl=no - # Try different library names - if test "$_opengles" = "yes" ; then - # 1) GLES_CM This is usually used for OpenGL ES 1.1 (Common profile) - # 2) GLESv1_CM This is used by the Windows Mali OpenGL ES 1.1 Emulator - # 3) glesv1 This is used by the Linux Mali OpenGL ES 1.1 Emulator - _opengles=no - for lib in "-lGLES_CM" "-lGLESv1_CM" "-lglesv1"; do - if cc_check_no_clean $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS $lib - then - _opengl=yes - _opengles=yes - OPENGL_LIBS="$OPENGL_LIBS $lib" - break - fi - done - else - # 1) -framework OpenGL This is used on Mac OS X - # 2) GL This is usually used on POSIX systems - # 3) opengl32 This is used on Windows - # - # We try "-framework OpenGL" first here to assure it will always be - # picked up by the configure script on Mac OS X, even when a libGL - # exists. - for lib in "-framework OpenGL" "-lGL" "-lopengl32"; do - if cc_check_no_clean $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS $lib - then - _opengl=yes - OPENGL_LIBS="$OPENGL_LIBS $lib" - break - fi - done - fi - cc_check_clean +_opengl=yes +case $_opengl_mode in + auto) + # This case should never occur but better safe than sorry. + echo "no" + _opengl=no + ;; - if test "$_opengl" = yes ; then - append_var LIBS "$OPENGL_LIBS" - append_var INCLUDES "$OPENGL_CFLAGS" - fi -fi + none) + echo "no" + _opengl=no + ;; -case $_host_os in - tizen) - # components live in non-standard locations so just assume sane SDK - _opengl=yes - _opengles=yes + any) + echo "yes (runtime detection)" + add_line_to_config_h "#undef USE_GLES_MODE" ;; -esac -if test "$_opengles" = "yes" ; then - echo "yes (OpenGL ES)" -else - echo "$_opengl" -fi + gl) + echo "yes (OpenGL)" + add_line_to_config_h "#define USE_GLES_MODE 0" + ;; + + gles) + echo "yes (OpenGL ES)" + add_line_to_config_h "#define USE_GLES_MODE 1" + ;; + + gles2) + echo "yes (OpenGL ES 2)" + add_line_to_config_h "#define USE_GLES_MODE 2" + ;; + + *) + echo "invalid mode specification '$_opengl_mode'. Aborting." + exit 1 + ;; +esac define_in_config_if_yes "$_opengl" "USE_OPENGL" -define_in_config_if_yes "$_opengles" "USE_GLES" + +# +# Check for Linux CD-ROM support +# +case $_host_os in + *linux*) + echocheck "Linux CD-ROM" + linuxcd=no + cat > $TMPC << EOF +#include <linux/cdrom.h> +#include <sys/types.h> +int main(void) { + int x = CDROMREADAUDIO; + dev_t dev; + return major(dev) + x; +} +EOF + cc_check && linuxcd=yes + define_in_config_if_yes "$linuxcd" 'USE_LINUXCD' + echo "$linuxcd" + ;; +esac + # # Check for nasm @@ -4794,6 +4842,7 @@ WIN32PATH=$_win32path AMIGAOSPATH=$_amigaospath STATICLIBPATH=$_staticlibpath XCODETOOLSPATH=$_xcodetoolspath +SPARKLEPATH=$_sparklepath SDLCONFIG=$_sdlconfig ABI := $ABI diff --git a/devtools/create_wage/create_wage.sh b/devtools/create_classicmacfonts.sh index 5e8fe352a2..517f3f5638 100755 --- a/devtools/create_wage/create_wage.sh +++ b/devtools/create_classicmacfonts.sh @@ -4,7 +4,7 @@ # from it. Mac only, unfortunately. # # On Windows you perhaps can perform the extraction manually with use of -# HFV Explorer: https://web.archive.org/web/20011202005455/http://gamma.nic.fi/~lpesonen/HFVExplorer/ +# HFSxplorer: http://www.catacombae.org/hfsexplorer/ # # More information could be found in the vMac documentation: http://www.gryphel.com/c/image/ # @@ -106,8 +106,8 @@ echo_n "Converting fonts..." fondu-060102/fondu -force *.bin echo done -zip -9 wage *.bdf -mv wage.zip wage.dat +zip -9 classicmacfonts *.bdf +mv classicmacfonts.zip classicmacfonts.dat echo_n "Cleaning up..." rm *.bdf @@ -116,4 +116,4 @@ rm *.bin rm *.dmg echo done -ls -l wage.dat +ls -l classicmacfonts.dat diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp index e064e899de..294eadf92b 100644 --- a/devtools/create_kyradat/create_kyradat.cpp +++ b/devtools/create_kyradat/create_kyradat.cpp @@ -45,7 +45,7 @@ enum { - kKyraDatVersion = 87 + kKyraDatVersion = 88 }; const ExtractFilename extractFilenames[] = { @@ -119,7 +119,6 @@ const ExtractFilename extractFilenames[] = { // AUDIO filename table { k1AudioTracks, kStringList, false }, - { k1AudioTracks2, kStringList, false }, { k1AudioTracksIntro, kStringList, false }, // AMULET anim diff --git a/devtools/create_kyradat/create_kyradat.h b/devtools/create_kyradat/create_kyradat.h index a6bee6f75c..1d58d7551f 100644 --- a/devtools/create_kyradat/create_kyradat.h +++ b/devtools/create_kyradat/create_kyradat.h @@ -131,7 +131,6 @@ enum kExtractID { k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, k1CreditsStrings, diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp index afe0c67dbf..e6f0b38c45 100644 --- a/devtools/create_kyradat/games.cpp +++ b/devtools/create_kyradat/games.cpp @@ -231,7 +231,6 @@ const int kyra1FloppyNeed[] = { k1NewGameString, k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, -1 }; @@ -317,7 +316,6 @@ const int kyra1FloppyOldNeed[] = { k1NewGameString, k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, -1 }; @@ -405,7 +403,6 @@ const int kyra1CDNeed[] = { k1NewGameString, k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, -1 }; diff --git a/devtools/create_kyradat/resources.cpp b/devtools/create_kyradat/resources.cpp index 4df6bb8fb8..246811f821 100644 --- a/devtools/create_kyradat/resources.cpp +++ b/devtools/create_kyradat/resources.cpp @@ -302,7 +302,6 @@ static const ResourceProvider resourceProviders[] = { { k1NewGameString, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1NewGameStringDOSEnglishProvider }, { k1ConfigStrings, kKyra1, kPlatformDOS, kNoSpecial, EN_ANY, &k1ConfigStringsDOSEnglishProvider }, { k1AudioTracks, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracksDOSProvider }, - { k1AudioTracks2, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracks2DOSProvider }, { k1AudioTracksIntro, kKyra1, kPlatformDOS, kNoSpecial, UNK_LANG, &k1AudioTracksIntroDOSProvider }, { k1IntroStrings, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1IntroStringsDOSGermanProvider }, { k1ItemNames, kKyra1, kPlatformDOS, kNoSpecial, DE_DEU, &k1ItemNamesDOSGermanProvider }, @@ -472,7 +471,6 @@ static const ResourceProvider resourceProviders[] = { { k1NewGameString, kKyra1, kPlatformDOS, kOldFloppy, RU_RUS, &k1NewGameStringDOSOldFloppyRussianProvider }, { k1ConfigStrings, kKyra1, kPlatformDOS, kOldFloppy, RU_RUS, &k1ConfigStringsDOSOldFloppyRussianProvider }, { k1AudioTracks, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1AudioTracksDOSOldFloppyProvider }, - { k1AudioTracks2, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1AudioTracks2DOSOldFloppyProvider }, { k1AudioTracksIntro, kKyra1, kPlatformDOS, kOldFloppy, UNK_LANG, &k1AudioTracksIntroDOSOldFloppyProvider }, { k1KallakWritingSeq, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1KallakWritingSeqDOSCDProvider }, { k1MalcolmTreeSeq, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1MalcolmTreeSeqDOSCDProvider }, @@ -556,7 +554,6 @@ static const ResourceProvider resourceProviders[] = { { k1NewGameString, kKyra1, kPlatformDOS, kTalkieVersion, EN_ANY, &k1NewGameStringDOSCDEnglishProvider }, { k1ConfigStrings, kKyra1, kPlatformDOS, kTalkieVersion, EN_ANY, &k1ConfigStringsDOSCDEnglishProvider }, { k1AudioTracks, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1AudioTracksDOSCDProvider }, - { k1AudioTracks2, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1AudioTracks2DOSCDProvider }, { k1AudioTracksIntro, kKyra1, kPlatformDOS, kTalkieVersion, UNK_LANG, &k1AudioTracksIntroDOSCDProvider }, { k1IntroStrings, kKyra1, kPlatformDOS, kTalkieVersion, DE_DEU, &k1IntroStringsDOSCDGermanProvider }, { k1ItemNames, kKyra1, kPlatformDOS, kTalkieVersion, DE_DEU, &k1ItemNamesDOSCDGermanProvider }, diff --git a/devtools/create_kyradat/resources/lok_dos.h b/devtools/create_kyradat/resources/lok_dos.h index e8d987fe1b..6bc9c2525f 100644 --- a/devtools/create_kyradat/resources/lok_dos.h +++ b/devtools/create_kyradat/resources/lok_dos.h @@ -1898,7 +1898,7 @@ static const byte k1OutroReunionSeqDOS[1351] = { static const ByteProvider k1OutroReunionSeqDOSProvider = { ARRAYSIZE(k1OutroReunionSeqDOS), k1OutroReunionSeqDOS }; -static const char *const k1AudioTracksDOS[8] = { +static const char *const k1AudioTracksDOS[9] = { "KYRA1A", "KYRA1B", "KYRA2A", @@ -1906,17 +1906,12 @@ static const char *const k1AudioTracksDOS[8] = { "KYRA4A", "KYRA4B", "KYRA5A", - "KYRA5B" + "KYRA5B", + "KYRAMISC" }; static const StringListProvider k1AudioTracksDOSProvider = { ARRAYSIZE(k1AudioTracksDOS), k1AudioTracksDOS }; -static const char *const k1AudioTracks2DOS[1] = { - "kyramisc" -}; - -static const StringListProvider k1AudioTracks2DOSProvider = { ARRAYSIZE(k1AudioTracks2DOS), k1AudioTracks2DOS }; - static const char *const k1AudioTracksIntroDOS[1] = { "intro" }; diff --git a/devtools/create_kyradat/resources/lok_dos_cd.h b/devtools/create_kyradat/resources/lok_dos_cd.h index 9550d53d61..dc7a521063 100644 --- a/devtools/create_kyradat/resources/lok_dos_cd.h +++ b/devtools/create_kyradat/resources/lok_dos_cd.h @@ -1969,7 +1969,7 @@ static const byte k1OutroReunionSeqDOSCD[1509] = { static const ByteProvider k1OutroReunionSeqDOSCDProvider = { ARRAYSIZE(k1OutroReunionSeqDOSCD), k1OutroReunionSeqDOSCD }; -static const char *const k1AudioTracksDOSCD[8] = { +static const char *const k1AudioTracksDOSCD[9] = { "KYRA1A", "KYRA1B", "KYRA2A", @@ -1977,17 +1977,12 @@ static const char *const k1AudioTracksDOSCD[8] = { "KYRA4A", "KYRA4B", "KYRA5A", - "KYRA5B" + "KYRA5B", + "KYRAMISC" }; static const StringListProvider k1AudioTracksDOSCDProvider = { ARRAYSIZE(k1AudioTracksDOSCD), k1AudioTracksDOSCD }; -static const char *const k1AudioTracks2DOSCD[1] = { - "kyramisc" -}; - -static const StringListProvider k1AudioTracks2DOSCDProvider = { ARRAYSIZE(k1AudioTracks2DOSCD), k1AudioTracks2DOSCD }; - static const char *const k1AudioTracksIntroDOSCD[2] = { "intro", "intro" diff --git a/devtools/create_kyradat/resources/lok_dos_oldfloppy.h b/devtools/create_kyradat/resources/lok_dos_oldfloppy.h index e19cb5a6ef..62b1530941 100644 --- a/devtools/create_kyradat/resources/lok_dos_oldfloppy.h +++ b/devtools/create_kyradat/resources/lok_dos_oldfloppy.h @@ -1884,7 +1884,7 @@ static const byte k1OutroReunionSeqDOSOldFloppy[1351] = { static const ByteProvider k1OutroReunionSeqDOSOldFloppyProvider = { ARRAYSIZE(k1OutroReunionSeqDOSOldFloppy), k1OutroReunionSeqDOSOldFloppy }; -static const char *const k1AudioTracksDOSOldFloppy[8] = { +static const char *const k1AudioTracksDOSOldFloppy[9] = { "KYRA1A", "KYRA1B", "KYRA2A", @@ -1892,17 +1892,12 @@ static const char *const k1AudioTracksDOSOldFloppy[8] = { "KYRA4A", "KYRA4B", "KYRA5A", - "KYRA5B" + "KYRA5B", + "KYRAMISC" }; static const StringListProvider k1AudioTracksDOSOldFloppyProvider = { ARRAYSIZE(k1AudioTracksDOSOldFloppy), k1AudioTracksDOSOldFloppy }; -static const char *const k1AudioTracks2DOSOldFloppy[1] = { - "kyramisc" -}; - -static const StringListProvider k1AudioTracks2DOSOldFloppyProvider = { ARRAYSIZE(k1AudioTracks2DOSOldFloppy), k1AudioTracks2DOSOldFloppy }; - static const char *const k1AudioTracksIntroDOSOldFloppy[1] = { "intro" }; diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index aa450f1461..0242af1cfb 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -125,7 +125,6 @@ int main(int argc, char *argv[]) { ProjectType projectType = kProjectNone; int msvcVersion = 12; - bool useSDL2 = false; // Parse command line arguments using std::cout; @@ -269,7 +268,7 @@ int main(int argc, char *argv[]) { } else if (!std::strcmp(argv[i], "--tests")) { setup.tests = true; } else if (!std::strcmp(argv[i], "--sdl2")) { - useSDL2 = true; + setup.useSDL2 = true; } else { std::cerr << "ERROR: Unknown parameter \"" << argv[i] << "\"\n"; return -1; @@ -349,11 +348,15 @@ int main(int argc, char *argv[]) { setup.defines.push_back("IPHONE"); } setup.defines.push_back("SDL_BACKEND"); - if (!useSDL2) { - cout << "\nLinking to SDL 1.2\n\n"; + if (!setup.useSDL2) { + cout << "\nBuilding against SDL 1.2\n\n"; setup.libraries.push_back("sdl"); } else { - cout << "\nLinking to SDL 2.0\n\n"; + cout << "\nBuilding against SDL 2.0\n\n"; + // TODO: This also defines USE_SDL2 in the preprocessor, we don't do + // this in our configure/make based build system. Adapt create_project + // to replicate this behavior. + setup.defines.push_back("USE_SDL2"); setup.libraries.push_back("sdl2"); } setup.libraries.push_back("winmm"); @@ -954,7 +957,8 @@ const Feature s_features[] = { { "16bit", "USE_RGB_COLOR", "", true, "16bit color support" }, { "mt32emu", "USE_MT32EMU", "", true, "integrated MT-32 emulator" }, { "nasm", "USE_NASM", "", true, "IA-32 assembly support" }, // This feature is special in the regard, that it needs additional handling. - { "opengl", "USE_OPENGL", "opengl32", true, "OpenGL support" }, + { "opengl", "USE_OPENGL", "", true, "OpenGL support" }, + { "opengles", "USE_GLES", "", true, "forced OpenGL ES mode" }, { "taskbar", "USE_TASKBAR", "", true, "Taskbar integration support" }, { "translation", "USE_TRANSLATION", "", true, "Translation support" }, { "vkeybd", "ENABLE_VKEYBD", "", false, "Virtual keyboard support"}, diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index fb207f3f59..1e417d485b 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -229,15 +229,17 @@ struct BuildSetup { StringList testDirs; ///< List of all folders containing tests bool devTools; ///< Generate project files for the tools - bool tests; ///< Generate project files for the tests + bool tests; ///< Generate project files for the tests bool runBuildEvents; ///< Run build events as part of the build (generate revision number and copy engine/theme data & needed files to the build folder bool createInstaller; ///< Create NSIS installer after the build + bool useSDL2; ///< Whether to use SDL2 or not. BuildSetup() { devTools = false; tests = false; runBuildEvents = false; createInstaller = false; + useSDL2 = false; } }; diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index a804205c42..2c6a89543f 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -366,7 +366,7 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_Global</_PropertySheetDisplayName>\n" "\t\t<ExecutablePath>$(" << LIBS_DEFINE << ")\\bin;$(" << LIBS_DEFINE << ")\\bin\\" << (bits == 32 ? "x86" : "x64") << ";$(ExecutablePath)</ExecutablePath>\n" "\t\t<LibraryPath>$(" << LIBS_DEFINE << ")\\lib\\" << (bits == 32 ? "x86" : "x64") << ";$(" << LIBS_DEFINE << ")\\lib\\" << (bits == 32 ? "x86" : "x64") << "\\$(Configuration);$(LibraryPath)</LibraryPath>\n" - "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\SDL;$(IncludePath)</IncludePath>\n" + "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\" << (setup.useSDL2 ? "SDL2" : "SDL") << ";$(IncludePath)</IncludePath>\n" "\t\t<OutDir>$(Configuration)" << bits << "\\</OutDir>\n" "\t\t<IntDir>$(Configuration)" << bits << "\\$(ProjectName)\\</IntDir>\n" "\t</PropertyGroup>\n" diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index a43730fbe2..bfe7f522f0 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -447,9 +447,6 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { DEF_SYSFRAMEWORK("UIKit"); DEF_SYSTBD("libiconv"); - // Optionals: - DEF_SYSFRAMEWORK("OpenGL"); - // Local libraries DEF_LOCALLIB_STATIC("libFLAC"); DEF_LOCALLIB_STATIC("libmad"); @@ -570,8 +567,6 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { frameworks_osx.push_back("IOKit.framework"); frameworks_osx.push_back("Cocoa.framework"); frameworks_osx.push_back("AudioUnit.framework"); - // Optionals: - frameworks_osx.push_back("OpenGL.framework"); order = 0; for (ValueList::iterator framework = frameworks_osx.begin(); framework != frameworks_osx.end(); framework++) { @@ -932,7 +927,11 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) { ADD_SETTING_LIST(scummvmOSX_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmOSX_defines, kSettingsNoQuote | kSettingsAsList, 5); ADD_SETTING_QUOTE(scummvmOSX_Debug, "GCC_VERSION", ""); ValueList scummvmOSX_HeaderPaths; - scummvmOSX_HeaderPaths.push_back("/opt/local/include/SDL"); + if (setup.useSDL2) { + scummvmOSX_HeaderPaths.push_back("/opt/local/include/SDL2"); + } else { + scummvmOSX_HeaderPaths.push_back("/opt/local/include/SDL"); + } scummvmOSX_HeaderPaths.push_back("/opt/local/include"); scummvmOSX_HeaderPaths.push_back("/opt/local/include/freetype2"); scummvmOSX_HeaderPaths.push_back("include/"); @@ -948,7 +947,6 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) { ADD_SETTING_LIST(scummvmOSX_Debug, "LIBRARY_SEARCH_PATHS", scummvmOSX_LibPaths, kSettingsNoQuote | kSettingsAsList, 5); ADD_SETTING_QUOTE(scummvmOSX_Debug, "OTHER_CFLAGS", ""); ValueList scummvmOSX_LdFlags; - scummvmOSX_LdFlags.push_back("-lSDLmain"); scummvmOSX_LdFlags.push_back("-logg"); scummvmOSX_LdFlags.push_back("-lpng"); scummvmOSX_LdFlags.push_back("-ljpeg"); @@ -958,7 +956,13 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) { scummvmOSX_LdFlags.push_back("-lvorbis"); scummvmOSX_LdFlags.push_back("-lmad"); scummvmOSX_LdFlags.push_back("-lFLAC"); - scummvmOSX_LdFlags.push_back("-lSDL"); + if (setup.useSDL2) { + scummvmOSX_LdFlags.push_back("-lSDL2main"); + scummvmOSX_LdFlags.push_back("-lSDL2"); + } else { + scummvmOSX_LdFlags.push_back("-lSDLmain"); + scummvmOSX_LdFlags.push_back("-lSDL"); + } scummvmOSX_LdFlags.push_back("-lz"); ADD_SETTING_LIST(scummvmOSX_Debug, "OTHER_LDFLAGS", scummvmOSX_LdFlags, kSettingsAsList, 5); ADD_SETTING(scummvmOSX_Debug, "PREBINDING", "NO"); diff --git a/devtools/credits.pl b/devtools/credits.pl index 9e0fcc6c82..cc75f76758 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -1011,6 +1011,7 @@ begin_credits("Credits"); begin_section("Mac OS X"); add_person("Max Horn", "Fingolfin", "(retired)"); add_person("Oystein Eftevaag", "vinterstum", ""); + add_person("Thierry Crozat", "criezy", ""); end_section(); begin_section("Mandriva"); diff --git a/devtools/encode-macbinary.sh b/devtools/encode-macbinary.sh new file mode 100755 index 0000000000..6635f7fcda --- /dev/null +++ b/devtools/encode-macbinary.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Iterates over current directory, encodes all files with +# MacBinary but ensures that the dates are preserved + +for i in * +do + macbinary encode "$i" + touch -r "$i" "$i.bin" + mv "$i.bin" "$i" +done diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index e9140f74f9..92754a27b4 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -50,25 +50,26 @@ # IFS=$OIFS # maniac Maniac Mansion - 2d624d1b214f7faf0094daea65c6d1a6 -1 en 2gs Apple II - - + 2d624d1b214f7faf0094daea65c6d1a6 -1 en 2gs Apple II - - 2cb46375dd5cdfd023e2f07e0a21b530 -1 en C64 C64 Demo - Robert Crossfield - eea4d9ac2fb6f145945a308e8866915b -1 en C64 C64 - - - 439a7f4adf510489981ac52308e7d7a2 -1 de C64 C64 - - + eea4d9ac2fb6f145945a308e8866915b -1 en C64 C64 - - + 439a7f4adf510489981ac52308e7d7a2 -1 de C64 C64 - - 7f45ddd6dbfbf8f80c0c0efea4c295bc 1972 en DOS V1 V1 - Fingolfin - 17f7296f63c78642724f057fd8e736a7 2082 gb NES NES - - 91d5db93187fab54d823f73bd6441cb6 -1 us NES NES - - 1c7e7db2cfab1ad62746ab680a634204 -1 fr NES NES - - 3a5ec90d556d4920976c5578bfbfaf79 -1 de NES NES - - b7d37d6b786b5a22deea3b038eca96ca -1 es NES NES - - fa3cb1541f9d7cf99ccbae6249bc150c -1 it NES NES - - 6b5a3fef241e90d4b2e77f1e222773ee -1 se NES NES - + 17f7296f63c78642724f057fd8e736a7 2082 gb NES NES - + 91d5db93187fab54d823f73bd6441cb6 -1 us NES NES - + 1c7e7db2cfab1ad62746ab680a634204 -1 fr NES NES - + 3a5ec90d556d4920976c5578bfbfaf79 -1 de NES NES - + b7d37d6b786b5a22deea3b038eca96ca -1 es NES NES - + fa3cb1541f9d7cf99ccbae6249bc150c -1 it NES NES - + 6b5a3fef241e90d4b2e77f1e222773ee -1 se NES NES - e781230da44a44e2f0770edb2b3b3633 -1 en Amiga V2 V2 - dhewg, Andrea Petrucci ce7733f185b838e248927c7ba1a04204 -1 fr Amiga V2 V2 - Tobias Fleischer 9bc548e179cdb0767009401c094d0895 -1 de Amiga V2 V2 - Norbert Lange + 3cf4b6ff78f735b671d8ccc2bc110b15 -1 es Amiga V2 V2 - vanfanel a570381b028972d891052ee1e51dc011 1988 en Atari V2 V2 SS Andreas Bylund 0c331637580950aea2346e012ef2a868 1988 en Atari V2 V2 DS Petr Maruska dd30a53035393baa5a5e222e716559af -1 fr Atari V2 V2 - Andreas Bylund @@ -87,9 +88,9 @@ maniac Maniac Mansion 3a988de37118873ad129246b452909c0 1988 ru DOS V2 Demo V2 Demo non-interactive sev zak Zak McKracken and the Alien Mindbenders - 254fede2f15dbb32a23760d601b01816 -1 en C64 V1 - - - 95be99181bd0f10fef4872c2d4a771cb -1 de C64 V1 - - - aeec382acef62e122bf0d5b14581cfa4 -1 it C64 V1 - - + 254fede2f15dbb32a23760d601b01816 -1 en C64 V1 - - + 95be99181bd0f10fef4872c2d4a771cb -1 de C64 V1 - - + aeec382acef62e122bf0d5b14581cfa4 -1 it C64 V1 - - 7020931d5a2be0a49d68e7a1882363e4 1896 en DOS V1 V1 - Fingolfin b23f7cd7c304d7dff08e92a96120d5b4 -1 en DOS V1 V1 alt? Andrea Petrucci @@ -97,9 +98,9 @@ zak Zak McKracken and the Alien Mindbenders 91469353f7be1b122fa88d23480a1320 -1 fr Amiga V2 V2 - Tobias Fleischer 6027e9ca9c35746d95dee2068cec17e5 -1 de Amiga V2 V2 - Norbert Lange 27b3a4224ad63d5b04627595c1c1a025 -1 it Amiga V2 V2 - Andrea Petrucci - d55eff37c2100f5065cde9de428621fa -1 en Atari V2 V2 - + d55eff37c2100f5065cde9de428621fa -1 en Atari V2 V2 - 613f64f78ea26c7353b2a5940eb61d6a -1 fr Atari V2 V2 - Andreas Bylund - ff05c07990061d97647f059c48c1d05a -1 de Atari V2 V2 - + ff05c07990061d97647f059c48c1d05a -1 de Atari V2 V2 - 675d71151e9b5a968c8ce46d9fbf4cbf 1916 en DOS V2 V2 - Kirben debe337f73d660e951ece7c1f1c81add -1 en DOS V2 V2 alt? Andrea Petrucci 52a4bae0746a11d7b1e8554e91a6645c -1 fr DOS V2 V2 - Andrea Petrucci @@ -110,7 +111,7 @@ zak Zak McKracken and the Alien Mindbenders 75ba23fff4fd63fa446c02864f2a5a4b -1 it DOS V2 V2 alt? Antti Leimi, Andrea Petrucci a77d0efbe786ea7f490c2021dbfa3f2f -1 ru DOS V2 V2 - sev - 2d4536a56e01da4b02eb021e7770afa2 7520 en FM-TOWNS FM-TOWNS - - + 2d4536a56e01da4b02eb021e7770afa2 7520 en FM-TOWNS FM-TOWNS - - 1ca86e2cf9aaa2068738a1e5ba477e60 -1 jp FM-TOWNS FM-TOWNS - - Andrea Petrucci 8299d9b8a1b0e7b881bae7a9971dc5e2 1916 en Atari V2 Demo non-interactive Fingolfin @@ -120,7 +121,7 @@ indy3 Indiana Jones and the Last Crusade e689bdf67f98b1d760ce4487ec0e8d06 -1 fr Amiga EGA EGA - Gerald Vincent 330f631502e381a4e199a3f7cb483c20 -1 de Amiga EGA EGA - dhewg df03ee021aa9b81d90cab9c26da07614 -1 it Amiga EGA EGA - Andrea Petrucci - 62b8c16b6db226ba95aaa8be73f9885c -1 es Amiga EGA EGA - + 62b8c16b6db226ba95aaa8be73f9885c -1 es Amiga EGA EGA - 157367c3c21e0d03a0cba44361b4cf65 -1 en Atari No AdLib EGA - Andreas Bylund 0f9c7a76657f0840b8f7ccb5bffeb9f4 -1 fr Atari No AdLib EGA - Andreas Bylund aaa7f36a253f277dd29dd1c051b0e4b9 -1 de Atari No AdLib EGA - Jimmy Kohl @@ -130,7 +131,7 @@ indy3 Indiana Jones and the Last Crusade 66236cd1aec24e1d4aff4c4cc93b7e18 -1 fr DOS EGA EGA ?? v1.3, 25 Aug 89 Andrea Petrucci, Peter Eckerlein 89cfc425566003ff74b7dc7b3e6fd469 -1 fr DOS EGA EGA ?? v1.3, 25 Aug 89 Jorpho 69d70269fafc4445adbb0d223e4f9a3f 5361 en DOS EGA EGA v1.4, 11/07/89 (5.25\") Petr Maruska - 56e8c37a0a08c3a7076f82417461a877 -1 en DOS EGA EGA v1.4, 7 Nov 89 (3.5\") Paulo Vicente + 56e8c37a0a08c3a7076f82417461a877 -1 en DOS EGA EGA v1.4, 7 Nov 89 (3.5\") Paulo Vicente 6f6ef668c608c7f534fea6e6d3878dde -1 de DOS EGA EGA v1.4 from 19 Oct 89 dhewg, Peter Eckerlein eb700bb73ca1cc44a1ad5e4b1a4bdeaf 5361 de DOS EGA EGA PC-Spiele a.borque d62d248c3df6ec177405e2cb23d923b2 -1 it DOS EGA EGA v1.4 from 25 Nov 89 Andrea Petrucci, Peter Eckerlein @@ -143,7 +144,7 @@ indy3 Indiana Jones and the Last Crusade a15d6e1e2c52bbd0ff7fa6b63ab7f796 680340 en Mac Steam Steam Steam Version Filippos Karapetis 399b217b0c8d65d0398076da486363a9 6295 de DOS VGA VGA VGA v1.02 from 7 Nov 91 Peter Eckerlein, Fingolfin 17b5d5e6af4ae89d62631641d66d5a05 -1 it DOS VGA VGA IBM 256 color v2.1 from 3 May 01 Andrea Petrucci, Peter Eckerlein - 3cce1913a3bc586b51a75c3892ff18dd -1 ru DOS VGA VGA VGA + 3cce1913a3bc586b51a75c3892ff18dd -1 ru DOS VGA VGA VGA 04687cdf7f975a89d2474929f7b80946 7552 en FM-TOWNS FM-TOWNS - v1.00 1/23/91 Fingolfin 3a0c35f3c147b98a2bdf8d400cfc4ab5 -1 jp FM-TOWNS FM-TOWNS - - Paul Priest, Andrea Petrucci @@ -155,8 +156,8 @@ loom Loom 39cb9dec16fa16f38d79acd80effb059 -1 All Amiga EGA EGA IT and FR Gerald Vincent (IT), Andrea Petrucci (FR) 2fe369ad70f52a8cf7ad6077ee64f81a -1 de Amiga EGA EGA - Norbert Lange 48b9f04b348bc5013327753f0d12a144 -1 es Amiga EGA EGA - VooD - a0a7dea72003933b8b3f8b99b9f7ddeb -1 en Atari No AdLib EGA - - 0e9b01430e31d9fcd94071d433bbc6bf -1 fr Atari No AdLib EGA - + a0a7dea72003933b8b3f8b99b9f7ddeb -1 en Atari No AdLib EGA - + 0e9b01430e31d9fcd94071d433bbc6bf -1 fr Atari No AdLib EGA - c24c490373aeb48fbd54caa8e7ae376d -1 de Atari No AdLib EGA - Andreas Bylund 28ef68ee3ed76d7e2ee8ee13c15fbd5b 5748 en DOS EGA EGA v1.0 from 8 Mar 90 Peter Eckerlein, Fingolfin 73e5ab7dbb9a8061cc6d25df02dbd1e7 -1 en DOS EGA EGA v1.0 alt Andrea Petrucci @@ -167,7 +168,7 @@ loom Loom 6f8a22bfa397be1f7ed4b74aba0e397e -1 fr DOS EGA EGA v1.2 26 Jun 90 Jorpho 470c45b636139bb40716daa1c7edaad0 -1 de DOS EGA EGA v1.2 Deutsch from 7 Jun 90 Peter Eckerlein fa127d7c4bb47d05bb1c33ddcaa9f767 5748 de DOS EGA EGA v1.2 Deutsch from 7 Jun 90 Fingolfin - 187d315f6b5168f68680dfe8c3d76a3e -1 he DOS EGA EGA - + 187d315f6b5168f68680dfe8c3d76a3e -1 he DOS EGA EGA - c3df37df9d3b481b45f75283a9907c47 -1 it DOS EGA EGA - Andrea Petrucci 0be88565f734b1e9e77ccaaf3bb14b29 -1 es DOS EGA EGA v1.2 Espanol from 31 Aug 90 George Kormend 2a208ffbcd0e83e86f4356e6f64aa6e1 -1 es DOS EGA EGA v1.2 Espanol from 31 Aug 90 abnog, Andrea Petrucci, Peter Eckerlein @@ -187,10 +188,10 @@ loom Loom a00554c31d623fdb9fcb0f924b89b42b -1 en DOS EGA EGA Demo non-interactive Adrian C. Fruehwirth monkey The Secret of Monkey Island - c666a998af90d81db447eccba9f72c8d -1 en Atari No AdLib EGA - + c666a998af90d81db447eccba9f72c8d -1 en Atari No AdLib EGA - 9e5e0fb43bd22f4628719b7501adb717 -1 fr Atari No AdLib EGA - Andreas Bylund 927a764615c7fcdd72f591355e089d8c -1 de Atari No AdLib EGA - Joachim Eberhard - 0a41311d462b6639fc45297b9044bf16 -1 es Atari No AdLib EGA - + 0a41311d462b6639fc45297b9044bf16 -1 es Atari No AdLib EGA - 49210e124e4c2b30f1290a9ef6306301 8357 en DOS EGA EGA 8 disk v1.0, 9/18/90 Fingolfin 1dd3c11ea4439adfe681e4e405b624e1 -1 fr DOS EGA EGA 8 disk Andrea Petrucci @@ -210,7 +211,7 @@ monkey The Secret of Monkey Island 870d1e3c86bc50846d808d14a36b4e08 -1 es Amiga VGA VGA - Andreas Bylund c7890e038806df2bb5c0c8c6f1986ea2 -1 en DOS VGA VGA 8 disk Andrea Petrucci - 15e03ffbfeddb9c2aebc13dcb2a4a8f4 8357 en DOS VGA VGA 4 disk + 15e03ffbfeddb9c2aebc13dcb2a4a8f4 8357 en DOS VGA VGA 4 disk 08656dd9698ddf1023ba9bf8a195e37b -1 en DOS VGA VGA V1.1 crossbow777 d0b531227a27c6662018d2bd05aac52a 8357 de DOS VGA VGA 4 disk v1.1, 14.Feb.91 Fingolfin 66fd5ff9a810dfeb6d6bdada18221140 -1 it DOS VGA VGA 4 disk Andrea Petrucci @@ -225,9 +226,9 @@ monkey The Secret of Monkey Island da6269b18fcb08189c0aa9c95533cce2 8955 it DOS CD CD CD-ROM v2.3 Fingolfin, Andrej Sinicyn, Andrea Petrucci f049e38c1f8302b5db6170f1872af89a 8955 es DOS CD CD CD-ROM v2.3 Fingolfin, Andrej Sinicyn, Andrea Petrucci 2ccd8891ce4d3f1a334d21bff6a88ca2 9455 en Mac CD - Mac v2.4 Fingolfin, Lars Næsbye Christensen - b9ba19ce376efc69be78ef3baef8d2b9 -1 en Mac CD - alt? Grant Yeager + b9ba19ce376efc69be78ef3baef8d2b9 -1 en Mac CD - alt? Grant Yeager - c13225cb1bbd3bc9fe578301696d8021 -1 en SEGA SEGA - - + c13225cb1bbd3bc9fe578301696d8021 -1 en SEGA SEGA - - 057c9b456dedcc4d71b991a3072a20b3 9465 jp SEGA SEGA - - GloKidd 8eb84cee9b429314c7f0bdcf560723eb 9925 en FM-TOWNS FM-TOWNS - - Paul Priest, Andrea Petrucci @@ -236,6 +237,7 @@ monkey The Secret of Monkey Island 71523b539491527d9860f4407faf0411 7607 en DOS Demo EGA Demo - Fingolfin 771bc18ec6f93837b839c992b211904b -1 de DOS Demo EGA Demo - khalek 54a936ad06161ff7bfefcb96200f7bff 7617 en Amiga VGA VGA Demo - khalek + c0c9de81fb965e6cbe77f6e5631ca705 9135 en DOS SE Talkie Unofficial SE Talkie v1.02 rootfather pass Passport to Adventure e6cd81b25ab1453a8a6d3482118c391e 7857 en DOS - - v1.0 9/14/90 Fingolfin @@ -255,7 +257,7 @@ monkey2 Monkey Island 2: LeChuck's Revenge da669b20271b85182e9c17a2a37ea02e -1 de Amiga - - - Andreas Bylund, Norbert Lange 11ddf1fde76e3156eb3a38da213f484e -1 it Amiga - - - Andrea Petrucci 6ea966b4d660c870b9ee790d1fbfc535 -1 es Amiga - - - Andreas Bylund - 3686cf8f89e102ececf4366e1d2c8126 11135 en DOS - - - + 3686cf8f89e102ececf4366e1d2c8126 11135 en DOS - - - 8e4ee4db46954bfe2912e259a16fad82 -1 fr DOS - - - Nicolas Sauzède, Andrea Petrucci 6886e5d08cee329b1f2e743ae2e3ceed 11135 de DOS - - v1.0D 17Feb92 Fingolfin 69ea626f1f87eecb78ea0d6c6b983a1d -1 it DOS - - - Andrea Petrucci @@ -268,6 +270,7 @@ monkey2 Monkey Island 2: LeChuck's Revenge 430bc518017b6fac046f58bab6baad5d -1 jp FM-TOWNS FM-TOWNS - - Antti Leimi, Andrea Petrucci 387a544b8b10b26912d8413bab63a853 -1 en DOS - Demo non-interactive khalek + f4d20ab4ce19743a646cb48bd93aee72 10835 en DOS SE Talkie Unofficial SE Talkie v0.2 rootfather atlantis Indiana Jones and the Fate of Atlantis 3a03dab514e4038df192d8a8de469788 -1 en Amiga Floppy Floppy - dhewg @@ -295,14 +298,14 @@ atlantis Indiana Jones and the Fate of Atlantis c7be10f775404fd9785a8b92a06d240c 12030 en FM-TOWNS FM-TOWNS - - dhewg, Andrea Petrucci 4d34042713958b971cb139fba4658586 -1 jp FM-TOWNS FM-TOWNS - - Andrea Petrucci - 035deab53b47bc43abc763560d0f8d4b -1 en DOS Floppy Demo - + 035deab53b47bc43abc763560d0f8d4b -1 en DOS Floppy Demo - 98744fe66ff730e8c2b3b1f58803ab0b -1 en DOS Floppy Demo - Simon Krumrein, sev 12cdc256eae5a461bcc9a49975999841 -1 en DOS Floppy Demo - Paulo Vicente - 99b6f822b0b2612415407865438697d6 -1 en DOS - Demo non-interactive + 99b6f822b0b2612415407865438697d6 -1 en DOS - Demo non-interactive 28d24a33448fab6795850bc9f159a4a2 11170 jp FM-TOWNS FM-TOWNS Demo non-interactive khalek, Fingolfin tentacle Day of the Tentacle - acad97ab1c6fc2a5b2d98abf6db4a190 -1 en All? Floppy Floppy Version A ? + acad97ab1c6fc2a5b2d98abf6db4a190 -1 en All? Floppy Floppy Version A ? 2723fea3dae0cb47768c424b145ae0e7 7932 en DOS Floppy Floppy Version B ? Andrej Sinicyn, Andrea Petrucci, Fingolfin f0ccc12a8704bf57706b42a37f877128 -1 en DOS Floppy Floppy 1.6 Paulo Vicente 92b078d9d6d9d751da9c26b8b3075779 -1 fr DOS Floppy Floppy - Nicolas Sauzède, Andrea Petrucci @@ -338,11 +341,11 @@ samnmax Sam & Max Hit the Road 0fb73eddfcf584c02ba097984df131ba 9080 de All? - CD - Fingolfin 0f6f2e716ba896a44e5059bba1de7ca9 -1 it All? - CD - Andrea Petrucci 4ba7fb331296c283e73d8f5b2096e551 -1 es All? - CD - Andrea Petrucci - d43352a805d78b5f4936c6d7779bf575 -1 ru DOS - CD - + d43352a805d78b5f4936c6d7779bf575 -1 ru DOS - CD - 166553538ff320c69edafeee29525419 199195304 en Mac - CD Mac bundle Joachim Eberhard 3a5d13675e9a23aedac0bac7730f0ac1 228446581 fr Mac - CD Mac bundle ThierryFR, Thierry Crozat - c3196c5349e53e387aaff1533d95e53a -1 en DOS Floppy Demo - + c3196c5349e53e387aaff1533d95e53a -1 en DOS Floppy Demo - 0e4c5d54a0ad4b26132e78b5ea76642a 6485 en DOS Floppy Demo WIP Fingolfin d9d0dd93d16ab4dec55cabc2b86bbd17 6478 en DOS - Demo non-interactive Fingolfin cc8ba2b0df2f9c450bcf055fe2711979 7485 de DOS Floppy Demo - Simon Krumrein, sev, Fingolfin @@ -358,12 +361,12 @@ ft Full Throttle 55518cd73cf9c6d23ea29c51ee06bdfe -1 it All? - - - delfino 55e4cc866ff9046824e1c638ba2b8c7f -1 ru All? - Akella - sev 291fb06071e65897f755846611f5ad40 19697 ru All? - 7-Wolf - sev - e72bb4c2b613db2cf50f89ff6350e70a -1 es All? - - - + e72bb4c2b613db2cf50f89ff6350e70a -1 es All? - - - fe381e45117878b1e942cb876b050fd6 513243679 en Mac - - Mac bundle Fingolfin 04401d747f1a2c1c4b388daff71ed378 535405461 de Mac - - Mac bundle Fingolfin 403d2ec4d60d3cdae925e6cbf67716d6 489436643 fr Mac - - Mac bundle Thierry Crozat - 32a433dea56b86a55b59e4ff7d755711 -1 en DOS Demo Demo - + 32a433dea56b86a55b59e4ff7d755711 -1 en DOS Demo Demo - 9d7b67be003fea60be4dcbd193611936 11164 en Mac Demo Demo - Fingolfin 9b7452b5cd6d3ffb2b2f5118010af84f 116463537 en Mac Demo Demo Mac bundle Fingolfin, Joachim Eberhard @@ -381,7 +384,7 @@ dig The Dig comi The Curse of Monkey Island fe60d6b5ff51b0553ac59963123b5777 76791 All Windows - - - Fingolfin - 861e59ed72a1cd0e6d454f7ee7e2bf3d -1 ru Windows - - - + 861e59ed72a1cd0e6d454f7ee7e2bf3d -1 ru Windows - - - 8fec68383202d38c0d25e9e3b757c5df 18041 All Windows Demo Demo - Fingolfin @@ -764,7 +767,7 @@ puttmoon Putt-Putt Goes to the Moon 9c92eeaf517a31b7221ec2546ab669fd -1 en Windows HE 70 - - khalek 3c4c471342bd95505a42334367d8f127 12161 ru Windows HE 70 - - sev - aa6a91b7f6f119d1b7b1f2a4c9e24d59 6233 en DOS - Demo - + aa6a91b7f6f119d1b7b1f2a4c9e24d59 6233 en DOS - Demo - 4af4a6b248103c1fe9edef619677f540 -1 en Mac - Demo - khalek 9c143c5905055d5df7a0f014ab379aee -1 en Windows HE 70 Demo - khalek @@ -792,7 +795,7 @@ puttputt Putt-Putt Joins the Parade 684732efb5799c0f78804c99d8de9aba -1 en Mac HE 62 - - khalek 6a30a07f353a75cdc602db27d73e1b42 -1 en Windows HE 70 - - khalek - 31aa57f460a3d12429f0552a46a90b39 6150 en DOS Demo Demo - + 31aa57f460a3d12429f0552a46a90b39 6150 en DOS Demo Demo - f40a7f495f59188ca57a9d1d50301bb6 -1 en Mac HE 60 Demo - khalek 37ff1b308999c4cca7319edfcc1280a0 8269 en Windows HE 70 Demo - khalek @@ -834,7 +837,7 @@ PuttTime Putt-Putt Travels Through Time 59d5cfcc5e672a6e07baae01328b918b -1 fr All HE 90 Demo - Kirben fbb697d89d2beca87360a145f467bdae -1 de All HE 90 Demo - Joachim Eberhard 6b19d0e25cbf720d05822379b8b90ed9 -1 nl All HE 90 Demo - adutchguy - 0a6d7b81b850ed4a77811c60c9b5c555 18458 us Windows HE 99 Mini Game - eriktorbjorn + 0a6d7b81b850ed4a77811c60c9b5c555 18458 us Windows HE 99 Mini Game - eriktorbjorn a71014c53a6d18c66ef2ea0ee42328e9 18458 nl Windows HE 99 Mini Game - Ben Castricum 8dd4d590685c19bf651b5016e749ead2 18458 fr Windows HE 99 Mini Game - Ben Castricum aef415cc5dc063e3668359c2657169f3 18458 de Windows HE 99 Mini Game - Ben Castricum @@ -859,16 +862,16 @@ dog Putt-Putt and Pep's Dog on a Stick d4b8ee426b1afd3e53bc0cf020418cf6 -1 en Windows HE 99 - - sev activity Putt-Putt & Fatty Bear's Activity Pack - 2c04aacffb8428f30ccf4f734fbe3adc -1 en DOS - - - Kirben + 2c04aacffb8428f30ccf4f734fbe3adc -1 en DOS - - - Kirben 0e96ab45a4eb72acc1b46813976589fd -1 en Mac - - - Kirben - b628506f7def772e40de0aa5440fb8e1 -1 en Windows HE 70 - - Kirben + b628506f7def772e40de0aa5440fb8e1 -1 en Windows HE 70 - - Kirben funpack Putt-Putt's Fun Pack 8afb3cf9f95abf208358e984f0c9e738 -1 en 3DO - - - sev e95cf980719c0be078fb68a67af97b4a -1 jp 3DO - - - clone2727 3d219e7546039543307b55a91282bf18 -1 en DOS - - - iziku 46b53fd430adcfbed791b48a0d4b079f -1 en DOS - - - khalek - 90a329d8ad5b7ce0690429e98cfbb32f -1 he DOS - - - + 90a329d8ad5b7ce0690429e98cfbb32f -1 he DOS - - - PuttsFunShop Putt-Putt's One-Stop Fun Shop 5262a27afcaee04e5c4900220bd463e7 -1 us All - - - Kirben @@ -922,7 +925,7 @@ spyozon SPY Fox 3: Operation Ozone 10d8e66cd11049ce64815ebb9fd76eb3 -1 fr All - - - gist974, ThierryFR 96a3069a3c63caa7329588ce1fef41ee -1 ru All - - - sev 7015b059ab72cff3a0ef9fb4d5e9889d -1 de Windows - - - andy482 - be39a5d4db60e8aa736b9086778cb45c -1 gb Windows - - - + be39a5d4db60e8aa736b9086778cb45c -1 gb Windows - - - ebd0b2c8a387f18887282afe6cad894a 15317 us All - Demo - Kirben a99c39ba65b6086be28aef576da69595 -1 fr Windows - Demo - Mevi diff --git a/devtools/update-version.pl b/devtools/update-version.pl index 337bad3e6c..3b5f892c3f 100755 --- a/devtools/update-version.pl +++ b/devtools/update-version.pl @@ -37,6 +37,7 @@ my @subs_files = qw( dists/scummvm.rc dists/slackware/scummvm.SlackBuild dists/macosx/Info.plist + dists/macosx/dockplugin/Info.plist dists/iphone/Info.plist dists/ios7/Info.plist dists/irix/scummvm.spec diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat Binary files differindex 1b42cfbadc..d49d107f6f 100644 --- a/dists/engine-data/kyra.dat +++ b/dists/engine-data/kyra.dat diff --git a/dists/gcw0/scummvm.sh b/dists/gcw0/scummvm.sh index c12a3030cc..7e2bbaf23e 100755 --- a/dists/gcw0/scummvm.sh +++ b/dists/gcw0/scummvm.sh @@ -6,4 +6,4 @@ if [ ! -f $HOME/.scummvmrc ] ; then cp ./scummvmrc $HOME/.scummvmrc fi -exec ./scummvm +exec ./scummvm 2>&1 >/var/tmp/scummvm.log diff --git a/dists/macosx/Info.plist b/dists/macosx/Info.plist index 7f6170294a..ce05e079df 100644 --- a/dists/macosx/Info.plist +++ b/dists/macosx/Info.plist @@ -53,7 +53,9 @@ <key>NSPrincipalClass</key> <string>NSApplication</string> <key>SUFeedURL</key> - <string>http://www.scummvm.org/appcasts/macosx/release.xml</string> + <string>https://www.scummvm.org/appcasts/macosx/release.xml</string> + <key>NSDockTilePlugIn</key> + <string>scummvm.docktileplugin</string> <key>SUPublicDSAKeyFile</key> <string>dsa_pub.pem</string> </dict> diff --git a/dists/macosx/Info.plist.in b/dists/macosx/Info.plist.in index 55be27d77b..c5f54fe3f0 100644 --- a/dists/macosx/Info.plist.in +++ b/dists/macosx/Info.plist.in @@ -53,7 +53,9 @@ <key>NSPrincipalClass</key> <string>NSApplication</string> <key>SUFeedURL</key> - <string>http://www.scummvm.org/appcasts/macosx/release.xml</string> + <string>https://www.scummvm.org/appcasts/macosx/release.xml</string> + <key>NSDockTilePlugIn</key> + <string>scummvm.docktileplugin</string> <key>SUPublicDSAKeyFile</key> <string>dsa_pub.pem</string> </dict> diff --git a/dists/macosx/dockplugin/Info.plist b/dists/macosx/dockplugin/Info.plist new file mode 100644 index 0000000000..c66f96a6b9 --- /dev/null +++ b/dists/macosx/dockplugin/Info.plist @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>ScummVMDockTilePlugin</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleIdentifier</key> + <string>org.scummvm.scummvm.DockTilePlugin</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.9.0git</string> + <key>CFBundleVersion</key> + <string>1.9.0git</string> + <key>NSHumanReadableCopyright</key> + <string>Copyright 2001-2016 The ScummVM Team</string> + <key>NSPrincipalClass</key> + <string>ScummVMDockTilePlugIn</string> +</dict> +</plist> diff --git a/dists/macosx/dockplugin/Info.plist.in b/dists/macosx/dockplugin/Info.plist.in new file mode 100644 index 0000000000..851fc70f11 --- /dev/null +++ b/dists/macosx/dockplugin/Info.plist.in @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>ScummVMDockTilePlugin</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleIdentifier</key> + <string>org.scummvm.scummvm.DockTilePlugin</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>@VERSION@</string> + <key>CFBundleVersion</key> + <string>@VERSION@</string> + <key>NSHumanReadableCopyright</key> + <string>Copyright 2001-2016 The ScummVM Team</string> + <key>NSPrincipalClass</key> + <string>ScummVMDockTilePlugIn</string> +</dict> +</plist> diff --git a/dists/macosx/dsa_pub.pem b/dists/macosx/dsa_pub.pem new file mode 100644 index 0000000000..13eb86201b --- /dev/null +++ b/dists/macosx/dsa_pub.pem @@ -0,0 +1,36 @@ +-----BEGIN PUBLIC KEY----- +MIIGOjCCBC0GByqGSM44BAEwggQgAoICAQDMnJLkF6tYuyGHM92pO49c0SV927yl +g4uteavJXH/AgJlSr/YmouiK5KrWBPoe5gQsxbFjmrt9L8ocwu9OCxNZHlifv7l0 +V4GbBfk11usFjRZXuIS/7N4RPBe0VDuhBoMdViGPBLCUsC/cmOOz4VtiyS1kW0WL +G2AwWzBT/Zzo4/cDMCys8VBIZjZnjyzxi9u374GdZYNlQ7ts6DbvIxheFBuFG7cg ++XeuB4fz9no1riKM9zEhXtbJJG18/61yvcUj4rOcEYPBFbUXesvuZalVVzYGzZ1G +p39tuAOK6S7W/AzWeDlAGYAOaMvAukAWTSIj/UeuAPPlnaXQLeZ59+7Fbcc7dvMc +SIngNszKbmqTPCAOjE1RWUbFoujxEMcoog0iBKNLvgnC9HEL9sfMNma2107xulf6 +ywcHFLC3f8O8RfTBnU4Q8jwI6pY46w5nZ3lmcDpVqF3OGE71z+OPBkVBJpyiRwFJ +tuCBy4Fc/Vza0QFixoxhREAfxNVza1wrN7DNIFnuhvUM1BwPHx9QvvGAOYJGr+E5 +lrnbpmqYW5icWT/LW+1wlSYTnZeXGTSJFq6Chi6nUyeUov5KdCfJbBu17V727Sj2 +6TKM2HCrE8VmTYSBG99i+2QHhXkV6gOv6reT5lzvzz0BPWRpx9jr48yWU8FxskSE +5z+GxzBYjqY0+QIVAO2l1PedCvhUPXWR7W4cLPo7na3dAoICACW1k1Omwf60vLnG +wmxb6hRV44k3UQ/7pwAIGTsepO0caU/5t5lWnmkPnGliXAe7MkJ5Is3aQFdV0kA8 +b0pBsZCpDW3qnJmSJtnO+21n5HMv2b3MFuzvEOCKXNt8RkJxeK/HaLSPQcMH/1GT +4tCfX7FXZi2VsrV5HxllEVdhMzGC3HBmgXxmO98iVAT9rTfmxqEPwysL/i5DrTXr +6SCLLYF7BR3bRVjp8y4jmIrGCDS+zqUgbWZR81sd3XcO05TLZr/xxBlY/jZYDbjr +VG53lIzHTnWp5nugl9CyXrcnzyvDpM/UaiPXxGPXYuK5X4+Kjo937ZegyNWULx6G ++CbcAbFy6R5KtObj9sInnnLjAt2+pIkUxhl8YZnOTraiRBWgnFAxVjTzEYjwlUF8 +gbg8NnAmLQkr/uWtpxdZ2d81pvlrIj0Y3ltzVPx7h5KyXpKItWm08HdPcYiCSXz8 +TIrioSTUcN0ISspsaujmNlAXMeMidrWLXUwL5fMuZ00p7w8gakgUMqbmeEvTkyJO +iGX5cMqXLp7AXEVFpKzCWg9ebuAWZTkI2v8Kkf466EhIB6OUeeHwWTXpU5Ar8ckU +MCc+FV9cpe+wQv7AN6SdXamUyJySJ07zcDwXHxpXIq32bANAWO/ZrebcLi5AUOs0 +rmiOk+ET2LzzfJjnmBnb0lELrvzbA4ICBQACggIAXh4VEPZbBDyfCvGDTGIjxxs9 +0uApTVBVyAzHTQ+J9OKsaoqbMF8QADczTXaE0ycaZZDcq1jHeAkL/UwAfm1gRyhn +jIWX+quZHv1hI2r114gxkvwa8FNvQKffkeYZ9r7NsCyuhBlSHbFuNgYbByTZ16v6 +s0KfMPgTVMb5LANDD6SwUhb8ggvbEnWrO8l6Cn8tKaCwSVfYF37cECCoqc+yLW+S +0rvJxr/aULAGuEBTA3uwuFOMhWveRNbRqOOfqvOkdGFyUL1zjmNEHNx7qJNU2sni +BbU2DQd01s6uPyWQOXXm77VG1TQo4Z2+OVZSvS8oyNRJaXmqfKf72rW14GERSb40 +qEL6RlltWjPw5Kezv/OdOrE6vKO2uprvpSkOARm9W2jJbJm9hpXvyHUljxJOkYR2 +VxCMVO74DbhDKFuh115wMy2g/FoDy/QbbvgsKOWgBNkgp+xbclo4bJdmvzihwScy +hCeCKKzQDZtu9JSaUnOMvx3hjL7hMAzjRP92Cmly0YoRNuLqzX4OqPTr/Si5au0C +/IiySlBxPUkoP1HQVXm9vU4pI4D/ViDJpXx2UKN9/nFQW1exC/n1TeGavnuT4HY1 +vAt/3wPz3asTCBIULmqGOEsgOo3nN3pfnBmmGDjUWg8i79RNCbLgLkcMtJ0F1xvq +pYCWvL3Wewrmz0Yc790= +-----END PUBLIC KEY----- diff --git a/dists/macosx/scummvm_appcast.xml b/dists/macosx/scummvm_appcast.xml new file mode 100644 index 0000000000..3d47c94bbc --- /dev/null +++ b/dists/macosx/scummvm_appcast.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <channel> + <title>ScummVM Changelog</title> + <link>https://www.scummvm.org/appcasts/macosx/release.xml</link> + <description>Most recent changes with links to updates.</description> + <language>en</language> + <item> + <title>Version 1.8.0</title> + <sparkle:releaseNotesLink> + https://scummvm.org/frs/scummvm/1.8.0/ReleaseNotes + </sparkle:releaseNotesLink> + <pubDate>Sat, 5 Mar 2016 20:16:00 +0000</pubDate> + <enclosure url="https://www.scummvm.org/frs/scummvm/1.8.0/scummvm-1.8.0-macosx.dmg" + sparkle:version="1.8.0" length="14085288" type="application/octet-stream" + sparkle:dsaSignature="MC0CFQDNy2yox7vklthHaZcMto8L4EuLwQIUY8cuevlTpLtuJ9nPOlrj4vo55lY=" /> + <enclosure sparkle:os="windows" + url="https://www.scummvm.org/frs/scummvm/1.8.0/scummvm-1.8.0-win32.exe" + sparkle:version="1.8.0" length="9081062" type="application/octet-stream" + sparkle:dsaSignature="MC0CFQCaG7Oo+Nc2EWVmc7GjUBJLKRvt3QIUQcZTMe2FQhfvrrofX4HLTldDHyY=" /> + </item> + <item> + <title>Version 1.7.0</title> + <sparkle:releaseNotesLink> + https://www.scummvm.org/frs/scummvm/1.7.0/ReleaseNotes + </sparkle:releaseNotesLink> + <sparkle:version>1.7.0</sparkle:version> + <pubDate>Tue, 29 Jul 2014 07:58:00 +0000</pubDate> + <link>https://www.scummvm.org/frs/scummvm/1.7.0/</link> + </item> + </channel> +</rss> diff --git a/dists/macosx/scummvm_osx_appcast.xml b/dists/macosx/scummvm_osx_appcast.xml deleted file mode 100644 index 455b062b6b..0000000000 --- a/dists/macosx/scummvm_osx_appcast.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/"> - <channel> - <title>ScummVM Changelog</title> - <link>http://scummvm.org/scummvm_appcast.xml</link> - <description>Most recent changes with links to updates.</description> - <language>en</language> - <item> - <title>Version 1.2.1 (3 bugs fixed; 2 new features)</title> - <sparkle:releaseNotesLink> - http://sourceforge.net/projects/scummvm/files/scummvm/1.2.1/ReleaseNotes/view - </sparkle:releaseNotesLink> - <pubDate>Sun, 19 Dec 2010 12:20:11 +0000</pubDate> - <enclosure url="http://scummvm.org/ScummVM 1.2.1-Test.zip" sparkle:version="1.2.1" length="1472893" type="application/octet-stream" sparkle:dsaSignature="234818feCa1JyW30nbkBwainOzrN6EQuAh" /> - </item> - <item> - <title>Version 1.2.0</title> - <sparkle:releaseNotesLink> - http://sourceforge.net/projects/scummvm/files/scummvm/1.2.0/ReleaseNotes/view - </sparkle:releaseNotesLink> - <pubDate>Fri, 15 Oct 2010 12:20:11 +0000</pubDate> - <enclosure url="http://scummvm.org/ScummVM 1.2.0-Test.zip" sparkle:version="1.2.0" length="1472893" type="application/octet-stream" sparkle:dsaSignature="234818feCa1JyW30nbkBwainOzrN6EQuAh" /> - </item> - </channel> -</rss> diff --git a/doc/cz/PrectiMe b/doc/cz/PrectiMe index 3c03db9802..030ddac916 100644 --- a/doc/cz/PrectiMe +++ b/doc/cz/PrectiMe @@ -651,7 +651,7 @@ Abyste mohli spustit verzi pro Mac OS X od Wyrmkeep musĆte data zkopĆrovat zĀ <http://wiki.scummvm.org/index.php/HOWTO-Mac_Games>
-I když se vĀ tomto ÄlĆ”nku pĆÅ”e hlavnÄ o hrĆ”ch SCUMM, je zde takĆ© zmĆnÄn nĆ”stroj "HFVExplorer", kterĆ½ potÅebujete kĀ extrakci souborÅÆ. NezapomeÅte, že data ÅeÄi "Inherit the Earth Voices" musĆte umĆstit do stejnĆ©ho adresĆ”Åe, kde jsou uložena data hry:
+I když se vĀ tomto ÄlĆ”nku pĆÅ”e hlavnÄ o hrĆ”ch SCUMM, je zde takĆ© zmĆnÄn nĆ”stroj "HFSExplorer", kterĆ½ potÅebujete kĀ extrakci souborÅÆ. NezapomeÅte, že data ÅeÄi "Inherit the Earth Voices" musĆte umĆstit do stejnĆ©ho adresĆ”Åe, kde jsou uložena data hry:
Inherit the Earth.app/Contents/Resources
@@ -915,7 +915,7 @@ Nebo mÅÆžete použĆt 'extract_mm_c64' zĀ balĆÄku nĆ”strojÅÆ pro extrahovĆ”nĆ 3.26) PoznĆ”mky ke hrĆ”m Macintosh:
----- ---------------------------
-VÅ”echny adventury LucasArts založenĆ© na SCUMM, kromÄ COMI, takĆ© existujĆ ve verzĆch pro in Macintosh. ScummVM mÅÆže vÄtÅ”inu (vÅ”echny?) použĆt, nicmĆ©nÄ, vĀ nÄkterĆ½ch pÅĆpadech je nutnĆ” dodateÄnĆ” prĆ”ce. NejdÅĆve, pokud pro toto nepoužĆvĆ”te Macintosh, pÅĆstup kĀ datÅÆm na CD/disketÄ mÅÆže bĆ½t obtĆžnĆ½. DÅÆvodem je to, že Mac použĆvĆ” zvlĆ”Å”tnĆ formĆ”t disku nazvanĆ½ HFS, kterĆ½ ostatnĆ systĆ©my vÄtÅ”inou nepodporujĆ. NicmĆ©nÄ existuje, nÄkolik nĆ”strojÅÆ, kterĆ© jsou zadarmo a umožÅujĆ ÄĆst takovĆ©to svazky HFS. NapÅĆklad "HFVExplorer" pro Windows a "hfsutils" pro Linux a ostatnĆ UnixovĆ© operaÄnĆ systĆ©my.
+VÅ”echny adventury LucasArts založenĆ© na SCUMM, kromÄ COMI, takĆ© existujĆ ve verzĆch pro in Macintosh. ScummVM mÅÆže vÄtÅ”inu (vÅ”echny?) použĆt, nicmĆ©nÄ, vĀ nÄkterĆ½ch pÅĆpadech je nutnĆ” dodateÄnĆ” prĆ”ce. NejdÅĆve, pokud pro toto nepoužĆvĆ”te Macintosh, pÅĆstup kĀ datÅÆm na CD/disketÄ mÅÆže bĆ½t obtĆžnĆ½. DÅÆvodem je to, že Mac použĆvĆ” zvlĆ”Å”tnĆ formĆ”t disku nazvanĆ½ HFS, kterĆ½ ostatnĆ systĆ©my vÄtÅ”inou nepodporujĆ. NicmĆ©nÄ existuje, nÄkolik nĆ”strojÅÆ, kterĆ© jsou zadarmo a umožÅujĆ ÄĆst takovĆ©to svazky HFS. NapÅĆklad "HFSExplorer" pro Windows a "hfsutils" pro Linux a ostatnĆ UnixovĆ© operaÄnĆ systĆ©my.
VÄtÅ”ina novÄjÅ”Ćch her na Macintosh je dodĆ”vĆ”na pouze sĀ jednĆm datovĆ½m souborem (v nÄkterĆ½ch pÅĆpadech byl tento soubor uÄinÄn neviditelnĆ½m, takže možnĆ” budete potÅebovat dodateÄnĆ© nĆ”stroje, abyste ho mohli zkopĆrovat). ScummVM je schopen takovĆ½to soubor použĆt pÅĆmo; jednoduÅ”e odkažte ScummVM na složku obsahujĆcĆ tento soubor a mÄlo by to fungovat (tak jako sĀ každou podporovanou hrou).
diff --git a/doc/de/Liesmich b/doc/de/Liesmich index f37fc7d396..84eb6b53fd 100644 --- a/doc/de/Liesmich +++ b/doc/de/Liesmich @@ -878,7 +878,7 @@ einem PC arbeiten, lesen Sie hierfĆ¼r: http://wiki.scummvm.org/index.php/HOWTO-Mac_Games Obwohl hier in erster Linie Ć¼ber SCUMM-Spiele gesprochen wird, findet das -Dienstprogramm āHFVExplorerā ErwƤhnung, welches Sie benƶtigen, um die Dateien zu +Dienstprogramm āHFSExplorerā ErwƤhnung, welches Sie benƶtigen, um die Dateien zu extrahieren. Beachten Sie, dass Sie die Sprachausgabedaten aus āInherit the Earth Voicesā im selben Verzeichnis ablegen mĆ¼ssen wie die Spieldaten, die sich an folgendem Ort befinden: @@ -1280,7 +1280,7 @@ kompliziert werden, auf die CD- oder Diskettendaten zuzugreifen. Der Grund hierfĆ¼r ist, dass der Mac ein spezielles DatentrƤgerformat nutzt, welches sich HFS nennt, und das andere Systeme normalerweise nicht unterstĆ¼tzen. Es gibt jedoch zahlreiche kostenlose Tools, die es ermƶglichen, einen solchen -HFS-DatentrƤger zu lesen. Z. B. āHFVExplorerā fĆ¼r Windows und āhfsutilsā fĆ¼r +HFS-DatentrƤger zu lesen. Z. B. āHFSExplorerā fĆ¼r Windows und āhfsutilsā fĆ¼r Linux und andere Betriebssysteme, die Unix Ƥhnlich sind. Die meisten neueren Spiele fĆ¼r den Macintosh wurden nur mit einer einzigen diff --git a/doc/de/Neues b/doc/de/Neues index ef462c189c..e3d8f3a607 100644 --- a/doc/de/Neues +++ b/doc/de/Neues @@ -4,13 +4,94 @@ Programmcodes finden Sie auf Englisch unter: 1.9.0 (DD.MM.YYYY) AGI: - - UnterstĆ¼tzung fĆ¼r Hercules-Darstellung (GrĆ¼n + Bernstein) hinzugefĆ¼gt + - UnterstĆ¼tzung fĆ¼r Hercules-Darstellung (GrĆ¼n + Bernstein) hinzugefĆ¼gt. - UnterstĆ¼tzung fĆ¼r hochauflƶsende Hercules-Schriftart hinzugefĆ¼gt - (auch auĆerhalb der Hercules-Darstellung nutzbar) + (auch auĆerhalb der Hercules-Darstellung nutzbar). - Optionale Funktion "Pause, wenn Befehle eingegeben werden" hinzugefĆ¼gt. Diese Funktion war im originalen Interpreter nur im Hercules-Darstellungsmodus verfĆ¼gbar. +1.8.1 (DD.MM.YYYY) + Allgemein: + - "TESTING"-Markierung von mehreren unterstĆ¼tzten Spielen entfernt. + - Chinesische Ćbersetzung (Pinyin) der BenutzeroberflƤche hinzugefĆ¼gt. + - Ruckeln des Mauszeigers im ScummVM-Programmfenster behoben, welches auf + einigen Systemen auftrat. + + BBVS: + - Fehler beim erneuten Starten des Spiels behoben. + + CinE: + - Fehler beim Laden der Soundeffekte behoben. + + Drascula: + - Text-Ausrichtung ist jetzt originalgetreu. + - Charakter tritt nicht mehr aus dem Bildschirmbereich heraus. + - Laden eines Spielstandes in der "Pendulum"-Szene repariert. + - Falscher Hintergrund fĆ¼r Inventar-GegenstƤnde im Kapitel 6 in der + spanischen Version korrigiert. + - Geschwindigkeit der Animationen korrigiert. Animationen wurden nur halb + so schnell wie im originalen Interpreter abgespielt. + - Rauschen am Beginn und/oder am Ende der Sprachausgabe behoben. + Dieser Fehler trat hauptsƤchlich in der spanischen Version auf. + - Verzƶgerung wƤhrend der Interaktion mit dem Verben-MenĆ¼ und dem Inventar behoben. + - Fehler behoben, durch den die Axt im Schloss mehrfach aufgehoben werden konnte. + + Gob: + - AufhƤngen wƤhrend Sound-Initialisierung in mehreren Spielen behoben. + + KYRA: + - Potentieller Absturz behoben, der in "Hand of Fate" auftritt, wenn der + Sumpfschlangentrank an der Ratte verwendet wird. + (HINWEIS: Dieser Fehler wurde bereits in Version 1.8.0 behoben, + jedoch nicht in der Neues-Datei erwƤhnt). + - Fehlende Stimm-Reaktionen korrigiert, wenn Gegner in der CD-Version von + Lands of Lore getroffen wurden. + + Lab: + - AufhƤngen wƤhrend der End-Sequenz behoben. + - Interne Spiel-Bedienelemente verbessert. + + SAGA: + - Fehlerhafte Farben der Bedienelemente in der franzƶsischen und deutschen + Version von "I Have No Mouth and I Must Scream" korrigiert. + + SCI: + - Cursor-Hilfsroutinen funktionieren nun korrekt auf OpenPandora und anderen + GerƤten, die einen Touchscreen und analoge Sticks/MƤuse zur gleichen Zeit + unterstĆ¼tzen. + - Skript-Fehlerbehebung, um den fehlerhaften Endkampf in der mehrsprachigen + Version von King's Quest 5 zu korrigieren. Betroffen sind die franzƶsische, + deutsche und spanische Version. + - UngĆ¼ltiger Speicherzugriff beim Laden der defekten Audiospur im Abspann + von King's Quest 5 behoben. + - Probleme mit der Einstellung der Bildschirmauflƶsung beim Speichern in + King's Quest 6 behoben. + + SCUMM: + - Erkennung von Maniac Mansion innerhalb von Day of the Tentacle in der + Windows-Version von ScummVM repariert. + - In der EGA-Version von Loom wurde ein Sound-Effekt nicht korrekt angehalten, + wenn AdLib verwendet wurde. Dieser Fehler wurde behoben. + + Baphomets Fluch 2.5: + - Option zur Auswahl von englischer Sprachausgabe anstelle der deutschen, + wenn in der gewƤhlten Sprache keine Sprachausgabe verfĆ¼gbar ist, hinzugefĆ¼gt. + - Ressourcen-Freigabe beim Beenden des Spiels korrigiert. + - Fehler beim Neustart des Spiels nach dem Wechsel der Spiel-Sprache behoben. + - Flackern im HauptmenĆ¼ behoben. + - Lange Dauer des Speichervorgangs unter Windows behoben. + + Windows-Portierung: + - Absturz im Zusammenhang mit nicht-funktionierenden MIDI-GerƤten behoben. + + Mac OS X-Portierung: + - Das Dock-MenĆ¼ fĆ¼r ScummVM enthƤlt nun eine Liste der zuletzt gespielten Spiele, + wenn ScummVM nicht lƤuft, und ermƶglicht den direkten Start dieser Spiele. + - Sparkle-Updater fĆ¼r vereinfachte Programmaktualisierungen hinzugefĆ¼gt. + + GCW0-Portierung: + - Verbesserte UnterstĆ¼tzung fĆ¼r die in ScummVM integrierte Dokumentation. 1.8.0 (04.03.2016) Neue Spiele: @@ -28,7 +109,7 @@ Programmcodes finden Sie auf Englisch unter: hinzugefĆ¼gt. - UnterstĆ¼tzung fĆ¼r Labyrinth of Time hinzugefĆ¼gt. -Neue Portierungen: + Neue Portierungen: - Portierung fĆ¼r den Raspberry Pi hinzugefĆ¼gt. - Portierung fĆ¼r den GCW Zero (GCW0) hinzugefĆ¼gt. @@ -38,7 +119,7 @@ Neue Portierungen: SDL: - Alt+x beendet ScummVM nicht mehr. Verwenden Sie stattdessen Cmd+q/Strg+q/Strg+z und beachten Sie die Hinweise in der Liesmich-Datei. - - Auf POSIX-Systemen befolgen wir nun die Spezifikation XDG Base Directory + - Auf POSIX-Systemen befolgen wir nun die Spezifikation XDG Base Directory fĆ¼r die Speicherung von Benutzerdaten. Dies fĆ¼hrt zu neuen Speicherorten fĆ¼r unsere Konfigurationsdatei, unsere Log-Datei sowie fĆ¼r den standardmƤĆig voreingestellten Speicherort fĆ¼r SpielstƤnde. Wir @@ -66,7 +147,7 @@ Neue Portierungen: (verwendet von Mixed Up Mother Goose). - Feste Verzƶgerung von 2 Sekunden bei Raumwechseln entfernt und durch Heuristik ersetzt. - - Fehlerhafte Tastenbelegungen nach abspeichern/laden behoben + - Fehlerhafte Tastenbelegungen nach abspeichern/laden behoben. AGOS: - Arpeggio-Effekt in der Musik der Amiga-Version von Elvira 1 repariert. @@ -78,7 +159,7 @@ Neue Portierungen: AdLib-Ausgabe erheblich und erhƶht die Originaltreue. Baphomets Fluch 1: - - Sprachausgabe in Macintosh-Versionen korrigiert, wenn ScumMVM + - Sprachausgabe in Macintosh-Versionen korrigiert, wenn ScummVM auf Big-Endian-Systemen ausgefĆ¼hrt wird. - Fehler beim Laden eines Spielstandes aus dem HauptmenĆ¼ in der Bull's Head Hill-Szene korrigiert. Dieser Fehler trat womƶglich auch diff --git a/engines/access/access.cpp b/engines/access/access.cpp index bc9bcb4b08..c12761af4a 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -436,20 +436,9 @@ void AccessEngine::copyBF1BF2() { } void AccessEngine::copyBF2Vid() { - const byte *srcP = (const byte *)_buffer2.getPixels(); - byte *destP = (byte *)_screen->getBasePtr(_screen->_windowXAdd, - _screen->_windowYAdd + _screen->_screenYOff); - - for (int yp = 0; yp < _screen->_vWindowLinesTall; ++yp) { - Common::copy(srcP, srcP + _screen->_vWindowBytesWide, destP); - srcP += _buffer2.pitch; - destP += _screen->pitch; - } - - // Add dirty rect for affected area - Common::Rect r(_screen->_vWindowBytesWide, _screen->_vWindowLinesTall); - r.moveTo(_screen->_windowXAdd, _screen->_windowYAdd + _screen->_screenYOff); - _screen->addDirtyRect(r); + _screen->blitFrom(_buffer2, + Common::Rect(0, 0, _screen->_vWindowBytesWide, _screen->_vWindowLinesTall), + Common::Point(_screen->_windowXAdd, _screen->_windowYAdd)); } void AccessEngine::playVideo(int videoNum, const Common::Point &pt) { diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index e78f92cda7..08006fe1b7 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -185,16 +185,24 @@ void CampScene::mWhileDoOpen() { _vm->_numAnimTimers = 0; _vm->_images.clear(); - if (_vm->_conversation == 2) { - // Cutscene at end of Chapter 6 - Resource *spriteData = _vm->_files->loadFile(28, 37); - _vm->_objectsTable[28] = new SpriteResource(_vm, spriteData); - delete spriteData; - - _vm->_animation->freeAnimationData(); - animResource = _vm->_files->loadFile(28, 38); - _vm->_animation->loadAnimations(animResource); - delete animResource; + if (_vm->isCD()) { + if (_vm->_conversation == 2) { + // Cutscene at end of Chapter 6 + Resource *spriteData = _vm->_files->loadFile(28, 37); + _vm->_objectsTable[28] = new SpriteResource(_vm, spriteData); + delete spriteData; + + _vm->_animation->freeAnimationData(); + animResource = _vm->_files->loadFile(28, 38); + _vm->_animation->loadAnimations(animResource); + delete animResource; + } + } else { + _vm->freeCells(); + _vm->_oldRects.clear(); + _vm->_newRects.clear(); + _vm->_numAnimTimers = 0; + _vm->_images.clear(); } } diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp index f693e6a3a0..2518ff6ad8 100644 --- a/engines/access/asurface.cpp +++ b/engines/access/asurface.cpp @@ -110,7 +110,7 @@ void ImageEntryList::addToList(ImageEntry &ie) { int ASurface::_clipWidth; int ASurface::_clipHeight; -ASurface::ASurface(): Graphics::Surface() { +ASurface::ASurface(): Graphics::ManagedSurface() { _leftSkip = _rightSkip = 0; _topSkip = _bottomSkip = 0; _lastBoundsX = _lastBoundsY = 0; @@ -122,65 +122,14 @@ ASurface::ASurface(): Graphics::Surface() { } ASurface::~ASurface() { - free(); _savedBlock.free(); } -void ASurface::create(uint16 width, uint16 height) { - Graphics::Surface::create(width, height, Graphics::PixelFormat::createFormatCLUT8()); -} - void ASurface::clearBuffer() { byte *pSrc = (byte *)getPixels(); Common::fill(pSrc, pSrc + w * h, 0); } -bool ASurface::clip(Common::Rect &r) { - int skip; - _leftSkip = _rightSkip = 0; - _topSkip = _bottomSkip = 0; - - if (r.left > _clipWidth || r.left < 0) { - if (r.left >= 0) - return true; - - skip = -r.left; - r.setWidth(r.width() - skip); - _leftSkip = skip; - r.moveTo(0, r.top); - } - - int right = r.right - 1; - if (right < 0) - return true; - else if (right > _clipWidth) { - skip = right - _clipWidth; - r.setWidth(r.width() - skip); - _rightSkip = skip; - } - - if (r.top > _clipHeight || r.top < 0) { - if (r.top >= 0) - return true; - - skip = -r.top; - r.setHeight(r.height() - skip); - _topSkip = skip; - r.moveTo(r.left, 0); - } - - int bottom = r.bottom - 1; - if (bottom < 0) - return true; - else if (bottom > _clipHeight) { - skip = bottom - _clipHeight; - _bottomSkip = skip; - r.setHeight(r.height() - skip); - } - - return false; -} - void ASurface::plotImage(SpriteResource *sprite, int frameNum, const Common::Point &pt) { SpriteFrame *frame = sprite->getFrame(frameNum); Common::Rect r(pt.x, pt.y, pt.x + frame->w, pt.y + frame->h); @@ -195,81 +144,7 @@ void ASurface::plotImage(SpriteResource *sprite, int frameNum, const Common::Poi } } -void ASurface::transBlitFrom(ASurface *src, const Common::Point &destPos) { - if (getPixels() == nullptr) - create(w, h); - - for (int yp = 0; yp < src->h; ++yp) { - const byte *srcP = (const byte *)src->getBasePtr(0, yp); - byte *destP = (byte *)getBasePtr(destPos.x, destPos.y + yp); - - for (int xp = 0; xp < this->w; ++xp, ++srcP, ++destP) { - if (*srcP != TRANSPARENCY) - *destP = *srcP; - } - } -} - -void ASurface::transBlitFrom(ASurface *src, const Common::Rect &bounds) { - const int SCALE_LIMIT = 0x100; - int scaleX = SCALE_LIMIT * bounds.width() / src->w; - int scaleY = SCALE_LIMIT * bounds.height() / src->h; - int scaleXCtr = 0, scaleYCtr = 0; - - for (int yCtr = 0, destY = bounds.top; yCtr < src->h; ++yCtr) { - // Handle skipping lines if Y scaling - scaleYCtr += scaleY; - if (scaleYCtr < SCALE_LIMIT) - continue; - scaleYCtr -= SCALE_LIMIT; - - // Handle off-screen lines - if (destY >= this->h) - break; - - if (destY >= 0) { - // Handle drawing the line - const byte *pSrc = (const byte *)src->getBasePtr(0, yCtr); - byte *pDest = (byte *)getBasePtr(bounds.left, destY); - scaleXCtr = 0; - int x = bounds.left; - - for (int xCtr = 0; xCtr < src->w; ++xCtr, ++pSrc) { - // Handle horizontal scaling - scaleXCtr += scaleX; - if (scaleXCtr < SCALE_LIMIT) - continue; - scaleXCtr -= SCALE_LIMIT; - - // Only handle on-screen pixels - if (x >= this->w) - break; - if (x >= 0 && *pSrc != 0) - *pDest = *pSrc; - - ++pDest; - ++x; - } - } - - ++destY; - } -} - -void ASurface::transBlitFrom(ASurface &src) { - blitFrom(src); -} - -void ASurface::blitFrom(const Graphics::Surface &src) { - assert(w >= src.w && h >= src.h); - for (int y = 0; y < src.h; ++y) { - const byte *srcP = (const byte *)src.getBasePtr(0, y); - byte *destP = (byte *)getBasePtr(0, y); - Common::copy(srcP, srcP + src.w, destP); - } -} - -void ASurface::copyBuffer(Graphics::Surface *src) { +void ASurface::copyBuffer(Graphics::ManagedSurface *src) { blitFrom(*src); } @@ -282,14 +157,11 @@ void ASurface::plotB(SpriteFrame *frame, const Common::Point &pt) { } void ASurface::sPlotF(SpriteFrame *frame, const Common::Rect &bounds) { - transBlitFrom(frame, bounds); + transBlitFrom(*frame, Common::Rect(0, 0, frame->w, frame->h), bounds, TRANSPARENCY, false); } void ASurface::sPlotB(SpriteFrame *frame, const Common::Rect &bounds) { - ASurface flippedFrame; - frame->flipHorizontal(flippedFrame); - - transBlitFrom(&flippedFrame, bounds); + transBlitFrom(*frame, Common::Rect(0, 0, frame->w, frame->h), bounds, TRANSPARENCY, true); } void ASurface::copyBlock(ASurface *src, const Common::Rect &bounds) { @@ -324,22 +196,22 @@ void ASurface::restoreBlock() { } void ASurface::drawRect() { - Graphics::Surface::fillRect(Common::Rect(_orgX1, _orgY1, _orgX2, _orgY2), _lColor); + Graphics::ManagedSurface::fillRect(Common::Rect(_orgX1, _orgY1, _orgX2, _orgY2), _lColor); } void ASurface::drawLine(int x1, int y1, int x2, int y2, int col) { - Graphics::Surface::drawLine(x1, y1, x2, y2, col); + Graphics::ManagedSurface::drawLine(x1, y1, x2, y2, col); } void ASurface::drawLine() { - Graphics::Surface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); + Graphics::ManagedSurface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); } void ASurface::drawBox() { - Graphics::Surface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); - Graphics::Surface::drawLine(_orgX1, _orgY2, _orgX2, _orgY2, _lColor); - Graphics::Surface::drawLine(_orgX2, _orgY1, _orgX2, _orgY1, _lColor); - Graphics::Surface::drawLine(_orgX2, _orgY2, _orgX2, _orgY2, _lColor); + Graphics::ManagedSurface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); + Graphics::ManagedSurface::drawLine(_orgX1, _orgY2, _orgX2, _orgY2, _lColor); + Graphics::ManagedSurface::drawLine(_orgX2, _orgY1, _orgX2, _orgY1, _lColor); + Graphics::ManagedSurface::drawLine(_orgX2, _orgY2, _orgX2, _orgY2, _lColor); } void ASurface::flipHorizontal(ASurface &dest) { @@ -373,4 +245,50 @@ void ASurface::moveBufferDown() { Common::copy_backward(p, p + (pitch * (h - TILE_HEIGHT)), p + (pitch * h)); } +bool ASurface::clip(Common::Rect &r) { + int skip; + _leftSkip = _rightSkip = 0; + _topSkip = _bottomSkip = 0; + + if (r.left > _clipWidth || r.left < 0) { + if (r.left >= 0) + return true; + + skip = -r.left; + r.setWidth(r.width() - skip); + _leftSkip = skip; + r.moveTo(0, r.top); + } + + int right = r.right - 1; + if (right < 0) + return true; + else if (right > _clipWidth) { + skip = right - _clipWidth; + r.setWidth(r.width() - skip); + _rightSkip = skip; + } + + if (r.top > _clipHeight || r.top < 0) { + if (r.top >= 0) + return true; + + skip = -r.top; + r.setHeight(r.height() - skip); + _topSkip = skip; + r.moveTo(r.left, 0); + } + + int bottom = r.bottom - 1; + if (bottom < 0) + return true; + else if (bottom > _clipHeight) { + skip = bottom - _clipHeight; + _bottomSkip = skip; + r.setHeight(r.height() - skip); + } + + return false; +} + } // End of namespace Access diff --git a/engines/access/asurface.h b/engines/access/asurface.h index dd05c8067b..ec18ec09c3 100644 --- a/engines/access/asurface.h +++ b/engines/access/asurface.h @@ -27,7 +27,7 @@ #include "common/array.h" #include "common/memstream.h" #include "common/rect.h" -#include "graphics/surface.h" +#include "graphics/managed_surface.h" #include "access/data.h" namespace Access { @@ -35,7 +35,7 @@ namespace Access { class SpriteResource; class SpriteFrame; -class ASurface : public Graphics::Surface { +class ASurface : virtual public Graphics::ManagedSurface { private: Graphics::Surface _savedBlock; @@ -61,14 +61,8 @@ public: virtual ~ASurface(); - void create(uint16 width, uint16 height); - - bool empty() const { return w == 0 || h == 0 || pixels == nullptr; } - void clearBuffer(); - bool clip(Common::Rect &r); - void plotImage(SpriteResource *sprite, int frameNum, const Common::Point &pt); /** @@ -102,18 +96,8 @@ public: virtual void drawLine(); virtual void drawBox(); - - virtual void transBlitFrom(ASurface *src, const Common::Point &destPos); - - virtual void transBlitFrom(ASurface *src, const Common::Rect &bounds); - virtual void transBlitFrom(ASurface &src); - - virtual void blitFrom(const Graphics::Surface &src); - - virtual void copyBuffer(Graphics::Surface *src); - - virtual void addDirtyRect(const Common::Rect &r) {} + virtual void copyBuffer(Graphics::ManagedSurface *src); void copyTo(ASurface *dest); @@ -126,6 +110,8 @@ public: void moveBufferUp(); void moveBufferDown(); + + bool clip(Common::Rect &r); }; class SpriteFrame : public ASurface { diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp index ef32e96f59..89c5d0727d 100644 --- a/engines/access/bubble_box.cpp +++ b/engines/access/bubble_box.cpp @@ -165,7 +165,7 @@ void BubbleBox::printBubble(const Common::String &msg) { void BubbleBox::printBubble_v1(const Common::String &msg) { drawBubble(_bubbles.size() - 1); - + // Loop through drawing the lines Common::String s = msg; Common::String line; @@ -369,7 +369,7 @@ void BubbleBox::displayBoxData() { _vm->_screen->drawRect(); _vm->_events->showCursor(); } - + _vm->_events->hideCursor(); int oldPStartY = _boxPStartY; ++_boxPStartY; @@ -474,7 +474,7 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) { --_vm->_screen->_orgX2; --_vm->_screen->_orgY2; _vm->_screen->_lColor = 0xF9; - + // Draw the inner border _vm->_screen->drawBox(); @@ -642,7 +642,9 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) { } } } - + + delete icons; + _vm->_screen->restoreScreen(); _vm->_boxDataStart = _startItem; _vm->_boxSelectYOld = -1; @@ -732,7 +734,7 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) { if (_type != TYPE_3) continue; - + if ((_vm->_events->_mousePos.x < tmpX) || (_vm->_events->_mousePos.x > tmpX + 144)) continue; diff --git a/engines/access/char.cpp b/engines/access/char.cpp index cbe1d5d3d9..f6d3033b1b 100644 --- a/engines/access/char.cpp +++ b/engines/access/char.cpp @@ -44,7 +44,7 @@ CharEntry::CharEntry(const byte *data, AccessEngine *vm) { if (vm->getGameID() == GType_MartianMemorandum) { int lastColor = s.readUint16LE(); _numColors = lastColor - _startColor; - } else + } else _numColors = s.readUint16LE(); // Load cells @@ -131,6 +131,7 @@ void CharManager::loadChar(int charId) { if (ce._animFile._fileNum != -1) { Resource *data = _vm->_files->loadFile(ce._animFile); _vm->_animation->loadAnimations(data); + delete data; } // Load script data diff --git a/engines/access/events.cpp b/engines/access/events.cpp index d62b05c33f..21ff0d0928 100644 --- a/engines/access/events.cpp +++ b/engines/access/events.cpp @@ -115,7 +115,7 @@ void EventsManager::setCursor(CursorType cursorId) { } } -void EventsManager::setCursorData(Graphics::Surface *src, const Common::Rect &r) { +void EventsManager::setCursorData(Graphics::ManagedSurface *src, const Common::Rect &r) { _invCursor.create(r.width(), r.height(), Graphics::PixelFormat::createFormatCLUT8()); _invCursor.copyRectToSurface(*src, 0, 0, r); } @@ -281,8 +281,7 @@ void EventsManager::nextFrame() { // Give time to the debugger _vm->_debugger->onFrame(); - // TODO: Refactor for dirty rects - _vm->_screen->updateScreen(); + _vm->_screen->update(); } void EventsManager::nextTimer() { diff --git a/engines/access/events.h b/engines/access/events.h index b8c5f0ee5e..5acbb71c9d 100644 --- a/engines/access/events.h +++ b/engines/access/events.h @@ -100,7 +100,7 @@ public: /** * Set the image for the inventory cursor */ - void setCursorData(Graphics::Surface *src, const Common::Rect &r); + void setCursorData(Graphics::ManagedSurface *src, const Common::Rect &r); /** * Return the current cursor Id diff --git a/engines/access/files.cpp b/engines/access/files.cpp index b9c0f7080d..48276ee477 100644 --- a/engines/access/files.cpp +++ b/engines/access/files.cpp @@ -130,13 +130,13 @@ void FileManager::openFile(Resource *res, const Common::String &filename) { error("Could not open file - %s", filename.c_str()); } -void FileManager::loadScreen(Graphics::Surface *dest, int fileNum, int subfile) { +void FileManager::loadScreen(Graphics::ManagedSurface *dest, int fileNum, int subfile) { Resource *res = loadFile(fileNum, subfile); handleScreen(dest, res); delete res; } -void FileManager::handleScreen(Graphics::Surface *dest, Resource *res) { +void FileManager::handleScreen(Graphics::ManagedSurface *dest, Resource *res) { _vm->_screen->loadRawPalette(res->_stream); if (_setPaletteFlag) _vm->_screen->setPalette(); @@ -147,20 +147,17 @@ void FileManager::handleScreen(Graphics::Surface *dest, Resource *res) { res->_size -= res->_stream->pos(); handleFile(res); - if (dest != _vm->_screen) - dest->w = _vm->_screen->w; + Graphics::Surface destSurface = dest->getSubArea(Common::Rect(0, 0, + _vm->_screen->w, _vm->_screen->h)); - if (dest->w == dest->pitch) { - res->_stream->read((byte *)dest->getPixels(), dest->w * dest->h); + if (destSurface.w == destSurface.pitch) { + res->_stream->read((byte *)destSurface.getPixels(), destSurface.w * destSurface.h); } else { - for (int y = 0; y < dest->h; ++y) { - byte *pDest = (byte *)dest->getBasePtr(0, y); - res->_stream->read(pDest, dest->w); + for (int y = 0; y < destSurface.h; ++y) { + byte *pDest = (byte *)destSurface.getBasePtr(0, y); + res->_stream->read(pDest, destSurface.w); } } - - if (dest == _vm->_screen) - _vm->_screen->addDirtyRect(Common::Rect(0, 0, dest->w, dest->h)); } void FileManager::loadScreen(int fileNum, int subfile) { diff --git a/engines/access/files.h b/engines/access/files.h index d081934e91..61fccc2431 100644 --- a/engines/access/files.h +++ b/engines/access/files.h @@ -26,7 +26,7 @@ #include "common/scummsys.h" #include "common/array.h" #include "common/file.h" -#include "graphics/surface.h" +#include "graphics/managed_surface.h" #include "access/decompress.h" namespace Access { @@ -81,7 +81,7 @@ private: /** * Handles loading a screen surface and palette with decoded resource */ - void handleScreen(Graphics::Surface *dest, Resource *res); + void handleScreen(Graphics::ManagedSurface *dest, Resource *res); /** * Open up a sub-file container file @@ -133,7 +133,7 @@ public: /** * Load a screen resource onto a designated surface */ - void loadScreen(Graphics::Surface *dest, int fileNum, int subfile); + void loadScreen(Graphics::ManagedSurface *dest, int fileNum, int subfile); }; } // End of namespace Access diff --git a/engines/access/font.cpp b/engines/access/font.cpp index 8af183f193..6ae65e43f0 100644 --- a/engines/access/font.cpp +++ b/engines/access/font.cpp @@ -151,13 +151,12 @@ void Font::drawString(ASurface *s, const Common::String &msg, const Common::Poin int Font::drawChar(ASurface *s, char c, Common::Point &pt) { Graphics::Surface &ch = _chars[c - ' ']; - - s->addDirtyRect(Common::Rect(pt.x, pt.y, pt.x + ch.w, pt.y + ch.h)); + Graphics::Surface dest = s->getSubArea(Common::Rect(pt.x, pt.y, pt.x + ch.w, pt.y + ch.h)); // Loop through the lines of the character for (int y = 0; y < ch.h; ++y) { byte *pSrc = (byte *)ch.getBasePtr(0, y); - byte *pDest = (byte *)s->getBasePtr(pt.x, pt.y + y); + byte *pDest = (byte *)dest.getBasePtr(0, y); // Loop through the horizontal pixels of the line for (int x = 0; x < ch.w; ++x, ++pSrc, ++pDest) { diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp index 0a962aa69a..e9874cd8d6 100644 --- a/engines/access/inventory.cpp +++ b/engines/access/inventory.cpp @@ -223,6 +223,7 @@ int InventoryManager::displayInv() { else _vm->_useItem = -1; + free(names); free(inv); return 0; } diff --git a/engines/access/room.cpp b/engines/access/room.cpp index a7192d330f..a41de63bf6 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -142,7 +142,7 @@ void Room::takePicture() { _vm->_player->_roomNumber = 7; _vm->_room->_function = FN_CLEAR1; return; - } else if (result >= 0) + } else if (result >= 0) _vm->_player->_move = (Direction)(result + 1); _vm->_player->_scrollFlag = false; @@ -715,6 +715,8 @@ void Room::executeCommand(int commandId) { screen.plotImage(spr, _selectCommand + 2, Common::Point(_rMouse[_selectCommand][0], (_vm->getGameID() == GType_MartianMemorandum) ? 184 : 176)); + delete spr; + _vm->_screen->restoreScreen(); _vm->_boxSelect = true; } diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp index aa15abd59a..9700640b71 100644 --- a/engines/access/screen.cpp +++ b/engines/access/screen.cpp @@ -69,8 +69,6 @@ void Screen::clearScreen() { clearBuffer(); if (_vesaMode) _vm->_clearSummaryFlag = true; - - addDirtyRect(Common::Rect(0, 0, this->w, this->h)); } void Screen::setDisplayScan() { @@ -89,28 +87,14 @@ void Screen::setPanel(int num) { _msVirtualOffset = _virtualOffsetsTable[num]; } -void Screen::updateScreen() { +void Screen::update() { if (_vm->_startup >= 0) { if (--_vm->_startup == -1) _fadeIn = true; return; } - - // Merge the dirty rects - mergeDirtyRects(); - - // Loop through copying dirty areas to the physical screen - Common::List<Common::Rect>::iterator i; - for (i = _dirtyRects.begin(); i != _dirtyRects.end(); ++i) { - const Common::Rect &r = *i; - const byte *srcP = (const byte *)getBasePtr(r.left, r.top); - g_system->copyRectToScreen(srcP, this->pitch, r.left, r.top, - r.width(), r.height()); - } - - // Signal the physical screen to update - g_system->updateScreen(); - _dirtyRects.clear(); + markAllDirty();//****DEBUG**** + Graphics::Screen::update(); } void Screen::setInitialPalettte() { @@ -153,7 +137,7 @@ void Screen::loadRawPalette(Common::SeekableReadStream *stream) { void Screen::updatePalette() { g_system->getPaletteManager()->setPalette(&_tempPalette[0], 0, PALETTE_COUNT); - updateScreen(); + update(); } void Screen::savePalette() { @@ -293,22 +277,7 @@ void Screen::drawBox() { ASurface::drawBox(); } -void Screen::transBlitFrom(ASurface *src, const Common::Point &destPos) { - addDirtyRect(Common::Rect(destPos.x, destPos.y, destPos.x + src->w, destPos.y + src->h)); - ASurface::transBlitFrom(src, destPos); -} - -void Screen::transBlitFrom(ASurface *src, const Common::Rect &bounds) { - addDirtyRect(bounds); - ASurface::transBlitFrom(src, bounds); -} - -void Screen::blitFrom(const Graphics::Surface &src) { - addDirtyRect(Common::Rect(0, 0, src.w, src.h)); - ASurface::blitFrom(src); -} - -void Screen::copyBuffer(Graphics::Surface *src) { +void Screen::copyBuffer(Graphics::ManagedSurface *src) { addDirtyRect(Common::Rect(0, 0, src->w, src->h)); ASurface::copyBuffer(src); } @@ -349,51 +318,7 @@ void Screen::cyclePaletteBackwards() { } void Screen::flashPalette(int count) { - warning("TODO: Implement flashPalette"); -} - -void Screen::addDirtyRect(const Common::Rect &r) { - _dirtyRects.push_back(r); - assert(r.isValidRect() && r.width() > 0 && r.height() > 0); -} - -void Screen::mergeDirtyRects() { - Common::List<Common::Rect>::iterator rOuter, rInner; - - // Ensure dirty rect list has at least two entries - rOuter = _dirtyRects.begin(); - for (int i = 0; i < 2; ++i, ++rOuter) { - if (rOuter == _dirtyRects.end()) - return; - } - - // Process the dirty rect list to find any rects to merge - for (rOuter = _dirtyRects.begin(); rOuter != _dirtyRects.end(); ++rOuter) { - rInner = rOuter; - while (++rInner != _dirtyRects.end()) { - - if ((*rOuter).intersects(*rInner)) { - // these two rectangles overlap or - // are next to each other - merge them - - unionRectangle(*rOuter, *rOuter, *rInner); - - // remove the inner rect from the list - _dirtyRects.erase(rInner); - - // move back to beginning of list - rInner = rOuter; - } - } - } + // No implementation needed in ScummVM } -bool Screen::unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2) { - destRect = src1; - destRect.extend(src2); - - return !destRect.isEmpty(); -} - - } // End of namespace Access diff --git a/engines/access/screen.h b/engines/access/screen.h index 6fa0fe3812..a022741f91 100644 --- a/engines/access/screen.h +++ b/engines/access/screen.h @@ -26,15 +26,13 @@ #include "common/scummsys.h" #include "common/rect.h" #include "common/stream.h" +#include "graphics/screen.h" #include "access/asurface.h" namespace Access { class AccessEngine; -#define PALETTE_COUNT 256 -#define PALETTE_SIZE (256 * 3) - struct ScreenSave { int _clipWidth; int _clipHeight; @@ -47,7 +45,7 @@ struct ScreenSave { int _screenYOff; }; -class Screen : public ASurface { +class Screen : public virtual ASurface, public virtual Graphics::Screen { private: AccessEngine *_vm; byte _tempPalette[PALETTE_SIZE]; @@ -66,10 +64,6 @@ private: Common::List<Common::Rect> _dirtyRects; void updatePalette(); - - void mergeDirtyRects(); - - bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2); public: int _vesaMode; int _startColor, _numColors; @@ -87,6 +81,11 @@ public: bool _screenChangeFlag; bool _fadeIn; public: + /** + * Updates the screen + */ + virtual void update(); + virtual void copyBlock(ASurface *src, const Common::Rect &bounds); virtual void restoreBlock(); @@ -95,15 +94,7 @@ public: virtual void drawBox(); - virtual void transBlitFrom(ASurface *src, const Common::Point &destPos); - - virtual void transBlitFrom(ASurface *src, const Common::Rect &bounds); - - virtual void blitFrom(const Graphics::Surface &src); - - virtual void copyBuffer(Graphics::Surface *src); - - virtual void addDirtyRect(const Common::Rect &r); + virtual void copyBuffer(Graphics::ManagedSurface *src); public: Screen(AccessEngine *vm); @@ -114,11 +105,6 @@ public: void setPanel(int num); /** - * Update the underlying screen - */ - void updateScreen(); - - /** * Fade out screen */ void forceFadeOut(); diff --git a/engines/access/sound.cpp b/engines/access/sound.cpp index 38f544de4e..448f630501 100644 --- a/engines/access/sound.cpp +++ b/engines/access/sound.cpp @@ -20,9 +20,11 @@ * */ -#include "common/algorithm.h" #include "common/config-manager.h" #include "audio/mixer.h" +#include "audio/audiostream.h" +#include "audio/mididrv.h" +#include "audio/midiparser.h" #include "audio/decoders/raw.h" #include "audio/decoders/wave.h" // Miles Audio diff --git a/engines/access/sound.h b/engines/access/sound.h index b372e566d2..d82ee956b1 100644 --- a/engines/access/sound.h +++ b/engines/access/sound.h @@ -24,14 +24,16 @@ #define ACCESS_SOUND_H #include "common/scummsys.h" -#include "audio/audiostream.h" #include "audio/mixer.h" #include "access/files.h" #include "audio/midiplayer.h" -#include "audio/midiparser.h" #define MAX_SOUNDS 20 +namespace Audio { +class AudioStream; +} + namespace Access { class AccessEngine; diff --git a/engines/access/video.cpp b/engines/access/video.cpp index 5fc5f6762c..e3ff457c3b 100644 --- a/engines/access/video.cpp +++ b/engines/access/video.cpp @@ -157,7 +157,7 @@ void VideoPlayer::playVideo() { // If the video is playing on the screen surface, add a dirty rect if (_vidSurface == _vm->_screen) - _vm->_screen->addDirtyRect(_videoBounds); + _vm->_screen->markAllDirty(); getFrame(); if (++_videoFrame == _frameCount) { diff --git a/engines/access/video/movie_decoder.cpp b/engines/access/video/movie_decoder.cpp index 05ec25d54c..1406e549ad 100644 --- a/engines/access/video/movie_decoder.cpp +++ b/engines/access/video/movie_decoder.cpp @@ -719,7 +719,7 @@ bool AccessEngine::playMovie(const Common::String &filename, const Common::Point g_system->getPaletteManager()->setPalette(palette, 0, 256); } - _screen->updateScreen(); + _screen->update(); } } diff --git a/engines/access/video/movie_decoder.h b/engines/access/video/movie_decoder.h index fe8a89fcde..8b5d94836b 100644 --- a/engines/access/video/movie_decoder.h +++ b/engines/access/video/movie_decoder.h @@ -23,13 +23,8 @@ #ifndef ACCESS_VIDEO_MOVIE_DECODER_H #define ACCESS_VIDEO_MOVIE_DECODER_H -#include "common/rect.h" #include "video/video_decoder.h" -#include "audio/decoders/raw.h" - -namespace Audio { -class QueuingAudioStream; -} +#include "audio/audiostream.h" namespace Common { class SeekableReadStream; diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp new file mode 100644 index 0000000000..1ab74c3cf6 --- /dev/null +++ b/engines/adl/adl.cpp @@ -0,0 +1,1038 @@ +/* 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/scummsys.h" +#include "common/config-manager.h" +#include "common/debug.h" +#include "common/error.h" +#include "common/file.h" +#include "common/system.h" +#include "common/events.h" +#include "common/stream.h" +#include "common/savefile.h" + +#include "engines/util.h" + +#include "graphics/palette.h" +#include "graphics/thumbnail.h" + +#include "adl/adl.h" +#include "adl/display.h" +#include "adl/detection.h" + +namespace Adl { + +AdlEngine::~AdlEngine() { + delete _display; +} + +AdlEngine::AdlEngine(OSystem *syst, const AdlGameDescription *gd) : + Engine(syst), + _display(nullptr), + _gameDescription(gd), + _isRestarting(false), + _isRestoring(false), + _saveVerb(0), + _saveNoun(0), + _restoreVerb(0), + _restoreNoun(0), + _canSaveNow(false), + _canRestoreNow(false) { +} + +Common::String AdlEngine::readString(Common::ReadStream &stream, byte until) const { + Common::String str; + + while (1) { + byte b = stream.readByte(); + + if (stream.eos() || stream.err()) + error("Error reading string"); + + if (b == until) + break; + + str += b; + }; + + return str; +} + +Common::String AdlEngine::readStringAt(Common::SeekableReadStream &stream, uint offset, byte until) const { + stream.seek(offset); + return readString(stream, until); +} + +void AdlEngine::printMessage(uint idx, bool wait) const { + Common::String msg = _messages[idx - 1]; + wordWrap(msg); + _display->printString(msg); + + if (wait) + delay(14 * 166018 / 1000); +} + +void AdlEngine::delay(uint32 ms) const { + Common::EventManager *ev = g_system->getEventManager(); + + uint32 start = g_system->getMillis(); + + while (!g_engine->shouldQuit() && g_system->getMillis() - start < ms) { + Common::Event event; + if (ev->pollEvent(event)) { + if (event.type == Common::EVENT_KEYDOWN && (event.kbd.flags & Common::KBD_CTRL)) { + switch(event.kbd.keycode) { + case Common::KEYCODE_q: + g_engine->quitGame(); + break; + default: + break; + } + } + } + g_system->delayMillis(16); + } +} + +Common::String AdlEngine::inputString(byte prompt) const { + Common::String s; + + if (prompt > 0) + _display->printString(Common::String(prompt)); + + while (1) { + byte b = inputKey(); + + if (g_engine->shouldQuit() || _isRestoring) + return 0; + + if (b == 0) + continue; + + if (b == ('\r' | 0x80)) { + s += b; + _display->printString(Common::String(b)); + return s; + } + + if (b < 0xa0) { + switch (b) { + case Common::KEYCODE_BACKSPACE | 0x80: + if (!s.empty()) { + _display->moveCursorBackward(); + _display->setCharAtCursor(APPLECHAR(' ')); + s.deleteLastChar(); + } + break; + }; + } else { + if (s.size() < 255) { + s += b; + _display->printString(Common::String(b)); + } + } + } +} + +byte AdlEngine::inputKey() const { + Common::EventManager *ev = g_system->getEventManager(); + + byte key = 0; + + _display->showCursor(true); + + while (!g_engine->shouldQuit() && !_isRestoring && key == 0) { + Common::Event event; + if (ev->pollEvent(event)) { + if (event.type != Common::EVENT_KEYDOWN) + continue; + + if (event.kbd.flags & Common::KBD_CTRL) { + if (event.kbd.keycode == Common::KEYCODE_q) + g_engine->quitGame(); + continue; + } + + switch (event.kbd.keycode) { + case Common::KEYCODE_BACKSPACE: + case Common::KEYCODE_RETURN: + key = convertKey(event.kbd.keycode); + break; + default: + if (event.kbd.ascii >= 0x20 && event.kbd.ascii < 0x80) + key = convertKey(event.kbd.ascii); + }; + } + + _display->updateTextScreen(); + g_system->delayMillis(16); + } + + _display->showCursor(false); + + return key; +} + +void AdlEngine::loadWords(Common::ReadStream &stream, WordMap &map) const { + uint index = 0; + + while (1) { + ++index; + + byte buf[IDI_WORD_SIZE]; + + if (stream.read(buf, IDI_WORD_SIZE) < IDI_WORD_SIZE) + error("Error reading word list"); + + Common::String word((char *)buf, IDI_WORD_SIZE); + + if (!map.contains(word)) + map[word] = index; + + byte synonyms = stream.readByte(); + + if (stream.err() || stream.eos()) + error("Error reading word list"); + + if (synonyms == 0xff) + break; + + for (uint i = 0; i < synonyms; ++i) { + if (stream.read((char *)buf, IDI_WORD_SIZE) < IDI_WORD_SIZE) + error("Error reading word list"); + + word = Common::String((char *)buf, IDI_WORD_SIZE); + + if (!map.contains(word)) + map[word] = index; + } + } +} + +void AdlEngine::readCommands(Common::ReadStream &stream, Commands &commands) { + while (1) { + Command command; + command.room = stream.readByte(); + + if (command.room == 0xff) + return; + + command.verb = stream.readByte(); + command.noun = stream.readByte(); + + byte scriptSize = stream.readByte() - 6; + + command.numCond = stream.readByte(); + command.numAct = stream.readByte(); + + for (uint i = 0; i < scriptSize; ++i) + command.script.push_back(stream.readByte()); + + if (stream.eos() || stream.err()) + error("Failed to read commands"); + + if (command.numCond == 0 && command.script[0] == IDO_ACT_SAVE) { + _saveVerb = command.verb; + _saveNoun = command.noun; + } + + if (command.numCond == 0 && command.script[0] == IDO_ACT_LOAD) { + _restoreVerb = command.verb; + _restoreNoun = command.noun; + } + + commands.push_back(command); + } +} + +Common::Error AdlEngine::run() { + _display = new Display(); + + loadData(); + + int saveSlot = ConfMan.getInt("save_slot"); + if (saveSlot >= 0) { + if (loadGameState(saveSlot).getCode() != Common::kNoError) + error("Failed to load save game from slot %i", saveSlot); + _display->moveCursorTo(Common::Point(0, 23)); + _isRestoring = true; + } else { + runIntro(); + initState(); + } + + _display->setMode(DISPLAY_MODE_MIXED); + _display->printAsciiString("\r\r\r\r\r"); + + while (1) { + uint verb = 0, noun = 0; + + // When restoring from the launcher, we don't read + // input on the first iteration. This is needed to + // ensure that restoring from the launcher and + // restoring in-game brings us to the same game state. + // (Also see comment below.) + if (!_isRestoring) { + clearScreen(); + showRoom(); + + _canSaveNow = _canRestoreNow = true; + getInput(verb, noun); + _canSaveNow = _canRestoreNow = false; + + if (shouldQuit()) + break; + + // If we just restored from the GMM, we skip this command + // set, as no command has been input by the user + if (!_isRestoring) + if (!doOneCommand(_roomCommands, verb, noun)) + printMessage(_messageIds.dontUnderstand); + } + + if (_isRestoring) { + // We restored from the GMM or launcher. As restoring + // with "RESTORE GAME" does not end command processing, + // we don't break it off here either. This essentially + // means that restoring a game will always run through + // the global commands and increase the move counter + // before the first user input. + _display->printAsciiString("\r"); + _isRestoring = false; + verb = _restoreVerb; + noun = _restoreNoun; + } + + // Restarting does end command processing + if (_isRestarting) { + _isRestarting = false; + continue; + } + + doAllCommands(_globalCommands, verb, noun); + _state.moves++; + } + + return Common::kNoError; +} + +bool AdlEngine::hasFeature(EngineFeature f) const { + switch (f) { + case kSupportsLoadingDuringRuntime: + case kSupportsSavingDuringRuntime: + case kSupportsRTL: + return true; + default: + return false; + } +} + +Common::Error AdlEngine::loadGameState(int slot) { + Common::String fileName = Common::String::format("%s.s%02d", _targetName.c_str(), slot); + Common::InSaveFile *inFile = getSaveFileManager()->openForLoading(fileName); + + if (!inFile) { + warning("Failed to open file '%s'", fileName.c_str()); + return Common::kUnknownError; + } + + if (inFile->readUint32BE() != MKTAG('A', 'D', 'L', ':')) { + warning("No header found in '%s'", fileName.c_str()); + delete inFile; + return Common::kUnknownError; + } + + byte saveVersion = inFile->readByte(); + if (saveVersion != SAVEGAME_VERSION) { + warning("Save game version %i not supported", saveVersion); + delete inFile; + return Common::kUnknownError; + } + + // Skip description + inFile->seek(SAVEGAME_NAME_LEN, SEEK_CUR); + // Skip save time + inFile->seek(6, SEEK_CUR); + + uint32 playTime = inFile->readUint32BE(); + + Graphics::skipThumbnail(*inFile); + + initState(); + + _state.room = inFile->readByte(); + _state.moves = inFile->readByte(); + _state.isDark = inFile->readByte(); + + uint32 size = inFile->readUint32BE(); + if (size != _state.rooms.size()) + error("Room count mismatch (expected %i; found %i)", _state.rooms.size(), size); + + for (uint i = 0; i < size; ++i) { + _state.rooms[i].picture = inFile->readByte(); + _state.rooms[i].curPicture = inFile->readByte(); + } + + size = inFile->readUint32BE(); + if (size != _state.items.size()) + error("Item count mismatch (expected %i; found %i)", _state.items.size(), size); + + for (uint i = 0; i < size; ++i) { + _state.items[i].room = inFile->readByte(); + _state.items[i].picture = inFile->readByte(); + _state.items[i].position.x = inFile->readByte(); + _state.items[i].position.y = inFile->readByte(); + _state.items[i].state = inFile->readByte(); + } + + size = inFile->readUint32BE(); + if (size != _state.vars.size()) + error("Variable count mismatch (expected %i; found %i)", _state.vars.size(), size); + + for (uint i = 0; i < size; ++i) + _state.vars[i] = inFile->readByte(); + + if (inFile->err() || inFile->eos()) + error("Failed to load game '%s'", fileName.c_str()); + + delete inFile; + + setTotalPlayTime(playTime); + + _isRestoring = true; + return Common::kNoError; +} + +bool AdlEngine::canLoadGameStateCurrently() { + return _canRestoreNow; +} + +Common::Error AdlEngine::saveGameState(int slot, const Common::String &desc) { + Common::String fileName = Common::String::format("%s.s%02d", _targetName.c_str(), slot); + Common::OutSaveFile *outFile = getSaveFileManager()->openForSaving(fileName); + + if (!outFile) { + warning("Failed to open file '%s'", fileName.c_str()); + return Common::kUnknownError; + } + + outFile->writeUint32BE(MKTAG('A', 'D', 'L', ':')); + outFile->writeByte(SAVEGAME_VERSION); + + char name[SAVEGAME_NAME_LEN] = { }; + + if (!desc.empty()) + strncpy(name, desc.c_str(), sizeof(name) - 1); + else { + Common::String defaultName("Save "); + defaultName += 'A' + slot; + strncpy(name, defaultName.c_str(), sizeof(name) - 1); + } + + outFile->write(name, sizeof(name)); + + TimeDate t; + g_system->getTimeAndDate(t); + + outFile->writeUint16BE(t.tm_year); + outFile->writeByte(t.tm_mon); + outFile->writeByte(t.tm_mday); + outFile->writeByte(t.tm_hour); + outFile->writeByte(t.tm_min); + + uint32 playTime = getTotalPlayTime(); + outFile->writeUint32BE(playTime); + + _display->saveThumbnail(*outFile); + + outFile->writeByte(_state.room); + outFile->writeByte(_state.moves); + outFile->writeByte(_state.isDark); + + outFile->writeUint32BE(_state.rooms.size()); + for (uint i = 0; i < _state.rooms.size(); ++i) { + outFile->writeByte(_state.rooms[i].picture); + outFile->writeByte(_state.rooms[i].curPicture); + } + + outFile->writeUint32BE(_state.items.size()); + for (uint i = 0; i < _state.items.size(); ++i) { + outFile->writeByte(_state.items[i].room); + outFile->writeByte(_state.items[i].picture); + outFile->writeByte(_state.items[i].position.x); + outFile->writeByte(_state.items[i].position.y); + outFile->writeByte(_state.items[i].state); + } + + outFile->writeUint32BE(_state.vars.size()); + for (uint i = 0; i < _state.vars.size(); ++i) + outFile->writeByte(_state.vars[i]); + + outFile->finalize(); + + if (outFile->err()) { + delete outFile; + warning("Failed to save game '%s'", fileName.c_str()); + return Common::kUnknownError; + } + + delete outFile; + return Common::kNoError; +} + +bool AdlEngine::canSaveGameStateCurrently() { + if (!_canSaveNow) + return false; + + Commands::const_iterator cmd; + + // Here we check whether or not the game currently accepts the command + // "SAVE GAME". This prevents saving via the GMM in situations where + // it wouldn't otherwise be possible to do so. + for (cmd = _roomCommands.begin(); cmd != _roomCommands.end(); ++cmd) { + uint offset; + if (matchCommand(*cmd, _saveVerb, _saveNoun, &offset)) + return cmd->script[offset] == IDO_ACT_SAVE; + } + + return false; +} + +void AdlEngine::wordWrap(Common::String &str) const { + uint end = 39; + + while (1) { + if (str.size() <= end) + return; + + while (str[end] != APPLECHAR(' ')) + --end; + + str.setChar(APPLECHAR('\r'), end); + end += 40; + } +} + +byte AdlEngine::convertKey(uint16 ascii) const { + ascii = toupper(ascii); + + if (ascii >= 0x80) + return 0; + + ascii |= 0x80; + + if (ascii >= 0x80 && ascii <= 0xe0) + return ascii; + + return 0; +} + +Common::String AdlEngine::getLine() const { + // Original engine uses a global here, which isn't reset between + // calls and may not match actual mode + bool textMode = false; + + while (1) { + Common::String line = inputString(APPLECHAR('?')); + + if (shouldQuit() || _isRestoring) + return ""; + + if ((byte)line[0] == ('\r' | 0x80)) { + textMode = !textMode; + _display->setMode(textMode ? DISPLAY_MODE_TEXT : DISPLAY_MODE_MIXED); + continue; + } + + // Remove the return + line.deleteLastChar(); + return line; + } +} + +Common::String AdlEngine::getWord(const Common::String &line, uint &index) const { + Common::String str; + + for (uint i = 0; i < 8; ++i) + str += APPLECHAR(' '); + + int copied = 0; + + // Skip initial whitespace + while (1) { + if (index == line.size()) + return str; + if (line[index] != APPLECHAR(' ')) + break; + ++index; + } + + // Copy up to 8 characters + while (1) { + if (copied < 8) + str.setChar(line[index], copied++); + + index++; + + if (index == line.size() || line[index] == APPLECHAR(' ')) + return str; + } +} + +void AdlEngine::getInput(uint &verb, uint &noun) { + while (1) { + _display->printString(_strings.enterCommand); + Common::String line = getLine(); + + if (shouldQuit() || _isRestoring) + return; + + uint index = 0; + Common::String verbStr = getWord(line, index); + + if (!_verbs.contains(verbStr)) { + Common::String err = _strings.verbError; + for (uint i = 0; i < verbStr.size(); ++i) + err.setChar(verbStr[i], i + 19); + _display->printString(err); + continue; + } + + verb = _verbs[verbStr]; + + Common::String nounStr = getWord(line, index); + + if (!_nouns.contains(nounStr)) { + Common::String err = _strings.nounError; + for (uint i = 0; i < verbStr.size(); ++i) + err.setChar(verbStr[i], i + 19); + for (uint i = 0; i < nounStr.size(); ++i) + err.setChar(nounStr[i], i + 30); + _display->printString(err); + continue; + } + + noun = _nouns[nounStr]; + return; + } +} + +void AdlEngine::showRoom() const { + if (!_state.isDark) { + drawPic(getCurRoom().curPicture); + drawItems(); + } + + _display->updateHiResScreen(); + printMessage(getCurRoom().description, false); +} + +void AdlEngine::clearScreen() const { + _display->setMode(DISPLAY_MODE_MIXED); + _display->clear(0x00); +} + +void AdlEngine::drawItems() const { + Common::Array<Item>::const_iterator item; + + uint dropped = 0; + + for (item = _state.items.begin(); item != _state.items.end(); ++item) { + if (item->room != _state.room) + continue; + + if (item->state == IDI_ITEM_MOVED) { + if (getCurRoom().picture == getCurRoom().curPicture) { + const Common::Point &p = _itemOffsets[dropped]; + if (item->isLineArt) + drawLineArt(_lineArt[item->picture - 1], p); + else + drawPic(item->picture, p); + ++dropped; + } + continue; + } + + Common::Array<byte>::const_iterator pic; + + for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) { + if (*pic == getCurRoom().curPicture) { + if (item->isLineArt) + drawLineArt(_lineArt[item->picture - 1], item->position); + else + drawPic(item->picture, item->position); + continue; + } + } + } +} + +void AdlEngine::drawNextPixel(Common::Point &p, byte color, byte bits, byte quadrant) const { + if (bits & 4) + _display->putPixel(p, color); + + bits += quadrant; + + if (bits & 1) + p.x += (bits & 2 ? -1 : 1); + else + p.y += (bits & 2 ? 1 : -1); +} + +void AdlEngine::drawLineArt(const Common::Array<byte> &lineArt, const Common::Point &pos, byte rotation, byte scaling, byte color) const { + const byte stepping[] = { + 0xff, 0xfe, 0xfa, 0xf4, 0xec, 0xe1, 0xd4, 0xc5, + 0xb4, 0xa1, 0x8d, 0x78, 0x61, 0x49, 0x31, 0x18, + 0xff + }; + + byte quadrant = rotation >> 4; + rotation &= 0xf; + byte xStep = stepping[rotation]; + byte yStep = stepping[(rotation ^ 0xf) + 1] + 1; + + Common::Point p(pos); + + for (uint i = 0; i < lineArt.size(); ++i) { + byte b = lineArt[i]; + + do { + byte xFrac = 0x80; + byte yFrac = 0x80; + for (uint j = 0; j < scaling; ++j) { + if (xFrac + xStep + 1 > 255) + drawNextPixel(p, color, b, quadrant); + xFrac += xStep + 1; + if (yFrac + yStep > 255) + drawNextPixel(p, color, b, quadrant + 1); + yFrac += yStep; + } + b >>= 3; + } while (b != 0); + } +} + +const Room &AdlEngine::getRoom(uint i) const { + if (i < 1 || i > _state.rooms.size()) + error("Room %i out of range [1, %i]", i, _state.rooms.size()); + + return _state.rooms[i - 1]; +} + +Room &AdlEngine::getRoom(uint i) { + if (i < 1 || i > _state.rooms.size()) + error("Room %i out of range [1, %i]", i, _state.rooms.size()); + + return _state.rooms[i - 1]; +} + +const Room &AdlEngine::getCurRoom() const { + return getRoom(_state.room); +} + +Room &AdlEngine::getCurRoom() { + return getRoom(_state.room); +} + +const Item &AdlEngine::getItem(uint i) const { + if (i < 1 || i > _state.items.size()) + error("Item %i out of range [1, %i]", i, _state.items.size()); + + return _state.items[i - 1]; +} + +Item &AdlEngine::getItem(uint i) { + if (i < 1 || i > _state.items.size()) + error("Item %i out of range [1, %i]", i, _state.items.size()); + + return _state.items[i - 1]; +} + +byte AdlEngine::getVar(uint i) const { + if (i >= _state.vars.size()) + error("Variable %i out of range [0, %i]", i, _state.vars.size() - 1); + + return _state.vars[i]; +} + +void AdlEngine::setVar(uint i, byte value) { + if (i >= _state.vars.size()) + error("Variable %i out of range [0, %i]", i, _state.vars.size() - 1); + + _state.vars[i] = value; +} + +void AdlEngine::takeItem(byte noun) { + Common::Array<Item>::iterator item; + + for (item = _state.items.begin(); item != _state.items.end(); ++item) { + if (item->noun != noun || item->room != _state.room) + continue; + + if (item->state == IDI_ITEM_DOESNT_MOVE) { + printMessage(_messageIds.itemDoesntMove); + return; + } + + if (item->state == IDI_ITEM_MOVED) { + item->room = IDI_NONE; + return; + } + + Common::Array<byte>::const_iterator pic; + for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) { + if (*pic == getCurRoom().curPicture) { + item->room = IDI_NONE; + item->state = IDI_ITEM_MOVED; + return; + } + } + } + + printMessage(_messageIds.itemNotHere); +} + +void AdlEngine::dropItem(byte noun) { + Common::Array<Item>::iterator item; + + for (item = _state.items.begin(); item != _state.items.end(); ++item) { + if (item->noun != noun || item->room != IDI_NONE) + continue; + + item->room = _state.room; + item->state = IDI_ITEM_MOVED; + return; + } + + printMessage(_messageIds.dontUnderstand); +} + +#define ARG(N) (command.script[offset + (N)]) + +bool AdlEngine::matchCommand(const Command &command, byte verb, byte noun, uint *actions) const { + if (command.room != IDI_NONE && command.room != _state.room) + return false; + + if (command.verb != IDI_NONE && command.verb != verb) + return false; + + if (command.noun != IDI_NONE && command.noun != noun) + return false; + + uint offset = 0; + for (uint i = 0; i < command.numCond; ++i) { + switch (ARG(0)) { + case IDO_CND_ITEM_IN_ROOM: + if (getItem(ARG(1)).room != ARG(2)) + return false; + offset += 3; + break; + case IDO_CND_MOVES_GE: + if (ARG(1) > _state.moves) + return false; + offset += 2; + break; + case IDO_CND_VAR_EQ: + if (getVar(ARG(1)) != ARG(2)) + return false; + offset += 3; + break; + case IDO_CND_CUR_PIC_EQ: + if (getCurRoom().curPicture != ARG(1)) + return false; + offset += 2; + break; + case IDO_CND_ITEM_PIC_EQ: + if (getItem(ARG(1)).picture != ARG(2)) + return false; + offset += 3; + break; + default: + error("Invalid condition opcode %02x", command.script[offset]); + } + } + + if (actions) + *actions = offset; + + return true; +} + +void AdlEngine::doActions(const Command &command, byte noun, byte offset) { + for (uint i = 0; i < command.numAct; ++i) { + switch (ARG(0)) { + case IDO_ACT_VAR_ADD: + setVar(ARG(2), getVar(ARG(2) + ARG(1))); + offset += 3; + break; + case IDO_ACT_VAR_SUB: + setVar(ARG(2), getVar(ARG(2)) - ARG(1)); + offset += 3; + break; + case IDO_ACT_VAR_SET: + setVar(ARG(1), ARG(2)); + offset += 3; + break; + case IDO_ACT_LIST_ITEMS: { + Common::Array<Item>::const_iterator item; + + for (item = _state.items.begin(); item != _state.items.end(); ++item) + if (item->room == IDI_NONE) + printMessage(item->description); + + ++offset; + break; + } + case IDO_ACT_MOVE_ITEM: + getItem(ARG(1)).room = ARG(2); + offset += 3; + break; + case IDO_ACT_SET_ROOM: + getCurRoom().curPicture = getCurRoom().picture; + _state.room = ARG(1); + offset += 2; + break; + case IDO_ACT_SET_CUR_PIC: + getCurRoom().curPicture = ARG(1); + offset += 2; + break; + case IDO_ACT_SET_PIC: + getCurRoom().picture = getCurRoom().curPicture = ARG(1); + offset += 2; + break; + case IDO_ACT_PRINT_MSG: + printMessage(ARG(1)); + offset += 2; + break; + case IDO_ACT_SET_LIGHT: + _state.isDark = false; + ++offset; + break; + case IDO_ACT_SET_DARK: + _state.isDark = true; + ++offset; + break; + case IDO_ACT_SAVE: + saveGameState(0, ""); + ++offset; + break; + case IDO_ACT_LOAD: + loadGameState(0); + ++offset; + // Original engine does not jump out of the loop, + // so we don't either. + // We reset the restore flag, as the restore game + // process is complete + _isRestoring = false; + break; + case IDO_ACT_RESTART: { + _display->printString(_strings.playAgain); + Common::String input = inputString(); + if (input.size() == 0 || input[0] != APPLECHAR('N')) { + _isRestarting = true; + _display->clear(0x00); + _display->updateHiResScreen(); + restartGame(); + return; + } + // Fall-through + } + case IDO_ACT_QUIT: + printMessage(_messageIds.thanksForPlaying); + quitGame(); + return; + case IDO_ACT_PLACE_ITEM: + getItem(ARG(1)).room = ARG(2); + getItem(ARG(1)).position.x = ARG(3); + getItem(ARG(1)).position.y = ARG(4); + offset += 5; + break; + case IDO_ACT_SET_ITEM_PIC: + getItem(ARG(2)).picture = ARG(1); + offset += 3; + break; + case IDO_ACT_RESET_PIC: + getCurRoom().curPicture = getCurRoom().picture; + ++offset; + break; + case IDO_ACT_GO_NORTH: + case IDO_ACT_GO_SOUTH: + case IDO_ACT_GO_EAST: + case IDO_ACT_GO_WEST: + case IDO_ACT_GO_UP: + case IDO_ACT_GO_DOWN: { + byte room = getCurRoom().connections[ARG(0) - IDO_ACT_GO_NORTH]; + + if (room == 0) { + printMessage(_messageIds.cantGoThere); + return; + } + + getCurRoom().curPicture = getCurRoom().picture; + _state.room = room; + return; + } + case IDO_ACT_TAKE_ITEM: + takeItem(noun); + ++offset; + break; + case IDO_ACT_DROP_ITEM: + dropItem(noun); + ++offset; + break; + case IDO_ACT_SET_ROOM_PIC: + getRoom(ARG(1)).picture = getRoom(ARG(1)).curPicture = ARG(2); + offset += 3; + break; + default: + error("Invalid action opcode %02x", ARG(0)); + } + } +} + +#undef ARG + +bool AdlEngine::doOneCommand(const Commands &commands, byte verb, byte noun) { + Commands::const_iterator cmd; + + for (cmd = commands.begin(); cmd != commands.end(); ++cmd) { + uint offset = 0; + if (matchCommand(*cmd, verb, noun, &offset)) { + doActions(*cmd, noun, offset); + return true; + } + } + + return false; +} + +void AdlEngine::doAllCommands(const Commands &commands, byte verb, byte noun) { + Commands::const_iterator cmd; + + for (cmd = commands.begin(); cmd != commands.end(); ++cmd) { + uint offset = 0; + if (matchCommand(*cmd, verb, noun, &offset)) + doActions(*cmd, noun, offset); + } +} + +} // End of namespace Adl diff --git a/engines/adl/adl.h b/engines/adl/adl.h new file mode 100644 index 0000000000..4ea7566669 --- /dev/null +++ b/engines/adl/adl.h @@ -0,0 +1,247 @@ +/* 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 ADL_ADL_H +#define ADL_ADL_H + +#include "common/array.h" +#include "common/rect.h" +#include "common/str.h" + +#include "engines/engine.h" + +namespace Common { +class ReadStream; +class SeekableReadStream; +} + +namespace Adl { + +class Display; +struct AdlGameDescription; + +// Conditional opcodes +#define IDO_CND_ITEM_IN_ROOM 0x03 +#define IDO_CND_MOVES_GE 0x05 +#define IDO_CND_VAR_EQ 0x06 +#define IDO_CND_CUR_PIC_EQ 0x09 +#define IDO_CND_ITEM_PIC_EQ 0x0a + +// Action opcodes +#define IDO_ACT_VAR_ADD 0x01 +#define IDO_ACT_VAR_SUB 0x02 +#define IDO_ACT_VAR_SET 0x03 +#define IDO_ACT_LIST_ITEMS 0x04 +#define IDO_ACT_MOVE_ITEM 0x05 +#define IDO_ACT_SET_ROOM 0x06 +#define IDO_ACT_SET_CUR_PIC 0x07 +#define IDO_ACT_SET_PIC 0x08 +#define IDO_ACT_PRINT_MSG 0x09 +#define IDO_ACT_SET_LIGHT 0x0a +#define IDO_ACT_SET_DARK 0x0b +#define IDO_ACT_QUIT 0x0d +#define IDO_ACT_SAVE 0x0f +#define IDO_ACT_LOAD 0x10 +#define IDO_ACT_RESTART 0x11 +#define IDO_ACT_PLACE_ITEM 0x12 +#define IDO_ACT_SET_ITEM_PIC 0x13 +#define IDO_ACT_RESET_PIC 0x14 +#define IDO_ACT_GO_NORTH 0x15 +#define IDO_ACT_GO_SOUTH 0x16 +#define IDO_ACT_GO_EAST 0x17 +#define IDO_ACT_GO_WEST 0x18 +#define IDO_ACT_GO_UP 0x19 +#define IDO_ACT_GO_DOWN 0x1a +#define IDO_ACT_TAKE_ITEM 0x1b +#define IDO_ACT_DROP_ITEM 0x1c +#define IDO_ACT_SET_ROOM_PIC 0x1d + +#define IDI_WORD_SIZE 8 + +struct Room { + byte description; + byte connections[6]; + byte picture; + byte curPicture; +}; + +struct Picture { + byte block; + uint16 offset; +}; + +struct Command { + byte room; + byte verb, noun; + byte numCond, numAct; + Common::Array<byte> script; +}; + +enum { + IDI_ITEM_NOT_MOVED, + IDI_ITEM_MOVED, + IDI_ITEM_DOESNT_MOVE +}; + +#define IDI_NONE 0xfe + +struct Item { + byte noun; + byte room; + byte picture; + bool isLineArt; + Common::Point position; + int state; + byte description; + Common::Array<byte> roomPictures; +}; + +struct State { + Common::Array<Room> rooms; + Common::Array<Item> items; + Common::Array<byte> vars; + + byte room; + uint16 moves; + bool isDark; + + State() : room(1), moves(0), isDark(false) { } +}; + +typedef Common::List<Command> Commands; +typedef Common::HashMap<Common::String, uint> WordMap; + +class AdlEngine : public Engine { +public: + virtual ~AdlEngine(); + +protected: + AdlEngine(OSystem *syst, const AdlGameDescription *gd); + + Common::String readString(Common::ReadStream &stream, byte until = 0) const; + Common::String readStringAt(Common::SeekableReadStream &stream, uint offset, byte until = 0) const; + + virtual void printMessage(uint idx, bool wait = true) const; + void delay(uint32 ms) const; + + Common::String inputString(byte prompt = 0) const; + byte inputKey() const; + + void loadWords(Common::ReadStream &stream, WordMap &map) const; + void readCommands(Common::ReadStream &stream, Commands &commands); + + Display *_display; + + // Message strings in data file + Common::Array<Common::String> _messages; + // Picture data + Common::Array<Picture> _pictures; + // Dropped item screen offsets + Common::Array<Common::Point> _itemOffsets; + // Drawings consisting of horizontal and vertical lines only, but + // supporting scaling and rotation + Common::Array<Common::Array<byte> > _lineArt; + // <room, verb, noun, script> lists + Commands _roomCommands; + Commands _globalCommands; + + WordMap _verbs; + WordMap _nouns; + + struct { + Common::String enterCommand; + Common::String dontHaveIt; + Common::String gettingDark; + Common::String verbError; + Common::String nounError; + Common::String playAgain; + } _strings; + + struct { + uint cantGoThere; + uint dontUnderstand; + uint itemDoesntMove; + uint itemNotHere; + uint thanksForPlaying; + } _messageIds; + + // Game state + State _state; + +private: + virtual void runIntro() const { } + virtual void loadData() = 0; + virtual void initState() = 0; + virtual void restartGame() = 0; + virtual void drawPic(byte pic, Common::Point pos = Common::Point()) const = 0; + + // Engine + Common::Error run(); + bool hasFeature(EngineFeature f) const; + Common::Error loadGameState(int slot); + bool canLoadGameStateCurrently(); + Common::Error saveGameState(int slot, const Common::String &desc); + bool canSaveGameStateCurrently(); + + // Text output + void wordWrap(Common::String &str) const; + + // Text input + byte convertKey(uint16 ascii) const; + Common::String getLine() const; + Common::String getWord(const Common::String &line, uint &index) const; + void getInput(uint &verb, uint &noun); + + // Graphics + void showRoom() const; + void clearScreen() const; + void drawItems() const; + void drawNextPixel(Common::Point &p, byte color, byte bits, byte quadrant) const; + void drawLineArt(const Common::Array<byte> &lineArt, const Common::Point &pos, byte rotation = 0, byte scaling = 1, byte color = 0x7f) const; + + // Game state functions + const Room &getRoom(uint i) const; + Room &getRoom(uint i); + const Room &getCurRoom() const; + Room &getCurRoom(); + const Item &getItem(uint i) const; + Item &getItem(uint i); + byte getVar(uint i) const; + void setVar(uint i, byte value); + void takeItem(byte noun); + void dropItem(byte noun); + bool matchCommand(const Command &command, byte verb, byte noun, uint *actions = nullptr) const; + void doActions(const Command &command, byte noun, byte offset); + bool doOneCommand(const Commands &commands, byte verb, byte noun); + void doAllCommands(const Commands &commands, byte verb, byte noun); + + const AdlGameDescription *_gameDescription; + bool _isRestarting, _isRestoring; + byte _saveVerb, _saveNoun, _restoreVerb, _restoreNoun; + bool _canSaveNow, _canRestoreNow; +}; + +AdlEngine *HiRes1Engine__create(OSystem *syst, const AdlGameDescription *gd); + +} // End of namespace Adl + +#endif diff --git a/engines/adl/configure.engine b/engines/adl/configure.engine new file mode 100644 index 0000000000..844e2b8e6a --- /dev/null +++ b/engines/adl/configure.engine @@ -0,0 +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 diff --git a/engines/adl/detection.cpp b/engines/adl/detection.cpp new file mode 100644 index 0000000000..1a8c5025e8 --- /dev/null +++ b/engines/adl/detection.cpp @@ -0,0 +1,247 @@ +/* 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/system.h" +#include "common/savefile.h" +#include "common/translation.h" + +#include "graphics/thumbnail.h" + +#include "engines/advancedDetector.h" + +#include "adl/detection.h" + +namespace Adl { + +#define GAMEOPTION_COLOR GUIO_GAMEOPTIONS1 +#define GAMEOPTION_SCANLINES GUIO_GAMEOPTIONS2 + +static const ADExtraGuiOptionsMap optionsList[] = { + { + GAMEOPTION_COLOR, + { + _s("Color mode"), + _s("Use color graphics"), + "color", + false + } + }, + + { + GAMEOPTION_SCANLINES, + { + _s("Scanlines"), + _s("Show scanlines"), + "scanlines", + false + } + }, + + AD_EXTRA_GUI_OPTIONS_TERMINATOR +}; + +static const PlainGameDescriptor adlGames[] = { + {"hires1", "Hi-Res Adventure #1: Mystery House"}, + {0, 0} +}; + +static const AdlGameDescription gameDescriptions[] = { + { // Hi-Res Adventure #1: Mystery House - Apple II - 1987 PD release + { + "hires1", 0, + { + {"ADVENTURE", 0, "22d9e63a11d69fa033ba1738715ad09a", 29952}, + {"AUTO LOAD OBJ", 0, "23bfccfe9fcff9b22cf6c41bde9078ac", 12291}, + {"MYSTERY.HELLO", 0, "2289b7fea300b506e902a4c597968369", 836}, + AD_LISTEND + }, + Common::EN_ANY, + Common::kPlatformApple2GS, // FIXME + ADGF_NO_FLAGS, + GUIO2(GAMEOPTION_COLOR, GAMEOPTION_SCANLINES) + }, + GAME_TYPE_HIRES1 + }, + { AD_TABLE_END_MARKER, GAME_TYPE_NONE } +}; + +class AdlMetaEngine : public AdvancedMetaEngine { +public: + AdlMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(AdlGameDescription), adlGames, optionsList) { } + + const char *getName() const { + return "ADL"; + } + + const char *getOriginalCopyright() const { + return "Copyright (C) Sierra On-Line"; + } + + bool hasFeature(MetaEngineFeature f) const; + SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const; + int getMaximumSaveSlot() const { return 'O' - 'A'; } + SaveStateList listSaves(const char *target) const; + void removeSaveState(const char *target, int slot) const; + + bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const; +}; + +bool AdlMetaEngine::hasFeature(MetaEngineFeature f) const { + switch(f) { + case kSupportsListSaves: + case kSupportsLoadingDuringStartup: + case kSupportsDeleteSave: + case kSavesSupportMetaInfo: + case kSavesSupportThumbnail: + case kSavesSupportCreationDate: + case kSavesSupportPlayTime: + return true; + default: + return false; + } +} + +SaveStateDescriptor AdlMetaEngine::querySaveMetaInfos(const char *target, int slot) const { + Common::String fileName = Common::String::format("%s.s%02d", target, slot); + Common::InSaveFile *inFile = g_system->getSavefileManager()->openForLoading(fileName); + + if (!inFile) + return SaveStateDescriptor(); + + if (inFile->readUint32BE() != MKTAG('A', 'D', 'L', ':')) { + delete inFile; + return SaveStateDescriptor(); + } + + byte saveVersion = inFile->readByte(); + if (saveVersion != SAVEGAME_VERSION) { + delete inFile; + return SaveStateDescriptor(); + } + + char name[SAVEGAME_NAME_LEN] = { }; + inFile->read(name, sizeof(name) - 1); + inFile->readByte(); + + if (inFile->eos() || inFile->err()) { + delete inFile; + return SaveStateDescriptor(); + } + + SaveStateDescriptor sd(slot, name); + + int year = inFile->readUint16BE(); + int month = inFile->readByte(); + int day = inFile->readByte(); + sd.setSaveDate(year + 1900, month + 1, day); + + int hour = inFile->readByte(); + int minutes = inFile->readByte(); + sd.setSaveTime(hour, minutes); + + uint32 playTime = inFile->readUint32BE(); + sd.setPlayTime(playTime); + + if (inFile->eos() || inFile->err()) { + delete inFile; + return SaveStateDescriptor(); + } + + Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*inFile); + sd.setThumbnail(thumbnail); + + delete inFile; + return sd; +} + +SaveStateList AdlMetaEngine::listSaves(const char *target) const { + Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); + Common::StringArray files = saveFileMan->listSavefiles(Common::String(target) + ".s##"); + + SaveStateList saveList; + + for (uint i = 0; i < files.size(); ++i) { + const Common::String &fileName = files[i]; + Common::InSaveFile *inFile = saveFileMan->openForLoading(fileName); + if (!inFile) { + warning("Cannot open save file '%s'", fileName.c_str()); + continue; + } + + if (inFile->readUint32BE() != MKTAG('A', 'D', 'L', ':')) { + warning("No header found in '%s'", fileName.c_str()); + delete inFile; + continue; + } + + byte saveVersion = inFile->readByte(); + if (saveVersion != SAVEGAME_VERSION) { + warning("Unsupported save game version %i found in '%s'", saveVersion, fileName.c_str()); + delete inFile; + continue; + } + + char name[SAVEGAME_NAME_LEN] = { }; + inFile->read(name, sizeof(name) - 1); + delete inFile; + + int slotNum = atoi(fileName.c_str() + fileName.size() - 2); + SaveStateDescriptor sd(slotNum, name); + saveList.push_back(sd); + } + + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); + return saveList; +} + +void AdlMetaEngine::removeSaveState(const char *target, int slot) const { + Common::String fileName = Common::String::format("%s.s%02d", target, slot); + g_system->getSavefileManager()->removeSavefile(fileName); +} + +Engine *HiRes1Engine_create(OSystem *syst, const AdlGameDescription *gd); + +bool AdlMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const { + if (!gd) + return false; + + const AdlGameDescription *adlGd = (const AdlGameDescription *)gd; + + switch (adlGd->gameType) { + case GAME_TYPE_HIRES1: + *engine = HiRes1Engine_create(syst, adlGd); + break; + default: + error("Unknown GameType"); + } + + return true; +} + +} // End of namespace Adl + +#if PLUGIN_ENABLED_DYNAMIC(ADL) + REGISTER_PLUGIN_DYNAMIC(ADL, PLUGIN_TYPE_ENGINE, Adl::AdlMetaEngine); +#else + REGISTER_PLUGIN_STATIC(ADL, PLUGIN_TYPE_ENGINE, Adl::AdlMetaEngine); +#endif diff --git a/backends/graphics/opengl/extensions.h b/engines/adl/detection.h index 87452429e2..c646aeb5b9 100644 --- a/backends/graphics/opengl/extensions.h +++ b/engines/adl/detection.h @@ -20,22 +20,26 @@ * */ -#ifndef BACKENDS_GRAPHICS_OPENGL_EXTENSIONS_H -#define BACKENDS_GRAPHICS_OPENGL_EXTENSIONS_H +#ifndef ADL_DETECTION_H +#define ADL_DETECTION_H -namespace OpenGL { +#include "engines/advancedDetector.h" -/** - * Checks for availability of extensions we want to use and initializes them - * when available. - */ -void initializeGLExtensions(); +namespace Adl { -/** - * Whether non power of two textures are supported - */ -extern bool g_extNPOTSupported; +#define SAVEGAME_VERSION 0 +#define SAVEGAME_NAME_LEN 32 + +enum GameType { + GAME_TYPE_NONE, + GAME_TYPE_HIRES1 +}; + +struct AdlGameDescription { + ADGameDescription desc; + GameType gameType; +}; -} // End of namespace OpenGL +} // End of namespace Adl #endif diff --git a/engines/adl/display.cpp b/engines/adl/display.cpp new file mode 100644 index 0000000000..6342504bc3 --- /dev/null +++ b/engines/adl/display.cpp @@ -0,0 +1,520 @@ +/* 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/stream.h" +#include "common/rect.h" +#include "common/system.h" +#include "common/str.h" +#include "common/config-manager.h" + +#include "graphics/surface.h" +#include "graphics/palette.h" +#include "graphics/thumbnail.h" + +#include "engines/util.h" + +#include "adl/display.h" + +namespace Adl { + +// This implements the Apple II "Hi-Res" display mode + +#define DISPLAY_PITCH (DISPLAY_WIDTH / 7) +#define DISPLAY_SIZE (DISPLAY_PITCH * DISPLAY_HEIGHT) + +#define TEXT_WIDTH 40 +#define TEXT_HEIGHT 24 +#define TEXT_BUF_SIZE (TEXT_WIDTH * TEXT_HEIGHT) + +#define COLOR_PALETTE_ENTRIES 8 +static const byte colorPalette[COLOR_PALETTE_ENTRIES * 3] = { + 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, + 0xc7, 0x34, 0xff, + 0x38, 0xcb, 0x00, + 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, + 0x0d, 0xa1, 0xff, + 0xf2, 0x5e, 0x00 +}; + +// Corresponding color in second palette +#define PAL2(X) ((X) | 0x04) + +// Alternate color for odd pixel rows (for scanlines) +#define ALTCOL(X) ((X) | 0x08) + +// Green monochrome palette +#define MONO_PALETTE_ENTRIES 2 +static const byte monoPalette[MONO_PALETTE_ENTRIES * 3] = { + 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x01 +}; + +// Uppercase-only Apple II font (manually created). +static const byte font[64][5] = { + { 0x7c, 0x82, 0xba, 0xb2, 0x9c }, { 0xf8, 0x24, 0x22, 0x24, 0xf8 }, // @A + { 0xfe, 0x92, 0x92, 0x92, 0x6c }, { 0x7c, 0x82, 0x82, 0x82, 0x44 }, // BC + { 0xfe, 0x82, 0x82, 0x82, 0x7c }, { 0xfe, 0x92, 0x92, 0x92, 0x82 }, // DE + { 0xfe, 0x12, 0x12, 0x12, 0x02 }, { 0x7c, 0x82, 0x82, 0xa2, 0xe2 }, // FG + { 0xfe, 0x10, 0x10, 0x10, 0xfe }, { 0x00, 0x82, 0xfe, 0x82, 0x00 }, // HI + { 0x40, 0x80, 0x80, 0x80, 0x7e }, { 0xfe, 0x10, 0x28, 0x44, 0x82 }, // JK + { 0xfe, 0x80, 0x80, 0x80, 0x80 }, { 0xfe, 0x04, 0x18, 0x04, 0xfe }, // LM + { 0xfe, 0x08, 0x10, 0x20, 0xfe }, { 0x7c, 0x82, 0x82, 0x82, 0x7c }, // NO + { 0xfe, 0x12, 0x12, 0x12, 0x0c }, { 0x7c, 0x82, 0xa2, 0x42, 0xbc }, // PQ + { 0xfe, 0x12, 0x32, 0x52, 0x8c }, { 0x4c, 0x92, 0x92, 0x92, 0x64 }, // RS + { 0x02, 0x02, 0xfe, 0x02, 0x02 }, { 0x7e, 0x80, 0x80, 0x80, 0x7e }, // TU + { 0x3e, 0x40, 0x80, 0x40, 0x3e }, { 0xfe, 0x40, 0x30, 0x40, 0xfe }, // VW + { 0xc6, 0x28, 0x10, 0x28, 0xc6 }, { 0x06, 0x08, 0xf0, 0x08, 0x06 }, // XY + { 0xc2, 0xa2, 0x92, 0x8a, 0x86 }, { 0xfe, 0xfe, 0x82, 0x82, 0x82 }, // Z[ + { 0x04, 0x08, 0x10, 0x20, 0x40 }, { 0x82, 0x82, 0x82, 0xfe, 0xfe }, // \] + { 0x20, 0x10, 0x08, 0x10, 0x20 }, { 0x80, 0x80, 0x80, 0x80, 0x80 }, // ^_ + { 0x00, 0x00, 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0xbe, 0x00, 0x00 }, // ! + { 0x00, 0x0e, 0x00, 0x0e, 0x00 }, { 0x28, 0xfe, 0x28, 0xfe, 0x28 }, // "# + { 0x48, 0x54, 0xfe, 0x54, 0x24 }, { 0x46, 0x26, 0x10, 0xc8, 0xc4 }, // $% + { 0x6c, 0x92, 0xac, 0x40, 0xa0 }, { 0x00, 0x00, 0x0e, 0x00, 0x00 }, // &' + { 0x38, 0x44, 0x82, 0x00, 0x00 }, { 0x00, 0x00, 0x82, 0x44, 0x38 }, // () + { 0x44, 0x28, 0xfe, 0x28, 0x44 }, { 0x10, 0x10, 0x7c, 0x10, 0x10 }, // *+ + { 0x00, 0x80, 0x60, 0x00, 0x00 }, { 0x10, 0x10, 0x10, 0x10, 0x10 }, // ,- + { 0x00, 0x00, 0x80, 0x00, 0x00 }, { 0x40, 0x20, 0x10, 0x08, 0x04 }, // ./ + { 0x7c, 0xa2, 0x92, 0x8a, 0x7c }, { 0x00, 0x84, 0xfe, 0x80, 0x00 }, // 01 + { 0xc4, 0xa2, 0x92, 0x92, 0x8c }, { 0x42, 0x82, 0x92, 0x9a, 0x66 }, // 23 + { 0x30, 0x28, 0x24, 0xfe, 0x20 }, { 0x4e, 0x8a, 0x8a, 0x8a, 0x72 }, // 45 + { 0x78, 0x94, 0x92, 0x92, 0x62 }, { 0x02, 0xe2, 0x12, 0x0a, 0x06 }, // 67 + { 0x6c, 0x92, 0x92, 0x92, 0x6c }, { 0x8c, 0x92, 0x92, 0x52, 0x3c }, // 89 + { 0x00, 0x00, 0x28, 0x00, 0x00 }, { 0x00, 0x80, 0x68, 0x00, 0x00 }, // :; + { 0x10, 0x28, 0x44, 0x82, 0x00 }, { 0x28, 0x28, 0x28, 0x28, 0x28 }, // <= + { 0x00, 0x82, 0x44, 0x28, 0x10 }, { 0x04, 0x02, 0xb2, 0x0a, 0x04 } // >? +}; + +Display::Display() : + _mode(DISPLAY_MODE_TEXT), + _cursorPos(0), + _showCursor(false) { + + initGraphics(DISPLAY_WIDTH * 2, DISPLAY_HEIGHT * 2, true); + + _monochrome = !ConfMan.getBool("color"); + _scanlines = ConfMan.getBool("scanlines"); + + if (_monochrome) + g_system->getPaletteManager()->setPalette(monoPalette, 0, MONO_PALETTE_ENTRIES); + else + g_system->getPaletteManager()->setPalette(colorPalette, 0, COLOR_PALETTE_ENTRIES); + + showScanlines(_scanlines); + + _frameBuf = new byte[DISPLAY_SIZE]; + memset(_frameBuf, 0, DISPLAY_SIZE); + _frameBufSurface = new Graphics::Surface; + // We need 2x scaling to properly render the half-pixel shift + // of the second palette + _frameBufSurface->create(DISPLAY_WIDTH * 2, DISPLAY_HEIGHT * 2, Graphics::PixelFormat::createFormatCLUT8()); + + _textBuf = new byte[TEXT_BUF_SIZE]; + memset(_textBuf, APPLECHAR(' '), TEXT_BUF_SIZE); + _textBufSurface = new Graphics::Surface; + // For ease of copying, also use 2x scaling here + _textBufSurface->create(DISPLAY_WIDTH * 2, DISPLAY_HEIGHT * 2, Graphics::PixelFormat::createFormatCLUT8()); + + createFont(); +} + +Display::~Display() { + delete[] _frameBuf; + _frameBufSurface->free(); + delete _frameBufSurface; + + delete[] _textBuf; + _textBufSurface->free(); + delete _textBufSurface; + + _font->free(); + delete _font; +} + +void Display::setMode(DisplayMode mode) { + _mode = mode; + + if (_mode == DISPLAY_MODE_TEXT || _mode == DISPLAY_MODE_MIXED) + updateTextScreen(); + if (_mode == DISPLAY_MODE_HIRES || _mode == DISPLAY_MODE_MIXED) + updateHiResScreen(); +} + +void Display::updateTextScreen() { + updateTextSurface(); + + if (_mode == DISPLAY_MODE_TEXT) + g_system->copyRectToScreen(_textBufSurface->getPixels(), _textBufSurface->pitch, 0, 0, _textBufSurface->w, _textBufSurface->h); + else if (_mode == DISPLAY_MODE_MIXED) + g_system->copyRectToScreen(_textBufSurface->getBasePtr(0, _textBufSurface->h - 4 * 8 * 2), _textBufSurface->pitch, 0, _textBufSurface->h - 4 * 8 * 2, _textBufSurface->w, 4 * 8 * 2); + + g_system->updateScreen(); +} + +void Display::updateHiResScreen() { + updateHiResSurface(); + + if (_mode == DISPLAY_MODE_HIRES) + g_system->copyRectToScreen(_frameBufSurface->getPixels(), _frameBufSurface->pitch, 0, 0, _frameBufSurface->w, _frameBufSurface->h); + else if (_mode == DISPLAY_MODE_MIXED) + g_system->copyRectToScreen(_frameBufSurface->getPixels(), _frameBufSurface->pitch, 0, 0, _frameBufSurface->w, _frameBufSurface->h - 4 * 8 * 2); + + g_system->updateScreen(); +} + +bool Display::saveThumbnail(Common::WriteStream &out) { + if (_scanlines) { + showScanlines(false); + g_system->updateScreen(); + } + + bool retval = Graphics::saveThumbnail(out); + + if (_scanlines) { + showScanlines(true); + g_system->updateScreen(); + } + + return retval; +} + +void Display::loadFrameBuffer(Common::ReadStream &stream) { + byte *dst = _frameBuf; + for (uint j = 0; j < 8; ++j) { + for (uint i = 0; i < 8; ++i) { + stream.read(dst, DISPLAY_PITCH); + dst += DISPLAY_PITCH * 64; + stream.read(dst, DISPLAY_PITCH); + dst += DISPLAY_PITCH * 64; + stream.read(dst, DISPLAY_PITCH); + stream.readUint32LE(); + stream.readUint32LE(); + dst -= DISPLAY_PITCH * 120; + } + dst -= DISPLAY_PITCH * 63; + } + + if (stream.eos() || stream.err()) + error("Failed to read frame buffer"); +} + +void Display::putPixel(const Common::Point &p, byte color) { + byte offset = p.x / 7; + + if (offset & 1) { + byte c = color << 1; + if (c >= 0x40 && c < 0xc0) + color ^= 0x7f; + } + + byte *b = _frameBuf + p.y * DISPLAY_PITCH + offset; + color ^= *b; + color &= 1 << (p.x % 7); + *b ^= color; +} + +void Display::clear(byte color) { + byte val = 0; + + byte c = color << 1; + if (c >= 0x40 && c < 0xc0) + val = 0x7f; + + for (uint i = 0; i < DISPLAY_SIZE; ++i) { + _frameBuf[i] = color; + color ^= val; + } +} + +void Display::home() { + memset(_textBuf, APPLECHAR(' '), TEXT_BUF_SIZE); + _cursorPos = 0; +} + +void Display::moveCursorForward() { + ++_cursorPos; + + if (_cursorPos >= TEXT_BUF_SIZE) + scrollUp(); +} + +void Display::moveCursorBackward() { + if (_cursorPos > 0) + --_cursorPos; +} + +void Display::moveCursorTo(const Common::Point &pos) { + _cursorPos = pos.y * TEXT_WIDTH + pos.x; + + if (_cursorPos >= TEXT_BUF_SIZE) + error("Cursor position (%i, %i) out of bounds", pos.x, pos.y); +} + +void Display::printString(const Common::String &str) { + Common::String::const_iterator c; + for (c = str.begin(); c != str.end(); ++c) { + byte b = *c; + + if (*c == APPLECHAR('\r')) + _cursorPos = (_cursorPos / TEXT_WIDTH + 1) * TEXT_WIDTH; + else if (b < 0x80 || b >= 0xa0) { + setCharAtCursor(b); + ++_cursorPos; + } + + if (_cursorPos == TEXT_BUF_SIZE) + scrollUp(); + } + + updateTextScreen(); +} + +void Display::printAsciiString(const Common::String &str) { + Common::String aStr; + + Common::String::const_iterator it; + for (it = str.begin(); it != str.end(); ++it) + aStr += APPLECHAR(*it); + + printString(aStr); +} + +void Display::setCharAtCursor(byte c) { + _textBuf[_cursorPos] = c; +} + +void Display::showCursor(bool enable) { + _showCursor = enable; +} + +void Display::showScanlines(bool enable) { + byte pal[COLOR_PALETTE_ENTRIES * 3] = { }; + + if (enable) + g_system->getPaletteManager()->setPalette(pal, COLOR_PALETTE_ENTRIES, COLOR_PALETTE_ENTRIES); + else { + g_system->getPaletteManager()->grabPalette(pal, 0, COLOR_PALETTE_ENTRIES); + g_system->getPaletteManager()->setPalette(pal, COLOR_PALETTE_ENTRIES, COLOR_PALETTE_ENTRIES); + } +} + +static byte processColorBits(uint16 &bits, bool &odd, bool secondPal) { + byte color = 0; + + switch (bits & 0x7) { + case 0x3: // 011 (white) + case 0x6: // 110 + case 0x7: // 111 + color = 1; + break; + case 0x2: // 010 (color) + color = 2 + odd; + break; + case 0x5: // 101 (color) + color = 2 + !odd; + } + + if (secondPal) + color = PAL2(color); + + odd = !odd; + bits >>= 1; + + return color; +} + +static void renderPixelRowColor(byte *dst, byte *src) { + uint16 bits = (src[0] & 0x7f) << 1; + byte pal = src[0] >> 7; + + if (pal != 0) + *dst++ = 0; + + bool odd = false; + + for (uint i = 0; i < DISPLAY_PITCH; ++i) { + if (i != DISPLAY_PITCH - 1) { + bits |= (src[i + 1] & 0x7f) << 8; + pal |= (src[i + 1] >> 7) << 1; + } + + // For the first 6 bits in the block we draw two pixels + for (uint j = 0; j < 6; ++j) { + byte color = processColorBits(bits, odd, pal & 1); + *dst++ = color; + *dst++ = color; + } + + // Last bit of the block, draw one, two or three pixels + byte color = processColorBits(bits, odd, pal & 1); + + // Draw the first pixel + *dst++ = color; + + switch (pal) { + case 0x0: + case 0x3: + // If palette stays the same, draw a second pixel + *dst++ = color; + break; + case 0x2: + // If we're moving from first to second palette, + // draw a second pixel, and a third in the second + // palette. + *dst++ = color; + *dst++ = PAL2(color); + } + + pal >>= 1; + } +} + +static void renderPixelRowMono(byte *dst, byte *src) { + byte pal = src[0] >> 7; + + if (pal != 0) + *dst++ = 0; + + for (uint i = 0; i < DISPLAY_PITCH; ++i) { + if (i != DISPLAY_PITCH - 1) + pal |= (src[i + 1] >> 7) << 1; + + for (uint j = 0; j < 6; ++j) { + bool color = src[i] & (1 << j); + *dst++ = color; + *dst++ = color; + } + + bool color = src[i] & (1 << 6); + + *dst++ = color; + + switch (pal) { + case 0x0: + case 0x3: + *dst++ = color; + break; + case 0x2: + *dst++ = color; + *dst++ = color; + } + + pal >>= 1; + } +} + +static void copyEvenSurfaceRows(Graphics::Surface &surf) { + byte *src = (byte *)surf.getPixels(); + + for (uint y = 0; y < surf.h / 2; ++y) { + byte *dst = src + surf.pitch; + for (uint x = 0; x < surf.w; ++x) + dst[x] = ALTCOL(src[x]); + src += surf.pitch * 2; + } +} + +void Display::updateHiResSurface() { + byte *src = _frameBuf; + byte *dst = (byte *)_frameBufSurface->getPixels(); + + for (uint i = 0; i < DISPLAY_HEIGHT; ++i) { + if (_monochrome) + renderPixelRowMono(dst, src); + else + renderPixelRowColor(dst, src); + src += DISPLAY_PITCH; + dst += _frameBufSurface->pitch * 2; + } + + copyEvenSurfaceRows(*_frameBufSurface); +} + +void Display::updateTextSurface() { + for (uint row = 0; row < 24; ++row) + for (uint col = 0; col < TEXT_WIDTH; ++col) { + uint charPos = row * TEXT_WIDTH + col; + char c = _textBuf[row * TEXT_WIDTH + col]; + + if (charPos == _cursorPos && _showCursor) + c = (c & 0x3f) | 0x40; + + Common::Rect r(7 * 2, 8 * 2); + r.translate(((c & 0x3f) % 16) * 7 * 2, (c & 0x3f) / 16 * 8 * 2); + + if (!(c & 0x80)) { + if (!(c & 0x40) || ((g_system->getMillis() / 270) & 1)) + r.translate(0, 4 * 8 * 2); + } + + _textBufSurface->copyRectToSurface(*_font, col * 7 * 2, row * 8 * 2, r); + } +} + +void Display::drawChar(byte c, int x, int y) { + byte *buf = (byte *)_font->getPixels() + y * _font->pitch + x; + + for (uint row = 0; row < 8; ++row) { + for (uint col = 1; col < 6; ++col) { + if (font[c][col - 1] & (1 << row)) { + buf[col * 2] = 1; + buf[col * 2 + 1] = 1; + } + } + + buf += 2 * _font->pitch; + } +} + +void Display::createFont() { + _font = new Graphics::Surface; + _font->create(16 * 7 * 2, 4 * 8 * 2 * 2, Graphics::PixelFormat::createFormatCLUT8()); + + for (uint i = 0; i < 4; ++i) + for (uint j = 0; j < 16; ++j) + drawChar(i * 16 + j, j * 7 * 2, i * 8 * 2); + + // Create inverted font + byte *buf = (byte *)_font->getPixels(); + byte *bufInv = buf + (_font->h / 2) * _font->pitch; + + for (uint row = 0; row < _font->h / 2; row += 2) { + for (uint col = 0; col < _font->w; ++col) + bufInv[col] = (buf[col] ? 0 : 1); + + buf += _font->pitch * 2; + bufInv += _font->pitch * 2; + } + + copyEvenSurfaceRows(*_font); +} + +void Display::scrollUp() { + memmove(_textBuf, _textBuf + TEXT_WIDTH, TEXT_BUF_SIZE - TEXT_WIDTH); + memset(_textBuf + TEXT_BUF_SIZE - TEXT_WIDTH, APPLECHAR(' '), TEXT_WIDTH); + if (_cursorPos >= TEXT_WIDTH) + _cursorPos -= TEXT_WIDTH; +} + +} // End of namespace Adl diff --git a/engines/adl/display.h b/engines/adl/display.h new file mode 100644 index 0000000000..ff01e3faf2 --- /dev/null +++ b/engines/adl/display.h @@ -0,0 +1,102 @@ +/* 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 ADL_DISPLAY_H +#define ADL_DISPLAY_H + +#include <common/types.h> + +namespace Common { +class ReadStream; +class WriteStream; +class String; +struct Point; +} + +namespace Graphics { +struct Surface; +} + +namespace Adl { + +#define DISPLAY_WIDTH 280 +#define DISPLAY_HEIGHT 192 + +enum DisplayMode { + DISPLAY_MODE_HIRES, + DISPLAY_MODE_TEXT, + DISPLAY_MODE_MIXED +}; + +#define APPLECHAR(C) ((char)((C) | 0x80)) + +class Display { +public: + Display(); + ~Display(); + + void setMode(DisplayMode mode); + void updateTextScreen(); + void updateHiResScreen(); + bool saveThumbnail(Common::WriteStream &out); + + // Graphics + void loadFrameBuffer(Common::ReadStream &stream); + void putPixel(const Common::Point &p, byte color); + void clear(byte color); + + // Text + void home(); + void moveCursorTo(const Common::Point &pos); + void moveCursorForward(); + void moveCursorBackward(); + void printString(const Common::String &str); + void printAsciiString(const Common::String &str); + void setCharAtCursor(byte c); + void showCursor(bool enable); + +private: + void updateHiResSurface(); + void showScanlines(bool enable); + + void updateTextSurface(); + void drawChar(byte c, int x, int y); + void createFont(); + void scrollUp(); + + DisplayMode _mode; + + byte *_frameBuf; + Graphics::Surface *_frameBufSurface; + bool _scanlines; + bool _monochrome; + + byte *_textBuf; + Graphics::Surface *_textBufSurface; + Graphics::Surface *_font; + uint _cursorPos; + bool _showCursor; +}; + +} // End of namespace Adl + +#endif diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp new file mode 100644 index 0000000000..6e1e31df9f --- /dev/null +++ b/engines/adl/hires1.cpp @@ -0,0 +1,396 @@ +/* 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/system.h" +#include "common/debug.h" +#include "common/error.h" +#include "common/file.h" +#include "common/stream.h" + +#include "adl/hires1.h" +#include "adl/display.h" + +namespace Adl { + +void HiRes1Engine::runIntro() const { + Common::File file; + + if (!file.open(IDS_HR1_EXE_0)) + error("Failed to open file '" IDS_HR1_EXE_0 "'"); + + file.seek(IDI_HR1_OFS_LOGO_0); + _display->setMode(DISPLAY_MODE_HIRES); + _display->loadFrameBuffer(file); + _display->updateHiResScreen(); + delay(4000); + + if (shouldQuit()) + return; + + _display->setMode(DISPLAY_MODE_TEXT); + + Common::File basic; + if (!basic.open(IDS_HR1_LOADER)) + error("Failed to open file '" IDS_HR1_LOADER "'"); + + Common::String str; + + str = readStringAt(basic, IDI_HR1_OFS_PD_TEXT_0, '"'); + _display->printAsciiString(str + '\r'); + + str = readStringAt(basic, IDI_HR1_OFS_PD_TEXT_1, '"'); + _display->printAsciiString(str + "\r\r"); + + str = readStringAt(basic, IDI_HR1_OFS_PD_TEXT_2, '"'); + _display->printAsciiString(str + "\r\r"); + + str = readStringAt(basic, IDI_HR1_OFS_PD_TEXT_3, '"'); + _display->printAsciiString(str + '\r'); + + inputKey(); + if (g_engine->shouldQuit()) + return; + + _display->setMode(DISPLAY_MODE_MIXED); + + str = readStringAt(file, IDI_HR1_OFS_GAME_OR_HELP); + + bool instructions = false; + + while (1) { + _display->printString(str); + Common::String s = inputString(); + + if (g_engine->shouldQuit()) + break; + + if (s.empty()) + continue; + + if (s[0] == APPLECHAR('I')) { + instructions = true; + break; + } else if (s[0] == APPLECHAR('G')) { + break; + } + }; + + if (instructions) { + _display->setMode(DISPLAY_MODE_TEXT); + file.seek(IDI_HR1_OFS_INTRO_TEXT); + + const uint pages[] = { 6, 6, 4, 5, 8, 7, 0 }; + + uint page = 0; + while (pages[page] != 0) { + _display->home(); + + uint count = pages[page++]; + for (uint i = 0; i < count; ++i) { + str = readString(file); + _display->printString(str); + file.seek(3, SEEK_CUR); + } + + inputString(); + + if (g_engine->shouldQuit()) + return; + + file.seek(6, SEEK_CUR); + } + } + + _display->printAsciiString("\r"); + + file.close(); + + _display->setMode(DISPLAY_MODE_MIXED); + + if (!file.open(IDS_HR1_EXE_1)) + error("Failed to open file '" IDS_HR1_EXE_1 "'"); + + // Title screen shown during loading + file.seek(IDI_HR1_OFS_LOGO_1); + _display->loadFrameBuffer(file); + _display->updateHiResScreen(); + delay(2000); +} + +void HiRes1Engine::loadData() { + Common::File f; + + if (!f.open(IDS_HR1_MESSAGES)) + error("Failed to open file '" IDS_HR1_MESSAGES "'"); + + for (uint i = 0; i < IDI_HR1_NUM_MESSAGES; ++i) + _messages.push_back(readString(f, APPLECHAR('\r')) + APPLECHAR('\r')); + + f.close(); + + if (!f.open(IDS_HR1_EXE_1)) + error("Failed to open file '" IDS_HR1_EXE_1 "'"); + + // Some messages have overrides inside the executable + _messages[IDI_HR1_MSG_CANT_GO_THERE - 1] = readStringAt(f, IDI_HR1_OFS_STR_CANT_GO_THERE); + _messages[IDI_HR1_MSG_DONT_HAVE_IT - 1] = readStringAt(f, IDI_HR1_OFS_STR_DONT_HAVE_IT); + _messages[IDI_HR1_MSG_DONT_UNDERSTAND - 1] = readStringAt(f, IDI_HR1_OFS_STR_DONT_UNDERSTAND); + _messages[IDI_HR1_MSG_GETTING_DARK - 1] = readStringAt(f, IDI_HR1_OFS_STR_GETTING_DARK); + + // Load other strings from executable + _strings.enterCommand = readStringAt(f, IDI_HR1_OFS_STR_ENTER_COMMAND); + _strings.dontHaveIt = readStringAt(f, IDI_HR1_OFS_STR_DONT_HAVE_IT); + _strings.gettingDark = readStringAt(f, IDI_HR1_OFS_STR_GETTING_DARK); + _strings.verbError = readStringAt(f, IDI_HR1_OFS_STR_VERB_ERROR); + _strings.nounError = readStringAt(f, IDI_HR1_OFS_STR_NOUN_ERROR); + _strings.playAgain = readStringAt(f, IDI_HR1_OFS_STR_PLAY_AGAIN); + _gameStrings.pressReturn = readStringAt(f, IDI_HR1_OFS_STR_PRESS_RETURN); + + // Set message IDs + _messageIds.cantGoThere = IDI_HR1_MSG_CANT_GO_THERE; + _messageIds.dontUnderstand = IDI_HR1_MSG_DONT_UNDERSTAND; + _messageIds.itemDoesntMove = IDI_HR1_MSG_ITEM_DOESNT_MOVE; + _messageIds.itemNotHere = IDI_HR1_MSG_ITEM_NOT_HERE; + _messageIds.thanksForPlaying = IDI_HR1_MSG_THANKS_FOR_PLAYING; + + // Load picture data from executable + f.seek(IDI_HR1_OFS_PICS); + for (uint i = 0; i < IDI_HR1_NUM_PICS; ++i) { + struct Picture pic; + pic.block = f.readByte(); + pic.offset = f.readUint16LE(); + _pictures.push_back(pic); + } + + // Load commands from executable + f.seek(IDI_HR1_OFS_CMDS_1); + readCommands(f, _roomCommands); + + f.seek(IDI_HR1_OFS_CMDS_0); + readCommands(f, _globalCommands); + + // Load dropped item offsets + f.seek(IDI_HR1_OFS_ITEM_OFFSETS); + for (uint i = 0; i < IDI_HR1_NUM_ITEM_OFFSETS; ++i) { + Common::Point p; + p.x = f.readByte(); + p.y = f.readByte(); + _itemOffsets.push_back(p); + } + + // Load right-angle line art + f.seek(IDI_HR1_OFS_LINE_ART); + uint16 lineArtTotal = f.readUint16LE(); + for (uint i = 0; i < lineArtTotal; ++i) { + f.seek(IDI_HR1_OFS_LINE_ART + 2 + i * 2); + uint16 offset = f.readUint16LE(); + f.seek(IDI_HR1_OFS_LINE_ART + offset); + + Common::Array<byte> lineArt; + byte b = f.readByte(); + while (b != 0) { + lineArt.push_back(b); + b = f.readByte(); + } + _lineArt.push_back(lineArt); + } + + if (f.eos() || f.err()) + error("Failed to read game data from '" IDS_HR1_EXE_1 "'"); + + f.seek(IDI_HR1_OFS_VERBS); + loadWords(f, _verbs); + + f.seek(IDI_HR1_OFS_NOUNS); + loadWords(f, _nouns); +} + +void HiRes1Engine::initState() { + Common::File f; + + _state.room = 1; + _state.moves = 0; + _state.isDark = false; + + _state.vars.clear(); + _state.vars.resize(IDI_HR1_NUM_VARS); + + if (!f.open(IDS_HR1_EXE_1)) + error("Failed to open file '" IDS_HR1_EXE_1 "'"); + + // Load room data from executable + _state.rooms.clear(); + f.seek(IDI_HR1_OFS_ROOMS); + for (uint i = 0; i < IDI_HR1_NUM_ROOMS; ++i) { + Room room; + f.readByte(); + room.description = f.readByte(); + for (uint j = 0; j < 6; ++j) + room.connections[j] = f.readByte(); + room.picture = f.readByte(); + room.curPicture = f.readByte(); + _state.rooms.push_back(room); + } + + // Load item data from executable + _state.items.clear(); + f.seek(IDI_HR1_OFS_ITEMS); + while (f.readByte() != 0xff) { + Item item; + item.noun = f.readByte(); + item.room = f.readByte(); + item.picture = f.readByte(); + item.isLineArt = f.readByte(); + item.position.x = f.readByte(); + item.position.y = f.readByte(); + item.state = f.readByte(); + item.description = f.readByte(); + + f.readByte(); + + byte size = f.readByte(); + + for (uint i = 0; i < size; ++i) + item.roomPictures.push_back(f.readByte()); + + _state.items.push_back(item); + } +} + +void HiRes1Engine::restartGame() { + initState(); + _display->printString(_gameStrings.pressReturn); + inputString(); // Missing in the original + _display->printAsciiString("\r\r\r\r\r"); +} + +void HiRes1Engine::drawPic(byte pic, Common::Point pos) const { + Common::File f; + Common::String name = Common::String::format("BLOCK%i", _pictures[pic].block); + + if (!f.open(name)) + error("Failed to open file '%s'", name.c_str()); + + f.seek(_pictures[pic].offset); + drawPic(f, pos); +} + +void HiRes1Engine::printMessage(uint idx, bool wait) const { + // Messages with hardcoded overrides don't delay after printing. + // It's unclear if this is a bug or not. In some cases the result + // is that these strings will scroll past the four-line text window + // before the user gets a chance to read them. + // NOTE: later games seem to wait for a key when the text window + // overflows and don't use delays. It might be better to use + // that system for this game as well. + switch (idx) { + case IDI_HR1_MSG_CANT_GO_THERE: + case IDI_HR1_MSG_DONT_HAVE_IT: + case IDI_HR1_MSG_DONT_UNDERSTAND: + case IDI_HR1_MSG_GETTING_DARK: + wait = false; + } + + AdlEngine::printMessage(idx, wait); +} + +void HiRes1Engine::drawLine(const Common::Point &p1, const Common::Point &p2, byte color) const { + // This draws a four-connected line + + int16 deltaX = p2.x - p1.x; + int8 xStep = 1; + + if (deltaX < 0) { + deltaX = -deltaX; + xStep = -1; + } + + int16 deltaY = p2.y - p1.y; + int8 yStep = -1; + + if (deltaY > 0) { + deltaY = -deltaY; + yStep = 1; + } + + Common::Point p(p1); + int16 steps = deltaX - deltaY + 1; + int16 err = deltaX + deltaY; + + while (1) { + _display->putPixel(p, color); + + if (--steps == 0) + return; + + if (err < 0) { + p.y += yStep; + err += deltaX; + } else { + p.x += xStep; + err += deltaY; + } + } +} + +void HiRes1Engine::drawPic(Common::ReadStream &stream, const Common::Point &pos) const { + byte x, y; + bool bNewLine = false; + byte oldX = 0, oldY = 0; + while (1) { + x = stream.readByte(); + y = stream.readByte(); + + if (stream.err() || stream.eos()) + error("Failed to read picture"); + + if (x == 0xff && y == 0xff) + return; + + if (x == 0 && y == 0) { + bNewLine = true; + continue; + } + + x += pos.x; + y += pos.y; + + if (y > 160) + y = 160; + + if (bNewLine) { + _display->putPixel(Common::Point(x, y), 0x7f); + bNewLine = false; + } else { + drawLine(Common::Point(oldX, oldY), Common::Point(x, y), 0x7f); + } + + oldX = x; + oldY = y; + } +} + +Engine *HiRes1Engine_create(OSystem *syst, const AdlGameDescription *gd) { + return new HiRes1Engine(syst, gd); +} + +} // End of namespace Adl diff --git a/engines/adl/hires1.h b/engines/adl/hires1.h new file mode 100644 index 0000000000..25f4744d26 --- /dev/null +++ b/engines/adl/hires1.h @@ -0,0 +1,113 @@ +/* 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 ADL_HIRES1_H +#define ADL_HIRES1_H + +#include "common/str.h" + +#include "adl/adl.h" + +namespace Common { +class ReadStream; +struct Point; +} + +namespace Adl { + +#define IDS_HR1_EXE_0 "AUTO LOAD OBJ" +#define IDS_HR1_EXE_1 "ADVENTURE" +#define IDS_HR1_LOADER "MYSTERY.HELLO" +#define IDS_HR1_MESSAGES "MESSAGES" + +#define IDI_HR1_NUM_ROOMS 41 +#define IDI_HR1_NUM_PICS 98 +#define IDI_HR1_NUM_VARS 20 +#define IDI_HR1_NUM_ITEM_OFFSETS 21 +#define IDI_HR1_NUM_MESSAGES 167 + +// Messages used outside of scripts +#define IDI_HR1_MSG_CANT_GO_THERE 137 +#define IDI_HR1_MSG_DONT_UNDERSTAND 37 +#define IDI_HR1_MSG_ITEM_DOESNT_MOVE 151 +#define IDI_HR1_MSG_ITEM_NOT_HERE 152 +#define IDI_HR1_MSG_THANKS_FOR_PLAYING 140 +#define IDI_HR1_MSG_DONT_HAVE_IT 127 +#define IDI_HR1_MSG_GETTING_DARK 7 + +#define IDI_HR1_OFS_STR_ENTER_COMMAND 0x5bbc +#define IDI_HR1_OFS_STR_VERB_ERROR 0x5b4f +#define IDI_HR1_OFS_STR_NOUN_ERROR 0x5b8e +#define IDI_HR1_OFS_STR_PLAY_AGAIN 0x5f1e +#define IDI_HR1_OFS_STR_CANT_GO_THERE 0x6c0a +#define IDI_HR1_OFS_STR_DONT_HAVE_IT 0x6c31 +#define IDI_HR1_OFS_STR_DONT_UNDERSTAND 0x6c51 +#define IDI_HR1_OFS_STR_GETTING_DARK 0x6c7c +#define IDI_HR1_OFS_STR_PRESS_RETURN 0x5f68 + +#define IDI_HR1_OFS_PD_TEXT_0 0x005d +#define IDI_HR1_OFS_PD_TEXT_1 0x012b +#define IDI_HR1_OFS_PD_TEXT_2 0x016d +#define IDI_HR1_OFS_PD_TEXT_3 0x0259 + +#define IDI_HR1_OFS_INTRO_TEXT 0x0066 +#define IDI_HR1_OFS_GAME_OR_HELP 0x000f + +#define IDI_HR1_OFS_LOGO_0 0x1003 +#define IDI_HR1_OFS_LOGO_1 0x1800 + +#define IDI_HR1_OFS_ITEMS 0x0100 +#define IDI_HR1_OFS_ROOMS 0x050a +#define IDI_HR1_OFS_PICS 0x4b00 +#define IDI_HR1_OFS_CMDS_0 0x3c00 +#define IDI_HR1_OFS_CMDS_1 0x3d00 + +#define IDI_HR1_OFS_ITEM_OFFSETS 0x68ff +#define IDI_HR1_OFS_LINE_ART 0x4f00 + +#define IDI_HR1_OFS_VERBS 0x3800 +#define IDI_HR1_OFS_NOUNS 0x0f00 + +class HiRes1Engine : public AdlEngine { +public: + HiRes1Engine(OSystem *syst, const AdlGameDescription *gd) : AdlEngine(syst, gd) { } + +private: + // AdlEngine + void runIntro() const; + void loadData(); + void initState(); + void restartGame(); + void drawPic(byte pic, Common::Point pos) const; + void printMessage(uint idx, bool wait = true) const; + + void drawLine(const Common::Point &p1, const Common::Point &p2, byte color) const; + void drawPic(Common::ReadStream &stream, const Common::Point &pos) const; + + struct { + Common::String pressReturn; + } _gameStrings; +}; + +} // End of namespace Adl + +#endif diff --git a/engines/adl/module.mk b/engines/adl/module.mk new file mode 100644 index 0000000000..6acd06f6de --- /dev/null +++ b/engines/adl/module.mk @@ -0,0 +1,18 @@ +MODULE := engines/adl + +MODULE_OBJS := \ + adl.o \ + detection.o \ + display.o \ + hires1.o + +MODULE_DIRS += \ + engines/adl + +# This module can be built as a plugin +ifeq ($(ENABLE_ADL), DYNAMIC_PLUGIN) +PLUGIN := 1 +endif + +# Include common rules +include $(srcdir)/rules.mk diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 6e63cd3e71..60c8d1f3ef 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -37,7 +37,6 @@ #include "graphics/cursorman.h" #include "audio/mididrv.h" -#include "audio/mixer.h" #include "agi/agi.h" #include "agi/font.h" @@ -404,6 +403,11 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas _lastSaveTime = 0; + _playTimeInSecondsAdjust = 0; + _lastUsedPlayTimeInCycles = 0; + _lastUsedPlayTimeInSeconds = 0; + _passedPlayTimeCycles = 0; + memset(_keyQueue, 0, sizeof(_keyQueue)); _console = nullptr; @@ -419,6 +423,9 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas _inventory = nullptr; _keyHoldMode = false; + + _artificialDelayCurrentRoom = 0; + _artificialDelayCurrentPicture = 0; } void AgiEngine::initialize() { diff --git a/engines/agi/agi.h b/engines/agi/agi.h index b288557f57..1baf0d912f 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -43,8 +43,6 @@ #include "agi/logic.h" #include "agi/sound.h" -#include "gui/predictivedialog.h" - namespace Common { class RandomSource; } diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp index 3bc45af5d4..7ed67949b5 100644 --- a/engines/agi/keyboard.cpp +++ b/engines/agi/keyboard.cpp @@ -21,6 +21,7 @@ */ #include "common/events.h" +#include "gui/predictivedialog.h" #include "agi/agi.h" #include "agi/graphics.h" diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index fed07ea986..8a62fce86c 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -662,7 +662,7 @@ void cmdWordToString(AgiGame *state, AgiEngine *vm, uint8 *parameter) { uint16 stringNr = parameter[0]; uint16 wordNr = parameter[1]; - strcpy(state->strings[stringNr], state->_vm->_words->getEgoWord(wordNr)); + Common::strlcpy(state->strings[stringNr], state->_vm->_words->getEgoWord(wordNr), MAX_STRINGLEN); } void cmdOpenDialogue(AgiGame *state, AgiEngine *vm, uint8 *parameter) { @@ -2014,7 +2014,7 @@ void cmdGetString(AgiGame *state, AgiEngine *vm, uint8 *parameter) { // copy string to destination // TODO: not sure if set all the time or only when ENTER is pressed - strcpy(&state->_vm->_game.strings[stringDestNr][0], (char *)textMgr->_inputString); + Common::strlcpy(&state->_vm->_game.strings[stringDestNr][0], (char *)textMgr->_inputString, MAX_STRINGLEN); textMgr->charPos_Pop(); @@ -2102,7 +2102,7 @@ void cmdSetString(AgiGame *state, AgiEngine *vm, uint8 *parameter) { // CM: to avoid crash in Groza (str = 150) if (stringNr > MAX_STRINGS) return; - strcpy(state->strings[stringNr], state->_curLogic->texts[textNr]); + Common::strlcpy(state->strings[stringNr], state->_curLogic->texts[textNr], MAX_STRINGLEN); } void cmdDisplay(AgiGame *state, AgiEngine *vm, uint8 *parameter) { diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp index 4b215edc63..4505668fd1 100644 --- a/engines/agi/op_test.cpp +++ b/engines/agi/op_test.cpp @@ -231,8 +231,8 @@ uint8 AgiEngine::testCompareStrings(uint8 s1, uint8 s2) { char ms2[MAX_STRINGLEN]; int j, k, l; - strcpy(ms1, _game.strings[s1]); - strcpy(ms2, _game.strings[s2]); + Common::strlcpy(ms1, _game.strings[s1], MAX_STRINGLEN); + Common::strlcpy(ms2, _game.strings[s2], MAX_STRINGLEN); l = strlen(ms1); for (k = 0, j = 0; k < l; k++) { diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp index bb5d3b8896..7e2e65a3eb 100644 --- a/engines/agi/preagi.cpp +++ b/engines/agi/preagi.cpp @@ -20,16 +20,14 @@ * */ -#include "common/config-manager.h" +#include "audio/softsynth/pcspk.h" + #include "common/debug-channels.h" #include "common/events.h" #include "common/random.h" -#include "common/textconsole.h" #include "agi/preagi.h" #include "agi/graphics.h" -#include "agi/keyboard.h" -#include "agi/text.h" namespace Agi { diff --git a/engines/agi/preagi.h b/engines/agi/preagi.h index 289b5ecdb9..d6026a5d4d 100644 --- a/engines/agi/preagi.h +++ b/engines/agi/preagi.h @@ -25,7 +25,9 @@ #include "agi/agi.h" -#include "audio/softsynth/pcspk.h" +namespace Audio { +class PCSpeaker; +} namespace Agi { diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp index 620d5e0baf..e1545cdb68 100644 --- a/engines/agi/preagi_mickey.cpp +++ b/engines/agi/preagi_mickey.cpp @@ -1205,7 +1205,7 @@ void MickeyEngine::printStory() { clearScreen(IDA_DEFAULT); for (iRow = 0; iRow < 25; iRow++) { - strcpy(szLine, buffer + pBuf); + Common::strlcpy(szLine, buffer + pBuf, 41); drawStr(iRow, 0, IDA_DEFAULT, szLine); pBuf += strlen(szLine) + 1; } @@ -1213,7 +1213,7 @@ void MickeyEngine::printStory() { clearScreen(IDA_DEFAULT); for (iRow = 0; iRow < 21; iRow++) { - strcpy(szLine, buffer + pBuf); + Common::strlcpy(szLine, buffer + pBuf, 41); drawStr(iRow, 0, IDA_DEFAULT, szLine); pBuf += strlen(szLine) + 1; } diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp index 87ac7c19c6..8fb9daca5e 100644 --- a/engines/agi/preagi_winnie.cpp +++ b/engines/agi/preagi_winnie.cpp @@ -292,7 +292,7 @@ int WinnieEngine::parser(int pc, int index, uint8 *buffer) { } // extract menu string - strcpy(szMenu, (char *)(buffer + pc)); + Common::strlcpy(szMenu, (char *)(buffer + pc), 121); XOR80(szMenu); break; default: diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index 0658609cd0..09fce9320b 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -118,7 +118,7 @@ int AgiEngine::saveGame(const Common::String &fileName, const Common::String &de out->writeByte(2); // was _game.state, 2 = STATE_RUNNING - strcpy(gameIDstring, _game.id); + Common::strlcpy(gameIDstring, _game.id, 8); out->write(gameIDstring, 8); debugC(5, kDebugLevelMain | kDebugLevelSavegame, "Writing game id (%s, %s)", gameIDstring, _game.id); diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp index f5c48b3b21..6998df6862 100644 --- a/engines/agi/sound_midi.cpp +++ b/engines/agi/sound_midi.cpp @@ -46,7 +46,6 @@ #include "common/file.h" #include "common/memstream.h" #include "common/stream.h" -#include "common/textconsole.h" #include "agi/agi.h" diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp index c8a7042ea3..939c3d2c77 100644 --- a/engines/agi/sound_sarien.cpp +++ b/engines/agi/sound_sarien.cpp @@ -22,8 +22,6 @@ #include "common/random.h" -#include "audio/mididrv.h" - #include "agi/agi.h" #include "agi/sound_sarien.h" diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index 0cacce2421..274a654547 100644 --- a/engines/agi/text.cpp +++ b/engines/agi/text.cpp @@ -457,7 +457,7 @@ void TextMgr::drawMessageBox(const char *textPtr, int16 forcedHeight, int16 want // Caller wants to force specified width/height? set it if (forcedHeight) _messageState.textSize_Height = forcedHeight; - + if (forcedWidth) { if (wantedWidth) _messageState.textSize_Width = wantedWidth; @@ -885,6 +885,12 @@ void TextMgr::stringEdit(int16 stringMaxLen) { _inputStringRow = _textPos.row; _inputStringColumn = _textPos.column; + if (_inputCursorChar) { + // Cursor character is shown, which means we are one beyond the start of the input + // Adjust the column for predictive input dialog + _inputStringColumn--; + } + // Caller can set the input string _inputStringCursorPos = 0; while (_inputStringCursorPos < inputStringLen) { @@ -1201,7 +1207,7 @@ char *TextMgr::stringPrintf(const char *originalText) { } assert(resultString.size() < sizeof(resultPrintfBuffer)); - strcpy(resultPrintfBuffer, resultString.c_str()); + Common::strlcpy(resultPrintfBuffer, resultString.c_str(), 2000); return resultPrintfBuffer; } diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 8952e649fd..48b170da75 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -32,6 +32,7 @@ #include "agos/intern.h" #include "agos/agos.h" #include "agos/midi.h" +#include "agos/sound.h" #include "backends/audiocd/audiocd.h" diff --git a/engines/agos/agos.h b/engines/agos/agos.h index b6b5e427e1..551df6e19b 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -32,8 +32,8 @@ #include "common/rect.h" #include "common/stack.h" #include "common/util.h" +#include "audio/mixer.h" -#include "agos/sound.h" #include "agos/vga.h" /** @@ -77,10 +77,14 @@ uint fileReadItemID(Common::SeekableReadStream *in); class MoviePlayer; #endif +class Sound; class MidiPlayer; struct Child; struct SubObject; +struct RoomState; +struct SubRoom; +struct SubSuperRoom; struct Item; struct WindowBlock; diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp index 65fdc9ec99..19a38116cf 100644 --- a/engines/agos/cursor.cpp +++ b/engines/agos/cursor.cpp @@ -26,6 +26,7 @@ #include "graphics/cursorman.h" #include "agos/agos.h" +#include "agos/intern.h" namespace AGOS { diff --git a/engines/agos/debugger.cpp b/engines/agos/debugger.cpp index 7ad742c928..365d84dd3f 100644 --- a/engines/agos/debugger.cpp +++ b/engines/agos/debugger.cpp @@ -25,6 +25,7 @@ #include "agos/debugger.h" #include "agos/agos.h" #include "agos/midi.h" +#include "agos/sound.h" namespace AGOS { diff --git a/engines/agos/detection_tables.h b/engines/agos/detection_tables.h index 793d4081cf..90e5a84829 100644 --- a/engines/agos/detection_tables.h +++ b/engines/agos/detection_tables.h @@ -2251,6 +2251,31 @@ static const AGOSGameDescription gameDescriptions[] = { GF_TALKIE }, + // Simon the Sorcerer 2 - Russian DOS CD + { + { + "simon2", + "CD", + + { + { "gsptr30", GAME_BASEFILE, "e26d162e573587f4601b88701292212c", 58851}, + { "icon.dat", GAME_ICONFILE, "72096a62d36e6034ea9fecc13b2dbdab", 18089}, + { "simon2.gme", GAME_GMEFILE, "9c535d403966750ae98bdaf698375a38", 19687892}, + { "stripped.txt", GAME_STRFILE, "e229f84d46fa83f99b4a7115679f3fb6", 171}, + { "tbllist", GAME_TBLFILE, "2082f8d02075e590300478853a91ffd9", 513}, + { NULL, 0, NULL, 0} + }, + Common::RU_RUS, + Common::kPlatformDOS, + ADGF_CD, + GUIO0() + }, + + GType_SIMON2, + GID_SIMON2, + GF_TALKIE + }, + // Simon the Sorcerer 2 - Czech Windows CD { { diff --git a/engines/agos/drivers/accolade/adlib.cpp b/engines/agos/drivers/accolade/adlib.cpp index 294be2b8a7..3a95d8f1c1 100644 --- a/engines/agos/drivers/accolade/adlib.cpp +++ b/engines/agos/drivers/accolade/adlib.cpp @@ -20,16 +20,13 @@ * */ -#include "agos/agos.h" #include "agos/drivers/accolade/mididriver.h" -#include "common/file.h" -#include "common/mutex.h" #include "common/system.h" #include "common/textconsole.h" #include "audio/fmopl.h" -#include "audio/softsynth/emumidi.h" +#include "audio/mididrv.h" namespace AGOS { diff --git a/engines/agos/drivers/accolade/driverfile.cpp b/engines/agos/drivers/accolade/driverfile.cpp index 4ff2fd550f..1e7fd442df 100644 --- a/engines/agos/drivers/accolade/driverfile.cpp +++ b/engines/agos/drivers/accolade/driverfile.cpp @@ -20,7 +20,6 @@ * */ -#include "agos/agos.h" #include "audio/mididrv.h" #include "common/error.h" #include "common/file.h" diff --git a/engines/agos/drivers/accolade/mt32.cpp b/engines/agos/drivers/accolade/mt32.cpp index 319e0ebf56..321b95f4ca 100644 --- a/engines/agos/drivers/accolade/mt32.cpp +++ b/engines/agos/drivers/accolade/mt32.cpp @@ -20,7 +20,6 @@ * */ -#include "agos/agos.h" #include "agos/drivers/accolade/mididriver.h" #include "audio/mididrv.h" diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index 95bcc68234..b70ec674dd 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -23,6 +23,7 @@ #include "agos/agos.h" #include "agos/animation.h" #include "agos/debugger.h" +#include "agos/sound.h" #include "agos/intern.h" #include "common/events.h" @@ -427,7 +428,7 @@ void AGOSEngine::delay(uint amount) { uint32 cur = start; uint this_delay, vgaPeriod; - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); _debugger->onFrame(); @@ -538,7 +539,7 @@ void AGOSEngine::delay(uint amount) { if (_leftButton == 1) _leftButtonCount++; - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); _system->updateScreen(); diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp index 2db2a52cbc..364fbf5f15 100644 --- a/engines/agos/icons.cpp +++ b/engines/agos/icons.cpp @@ -27,6 +27,7 @@ #include "graphics/surface.h" #include "agos/agos.h" +#include "agos/intern.h" namespace AGOS { diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp index 686b1c35b2..3b57369f1e 100644 --- a/engines/agos/input.cpp +++ b/engines/agos/input.cpp @@ -26,6 +26,7 @@ #include "agos/intern.h" #include "agos/agos.h" #include "agos/midi.h" +#include "agos/sound.h" #include "agos/vga.h" namespace AGOS { diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp index 2631f7998e..76d23905b7 100644 --- a/engines/agos/res.cpp +++ b/engines/agos/res.cpp @@ -31,7 +31,6 @@ #include "agos/agos.h" #include "agos/intern.h" -#include "agos/sound.h" #include "common/zlib.h" diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp index d04f1735d6..81d89cc4d3 100644 --- a/engines/agos/res_snd.cpp +++ b/engines/agos/res_snd.cpp @@ -28,6 +28,7 @@ #include "agos/intern.h" #include "agos/agos.h" #include "agos/midi.h" +#include "agos/sound.h" #include "agos/vga.h" #include "backends/audiocd/audiocd.h" @@ -228,7 +229,7 @@ void AGOSEngine_Simon1::playMusic(uint16 music, uint16 track) { // Support for compressed music from the ScummVM Music Enhancement Project _system->getAudioCDManager()->stop(); - _system->getAudioCDManager()->play(music + 1, -1, 0, 0); + _system->getAudioCDManager()->play(music + 1, -1, 0, 0, true); if (_system->getAudioCDManager()->isPlaying()) return; diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index b968ae645c..66a7fa90b3 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -25,7 +25,6 @@ #include "common/textconsole.h" #include "common/translation.h" -#include "gui/about.h" #include "gui/message.h" #include "agos/agos.h" diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index 1dbb9c255a..5f4ff4e773 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -27,8 +27,8 @@ #include "common/system.h" #include "common/textconsole.h" -#include "agos/animation.h" #include "agos/agos.h" +#include "agos/intern.h" #ifdef _WIN32_WCE extern bool isSmartphone(); diff --git a/engines/agos/script_e1.cpp b/engines/agos/script_e1.cpp index a022335ebc..38b29d475e 100644 --- a/engines/agos/script_e1.cpp +++ b/engines/agos/script_e1.cpp @@ -22,6 +22,7 @@ #include "agos/agos.h" +#include "agos/intern.h" #include "agos/vga.h" namespace AGOS { diff --git a/engines/agos/script_e2.cpp b/engines/agos/script_e2.cpp index 21b651ec12..d0cd015ce9 100644 --- a/engines/agos/script_e2.cpp +++ b/engines/agos/script_e2.cpp @@ -23,6 +23,7 @@ #include "agos/agos.h" +#include "agos/intern.h" namespace AGOS { diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp index e4fadcf360..10c9e995d4 100644 --- a/engines/agos/script_ff.cpp +++ b/engines/agos/script_ff.cpp @@ -28,6 +28,8 @@ #include "agos/animation.h" #include "agos/agos.h" +#include "agos/intern.h" +#include "agos/sound.h" namespace AGOS { diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp index 60948db35a..653a162904 100644 --- a/engines/agos/script_pn.cpp +++ b/engines/agos/script_pn.cpp @@ -21,6 +21,7 @@ */ #include "agos/agos.h" +#include "agos/intern.h" #include "agos/vga.h" #include "common/endian.h" diff --git a/engines/agos/script_s1.cpp b/engines/agos/script_s1.cpp index ec3de9bf94..e7828609d9 100644 --- a/engines/agos/script_s1.cpp +++ b/engines/agos/script_s1.cpp @@ -26,6 +26,8 @@ #include "graphics/palette.h" #include "agos/agos.h" +#include "agos/intern.h" +#include "agos/sound.h" #ifdef _WIN32_WCE extern bool isSmartphone(); diff --git a/engines/agos/script_s2.cpp b/engines/agos/script_s2.cpp index 44552ecd8a..7b1f369d68 100644 --- a/engines/agos/script_s2.cpp +++ b/engines/agos/script_s2.cpp @@ -23,6 +23,7 @@ #include "agos/agos.h" +#include "agos/intern.h" #include "agos/midi.h" #include "common/textconsole.h" diff --git a/engines/agos/script_ww.cpp b/engines/agos/script_ww.cpp index aff3229f8e..9394311001 100644 --- a/engines/agos/script_ww.cpp +++ b/engines/agos/script_ww.cpp @@ -23,6 +23,7 @@ #include "agos/agos.h" +#include "agos/intern.h" namespace AGOS { diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index 3eb0aca04d..cc443f2f50 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -25,7 +25,6 @@ #include "common/file.h" #include "common/textconsole.h" -#include "gui/about.h" #include "gui/message.h" #include "agos/agos.h" @@ -127,14 +126,14 @@ const byte *AGOSEngine::getStringPtrByID(uint16 stringId, bool upperCase) { _awaitTwoByteToken = 0; uncompressText(ptr); _textBuffer[_textCount] = 0; - strcpy((char *)dst, (const char *)_textBuffer); + Common::strlcpy((char *)dst, (const char *)_textBuffer, 180); } else { if (stringId < 0x8000) { stringPtr = _stringTabPtr[stringId]; } else { stringPtr = getLocalStringByID(stringId); } - strcpy((char *)dst, (const char *)stringPtr); + Common::strlcpy((char *)dst, (const char *)stringPtr, 180); } // WORKAROUND bug #1538873: The French version of Simon 1 and the @@ -797,7 +796,7 @@ void AGOSEngine_Feeble::printInteractText(uint16 num, const char *string) { if (*string2 == 0x00) { if (w == 0xFFFF) w = pixels; - strcpy(convertedString2, string); + Common::strlcpy(convertedString2, string, 320); break; } while (*string2 != ' ') { diff --git a/engines/agos/string_pn.cpp b/engines/agos/string_pn.cpp index 7a364f3ea9..06c8bbd98e 100644 --- a/engines/agos/string_pn.cpp +++ b/engines/agos/string_pn.cpp @@ -114,7 +114,7 @@ void AGOSEngine_PN::getObjectName(char *v, uint16 x) { } void AGOSEngine_PN::pcl(const char *s) { - strcat(_sb, s); + Common::strlcat(_sb, s, 80); if (strchr(s, '\n') == 0) { for (char *str = _sb; *str; str++) windowPutChar(_windowArray[_curWindow], *str); diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp index 1e6ecaa829..0f6c767300 100644 --- a/engines/agos/subroutine.cpp +++ b/engines/agos/subroutine.cpp @@ -26,6 +26,7 @@ #include "agos/agos.h" #include "agos/intern.h" +#include "agos/sound.h" namespace AGOS { diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index f761c3fc3f..2a675bf6e8 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -25,6 +25,7 @@ #include "agos/agos.h" #include "agos/intern.h" +#include "agos/sound.h" #include "agos/vga.h" #include "common/debug-channels.h" diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp index bc26058640..a26f189c43 100644 --- a/engines/agos/vga_e2.cpp +++ b/engines/agos/vga_e2.cpp @@ -25,6 +25,7 @@ #include "agos/agos.h" #include "agos/intern.h" +#include "agos/sound.h" #include "common/endian.h" #include "common/system.h" diff --git a/engines/agos/vga_ff.cpp b/engines/agos/vga_ff.cpp index 52e30699b0..c350c37413 100644 --- a/engines/agos/vga_ff.cpp +++ b/engines/agos/vga_ff.cpp @@ -26,6 +26,7 @@ #include "agos/agos.h" #include "agos/intern.h" +#include "agos/sound.h" namespace AGOS { diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp index c5f0f7874d..9b7e529e4b 100644 --- a/engines/agos/vga_s1.cpp +++ b/engines/agos/vga_s1.cpp @@ -24,6 +24,7 @@ #include "agos/agos.h" #include "agos/intern.h" +#include "agos/sound.h" #include "agos/vga.h" namespace AGOS { diff --git a/engines/agos/vga_s2.cpp b/engines/agos/vga_s2.cpp index 0c716d06c4..5326e0250f 100644 --- a/engines/agos/vga_s2.cpp +++ b/engines/agos/vga_s2.cpp @@ -23,6 +23,7 @@ #include "agos/agos.h" #include "agos/intern.h" #include "agos/midi.h" +#include "agos/sound.h" #include "graphics/surface.h" diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index 451b4a1c68..6946e448d8 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -27,6 +27,7 @@ /* TRIP5 Trippancy V - the sprite animation subsystem */ +#include "common/system.h" #include "avalanche/avalanche.h" #include "avalanche/animation.h" diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index 6cfe4dfdb6..8726ef784a 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -29,6 +29,7 @@ #include "common/random.h" #include "common/savefile.h" +#include "common/system.h" #include "graphics/thumbnail.h" namespace Avalanche { diff --git a/engines/avalanche/clock.cpp b/engines/avalanche/clock.cpp index 6d398d9921..4276e41d99 100644 --- a/engines/avalanche/clock.cpp +++ b/engines/avalanche/clock.cpp @@ -28,6 +28,8 @@ #include "avalanche/clock.h" #include "avalanche/avalanche.h" +#include "common/system.h" + namespace Avalanche { Clock::Clock(AvalancheEngine *vm) { diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp index f95440900b..d1a7234b03 100644 --- a/engines/avalanche/dialogs.cpp +++ b/engines/avalanche/dialogs.cpp @@ -30,6 +30,7 @@ #include "avalanche/avalanche.h" #include "avalanche/dialogs.h" +#include "common/system.h" #include "common/random.h" namespace Avalanche { diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp index 047a3670c2..254bf5e174 100644 --- a/engines/avalanche/ghostroom.cpp +++ b/engines/avalanche/ghostroom.cpp @@ -29,6 +29,7 @@ #include "avalanche/ghostroom.h" #include "common/random.h" +#include "common/system.h" namespace Avalanche { diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index 60c23594d3..03c9e9e3cb 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -28,6 +28,7 @@ #include "avalanche/avalanche.h" #include "avalanche/graphics.h" +#include "common/system.h" #include "engines/util.h" #include "graphics/palette.h" diff --git a/engines/avalanche/highscore.cpp b/engines/avalanche/highscore.cpp index 5f47aeb894..b977e2f33c 100644 --- a/engines/avalanche/highscore.cpp +++ b/engines/avalanche/highscore.cpp @@ -29,6 +29,7 @@ #include "avalanche/highscore.h" #include "common/savefile.h" +#include "common/system.h" namespace Avalanche { diff --git a/engines/avalanche/mainmenu.cpp b/engines/avalanche/mainmenu.cpp index 543684556c..ff24b37e0d 100644 --- a/engines/avalanche/mainmenu.cpp +++ b/engines/avalanche/mainmenu.cpp @@ -28,6 +28,8 @@ #include "avalanche/avalanche.h" #include "avalanche/mainmenu.h" +#include "common/system.h" + namespace Avalanche { MainMenu::MainMenu(AvalancheEngine *vm) { diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp index b17af8767a..a0a1756e0a 100644 --- a/engines/avalanche/nim.cpp +++ b/engines/avalanche/nim.cpp @@ -28,6 +28,8 @@ #include "avalanche/avalanche.h" #include "avalanche/nim.h" +#include "common/system.h" + namespace Avalanche { const char * const Nim::kNames[2] = {"Avalot", "Dogfood"}; diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp index 7c6d254099..112dce93ac 100644 --- a/engines/avalanche/parser.cpp +++ b/engines/avalanche/parser.cpp @@ -30,6 +30,7 @@ #include "avalanche/nim.h" #include "gui/saveload.h" +#include "common/system.h" #include "common/translation.h" namespace Avalanche { diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp index e5e44ed934..7f6cf99974 100644 --- a/engines/avalanche/shootemup.cpp +++ b/engines/avalanche/shootemup.cpp @@ -29,6 +29,7 @@ #include "avalanche/shootemup.h" #include "common/random.h" +#include "common/system.h" namespace Avalanche { diff --git a/engines/avalanche/sound.cpp b/engines/avalanche/sound.cpp index 0223bead48..a441121e90 100644 --- a/engines/avalanche/sound.cpp +++ b/engines/avalanche/sound.cpp @@ -23,7 +23,7 @@ #include "avalanche/avalanche.h" #include "avalanche/sound.h" -#include "audio/audiostream.h" +#include "audio/softsynth/pcspk.h" #include "common/config-manager.h" namespace Avalanche { diff --git a/engines/avalanche/sound.h b/engines/avalanche/sound.h index a67016a206..f9775654b4 100644 --- a/engines/avalanche/sound.h +++ b/engines/avalanche/sound.h @@ -24,7 +24,10 @@ #define AVALANCHE_SOUND_H #include "audio/mixer.h" -#include "audio/softsynth/pcspk.h" + +namespace Audio { +class PCSpeaker; +} namespace Avalanche { diff --git a/engines/bbvs/bbvs.cpp b/engines/bbvs/bbvs.cpp index 6ae663479d..e7b20512a2 100644 --- a/engines/bbvs/bbvs.cpp +++ b/engines/bbvs/bbvs.cpp @@ -34,6 +34,7 @@ #include "bbvs/minigames/minigame.h" #include "audio/audiostream.h" +#include "audio/decoders/aiff.h" #include "common/config-manager.h" #include "common/debug-channels.h" #include "common/error.h" diff --git a/engines/bbvs/bbvs.h b/engines/bbvs/bbvs.h index ff4afe9526..8d9550d423 100644 --- a/engines/bbvs/bbvs.h +++ b/engines/bbvs/bbvs.h @@ -24,7 +24,6 @@ #define BBVS_BBVS_H #include "audio/mixer.h" -#include "audio/decoders/aiff.h" #include "common/array.h" #include "common/events.h" #include "common/file.h" diff --git a/engines/bbvs/dialogs.cpp b/engines/bbvs/dialogs.cpp index c8470f8eef..1609794c73 100644 --- a/engines/bbvs/dialogs.cpp +++ b/engines/bbvs/dialogs.cpp @@ -22,10 +22,13 @@ #include "bbvs/dialogs.h" #include "common/events.h" -#include "gui/gui-manager.h" -#include "gui/ThemeEval.h" +#include "gui/widget.h" #include "engines/advancedDetector.h" +namespace GUI { +class CommandSender; +} + namespace Bbvs { struct MenuButton { diff --git a/engines/bbvs/dialogs.h b/engines/bbvs/dialogs.h index 7db0b182b7..af1f70e9a7 100644 --- a/engines/bbvs/dialogs.h +++ b/engines/bbvs/dialogs.h @@ -25,7 +25,11 @@ #include "bbvs/bbvs.h" #include "gui/dialog.h" -#include "gui/widgets/edittext.h" + +namespace GUI { +class ButtonWidget; +class CommandSender; +} namespace Bbvs { diff --git a/engines/bbvs/minigames/bbairguitar.cpp b/engines/bbvs/minigames/bbairguitar.cpp index 04175f7290..f826667134 100644 --- a/engines/bbvs/minigames/bbairguitar.cpp +++ b/engines/bbvs/minigames/bbairguitar.cpp @@ -25,7 +25,6 @@ #include "common/savefile.h" #include "common/translation.h" -#include "gui/dialog.h" #include "gui/message.h" #include "gui/filebrowser-dialog.h" diff --git a/engines/bbvs/sound.cpp b/engines/bbvs/sound.cpp index 7f9c00ad48..587868f26d 100644 --- a/engines/bbvs/sound.cpp +++ b/engines/bbvs/sound.cpp @@ -21,6 +21,7 @@ */ #include "bbvs/sound.h" +#include "audio/audiostream.h" #include "audio/decoders/aiff.h" #include "common/debug.h" #include "common/file.h" diff --git a/engines/bbvs/sound.h b/engines/bbvs/sound.h index 4d3253c48e..a21d97b7ed 100644 --- a/engines/bbvs/sound.h +++ b/engines/bbvs/sound.h @@ -23,10 +23,13 @@ #ifndef BBVS_SOUND_H #define BBVS_SOUND_H -#include "audio/audiostream.h" #include "audio/mixer.h" #include "common/array.h" +namespace Audio { +class RewindableAudioStream; +} + namespace Bbvs { class Sound { diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index c2f8982592..5d3d0a16a0 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -26,8 +26,6 @@ */ #include "gui/saveload.h" -#include "gui/about.h" -#include "gui/message.h" #include "common/config-manager.h" #include "common/events.h" #include "common/translation.h" diff --git a/engines/cge/sound.cpp b/engines/cge/sound.cpp index 370b768bca..3af094ef06 100644 --- a/engines/cge/sound.cpp +++ b/engines/cge/sound.cpp @@ -30,8 +30,10 @@ #include "cge/cge_main.h" #include "common/config-manager.h" #include "common/memstream.h" -#include "audio/decoders/raw.h" #include "audio/audiostream.h" +#include "audio/decoders/wave.h" +#include "audio/mididrv.h" +#include "audio/midiparser.h" namespace CGE { diff --git a/engines/cge/sound.h b/engines/cge/sound.h index dc67f9408b..8e624ee575 100644 --- a/engines/cge/sound.h +++ b/engines/cge/sound.h @@ -29,15 +29,14 @@ #define CGE_SOUND_H #include "cge/fileio.h" -#include "audio/audiostream.h" -#include "audio/decoders/wave.h" -#include "audio/fmopl.h" -#include "audio/mididrv.h" -#include "audio/midiparser.h" #include "audio/midiplayer.h" #include "audio/mixer.h" #include "common/memstream.h" +namespace Audio { +class RewindableAudioStream; +} + namespace CGE { class CGEEngine; diff --git a/engines/cge2/events.cpp b/engines/cge2/events.cpp index 96cecc8e23..2dac04a0a5 100644 --- a/engines/cge2/events.cpp +++ b/engines/cge2/events.cpp @@ -26,8 +26,6 @@ */ #include "gui/saveload.h" -#include "gui/about.h" -#include "gui/message.h" #include "common/config-manager.h" #include "common/events.h" #include "common/translation.h" diff --git a/engines/cge2/saveload.cpp b/engines/cge2/saveload.cpp index 7735c077a6..cd0be84567 100644 --- a/engines/cge2/saveload.cpp +++ b/engines/cge2/saveload.cpp @@ -25,7 +25,7 @@ * Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon */ -#include "common/config-manager.h" +#include "common/memstream.h" #include "common/savefile.h" #include "common/system.h" #include "graphics/thumbnail.h" @@ -36,8 +36,6 @@ #include "cge2/snail.h" #include "cge2/hero.h" #include "cge2/text.h" -#include "cge2/sound.h" -#include "cge2/cge2_main.h" namespace CGE2 { diff --git a/engines/cge2/sound.cpp b/engines/cge2/sound.cpp index 57ec5983e8..691414d84a 100644 --- a/engines/cge2/sound.cpp +++ b/engines/cge2/sound.cpp @@ -26,10 +26,11 @@ */ #include "cge2/sound.h" -#include "common/config-manager.h" #include "common/memstream.h" -#include "audio/decoders/raw.h" #include "audio/audiostream.h" +#include "audio/decoders/wave.h" +#include "audio/mididrv.h" +#include "audio/midiparser.h" #include "cge2/cge2.h" namespace CGE2 { diff --git a/engines/cge2/sound.h b/engines/cge2/sound.h index 02afe610a2..8c16f06e97 100644 --- a/engines/cge2/sound.h +++ b/engines/cge2/sound.h @@ -28,19 +28,17 @@ #ifndef CGE2_SOUND_H #define CGE2_SOUND_H -#include "cge2/fileio.h" -#include "audio/audiostream.h" -#include "audio/decoders/wave.h" -#include "audio/fmopl.h" -#include "audio/mididrv.h" -#include "audio/midiparser.h" #include "audio/midiplayer.h" #include "audio/mixer.h" -#include "common/memstream.h" + +namespace Audio { +class RewindableAudioStream; +} namespace CGE2 { class CGE2Engine; +class EncryptedStream; // sample info struct SmpInfo { diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index 54f5c00d93..8b0d8b6c77 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -952,8 +952,9 @@ uint8 Vga::closest(Dac *pal, const uint8 colR, const uint8 colG, const uint8 col } uint8 Vga::closest(Dac *pal, Dac x) { - int exp = (sizeof(long) * 8 - 1); - long D = (1 << exp) - 1; // Maximum value of long. + long D = 0; + D = ~D; + D = (unsigned long)D >> 1; // Maximum value of long. long R = x._r; long G = x._g; long B = x._b; diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index e52fc464d5..19a2d8a82e 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -222,7 +222,7 @@ void manageEvents() { mouseData.left = mouseLeft; mouseData.right = mouseRight; - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY) { diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp index 7cab067371..a8b4c085ff 100644 --- a/engines/cine/sound.cpp +++ b/engines/cine/sound.cpp @@ -939,6 +939,10 @@ PCSound::PCSound(Audio::Mixer *mixer, CineEngine *vm) } _player = new PCSoundFxPlayer(_soundDriver); + + // Ensure the CD is open + if (_vm->getGameType() == GType_FW && (_vm->getFeatures() & GF_CD)) + g_system->getAudioCDManager()->open(); } PCSound::~PCSound() { diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index f070338978..73d97e100d 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -21,13 +21,9 @@ */ #include "common/scummsys.h" -#include "common/config-manager.h" #include "common/events.h" -#include "common/file.h" #include "common/random.h" -#include "common/fs.h" #include "common/keyboard.h" -#include "common/substream.h" #include "graphics/cursorman.h" #include "graphics/surface.h" @@ -35,9 +31,6 @@ #include "graphics/wincursor.h" #include "engines/util.h" -#include "engines/advancedDetector.h" - -#include "audio/audiostream.h" #include "composer/composer.h" #include "composer/graphics.h" diff --git a/engines/composer/composer.h b/engines/composer/composer.h index 47398fe36d..234494e655 100644 --- a/engines/composer/composer.h +++ b/engines/composer/composer.h @@ -28,6 +28,7 @@ #include "common/system.h" #include "common/debug.h" #include "common/debug-channels.h" +#include "common/error.h" #include "common/textconsole.h" #include "common/rect.h" diff --git a/engines/composer/detection.cpp b/engines/composer/detection.cpp index a3ab18ae54..689a72a743 100644 --- a/engines/composer/detection.cpp +++ b/engines/composer/detection.cpp @@ -253,6 +253,36 @@ static const ComposerGameDescription gameDescriptions[] = { GType_ComposerV2 }, + { // Provided by WindlePoons, "100% Kids Darby & Gregor" Pack. Bugreport #6825 + { + "darby", + 0, + { + {"book.ini", 0, "285308372f7dddff2ca5a25c9192cf5c", 2545}, + {"page99.rsc", 0, "40b4879e9ba6a34d6aa2a9d2e30c5ef7", 1286480}, + AD_LISTEND + }, + Common::DE_DEU, + Common::kPlatformWindows, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + GType_ComposerV2 + }, + + { // Provided by Niv Baehr, Bugreport #6878 + { + "darby", + 0, + AD_ENTRY1("page99.rsc", "183463d18c050563dcdec2d9f9670515"), + Common::HE_ISR, + Common::kPlatformWindows, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + GType_ComposerV2 + }, + { { "gregory", @@ -296,6 +326,23 @@ static const ComposerGameDescription gameDescriptions[] = { GType_ComposerV2 }, + { // Provided by WindlePoons, "100% Kids Darby & Gregor" Pack. Bugreport #6825 + { + "gregory", + 0, + { + {"book.ini", 0, "e54fc5c00de5f94e908a969e445af5d0", 2234}, + {"page99.rsc", 0, "1ae6610de621a9901bf87b874fbf331f", 388644}, + AD_LISTEND + }, + Common::DE_DEU, + Common::kPlatformWindows, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + GType_ComposerV2 + }, + { // Provided by sev { "princess", diff --git a/engines/cruise/ctp.cpp b/engines/cruise/ctp.cpp index 9515b552e1..4458e39e91 100644 --- a/engines/cruise/ctp.cpp +++ b/engines/cruise/ctp.cpp @@ -307,7 +307,7 @@ int initCt(const char *ctpName) { MemFree(ptr); if (ctpName != currentCtpName) - strcpy(currentCtpName, ctpName); + Common::strlcpy(currentCtpName, ctpName, 40); numberOfWalkboxes = segementSizeTable[6] / 2; // get the number of walkboxes diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp index 7a1258dbde..2eff82bc61 100644 --- a/engines/cruise/dataLoader.cpp +++ b/engines/cruise/dataLoader.cpp @@ -249,12 +249,19 @@ int loadFile(const char* name, int idx, int destIdx) { int numMaxEntriesInSet = getNumMaxEntiresInSet(ptr); if (destIdx > numMaxEntriesInSet) { + MemFree(ptr); return 0; // exit if limit is reached } - return loadSetEntry(name, ptr, destIdx, idx); + int res = loadSetEntry(name, ptr, destIdx, idx); + MemFree(ptr); + + return res; } case type_FNT: { - return loadFNTSub(ptr, idx); + int res = loadFNTSub(ptr, idx); + MemFree(ptr); + + return res; } case type_SPL: { // Sound file diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp index f57435f4f7..b477dcdf9c 100644 --- a/engines/cruise/sound.cpp +++ b/engines/cruise/sound.cpp @@ -29,10 +29,11 @@ #include "cruise/sound.h" #include "cruise/volume.h" -#include "audio/audiostream.h" #include "audio/fmopl.h" -#include "audio/mixer.h" -#include "audio/mods/soundfx.h" + +namespace Audio { +class Mixer; +} namespace Cruise { diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 8498e50b8d..a21a4a8126 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -43,13 +43,13 @@ #include "engines/engine.h" #include "engines/metaengine.h" -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG #include "gui/KeysDialog.h" #endif class ConfigDialog : public GUI::OptionsDialog { protected: -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG GUI::Dialog *_keysDialog; #endif @@ -307,14 +307,14 @@ ConfigDialog::ConfigDialog(bool subtitleControls) new GUI::ButtonWidget(this, "GlobalConfig.Ok", _("~O~K"), 0, GUI::kOKCmd); new GUI::ButtonWidget(this, "GlobalConfig.Cancel", _("~C~ancel"), 0, GUI::kCloseCmd); -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG new GUI::ButtonWidget(this, "GlobalConfig.Keys", _("~K~eys"), 0, kKeysCmd); _keysDialog = NULL; #endif } ConfigDialog::~ConfigDialog() { -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG delete _keysDialog; #endif } @@ -323,7 +323,7 @@ void ConfigDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 switch (cmd) { case kKeysCmd: -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG // // Create the sub dialog(s) // diff --git a/engines/draci/music.cpp b/engines/draci/music.cpp index cda2007a8e..3fa380196a 100644 --- a/engines/draci/music.cpp +++ b/engines/draci/music.cpp @@ -22,10 +22,8 @@ // MIDI and digital music class -#include "audio/audiostream.h" #include "audio/mididrv.h" #include "audio/midiparser.h" -#include "common/config-manager.h" #include "common/debug.h" #include "common/file.h" diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp index 849e2ccd24..b459c4539b 100644 --- a/engines/drascula/actors.cpp +++ b/engines/drascula/actors.cpp @@ -123,6 +123,8 @@ void DrasculaEngine::startWalking() { walkUp(); else if (roomY > curY + curHeight) walkDown(); + else + characterMoved = 0; } else { if ((roomX < curX + curWidth / 2 ) && (roomY <= (curY + curHeight))) quadrant_1(); @@ -189,7 +191,7 @@ void DrasculaEngine::moveCharacters() { } if (currentChapter != 2 && currentChapter != 3) { - if (hare_se_ve == 0) { + if (characterVisible == 0) { increaseFrameNum(); return; } diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 5009a62e84..f672ad3b55 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -360,7 +360,7 @@ void DrasculaEngine::animation_2_1() { int l; gotoObject(231, 91); - hare_se_ve = 0; + characterVisible = 0; term_int = 0; @@ -433,7 +433,7 @@ void DrasculaEngine::animation_2_1() { curX = 91; curY = 95; trackProtagonist = 1; - hare_se_ve = 1; + characterVisible = 1; loadPic("97g.alg", extraSurface); if (animate("lev.bin", 15)) @@ -1434,7 +1434,7 @@ void DrasculaEngine::animation_12_5() { doBreak = 1; previousMusic = roomMusic; - hare_se_ve = 1; + characterVisible = 1; clearRoom(); trackProtagonist = 1; characterMoved = 0; @@ -1504,6 +1504,7 @@ void DrasculaEngine::animation_14_5() { void DrasculaEngine::animation_1_6() { debug(4, "animation_1_6()"); + hideCursor(); trackProtagonist = 0; curX = 103; curY = 108; @@ -1543,7 +1544,7 @@ void DrasculaEngine::animation_1_6() { updateEvents(); clearRoom(); black(); - hare_se_ve = 0; + characterVisible = 0; flags[0] = 0; updateRoom(); updateScreen(); @@ -1618,7 +1619,7 @@ void DrasculaEngine::animation_6_6() { curX = -1; selectVerb(kVerbNone); enterRoom(58); - hare_se_ve = 1; + characterVisible = 1; trackProtagonist = 1; animate("hbp.bin", 14); @@ -2138,7 +2139,7 @@ void DrasculaEngine::animation_5_4(){ loadPic("anh_dr.alg", backSurface); gotoObject(99, 160); gotoObject(38, 177); - hare_se_ve = 0; + characterVisible = 0; updateRoom(); updateScreen(); delay(800); @@ -2156,7 +2157,7 @@ void DrasculaEngine::animation_5_4(){ talk_igor(30, kIgorFront); loadPic(96, frontSurface); loadPic(99, backSurface); - hare_se_ve = 1; + characterVisible = 1; fadeToBlack(0); exitRoom(0); } @@ -2211,7 +2212,7 @@ void DrasculaEngine::activatePendulum() { debug(4, "activatePendulum()"); flags[1] = 2; - hare_se_ve = 0; + characterVisible = 0; _roomNumber = 102; loadPic(102, bgSurface, HALF_PAL); loadPic("an_p1.alg", drawSurface3); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c72d77c281..ab91056480 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -23,19 +23,13 @@ #include "common/events.h" #include "common/keyboard.h" #include "common/file.h" -#include "common/savefile.h" #include "common/config-manager.h" #include "common/textconsole.h" #include "backends/audiocd/audiocd.h" -#include "base/plugins.h" -#include "base/version.h" - #include "engines/util.h" -#include "audio/mixer.h" - #include "drascula/drascula.h" #include "drascula/console.h" @@ -144,7 +138,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam curDirection = 0; trackProtagonist = 0; _characterFrame = 0; - hare_se_ve = 0; + characterVisible = 0; roomX = 0; roomY = 0; checkFlags = 0; @@ -183,9 +177,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam const Common::FSNode gameDataDir(ConfMan.get("path")); SearchMan.addSubDirectoryMatching(gameDataDir, "audio"); - int cd_num = ConfMan.getInt("cdrom"); - if (cd_num >= 0) - _system->getAudioCDManager()->openCD(cd_num); + _system->getAudioCDManager()->open(); _lang = kEnglish; @@ -301,7 +293,7 @@ Common::Error DrasculaEngine::run() { characterMoved = 0; trackProtagonist = 3; _characterFrame = 0; - hare_se_ve = 1; + characterVisible = 1; checkFlags = 1; doBreak = 0; walkToObject = 0; @@ -367,7 +359,7 @@ Common::Error DrasculaEngine::run() { for (i = 0; i < 25; i++) memcpy(crosshairCursor + i * 40, tableSurface + 225 + (56 + i) * 320, 40); - if (_lang == kSpanish) + if (_lang == kSpanish && currentChapter != 6) loadPic(974, tableSurface); if (currentChapter != 2) { @@ -603,7 +595,6 @@ bool DrasculaEngine::runCurrentChapter() { if (_rightMouseButton == 1 && _menuScreen) { #endif _rightMouseButton = 0; - delay(100); if (currentChapter == 2) { loadPic(menuBackground, cursorSurface); loadPic(menuBackground, backSurface); @@ -632,7 +623,6 @@ bool DrasculaEngine::runCurrentChapter() { !(currentChapter == 5 && pickedObject == 16)) { #endif _rightMouseButton = 0; - delay(100); characterMoved = 0; if (trackProtagonist == 2) trackProtagonist = 1; @@ -660,12 +650,11 @@ bool DrasculaEngine::runCurrentChapter() { #endif if (_leftMouseButton == 1 && _menuBar) { - delay(100); selectVerbFromBar(); } else if (_leftMouseButton == 1 && takeObject == 0) { - delay(100); if (verify1()) return true; + delay(100); } else if (_leftMouseButton == 1 && takeObject == 1) { if (verify2()) return true; @@ -899,7 +888,7 @@ void DrasculaEngine::pause(int duration) { } int DrasculaEngine::getTime() { - return _system->getMillis() / 20; // originally was 1 + return _system->getMillis() / 10; } void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int width, int height, int factor, byte *dir_inicio, byte *dir_fin) { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 762add50a5..acca2e5915 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -429,7 +429,7 @@ public: int frame_y; int curX, curY, characterMoved, curDirection, trackProtagonist, _characterFrame; - int hare_se_ve; // TODO: what is this for? + int characterVisible; int roomX, roomY, checkFlags; int doBreak; int stepX, stepY; diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 077047a6eb..6bfb2e1823 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -217,6 +217,10 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { int letterY = 0, letterX = 0, i; uint len = strlen(said); byte c; + + byte *srcSurface = tableSurface; + if (_lang == kSpanish && currentChapter == 6) + srcSurface = extraSurface; for (uint h = 0; h < len; h++) { c = toupper(said[h]); @@ -241,7 +245,7 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { } // for copyRect(letterX, letterY, screenX, screenY, - CHAR_WIDTH, CHAR_HEIGHT, tableSurface, screenSurface); + CHAR_WIDTH, CHAR_HEIGHT, srcSurface, screenSurface); screenX = screenX + CHAR_WIDTH; if (screenX > 317) { @@ -319,28 +323,51 @@ int DrasculaEngine::print_abc_opc(const char *said, int screenY, int game) { } bool DrasculaEngine::textFitsCentered(char *text, int x) { - int len = strlen(text); - int tmp = CLIP<int>(x - len * CHAR_WIDTH / 2, 60, 255); - return (tmp + len * CHAR_WIDTH) <= 320; + int textLen = strlen(text); + int halfLen = (textLen / 2) * CHAR_WIDTH; + + //if (x > 160) + // x = 315 - x; + //return (halfLen <= x); + + // The commented out code above is what the original engine is doing. Instead of testing the + // upper bound if x is greater than 160 it takes the complement to 315 and test only the lower + // bounds. + // Also note that since it does an integer division to compute the half length of the string, + // in the case where the string has an odd number of characters there is one more character to + // the right than to the left. If the string center is beyond 160, this is taken care of by + // taking the complement to 315 instead of 320. But if the string center is close to the screen + // center, but not greater than 160, this can lead to the string being accepted despite having + // one character beyond the right edge of the screen. + // In ScummVM we therefore also test the right edge, which leads to differences + // with the original engine, but for the better. + if (x > 160) + return (315 - x - halfLen >= 0); + return (x - halfLen >= 0 && x + halfLen + (textLen % 2) * CHAR_WIDTH <= 320); } void DrasculaEngine::centerText(const char *message, int textX, int textY) { char msg[200]; - char messageLine[200]; - char tmpMessageLine[200]; - *messageLine = 0; - *tmpMessageLine = 0; - char *curWord; - int curLine = 0; - int x = 0; - // original starts printing 4 lines above textY - int y = CLIP<int>(textY - (4 * CHAR_HEIGHT), 0, 320); - Common::strlcpy(msg, message, 200); + + // We make sure to have a width of at least 120 pixels by clipping the center. + // In theory since the screen width is 320 I would expect something like this: + // x = CLIP<int>(x, 60, 260); + // return (x - halfLen >= 0 && x + halfLen <= 319); + + // The engines does things differently though. It tries to clips text at 315 instead of 319. + // See also the comment in textFitsCentered(). + + textX = CLIP<int>(textX, 60, 255); // If the message fits on screen as-is, just print it here if (textFitsCentered(msg, textX)) { - x = CLIP<int>(textX - strlen(msg) * CHAR_WIDTH / 2, 60, 255); + int x = textX - (strlen(msg) / 2) * CHAR_WIDTH - 1; + // The original starts to draw (nbLines + 2) lines above textY, except if there is a single line + // in which case it starts drawing at (nbLines + 3) above textY. + // Also clip to the screen height although the original does not do it. + int y = textY - 4 * CHAR_HEIGHT; + y = CLIP<int>(y, 0, 200 - CHAR_HEIGHT); print_abc(msg, x, y); return; } @@ -351,42 +378,61 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) { // with the German translation. if (!strchr(msg, ' ')) { int len = strlen(msg); - x = CLIP<int>(textX - len * CHAR_WIDTH / 2, 0, 319 - len * CHAR_WIDTH); + int x = CLIP<int>(textX - (len / 2) * CHAR_WIDTH - 1, 0, 319 - len * CHAR_WIDTH); + int y = textY - 4 * CHAR_HEIGHT; + y = CLIP<int>(y, 0, 200 - CHAR_HEIGHT); print_abc(msg, x, y); return; } // Message doesn't fit on screen, split it - + char messageLines[15][41]; // screenWidth/charWidth = 320/8 = 40. Thus lines can have up to 41 characters with the null terminator (despite the original allocating only 40 characters here). + int curLine = 0; + char messageCurLine[50]; + char tmpMessageCurLine[50]; + *messageCurLine = 0; + *tmpMessageCurLine = 0; // Get a word from the message - curWord = strtok(msg, " "); + char* curWord = strtok(msg, " "); while (curWord != NULL) { // Check if the word and the current line fit on screen - if (tmpMessageLine[0] != '\0') - Common::strlcat(tmpMessageLine, " ", 200); - Common::strlcat(tmpMessageLine, curWord, 200); - if (textFitsCentered(tmpMessageLine, textX)) { + if (tmpMessageCurLine[0] != '\0') + Common::strlcat(tmpMessageCurLine, " ", 50); + Common::strlcat(tmpMessageCurLine, curWord, 50); + if (textFitsCentered(tmpMessageCurLine, textX)) { // Line fits, so add the word to the current message line - strcpy(messageLine, tmpMessageLine); + strcpy(messageCurLine, tmpMessageCurLine); } else { - // Line doesn't fit, so show the current line on screen and - // create a new one - // If it goes off screen, print_abc will adjust it - x = CLIP<int>(textX - strlen(messageLine) * CHAR_WIDTH / 2, 60, 255); - print_abc(messageLine, x, y + curLine * CHAR_HEIGHT); - Common::strlcpy(messageLine, curWord, 200); - Common::strlcpy(tmpMessageLine, curWord, 200); - curLine++; + // Line does't fit. Store the current line and start a new line. + Common::strlcpy(messageLines[curLine++], messageCurLine, 41); + Common::strlcpy(messageCurLine, curWord, 50); + Common::strlcpy(tmpMessageCurLine, curWord, 50); } // Get next word curWord = strtok(NULL, " "); - if (curWord == NULL) { - x = CLIP<int>(textX - strlen(messageLine) * CHAR_WIDTH / 2, 60, 255); - print_abc(messageLine, x, y + curLine * CHAR_HEIGHT); + // The original has an interesting bug that if we split the text on several lines + // a space is added at the end (which impacts the alignment, and may even cause the line + // to become too long). + Common::strlcat(messageCurLine, " ", 50); + if (!textFitsCentered(messageCurLine, textX)) { + messageCurLine[strlen(messageCurLine) - 1] = '\0'; + Common::strlcpy(messageLines[curLine++], messageCurLine, 41); + strcpy(messageLines[curLine++], " "); + } else + Common::strlcpy(messageLines[curLine++], messageCurLine, 41); } } + + // The original starts to draw (nbLines + 2) lines above textY. + // Also clip to the screen height although the original does not do it. + int y = textY - (curLine + 2) * CHAR_HEIGHT; + y = CLIP<int>(y, 0, 200 - curLine * (CHAR_HEIGHT + 2) + 2); + for (int line = 0 ; line < curLine ; ++line, y += CHAR_HEIGHT + 2) { + int textHalfLen = (strlen(messageLines[line]) / 2) * CHAR_WIDTH; + print_abc(messageLines[line], textX - textHalfLen - 1, y); + } } void DrasculaEngine::screenSaver() { diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp index cd7d502194..02846abcc9 100644 --- a/engines/drascula/objects.cpp +++ b/engines/drascula/objects.cpp @@ -62,7 +62,7 @@ void DrasculaEngine::gotoObject(int pointX, int pointY) { hideCursor(); if (currentChapter == 5 || currentChapter == 6) { - if (hare_se_ve == 0) { + if (characterVisible == 0) { curX = roomX; curY = roomY; updateRoom(); @@ -272,6 +272,8 @@ void DrasculaEngine::updateVisible() { visible[2] = 0; if (_roomNumber == 26 && flags[12] == 1) visible[1] = 0; + if (_roomNumber == 31 && flags[13] == 1) + visible[1] = 0; if (_roomNumber == 35 && flags[14] == 1) visible[2] = 0; if (_roomNumber == 35 && flags[17] == 1) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 8691bd2cb4..57d4517295 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -980,12 +980,12 @@ bool DrasculaEngine::room_59(int fl) { playSound(12); pause(19); stopSound(); - hare_se_ve = 0; + characterVisible = 0; updateRoom(); copyRect(101, 34, curX - 4, curY - 1, 37, 70, drawSurface3, screenSurface); copyBackground(0, 0, 0, 0, 320, 200, screenSurface, bgSurface); updateScreen(); - hare_se_ve = 1; + characterVisible = 1; clearRoom(); loadPic("tlef0.alg", bgSurface, COMPLETE_PAL); loadPic("tlef1.alg", drawSurface3); @@ -1399,7 +1399,7 @@ void DrasculaEngine::update_58_pre() { } void DrasculaEngine::update_58() { - if (hare_se_ve == 1) + if (characterVisible == 1) copyRect(67, 139, 140, 147, 12, 16, drawSurface3, screenSurface); } @@ -1845,7 +1845,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { } if (currentChapter == 5) - hare_se_ve = 1; + characterVisible = 1; updateVisible(); @@ -1885,7 +1885,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { if (currentChapter == 5) { if (_roomNumber == 45) - hare_se_ve = 0; + characterVisible = 0; if (_roomNumber == 49 && flags[7] == 0) { playTalkSequence(4); // sequence 4, chapter 5 } @@ -1961,7 +1961,7 @@ bool DrasculaEngine::exitRoom(int doorNumber) { } if (currentChapter == 5) - hare_se_ve = 1; + characterVisible = 1; clearRoom(); if (!sscanf(_targetSurface[doorNumber], "%d", &roomNum)) { diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index d0f16aa941..eb72a999d4 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -255,6 +255,19 @@ bool DrasculaEngine::loadGame(int slot) { if (!(in = _saveFileMan->openForLoading(saveFileName))) { error("missing savegame file %s", saveFileName.c_str()); } + + // If we currently are in room 102 while being attached below the pendulum + // the character is invisible and some surface are temporarily used for other + // things. Reset those before loading the savegame otherwise we may have some + // issues such as the protagonist being invisible after reloading a savegame. + if (_roomNumber == 102 && flags[1] == 2) { + characterVisible = 1; + loadPic(96, frontSurface); + loadPic(97, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); + } + loadMetaData(in, slot, true); Graphics::skipThumbnail(*in); @@ -287,8 +300,23 @@ bool DrasculaEngine::loadGame(int slot) { if (!sscanf(currentData, "%d.ald", &roomNum)) { error("Bad save format"); } + + // When loading room 102 while being attached below the pendulum Some variables + // are not correctly set and can cause random crashes when calling enterRoom below. + // The crash occurs in moveCharacters() when accessing factor_red[curY + curHeight]. + if (roomNum == 102 && flags[1] == 2) { + curX = 103; + curY = 108; + curWidth = curHeight = 0; + } + enterRoom(roomNum); selectVerb(kVerbNone); + + // When loading room 102 while being attached below the pendulum we + // need to call activatePendulum() to properly initialized the scene. + if (_roomNumber == 102 && flags[1] == 2) + activatePendulum(); return true; } diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp index 148dae76f5..62ec796678 100644 --- a/engines/drascula/sound.cpp +++ b/engines/drascula/sound.cpp @@ -44,7 +44,7 @@ void DrasculaEngine::updateVolume(Audio::Mixer::SoundType soundType, int prevVol } void DrasculaEngine::volumeControls() { - if (_lang == kSpanish) + if (_lang == kSpanish && currentChapter != 6) loadPic(95, tableSurface); copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); @@ -101,7 +101,7 @@ void DrasculaEngine::volumeControls() { } - if (_lang == kSpanish) + if (_lang == kSpanish && currentChapter != 6) loadPic(974, tableSurface); selectVerb(kVerbNone); @@ -133,7 +133,7 @@ void DrasculaEngine::stopMusic() { } void DrasculaEngine::updateMusic() { - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); } int DrasculaEngine::musicStatus() { @@ -166,8 +166,8 @@ void DrasculaEngine::MusicFadeout() { void DrasculaEngine::playFile(const char *fname) { Common::SeekableReadStream *stream = _archives.open(fname); if (stream) { - int startOffset = 0; - int soundSize = stream->size() - startOffset; + int startOffset = 32; + int soundSize = stream->size() - 64; if (!strcmp(fname, "3.als") && soundSize == 145166 && _lang != kSpanish) { // WORKAROUND: File 3.als with English speech files has a big silence at diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index e9fec868f8..cc329b206b 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -232,7 +232,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { if (currentChapter == 1) color_abc(color_solo); - else if (currentChapter == 4) + else if (currentChapter == 5) color_abc(kColorRed); talkInit(filename); diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp index 764171bcb0..8e24c44702 100644 --- a/engines/dreamweb/detection.cpp +++ b/engines/dreamweb/detection.cpp @@ -23,6 +23,7 @@ #include "base/plugins.h" #include "common/algorithm.h" +#include "common/savefile.h" #include "common/system.h" #include "common/translation.h" diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h index cb9bebb304..0a59543c51 100644 --- a/engines/dreamweb/detection_tables.h +++ b/engines/dreamweb/detection_tables.h @@ -244,6 +244,26 @@ static const DreamWebGameDescription gameDescriptions[] = { }, }, + // Czech fan-made translation + // From bug #7078 + { + { + "dreamweb", + "CD", + { + {"dreamweb.r00", 0, "3b5c87717fc40cc5a5ae19c155662ee3", 152918}, + {"dreamweb.r02", 0, "28458718167a040d7e988cf7d2298eae", 210466}, + {"dreamweb.exe", 0, "40cc15bdc8fa3a785b5fd1ecd6194119", 65440}, + AD_LISTEND + }, + Common::CZ_CZE, + Common::kPlatformDOS, + ADGF_CD, + GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) + }, + }, + + { AD_TABLE_END_MARKER } }; diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index e39f8c0d51..2e5fb424f8 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -24,17 +24,12 @@ #define DREAMWEB_H #include "common/error.h" -#include "common/file.h" #include "common/keyboard.h" #include "common/random.h" #include "common/rect.h" -#include "common/savefile.h" #include "common/scummsys.h" #include "common/system.h" -#include "audio/audiostream.h" -#include "audio/mixer.h" - #include "engines/engine.h" #include "dreamweb/console.h" @@ -45,6 +40,10 @@ #define SCUMMVM_BLOCK_MAGIC_SIZE 0x1234 #define SAVEGAME_VERSION 1 +namespace Common { +class File; +} + namespace DreamWeb { const unsigned int kNumReelRoutines = 57; diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index ce89dae732..a104ba727d 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -28,6 +28,7 @@ #include "gui/saveload.h" #include "common/config-manager.h" #include "common/translation.h" +#include "common/savefile.h" #include "common/serializer.h" namespace DreamWeb { diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index d3b417de90..2a4cd9c75c 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -25,6 +25,8 @@ #include "common/debug.h" #include "common/file.h" +#include "audio/audiostream.h" + #include "dreamweb/dreamweb.h" #include "dreamweb/sound.h" diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 68b223392c..4aa487d13f 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -23,6 +23,7 @@ #include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" #include "common/config-manager.h" +#include "common/file.h" namespace DreamWeb { diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp index c59d3e3ad5..4a7acd2344 100644 --- a/engines/dreamweb/vgagrafx.cpp +++ b/engines/dreamweb/vgagrafx.cpp @@ -21,6 +21,7 @@ */ #include "dreamweb/dreamweb.h" +#include "common/file.h" #include "engines/util.h" #include "graphics/surface.h" #include "image/pcx.h" diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index ebaff32550..c2aae9ba88 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -24,6 +24,7 @@ #include "common/archive.h" #include "common/config-manager.h" +#include "audio/mixer.h" #include "engines/util.h" @@ -112,6 +113,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _musicLocal = 0; _trackStartDelay = 0; + _sceneTrackHandle = new Audio::SoundHandle(); + memset(_sceneTracks, 0, sizeof(_sceneTracks)); memset(_trackName, 0, sizeof(_trackName)); memset(_sceneTracksCurrentTrack, 0, sizeof(_sceneTracksCurrentTrack)); @@ -192,6 +195,7 @@ FullpipeEngine::~FullpipeEngine() { delete _rnd; delete _console; delete _globalMessageQueueList; + delete _sceneTrackHandle; } void FullpipeEngine::initialize() { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 7f20a6d6af..fba61aa13b 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -30,8 +30,6 @@ #include "common/savefile.h" #include "common/system.h" -#include "audio/mixer.h" - #include "graphics/transparent_surface.h" #include "engines/engine.h" @@ -41,6 +39,10 @@ struct ADGameDescription; +namespace Audio { +class SoundHandle; +} + namespace Fullpipe { enum FullpipeGameFeatures { @@ -312,7 +314,7 @@ public: void lift_openLift(); GameVar *_musicGameVar; - Audio::SoundHandle _sceneTrackHandle; + Audio::SoundHandle *_sceneTrackHandle; public: diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 1a61cb742a..9cf18f3cc2 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -855,9 +855,9 @@ Common::Array<MovItem *> *MovGraph::getPaths(StaticANIObject *ani, int x, int y, if (sz > 0) { for (int j = 0; j < sz; j++) _items[idx]->movitems->push_back(movitems[j]); - - delete movitems; } + + delete movitems; } delete movarr; diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 230d6c39a9..c82c2c414c 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -30,6 +30,7 @@ #include "fullpipe/statics.h" #include "common/memstream.h" +#include "audio/mixer.h" #include "audio/audiostream.h" #include "audio/decoders/vorbis.h" #include "audio/decoders/wave.h" @@ -96,12 +97,13 @@ Sound::Sound() { memset(_directSoundBuffers, 0, sizeof(_directSoundBuffers)); _description = 0; _volume = 100; + _handle = new Audio::SoundHandle(); } Sound::~Sound() { freeSound(); - free(_description); + delete _handle; } bool Sound::load(MfcArchive &file, NGIArchive *archive) { @@ -206,14 +208,14 @@ void Sound::setPanAndVolumeByStaticAni() { } void Sound::setPanAndVolume(int vol, int pan) { - g_fp->_mixer->setChannelVolume(_handle, vol / 39); // 0..10000 - g_fp->_mixer->setChannelBalance(_handle, pan / 78); // -10000..10000 + g_fp->_mixer->setChannelVolume(*_handle, vol / 39); // 0..10000 + g_fp->_mixer->setChannelBalance(*_handle, pan / 78); // -10000..10000 } void Sound::play(int flag) { - Audio::SoundHandle handle = getHandle(); + Audio::SoundHandle *handle = getHandle(); - if (g_fp->_mixer->isSoundHandleActive(handle)) + if (g_fp->_mixer->isSoundHandleActive(*handle)) return; byte *soundData = loadData(); @@ -221,7 +223,7 @@ void Sound::play(int flag) { Audio::RewindableAudioStream *wav = Audio::makeWAVStream(dataStream, DisposeAfterUse::YES); Audio::AudioStream *audioStream = new Audio::LoopingAudioStream(wav, (flag == 1) ? 0 : 1); - g_fp->_mixer->playStream(Audio::Mixer::kSFXSoundType, &handle, audioStream); + g_fp->_mixer->playStream(Audio::Mixer::kSFXSoundType, handle, audioStream); } void Sound::freeSound() { @@ -231,11 +233,11 @@ void Sound::freeSound() { } int Sound::getVolume() { - return g_fp->_mixer->getChannelVolume(_handle) * 39; // 0..10000 + return g_fp->_mixer->getChannelVolume(*_handle) * 39; // 0..10000 } void Sound::stop() { - g_fp->_mixer->stopHandle(_handle); + g_fp->_mixer->stopHandle(*_handle); } void FullpipeEngine::setSceneMusicParameters(GameVar *gvar) { @@ -353,7 +355,7 @@ void FullpipeEngine::startSoundStream1(char *trackName) { stopAllSoundStreams(); #ifdef USE_VORBIS - if (_mixer->isSoundHandleActive(_sceneTrackHandle)) + if (_mixer->isSoundHandleActive(*_sceneTrackHandle)) return; Common::File *track = new Common::File(); @@ -363,7 +365,7 @@ void FullpipeEngine::startSoundStream1(char *trackName) { return; } Audio::RewindableAudioStream *ogg = Audio::makeVorbisStream(track, DisposeAfterUse::YES); - _mixer->playStream(Audio::Mixer::kMusicSoundType, &_sceneTrackHandle, ogg); + _mixer->playStream(Audio::Mixer::kMusicSoundType, _sceneTrackHandle, ogg); #endif } diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h index 14e766f5bb..983f28312b 100644 --- a/engines/fullpipe/sound.h +++ b/engines/fullpipe/sound.h @@ -23,6 +23,10 @@ #ifndef FULLPIPE_SOUND_H #define FULLPIPE_SOUND_H +namespace Audio { +class SoundHandle; +} + namespace Fullpipe { class Sound : public MemoryObject { @@ -31,7 +35,7 @@ class Sound : public MemoryObject { int _directSoundBuffer; int _directSoundBuffers[7]; byte *_soundData; - Audio::SoundHandle _handle; + Audio::SoundHandle *_handle; int _volume; public: @@ -45,7 +49,7 @@ public: virtual bool load(MfcArchive &file) { assert(0); return false; } // Disable base class void updateVolume(); int getId() const { return _id; } - Audio::SoundHandle getHandle() const { return _handle; } + Audio::SoundHandle *getHandle() const { return _handle; } void play(int flag); void freeSound(); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 8ee3b14d0c..36fbb73037 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1576,6 +1576,9 @@ Movement::Movement(Movement *src, int *oldIdxs, int newSize, StaticANIObject *an _m2x = 0; _m2y = 0; + _counter = 0; + _counterMax = 0; + _field_78 = 0; _framePosOffsets = 0; _field_84 = 0; diff --git a/engines/gob/detection/tables_fascin.h b/engines/gob/detection/tables_fascin.h index 7c7c9a7a2f..92272e9852 100644 --- a/engines/gob/detection/tables_fascin.h +++ b/engines/gob/detection/tables_fascin.h @@ -187,6 +187,20 @@ kFeaturesCD, "intro.stk", 0, 0 }, +{ // From bug #7069 + { + "fascination", + "", + AD_ENTRY1s("disk0.stk", "fbf73d7919e1a6752d924eccc14838d7", 190498), + ES_ESP, + kPlatformDOS, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesNone, + "disk0.stk", 0, 0 +}, // -- Amiga -- diff --git a/engines/gob/detection/tables_playtoons.h b/engines/gob/detection/tables_playtoons.h index f249e3ffa6..e495db9e25 100644 --- a/engines/gob/detection/tables_playtoons.h +++ b/engines/gob/detection/tables_playtoons.h @@ -222,6 +222,24 @@ kFeatures640x480, "intro2.stk", 0, 0 }, +{ // Version 1.002. Bug #7052 + { + "playtoons2", + "", + { + {"playtoon.stk", 0, "8c98e9a11be9bb203a55e8c6e68e519b", 25574338}, + {"spirou.stk", 0, "91080dc148de1bbd6a97321c1a1facf3", 9817086}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformDOS, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, { { "playtoons2", diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 24bdb858d8..b51a6382e6 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -26,6 +26,7 @@ #include "base/plugins.h" #include "common/config-manager.h" #include "audio/mididrv.h" +#include "audio/mixer.h" #include "gui/gui-manager.h" #include "gui/dialog.h" @@ -296,9 +297,7 @@ Common::Error GobEngine::run() { if (isCD()) checkCD(); - int cd_num = ConfMan.getInt("cdrom"); - if (cd_num >= 0) - _system->getAudioCDManager()->openCD(cd_num); + _system->getAudioCDManager()->open(); _global->_debugFlag = 1; _video->_doRangeClamp = true; diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp index 45f573efcd..13d24dc05d 100644 --- a/engines/gob/inter_playtoons.cpp +++ b/engines/gob/inter_playtoons.cpp @@ -41,7 +41,6 @@ #include "gob/video.h" #include "gob/videoplayer.h" #include "gob/save/saveload.h" -#include "gob/sound/sound.h" namespace Gob { diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 3aa7ad1664..4b58819c01 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -26,9 +26,6 @@ #include "gui/message.h" -#include "audio/mixer.h" -#include "audio/mods/infogrames.h" - #include "gob/gob.h" #include "gob/inter.h" #include "gob/global.h" diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index 656ca6f5c3..d379d5ab11 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -205,7 +205,7 @@ void Inter_v4::o4_playVmdOrMusic() { return; } else if (props.lastFrame == -9) { _vm->_sound->bgStop(); - _vm->_sound->bgSetPlayMode(BackgroundAtmosphere::kPlayModeRandom); + _vm->_sound->bgSetPlayMode(Sound::kPlayModeRandom); _vm->_sound->bgPlay(file.c_str(), "SND", SOUND_SND, props.palStart); return; } else if (props.lastFrame < 0) { diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index a6e4da75e7..50910e77bd 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -30,8 +30,6 @@ #include "gob/anifile.h" #include "gob/aniobject.h" -#include "gob/sound/sound.h" - #include "gob/pregob/txtfile.h" #include "gob/pregob/gctfile.h" diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index 021cf2b3d6..108771a63a 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -29,14 +29,14 @@ #include "gob/util.h" #include "gob/aniobject.h" -#include "gob/sound/sounddesc.h" - #include "gob/pregob/txtfile.h" namespace Gob { class GobEngine; +class ANIFile; class Surface; +class SoundDesc; class GCTFile; diff --git a/engines/gob/sound/adlib.h b/engines/gob/sound/adlib.h index d60458295c..9d6b3053b6 100644 --- a/engines/gob/sound/adlib.h +++ b/engines/gob/sound/adlib.h @@ -25,7 +25,6 @@ #include "common/mutex.h" -#include "audio/audiostream.h" #include "audio/mixer.h" namespace OPL { diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp index 21fb70278a..c7be1be96a 100644 --- a/engines/gob/sound/bgatmosphere.cpp +++ b/engines/gob/sound/bgatmosphere.cpp @@ -23,6 +23,7 @@ #include "common/array.h" #include "gob/sound/bgatmosphere.h" +#include "gob/sound/sound.h" #include "gob/sound/sounddesc.h" namespace Gob { @@ -30,7 +31,7 @@ namespace Gob { BackgroundAtmosphere::BackgroundAtmosphere(Audio::Mixer &mixer) : SoundMixer(mixer, Audio::Mixer::kMusicSoundType), _rnd("gobBA") { - _playMode = kPlayModeLinear; + _playMode = Sound::kPlayModeLinear; _queuePos = -1; _shaded = false; _shadable = true; @@ -56,7 +57,7 @@ void BackgroundAtmosphere::stopBA() { SoundMixer::stop(0); } -void BackgroundAtmosphere::setPlayMode(PlayMode mode) { +void BackgroundAtmosphere::setPlayMode(Sound::BackgroundPlayMode mode) { _playMode = mode; } @@ -100,11 +101,11 @@ void BackgroundAtmosphere::getNextQueuePos() { switch (_playMode) { - case kPlayModeLinear: + case Sound::kPlayModeLinear: _queuePos = (_queuePos + 1) % _queue.size(); break; - case kPlayModeRandom: + case Sound::kPlayModeRandom: _queuePos = _rnd.getRandomNumber(_queue.size() - 1); break; diff --git a/engines/gob/sound/bgatmosphere.h b/engines/gob/sound/bgatmosphere.h index 1cfc63c79a..138b65a1c1 100644 --- a/engines/gob/sound/bgatmosphere.h +++ b/engines/gob/sound/bgatmosphere.h @@ -23,31 +23,30 @@ #ifndef GOB_SOUND_BGATMOSPHERE_H #define GOB_SOUND_BGATMOSPHERE_H -#include "audio/mixer.h" #include "common/array.h" #include "common/mutex.h" #include "common/random.h" +#include "gob/sound/sound.h" #include "gob/sound/soundmixer.h" +namespace Audio { +class Mixer; +} + namespace Gob { class SoundDesc; class BackgroundAtmosphere : private SoundMixer { public: - enum PlayMode { - kPlayModeLinear, - kPlayModeRandom - }; - BackgroundAtmosphere(Audio::Mixer &mixer); ~BackgroundAtmosphere(); void playBA(); void stopBA(); - void setPlayMode(PlayMode mode); + void setPlayMode(Sound::BackgroundPlayMode mode); void queueSample(SoundDesc &sndDesc); void queueClear(); @@ -57,7 +56,7 @@ public: void unshade(); private: - PlayMode _playMode; + Sound::BackgroundPlayMode _playMode; Common::Array<SoundDesc *> _queue; int _queuePos; diff --git a/engines/gob/sound/pcspeaker.cpp b/engines/gob/sound/pcspeaker.cpp index d0dcb9a871..7ba9fa75df 100644 --- a/engines/gob/sound/pcspeaker.cpp +++ b/engines/gob/sound/pcspeaker.cpp @@ -20,6 +20,7 @@ * */ +#include "audio/softsynth/pcspk.h" #include "gob/sound/pcspeaker.h" namespace Gob { diff --git a/engines/gob/sound/pcspeaker.h b/engines/gob/sound/pcspeaker.h index ba2e00ce3e..2c3a12a168 100644 --- a/engines/gob/sound/pcspeaker.h +++ b/engines/gob/sound/pcspeaker.h @@ -24,7 +24,10 @@ #define GOB_SOUND_PCSPEAKER_H #include "audio/mixer.h" -#include "audio/softsynth/pcspk.h" + +namespace Audio { +class PCSpeaker; +} namespace Gob { diff --git a/engines/gob/sound/protracker.cpp b/engines/gob/sound/protracker.cpp index ce29100b85..7cf8dbb37c 100644 --- a/engines/gob/sound/protracker.cpp +++ b/engines/gob/sound/protracker.cpp @@ -22,6 +22,7 @@ #include "common/file.h" +#include "audio/audiostream.h" #include "audio/mods/protracker.h" #include "gob/sound/protracker.h" diff --git a/engines/gob/sound/protracker.h b/engines/gob/sound/protracker.h index ccd0d51552..17d909346e 100644 --- a/engines/gob/sound/protracker.h +++ b/engines/gob/sound/protracker.h @@ -24,7 +24,10 @@ #define GOB_SOUND_PROTRACKER_H #include "audio/mixer.h" -#include "audio/audiostream.h" + +namespace Audio { +class AudioStream; +} namespace Gob { diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 22dfe9d3c3..000eafa031 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -28,6 +28,7 @@ #include "gob/game.h" #include "gob/inter.h" +#include "gob/sound/bgatmosphere.h" #include "gob/sound/pcspeaker.h" #include "gob/sound/soundblaster.h" #include "gob/sound/adlplayer.h" @@ -717,7 +718,7 @@ void Sound::bgStop() { _bgatmos->queueClear(); } -void Sound::bgSetPlayMode(BackgroundAtmosphere::PlayMode mode) { +void Sound::bgSetPlayMode(Sound::BackgroundPlayMode mode) { if (!_bgatmos) return; diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h index 6ebc323b18..f1fd46d24b 100644 --- a/engines/gob/sound/sound.h +++ b/engines/gob/sound/sound.h @@ -23,12 +23,13 @@ #ifndef GOB_SOUND_SOUND_H #define GOB_SOUND_SOUND_H +#include "common/str.h" #include "gob/sound/sounddesc.h" -#include "gob/sound/bgatmosphere.h" namespace Gob { class GobEngine; +class BackgroundAtmosphere; class PCSpeaker; class SoundBlaster; class ADLPlayer; @@ -39,6 +40,11 @@ class CDROM; class Sound { public: + enum BackgroundPlayMode { + kPlayModeLinear, + kPlayModeRandom + }; + static const int kSoundsCount = 60; Sound(GobEngine *vm); @@ -135,7 +141,7 @@ public: void bgPlay(const char *base, const char *ext, SoundType type, int count); void bgStop(); - void bgSetPlayMode(BackgroundAtmosphere::PlayMode mode); + void bgSetPlayMode(BackgroundPlayMode mode); void bgShade(); void bgUnshade(); diff --git a/engines/gob/sound/soundblaster.h b/engines/gob/sound/soundblaster.h index 6a732dbec9..8abed62019 100644 --- a/engines/gob/sound/soundblaster.h +++ b/engines/gob/sound/soundblaster.h @@ -24,10 +24,13 @@ #define GOB_SOUND_SOUNDBLASTER_H #include "common/mutex.h" -#include "audio/mixer.h" #include "gob/sound/soundmixer.h" +namespace Audio { +class Mixer; +} + namespace Gob { class SoundDesc; diff --git a/engines/gob/sound/sounddesc.cpp b/engines/gob/sound/sounddesc.cpp index f981d0b385..d56387078a 100644 --- a/engines/gob/sound/sounddesc.cpp +++ b/engines/gob/sound/sounddesc.cpp @@ -24,7 +24,6 @@ #include "common/memstream.h" #include "common/textconsole.h" -#include "audio/mixer.h" #include "audio/decoders/raw.h" #include "audio/decoders/wave.h" diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index e97848d27e..bbf4ef4162 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -21,6 +21,8 @@ */ +#include "video/coktel_decoder.h" + #include "gob/videoplayer.h" #include "gob/global.h" #include "gob/dataio.h" diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index 02ed510ec5..1c39ecf2fa 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -29,11 +29,14 @@ #include "common/str.h" #include "graphics/surface.h" -#include "video/coktel_decoder.h" #include "gob/util.h" #include "gob/draw.h" +namespace Video { +class CoktelDecoder; +} + namespace Gob { class GobEngine; diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 2021cef6e8..ac77ec3099 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -20,9 +20,6 @@ * */ -#include "audio/mididrv.h" -#include "audio/mixer.h" - #include "groovie/groovie.h" #include "groovie/cursor.h" #include "groovie/detection.h" @@ -257,11 +254,7 @@ Common::Error GroovieEngine::run() { // the same cd if (getPlatform() != Common::kPlatformIOS) { checkCD(); - - // Initialize the CD - int cd_num = ConfMan.getInt("cdrom"); - if (cd_num >= 0) - _system->getAudioCDManager()->openCD(cd_num); + _system->getAudioCDManager()->open(); } while (!shouldQuit()) { diff --git a/engines/groovie/music.h b/engines/groovie/music.h index dcb91d42a8..c549527c77 100644 --- a/engines/groovie/music.h +++ b/engines/groovie/music.h @@ -25,6 +25,8 @@ #include "common/array.h" #include "common/mutex.h" +#include "audio/mididrv.h" +#include "audio/mixer.h" class MidiParser; diff --git a/engines/groovie/player.cpp b/engines/groovie/player.cpp index c1b90fbd2c..dea32386f2 100644 --- a/engines/groovie/player.cpp +++ b/engines/groovie/player.cpp @@ -21,6 +21,7 @@ */ #include "common/debug.h" +#include "audio/audiostream.h" #include "groovie/player.h" #include "groovie/groovie.h" diff --git a/engines/groovie/player.h b/engines/groovie/player.h index b1aac963f2..952d3ac208 100644 --- a/engines/groovie/player.h +++ b/engines/groovie/player.h @@ -24,7 +24,10 @@ #define GROOVIE_PLAYER_H #include "common/system.h" -#include "audio/audiostream.h" + +namespace Audio { +class QueuingAudioStream; +} namespace Groovie { diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index f14cacd6b8..c1b6c44c4d 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -40,6 +40,7 @@ // Required for the YUV to RGB conversion #include "graphics/conversion.h" #endif +#include "audio/audiostream.h" #include "audio/mixer.h" #include "audio/decoders/raw.h" diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index eef97b6ff9..47fdaacf7a 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -21,7 +21,6 @@ */ #include "audio/mididrv.h" -#include "audio/mixer.h" #include "groovie/script.h" #include "groovie/cell.h" diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp index 09c2e0d3ea..94b6aa0680 100644 --- a/engines/groovie/vdx.cpp +++ b/engines/groovie/vdx.cpp @@ -28,6 +28,7 @@ #include "common/debug.h" #include "common/debug-channels.h" #include "common/textconsole.h" +#include "audio/audiostream.h" #include "audio/mixer.h" #include "audio/decoders/raw.h" #include "graphics/palette.h" diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h index b782d103a8..30140baa2e 100644 --- a/engines/hopkins/hopkins.h +++ b/engines/hopkins/hopkins.h @@ -48,7 +48,6 @@ #include "common/util.h" #include "engines/engine.h" #include "graphics/surface.h" -#include "gui/debugger.h" /** * This is the namespace of the Hopkins engine. diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index 6660233740..3030636a59 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -26,6 +26,8 @@ #include "hopkins/hopkins.h" #include "audio/decoders/adpcm_intern.h" +#include "audio/decoders/wave.h" +#include "audio/softsynth/pcspk.h" #include "common/system.h" #include "common/config-manager.h" #include "common/file.h" diff --git a/engines/hopkins/sound.h b/engines/hopkins/sound.h index 1fb4f9ae71..49c5846198 100644 --- a/engines/hopkins/sound.h +++ b/engines/hopkins/sound.h @@ -25,10 +25,16 @@ #include "common/scummsys.h" #include "common/str.h" -#include "audio/audiostream.h" -#include "audio/decoders/wave.h" #include "audio/mixer.h" +namespace Audio { +class RewindableAudioStream; +} + +namespace Common { +class SeekableReadStream; +} + namespace Hopkins { class VoiceItem { diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp index 8b145b78d8..c741c6a837 100644 --- a/engines/hugo/dialogs.cpp +++ b/engines/hugo/dialogs.cpp @@ -26,7 +26,8 @@ #include "image/bmp.h" #include "hugo/hugo.h" -#include "hugo/display.h" +#include "hugo/dialogs.h" +#include "hugo/file.h" #include "hugo/parser.h" #include "hugo/schedule.h" #include "hugo/sound.h" diff --git a/engines/hugo/dialogs.h b/engines/hugo/dialogs.h index 55bb8f9fd0..aebbeee8c1 100644 --- a/engines/hugo/dialogs.h +++ b/engines/hugo/dialogs.h @@ -28,6 +28,8 @@ namespace Hugo { +class HugoEngine; + enum MenuOption { kMenuWhat = 0, kMenuMusic, diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index a8a22fb4b9..17627608bd 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -37,6 +37,7 @@ #include "hugo/hugo.h" #include "hugo/display.h" +#include "hugo/file.h" #include "hugo/inventory.h" #include "hugo/util.h" #include "hugo/object.h" diff --git a/engines/hugo/display.h b/engines/hugo/display.h index e152a7f868..99fda0a638 100644 --- a/engines/hugo/display.h +++ b/engines/hugo/display.h @@ -30,6 +30,11 @@ #ifndef HUGO_DISPLAY_H #define HUGO_DISPLAY_H +namespace Common { +class ReadStream; +class WriteStream; +} + namespace Hugo { enum OverlayState {kOvlUndef, kOvlForeground, kOvlBackground}; // Overlay state diff --git a/engines/hugo/file.h b/engines/hugo/file.h index d43528f0f8..731eb70a35 100644 --- a/engines/hugo/file.h +++ b/engines/hugo/file.h @@ -30,6 +30,8 @@ #ifndef HUGO_FILE_H #define HUGO_FILE_H +#include "common/file.h" + namespace Hugo { /** * Enumerate overlay file types diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 8f89832f6b..267eb08436 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -29,7 +29,10 @@ #include "common/textconsole.h" #include "hugo/hugo.h" +#include "hugo/console.h" +#include "hugo/dialogs.h" #include "hugo/file.h" +#include "hugo/game.h" #include "hugo/schedule.h" #include "hugo/display.h" #include "hugo/mouse.h" diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index cc0fcc6ec2..27dfea8725 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -24,19 +24,16 @@ #define HUGO_H #include "engines/engine.h" -#include "common/file.h" -#include "hugo/console.h" -#include "hugo/dialogs.h" // This include is here temporarily while the engine is being refactored. #include "hugo/game.h" -#include "hugo/file.h" #define HUGO_DAT_VER_MAJ 0 // 1 byte #define HUGO_DAT_VER_MIN 42 // 1 byte #define DATAALIGNMENT 4 namespace Common { +class SeekableReadStream; class RandomSource; } @@ -209,6 +206,8 @@ class SoundHandler; class IntroHandler; class ObjectHandler; class TextHandler; +class TopMenu; +class HugoConsole; class HugoEngine : public Engine { public: diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp index 26ef65edf8..e15291e03b 100644 --- a/engines/hugo/intro.cpp +++ b/engines/hugo/intro.cpp @@ -29,9 +29,13 @@ #include "common/system.h" #include "common/textconsole.h" +#include "graphics/font.h" +#include "graphics/pixelformat.h" #include "hugo/hugo.h" #include "hugo/intro.h" +#include "hugo/file.h" +#include "hugo/game.h" #include "hugo/util.h" #include "hugo/display.h" #include "hugo/sound.h" diff --git a/engines/hugo/intro.h b/engines/hugo/intro.h index 7af53c8922..d40cffbfaf 100644 --- a/engines/hugo/intro.h +++ b/engines/hugo/intro.h @@ -29,6 +29,7 @@ #ifndef INTRO_H #define INTRO_H +#include "graphics/surface.h" #include "graphics/fonts/winfont.h" namespace Hugo { diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index 3674c90757..8c0ba12f8f 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -33,6 +33,7 @@ #include "common/system.h" #include "hugo/hugo.h" +#include "hugo/dialogs.h" #include "hugo/game.h" #include "hugo/mouse.h" #include "hugo/schedule.h" diff --git a/engines/hugo/mouse.h b/engines/hugo/mouse.h index f9d547ec86..0bfa1b0db4 100644 --- a/engines/hugo/mouse.h +++ b/engines/hugo/mouse.h @@ -29,6 +29,13 @@ #ifndef HUGO_MOUSE_H #define HUGO_MOUSE_H + +#include "hugo/game.h" + +namespace Common { +class ReadStream; +} + namespace Hugo { class MouseHandler { diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index 998dd5df58..7ee0198882 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -29,12 +29,12 @@ #include "common/events.h" #include "common/textconsole.h" +#include "gui/debugger.h" #include "hugo/hugo.h" #include "hugo/display.h" #include "hugo/parser.h" #include "hugo/file.h" -#include "hugo/schedule.h" #include "hugo/util.h" #include "hugo/route.h" #include "hugo/sound.h" diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h index 5a2ac7d375..dfdd984832 100644 --- a/engines/hugo/parser.h +++ b/engines/hugo/parser.h @@ -32,6 +32,7 @@ namespace Common { struct Event; +class ReadStream; } namespace Hugo { diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp index 8591709dc3..09de256789 100644 --- a/engines/hugo/sound.cpp +++ b/engines/hugo/sound.cpp @@ -37,6 +37,7 @@ #include "audio/decoders/raw.h" #include "audio/audiostream.h" #include "audio/midiparser.h" +#include "audio/softsynth/pcspk.h" #include "hugo/hugo.h" #include "hugo/game.h" diff --git a/engines/hugo/sound.h b/engines/hugo/sound.h index 6c3420918d..a623569a8b 100644 --- a/engines/hugo/sound.h +++ b/engines/hugo/sound.h @@ -32,7 +32,10 @@ #include "audio/mixer.h" #include "audio/midiplayer.h" -#include "audio/softsynth/pcspk.h" + +namespace Audio { +class PCSpeaker; +} namespace Hugo { diff --git a/engines/hugo/text.cpp b/engines/hugo/text.cpp index 50b2b64260..617fccc36d 100644 --- a/engines/hugo/text.cpp +++ b/engines/hugo/text.cpp @@ -20,6 +20,7 @@ * */ #include "common/system.h" +#include "common/stream.h" #include "hugo/hugo.h" #include "hugo/text.h" diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp index 7b75bf2bc5..bc1525382c 100644 --- a/engines/hugo/util.cpp +++ b/engines/hugo/util.cpp @@ -28,13 +28,11 @@ */ #include "common/system.h" +#include "common/util.h" #include "gui/message.h" -#include "hugo/game.h" -#include "hugo/hugo.h" +#include "hugo/dialogs.h" #include "hugo/util.h" -#include "hugo/sound.h" -#include "hugo/text.h" namespace Hugo { diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index 6683f973ca..614d23f70e 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -31,8 +31,6 @@ #include "common/system.h" #include "common/config-manager.h" -#include "gui/message.h" - namespace Kyra { Debugger::Debugger(KyraEngine_v1 *vm) diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp index 38a5ab8440..2264d99dde 100644 --- a/engines/kyra/eobcommon.cpp +++ b/engines/kyra/eobcommon.cpp @@ -24,7 +24,8 @@ #include "kyra/kyra_rpg.h" #include "kyra/resource.h" -#include "kyra/sound_intern.h" +#include "engines/kyra/sound.h" +#include "engines/kyra/sound_adlib.h" #include "kyra/script_eob.h" #include "kyra/timer.h" #include "kyra/debugger.h" @@ -32,9 +33,6 @@ #include "common/config-manager.h" #include "common/translation.h" -#include "audio/mididrv.h" -#include "audio/mixer.h" - #include "backends/keymapper/keymapper.h" namespace Kyra { diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index 80511c674d..118ca8dfaa 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -33,8 +33,6 @@ #include "common/config-manager.h" #include "common/debug-channels.h" -#include "gui/message.h" - namespace Kyra { KyraEngine_LoK::KyraEngine_LoK(OSystem *system, const GameFlags &flags) diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 925dcf7bfe..106420d9c2 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -46,6 +46,8 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi memset(&_sceneScriptState, 0, sizeof(_sceneScriptState)); memset(&_sceneScriptData, 0, sizeof(_sceneScriptData)); + Common::fill(_sceneSpecialScriptsTimer, ARRAYEND(_sceneSpecialScriptsTimer), 0); + _animObjects = 0; _runFlag = true; diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index e060b307af..af58397200 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -463,6 +463,7 @@ private: const uint8 *_musicTrackMap; const uint16 *_ingameSoundIndex; + int _ingameSoundIndexSize; const uint8 *_ingameGMSoundIndex; int _ingameGMSoundIndexSize; const uint8 *_ingameMT32SoundIndex; diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 3ab08a4c7c..c3ebf6e5fe 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -203,7 +203,6 @@ enum KyraResources { k1ConfigStrings, k1AudioTracks, - k1AudioTracks2, k1AudioTracksIntro, k1CreditsStrings, diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp index 1d741d8bd0..1703fb904e 100644 --- a/engines/kyra/sound_adlib.cpp +++ b/engines/kyra/sound_adlib.cpp @@ -44,15 +44,17 @@ #include "common/mutex.h" #include "common/config-manager.h" -#include "audio/mixer.h" #include "audio/fmopl.h" -#include "audio/audiostream.h" // Basic AdLib Programming: // http://www.gamedev.net/reference/articles/article446.asp #define CALLBACKS_PER_SECOND 72 +namespace Audio { +class Mixer; +} + namespace Kyra { class AdLibDriver { diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp index 8be0cb6ab9..6e7551ed0e 100644 --- a/engines/kyra/sound_lol.cpp +++ b/engines/kyra/sound_lol.cpp @@ -161,7 +161,7 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) { return; _lastSfxTrack = track; - if (track == -1 || track >= _ingameSoundListSize) + if (track == -1 || track >= _ingameSoundIndexSize) return; volume &= 0xFF; @@ -216,10 +216,10 @@ bool LoLEngine::snd_processEnvironmentalSoundEffect(int soundId, int block) { for (int i = 3; i > 0; i--) { int dir = calcMonsterDirection(cbl & 0x1F, cbl >> 5, block & 0x1F, block >> 5); cbl = (cbl + blockShiftTable[dir]) & 0x3FF; - if (cbl != block) { - if (testWallFlag(cbl, 0, 1)) - _environmentSfxVol >>= 1; - } + if (cbl == block) + break; + if (testWallFlag(cbl, 0, 1)) + _environmentSfxVol >>= 1; } } diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index 65ab4f31ef..646f908b94 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -68,11 +68,14 @@ bool SoundTowns::init() { _player->driver()->intf()->callback(70, 0x33);*/ _player->driver()->setOutputVolume(1, 118, 118); + // Initialize CD for audio + g_system->getAudioCDManager()->open(); + return true; } void SoundTowns::process() { - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } void SoundTowns::playTrack(uint8 track) { @@ -95,7 +98,7 @@ void SoundTowns::playTrack(uint8 track) { if (_musicEnabled == 2 && trackNum != -1) { _player->driver()->setOutputVolume(1, 118, 118); g_system->getAudioCDManager()->play(trackNum + 1, loop ? -1 : 1, 0, 0); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); _cdaPlaying = true; } else if (_musicEnabled) { playEuphonyTrack(READ_LE_UINT32(&res()->cdaTable[tTableIndex]), loop); @@ -108,7 +111,7 @@ void SoundTowns::playTrack(uint8 track) { void SoundTowns::haltTrack() { _lastTrack = -1; g_system->getAudioCDManager()->stop(); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); _cdaPlaying = false; for (int i = 0; i < 6; i++) @@ -407,6 +410,10 @@ bool SoundPC98::init() { _driver = new TownsPC98_AudioDriver(_mixer, TownsPC98_AudioDriver::kType26); bool reslt = _driver->init(); updateVolumeSettings(); + + // Initialize CD for audio + g_system->getAudioCDManager()->open(); + return reslt; } @@ -471,7 +478,7 @@ void SoundPC98::playTrack(uint8 track) { void SoundPC98::haltTrack() { _lastTrack = -1; g_system->getAudioCDManager()->stop(); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); _driver->reset(); } @@ -529,6 +536,10 @@ bool SoundTownsPC98_v2::init() { if (_resInfo[_currentResourceSet]) if (_resInfo[_currentResourceSet]->cdaTableSize) _vm->checkCD(); + + // Initialize CD for audio + bool hasRealCD = g_system->getAudioCDManager()->open(); + // FIXME: While checking for 'track1.XXX(X)' looks like // a good idea, we should definitely not be doing this // here. Basically our filenaming scheme could change @@ -538,7 +549,7 @@ bool SoundTownsPC98_v2::init() { // check if we have access to CD audio. Resource *r = _vm->resource(); if (_musicEnabled && - (r->exists("track1.mp3") || r->exists("track1.ogg") || r->exists("track1.flac") || r->exists("track1.fla") + (hasRealCD || r->exists("track1.mp3") || r->exists("track1.ogg") || r->exists("track1.flac") || r->exists("track1.fla") || r->exists("track01.mp3") || r->exists("track01.ogg") || r->exists("track01.flac") || r->exists("track01.fla"))) _musicEnabled = 2; else @@ -580,7 +591,7 @@ void SoundTownsPC98_v2::loadSoundFile(Common::String file) { } void SoundTownsPC98_v2::process() { - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } void SoundTownsPC98_v2::playTrack(uint8 track) { @@ -610,7 +621,7 @@ void SoundTownsPC98_v2::playTrack(uint8 track) { if (_musicEnabled == 2 && trackNum != -1) { g_system->getAudioCDManager()->play(trackNum+1, _driver->looping() ? -1 : 1, 0, 0); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } else if (_musicEnabled) { _driver->cont(); } @@ -621,7 +632,7 @@ void SoundTownsPC98_v2::playTrack(uint8 track) { void SoundTownsPC98_v2::haltTrack() { _lastTrack = -1; g_system->getAudioCDManager()->stop(); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); _driver->reset(); } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 1a2e2c093c..e99321ddcb 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -39,7 +39,7 @@ namespace Kyra { -#define RESFILE_VERSION 87 +#define RESFILE_VERSION 88 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { @@ -805,19 +805,11 @@ void KyraEngine_LoK::initStaticResource() { } // audio resource assignment - int size1, size2; - const char *const *soundfiles1 = _staticres->loadStrings(k1AudioTracks, size1); - const char *const *soundfiles2 = _staticres->loadStrings(k1AudioTracks2, size2); - int soundFilesSize = size1 + size2; + int soundFilesSize; + const char *const *soundFiles = _staticres->loadStrings(k1AudioTracks, soundFilesSize); int soundFilesIntroSize = 0; int cdaTableSize = 0; - const char **soundFiles = 0; - if (soundFilesSize) { - soundFiles = new const char*[soundFilesSize]; - for (int i = 0; i < soundFilesSize; i++) - soundFiles[i] = (i < size1) ? soundfiles1[i] : soundfiles2[i - size1]; - } const char *const *soundFilesIntro = _staticres->loadStrings(k1AudioTracksIntro, soundFilesIntroSize); const int32 *cdaTable = (const int32 *)_staticres->loadRawData(k1TownsCDATable, cdaTableSize); diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp index 9a4fc281d5..c40b4a0c7d 100644 --- a/engines/kyra/staticres_lol.cpp +++ b/engines/kyra/staticres_lol.cpp @@ -255,7 +255,7 @@ void LoLEngine::initStaticResource() { int tempSize; _pakFileList = _staticres->loadStrings(kLoLIngamePakFiles, _pakFileListSize); _charDefaults = _staticres->loadCharData(kLoLCharacterDefs, _charDefaultsSize); - _ingameSoundIndex = (const uint16 *)_staticres->loadRawData(kLoLIngameSfxIndex, tempSize); + _ingameSoundIndex = (const uint16 *)_staticres->loadRawData(kLoLIngameSfxIndex, _ingameSoundIndexSize); _musicTrackMap = _staticres->loadRawData(kLoLMusicTrackMap, tempSize); _ingameGMSoundIndex = _staticres->loadRawData(kLoLIngameGMSfxIndex, _ingameGMSoundIndexSize); _ingameMT32SoundIndex = _staticres->loadRawData(kLoLIngameMT32SfxIndex, _ingameMT32SoundIndexSize); diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp index f2e6992375..1190f0323b 100644 --- a/engines/lab/anim.cpp +++ b/engines/lab/anim.cpp @@ -28,6 +28,8 @@ * */ +#include "common/file.h" + #include "lab/lab.h" #include "lab/anim.h" diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index af235f234b..d642f2fed5 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -28,6 +28,7 @@ * */ +#include "common/file.h" #include "graphics/palette.h" #include "lab/lab.h" diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 6ba405380e..4f0a0da777 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -29,6 +29,7 @@ */ #include "common/config-manager.h" +#include "common/file.h" #include "gui/message.h" diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index 01e8cac401..0184ff7c69 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -28,6 +28,8 @@ * */ +#include "common/file.h" + #include "lab/lab.h" #include "lab/anim.h" diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index 9b0ebfc4e5..39b2feb93d 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -31,6 +31,7 @@ #include "common/config-manager.h" #include "common/debug-channels.h" #include "common/error.h" +#include "common/file.h" #include "engines/util.h" diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index 5c6bb07814..057cac3589 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -28,6 +28,8 @@ * */ +#include "common/file.h" + #include "lab/lab.h" #include "lab/dispman.h" diff --git a/engines/lab/music.cpp b/engines/lab/music.cpp index b58d6dc923..579f450456 100644 --- a/engines/lab/music.cpp +++ b/engines/lab/music.cpp @@ -28,6 +28,8 @@ * */ +#include "common/file.h" +#include "audio/audiostream.h" #include "audio/decoders/raw.h" #include "lab/lab.h" diff --git a/engines/lab/music.h b/engines/lab/music.h index 472fe4fef7..8175e350f1 100644 --- a/engines/lab/music.h +++ b/engines/lab/music.h @@ -31,9 +31,11 @@ #ifndef LAB_MUSIC_H #define LAB_MUSIC_H -#include "common/file.h" #include "audio/mixer.h" -#include "audio/audiostream.h" + +namespace Common { +class File; +} namespace Lab { diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp index aae369fbae..9cb35d1088 100644 --- a/engines/lab/resource.cpp +++ b/engines/lab/resource.cpp @@ -28,6 +28,8 @@ * */ +#include "common/file.h" + #include "lab/lab.h" #include "lab/dispman.h" diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 9f9b993afa..7c3cb39931 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -28,6 +28,8 @@ * */ +#include "common/file.h" + #include "lab/lab.h" #include "lab/anim.h" diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp index b628b8dfe7..1b51dd2006 100644 --- a/engines/lastexpress/entities/gendarmes.cpp +++ b/engines/lastexpress/entities/gendarmes.cpp @@ -174,7 +174,7 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, doCompartment, CarIndex, EntityPosition) strcat((char *)¶meters1->seq1, (char *)¶ms->seq1); strcat((char *)¶meters1->seq2, (char *)¶ms->seq1); - strcat((char *)¶meters1->seq3, (char *)¶ms->seq1); + Common::strlcat((char *)¶meters1->seq3, (char *)¶ms->seq1, 9); // Beware, seq3 is smaller than seq1 if ((getEntities()->isInsideCompartment(kEntityPlayer, (CarIndex)params->param1, (EntityPosition)params->param2) || getEntities()->isInsideCompartment(kEntityPlayer, (CarIndex)params->param1, (EntityPosition)parameters2->param7) diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp index 697e6e1269..7308214551 100644 --- a/engines/lastexpress/sound/entry.cpp +++ b/engines/lastexpress/sound/entry.cpp @@ -366,7 +366,7 @@ void SoundEntry::saveLoadWithSerializer(Common::Serializer &s) { assert(_name1.size() <= 16); assert(_name2.size() <= 16); - if (_name2.matchString("NISSND?") && (_status.status & kFlagType9) != kFlag3) { + if (_name2.matchString("NISSND?") && ((_status.status & kFlagType9) != kFlag3)) { s.syncAsUint32LE(_status.status); s.syncAsUint32LE(_type); s.syncAsUint32LE(_blockCount); // field_8; diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp index 38ca0ba54f..84cc91ec9a 100644 --- a/engines/lure/game.cpp +++ b/engines/lure/game.cpp @@ -538,7 +538,7 @@ void Game::handleRightClickMenu() { hotspot = res.getHotspot(room.hotspotId()); assert(hotspot); strings.getString(hotspot->nameId, statusLine); - strcat(statusLine, stringList.getString(S_FOR)); + Common::strlcat(statusLine, stringList.getString(S_FOR), MAX_DESC_SIZE); statusLine += strlen(statusLine); itemId = PopupMenu::ShowItems(GET, player->roomNumber()); @@ -549,7 +549,7 @@ void Game::handleRightClickMenu() { hotspot = res.getHotspot(room.hotspotId()); assert(hotspot); strings.getString(hotspot->nameId, statusLine); - strcat(statusLine, stringList.getString(S_TO)); + Common::strlcat(statusLine, stringList.getString(S_TO), MAX_DESC_SIZE); breakFlag = GetTellActions(); break; @@ -559,7 +559,7 @@ void Game::handleRightClickMenu() { case DRINK: hasItems = (res.numInventoryItems() != 0); if (!hasItems) - strcat(statusLine, stringList.getString(S_ACTION_NOTHING)); + Common::strlcat(statusLine, stringList.getString(S_ACTION_NOTHING), MAX_DESC_SIZE); statusLine += strlen(statusLine); room.update(); @@ -579,9 +579,9 @@ void Game::handleRightClickMenu() { assert(useHotspot); strings.getString(useHotspot->nameId, statusLine); if (action == GIVE) - strcat(statusLine, stringList.getString(S_TO)); + Common::strlcat(statusLine, stringList.getString(S_TO), MAX_DESC_SIZE); else - strcat(statusLine, stringList.getString(S_ON)); + Common::strlcat(statusLine, stringList.getString(S_ON), MAX_DESC_SIZE); statusLine += strlen(statusLine); } else if ((action == DRINK) || (action == EXAMINE)) @@ -762,11 +762,11 @@ bool Game::GetTellActions() { // Second parameter action = (Action) commands[_numTellCommands * 3]; if (action == ASK) - strcat(statusLine, stringList.getString(S_FOR)); + Common::strlcat(statusLine, stringList.getString(S_FOR), MAX_DESC_SIZE); else if (action == GIVE) - strcat(statusLine, stringList.getString(S_TO)); + Common::strlcat(statusLine, stringList.getString(S_TO), MAX_DESC_SIZE); else if (action == USE) - strcat(statusLine, stringList.getString(S_ON)); + Common::strlcat(statusLine, stringList.getString(S_ON), MAX_DESC_SIZE); else { // All other commads don't need a second parameter ++paramIndex; diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index fbf93e1e14..a972909b8b 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -1898,8 +1898,8 @@ void Hotspot::doStatus(HotspotData *hotspot) { endAction(); strings.getString(room.roomNumber(), buffer); - strcat(buffer, "\n\n"); - strcat(buffer, stringList.getString(S_YOU_ARE_CARRYING)); + Common::strlcat(buffer, "\n\n", MAX_DESC_SIZE); + Common::strlcat(buffer, stringList.getString(S_YOU_ARE_CARRYING), MAX_DESC_SIZE); // Scan through the list and add in any items assigned to the player HotspotDataList &list = res.hotspotData(); @@ -1909,25 +1909,25 @@ void Hotspot::doStatus(HotspotData *hotspot) { if (rec.roomNumber == PLAYER_ID) { if (numItems++ == 0) - strcat(buffer, ": "); + Common::strlcat(buffer, ": ", MAX_DESC_SIZE); else - strcat(buffer, ", "); + Common::strlcat(buffer, ", ", MAX_DESC_SIZE); strings.getString(rec.nameId, buffer + strlen(buffer)); } } // If there were no items, add in the word 'nothing' if (numItems == 0) - strcat(buffer, stringList.getString(S_INV_NOTHING)); + Common::strlcat(buffer, stringList.getString(S_INV_NOTHING), MAX_DESC_SIZE); // If the player has money, add it in uint16 numGroats = res.fieldList().numGroats(); if (numGroats > 0) { - strcat(buffer, "\n\n"); - strcat(buffer, stringList.getString(S_YOU_HAVE)); - sprintf(buffer + strlen(buffer), "%d", numGroats); - strcat(buffer, " "); - strcat(buffer, stringList.getString((numGroats == 1) ? S_GROAT : S_GROATS)); + Common::strlcat(buffer, "\n\n", MAX_DESC_SIZE); + Common::strlcat(buffer, stringList.getString(S_YOU_HAVE), MAX_DESC_SIZE); + snprintf(buffer + strlen(buffer), MAX_DESC_SIZE, "%d", numGroats); + Common::strlcat(buffer, " ", MAX_DESC_SIZE); + Common::strlcat(buffer, stringList.getString((numGroats == 1) ? S_GROAT : S_GROATS), MAX_DESC_SIZE); // Make sure we're not overrunning } // Display the dialog diff --git a/engines/lure/lure.h b/engines/lure/lure.h index b6eb9123ad..af00197c3f 100644 --- a/engines/lure/lure.h +++ b/engines/lure/lure.h @@ -25,7 +25,6 @@ #include "engines/engine.h" #include "common/rect.h" -#include "audio/mixer.h" #include "common/file.h" #include "common/savefile.h" #include "common/util.h" diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp index 3df119a9da..f7dc06033a 100644 --- a/engines/lure/scripts.cpp +++ b/engines/lure/scripts.cpp @@ -926,8 +926,8 @@ uint16 Script::execute(uint16 startOffset) { opcode >>= 1; if (gDebugLevel >= ERROR_DETAILED) - strcat(debugInfo, (opcode > S_OPCODE_RANDOM) ? "INVALID" : - scriptOpcodes[opcode]); + Common::strlcat(debugInfo, (opcode > S_OPCODE_RANDOM) ? "INVALID" : + scriptOpcodes[opcode], MAX_DESC_SIZE); if (hasParam) { // Flag to read next two bytes as active parameter @@ -1087,7 +1087,7 @@ uint16 Script::execute(uint16 startOffset) { else if (scriptMethodNames[param] == NULL) strcat(debugInfo, " UNKNOWN METHOD"); else { strcat(debugInfo, " "); - strcat(debugInfo, scriptMethodNames[param]); + Common::strlcat(debugInfo, scriptMethodNames[param], MAX_DESC_SIZE); } // Any params diff --git a/engines/made/database.cpp b/engines/made/database.cpp index 3eab31acc2..0020cb398c 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -40,6 +40,7 @@ namespace Made { */ Object::Object() : _objData(NULL), _freeData(false) { + _objSize = 0; } Object::~Object() { diff --git a/engines/made/made.cpp b/engines/made/made.cpp index ab07ef757b..a29aa2512f 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -58,18 +58,29 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng const GameSettings *g; + _eventNum = 0; + _eventMouseX = _eventMouseY = 0; + _eventKey = 0; + _autoStopSound = false; + _soundEnergyIndex = 0; + _soundEnergyArray = 0; + _musicBeatStart = 0; + _cdTimeStart = 0; + + _gameId = -1; + const char *gameid = ConfMan.get("gameid").c_str(); for (g = madeSettings; g->gameid; ++g) if (!scumm_stricmp(g->gameid, gameid)) _gameId = g->id; + assert(_gameId != -1); + _rnd = new Common::RandomSource("made"); _console = new MadeConsole(this); - int cd_num = ConfMan.getInt("cdrom"); - if (cd_num >= 0) - _system->getAudioCDManager()->openCD(cd_num); + _system->getAudioCDManager()->open(); _pmvPlayer = new PmvPlayer(this, _mixer); _res = new ResourceReader(); @@ -87,6 +98,8 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng _music = nullptr; + _soundRate = 0; + // Set default sound frequency switch (getGameID()) { case GID_RODNEY: @@ -270,7 +283,7 @@ void MadeEngine::handleEvents() { } } - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); } diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 453e2a4872..0beb132b93 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -223,7 +223,10 @@ bool PmvPlayer::play(const char *filename) { //delete _audioStream; delete _fd; - _surface->free(); + + if(_surface) + _surface->free(); + delete _surface; return !_aborted; diff --git a/engines/made/redreader.cpp b/engines/made/redreader.cpp index f92ffd8dd8..a0aaf7be43 100644 --- a/engines/made/redreader.cpp +++ b/engines/made/redreader.cpp @@ -102,7 +102,7 @@ int LzhDecompressor::decompress(Common::SeekableReadStream &source, byte *dest, int bufsize; byte* buffer; - buffer = (byte *) malloc(DICSIZ); + buffer = (byte *)calloc(DICSIZ, 1); _source = &source; _compSize = sourceLen; diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index f8e763e74e..a9734ed47d 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -43,6 +43,7 @@ Resource::~Resource() { PictureResource::PictureResource() : _picture(NULL), _picturePalette(NULL) { _hasPalette = false; + _paletteColorCount = 0; } PictureResource::~PictureResource() { @@ -182,6 +183,9 @@ void PictureResource::loadChunked(byte *source, int size) { /* AnimationResource */ AnimationResource::AnimationResource() { + _flags = 0; + _width = 0; + _height = 0; } AnimationResource::~AnimationResource() { diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index edccb68953..33edb3834c 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -91,6 +91,8 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _currentFontNum = 0; _fontDrawCtx.clipRect = Common::Rect(320, 200); _fontDrawCtx.destSurface = _backgroundScreen; + _outlineColor = 0; + _dropShadowColor = 0; clearChannels(); } diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp index ad49031e7b..62559efa84 100644 --- a/engines/made/sound.cpp +++ b/engines/made/sound.cpp @@ -155,6 +155,7 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou }; soundEnergyItem.position = 0; + memset(deltaSoundBuffer, 0, 1024); if (soundEnergyArray) soundEnergyArray->clear(); @@ -237,6 +238,7 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou break; default: + delete[] soundBuffer; return; } @@ -247,6 +249,9 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou // soundBuffer. soundBuffer[workChunkSize] = soundBuffer[workChunkSize - 1]; + for (i = 0; i < chunkSize; i++) + soundBuffer[i] = 0; + if (deltaType == 1) { for (i = 0; i < chunkSize - 1; i += 2) { l = i / 2; diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp index 740c19abad..b9731b1d31 100644 --- a/engines/mads/debugger.cpp +++ b/engines/mads/debugger.cpp @@ -158,7 +158,7 @@ bool Debugger::Cmd_ShowCodes(int argc, const char **argv) { Scene &scene = _vm->_game->_scene; // Copy the depth/walk surface to the background and flag for screen refresh - scene._depthSurface.copyTo(&scene._backgroundSurface); + scene._depthSurface.blitFrom(scene._backgroundSurface); scene._spriteSlots.fullRefresh(); // Draw the locations of scene nodes onto the background diff --git a/engines/mads/dialogs.cpp b/engines/mads/dialogs.cpp index d9a1e53964..fa656a90c1 100644 --- a/engines/mads/dialogs.cpp +++ b/engines/mads/dialogs.cpp @@ -54,21 +54,19 @@ Dialog::~Dialog() { void Dialog::save() { _savedSurface = new MSurface(_width, _height); - _vm->_screen.copyTo(_savedSurface, + _savedSurface->blitFrom(*_vm->_screen, Common::Rect(_position.x, _position.y, _position.x + _width, _position.y + _height), Common::Point()); - _vm->_screen.copyRectToScreen(getBounds()); +// _vm->_screen->copyRectToScreen(getBounds()); } void Dialog::restore() { if (_savedSurface) { - _savedSurface->copyTo(&_vm->_screen, _position); + _vm->_screen->blitFrom(*_savedSurface, _position); delete _savedSurface; _savedSurface = nullptr; - _vm->_screen.copyRectToScreen(getBounds()); - Common::copy(&_dialogPalette[0], &_dialogPalette[8 * 3], &_vm->_palette->_mainPalette[248 * 3]); _vm->_palette->setPalette(&_vm->_palette->_mainPalette[248 * 3], 248, 8); @@ -87,16 +85,16 @@ void Dialog::draw() { // Draw the dialog // Fill entire content of dialog Common::Rect bounds = getBounds(); - _vm->_screen.fillRect(bounds, TEXTDIALOG_BACKGROUND); + _vm->_screen->fillRect(bounds, TEXTDIALOG_BACKGROUND); // Draw the outer edge lines - _vm->_screen.hLine(_position.x + 1, _position.y + _height - 2, + _vm->_screen->hLine(_position.x + 1, _position.y + _height - 2, _position.x + _width - 2, TEXTDIALOG_EDGE); - _vm->_screen.hLine(_position.x, _position.y + _height - 1, + _vm->_screen->hLine(_position.x, _position.y + _height - 1, _position.x + _width - 1, TEXTDIALOG_EDGE); - _vm->_screen.vLine(_position.x + _width - 2, _position.y + 2, + _vm->_screen->vLine(_position.x + _width - 2, _position.y + 2, _position.y + _height - 2, TEXTDIALOG_EDGE); - _vm->_screen.vLine(_position.x + _width - 1, _position.y + 1, + _vm->_screen->vLine(_position.x + _width - 1, _position.y + 1, _position.y + _height - 1, TEXTDIALOG_EDGE); // Draw the gravelly dialog content @@ -125,8 +123,9 @@ void Dialog::calculateBounds() { void Dialog::drawContent(const Common::Rect &r, int seed, byte color1, byte color2) { uint16 currSeed = seed ? seed : 0xB78E; + Graphics::Surface dest = _vm->_screen->getSubArea(r); for (int yp = 0; yp < r.height(); ++yp) { - byte *destP = _vm->_screen.getBasePtr(r.left, r.top + yp); + byte *destP = (byte *)dest.getBasePtr(0, yp); for (int xp = 0; xp < r.width(); ++xp) { uint16 seedAdjust = currSeed; @@ -326,7 +325,7 @@ void TextDialog::draw() { for (int lineNum = 0; lineNum <= _numLines; ++lineNum) { if (_lineXp[lineNum] == -1) { // Draw a line across the entire dialog - _vm->_screen.hLine(_position.x + 2, + _vm->_screen->hLine(_position.x + 2, lineYp + (_font->getHeight() + 1) / 2, _position.x + _width - 4, TEXTDIALOG_BLACK); } else { @@ -336,21 +335,19 @@ void TextDialog::draw() { if (_lineXp[lineNum] & 0x40) ++yp; - _font->writeString(&_vm->_screen, _lines[lineNum], + _font->writeString(_vm->_screen, _lines[lineNum], Common::Point(xp, yp), 1); if (_lineXp[lineNum] & 0x80) { // Draw an underline under the text int lineWidth = _font->getWidth(_lines[lineNum], 1); - _vm->_screen.hLine(xp, yp + _font->getHeight(), xp + lineWidth, + _vm->_screen->hLine(xp, yp + _font->getHeight(), xp + lineWidth, TEXTDIALOG_BLACK); } } lineYp += _font->getHeight() + 1; } - - _vm->_screen.copyRectToScreen(getBounds()); } void TextDialog::calculateBounds() { @@ -360,10 +357,10 @@ void TextDialog::calculateBounds() { if (_position.y == -1) _position.y = 100 - (_height / 2); - if ((_position.x + _width) > _vm->_screen.getWidth()) - _position.x = _vm->_screen.getWidth() - (_position.x + _width); - if ((_position.y + _height) > _vm->_screen.getHeight()) - _position.y = _vm->_screen.getHeight() - (_position.y + _height); + if ((_position.x + _width) > _vm->_screen->w) + _position.x = _vm->_screen->w - (_position.x + _width); + if ((_position.y + _height) > _vm->_screen->h) + _position.y = _vm->_screen->h - (_position.y + _height); } void TextDialog::drawWithInput() { @@ -452,7 +449,7 @@ FullScreenDialog::FullScreenDialog(MADSEngine *vm) : _vm(vm) { } FullScreenDialog::~FullScreenDialog() { - _vm->_screen.resetClipBounds(); + _vm->_screen->resetClipBounds(); _vm->_game->_scene.restrictScene(); } @@ -491,16 +488,13 @@ void FullScreenDialog::display() { game._trigger = 0; // Clear the screen and draw the upper and lower horizontal lines - _vm->_screen.empty(); + _vm->_screen->clear(); _vm->_palette->setLowRange(); - _vm->_screen.hLine(0, 20, MADS_SCREEN_WIDTH, 2); - _vm->_screen.hLine(0, 179, MADS_SCREEN_WIDTH, 2); - _vm->_screen.resetClipBounds(); - _vm->_screen.copyRectToScreen(Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT)); + _vm->_screen->hLine(0, 20, MADS_SCREEN_WIDTH, 2); + _vm->_screen->hLine(0, 179, MADS_SCREEN_WIDTH, 2); // Restrict the screen to the area between the two lines - _vm->_screen.setClipBounds(Common::Rect(0, DIALOG_TOP, MADS_SCREEN_WIDTH, - DIALOG_TOP + MADS_SCENE_HEIGHT)); + _vm->_screen->setClipBounds(Common::Rect(0, DIALOG_TOP, MADS_SCREEN_WIDTH, DIALOG_TOP + MADS_SCENE_HEIGHT)); _vm->_game->_scene.restrictScene(); if (_screenId > 0) diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp index 938931e80d..a18d03d143 100644 --- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp +++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp @@ -218,7 +218,7 @@ void SceneInfoDragonsphere::loadCodes(MSurface &depthSurface, int variant) { } void SceneInfoDragonsphere::loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream) { - byte *destP = depthSurface.getData(); + byte *destP = (byte *)depthSurface.getPixels(); byte *walkMap = new byte[stream->size()]; stream->read(walkMap, stream->size()); diff --git a/engines/mads/events.cpp b/engines/mads/events.cpp index 7463704c4b..de83260b0f 100644 --- a/engines/mads/events.cpp +++ b/engines/mads/events.cpp @@ -98,7 +98,7 @@ void EventsManager::changeCursor() { // Check for hotspot indication pixels along the right-hand and bottom // row. Put together, these give the cursor's hotspot x,y int hotspotX = 0, hotspotY = 0; - byte *cursorData = cursor->getData(); + const byte *cursorData = (const byte *)cursor->getPixels(); for (int idx = 0; idx < cursor->w; ++idx) { if (cursorData[(cursor->h - 1) * cursor->w + idx] != transIndex) hotspotX = idx; @@ -110,7 +110,7 @@ void EventsManager::changeCursor() { // Reduce the cursor data to remove the last column from each row, since // the cursor routines don't have a pitch option byte *destCursor = new byte[(cursor->w - 1) * (cursor->h - 1)]; - byte *srcP = cursorData; + const byte *srcP = cursorData; byte *destP = destCursor; for (int idx = 0; idx < (cursor->h - 1); ++idx) { @@ -217,7 +217,7 @@ bool EventsManager::checkForNextFrameCounter() { _vm->_debugger->onFrame(); // Display the frame - _vm->_screen.updateScreen(); + _vm->_screen->update(); // Signal the ScummVM debugger _vm->_debugger->onFrame(); diff --git a/engines/mads/font.cpp b/engines/mads/font.cpp index 3e6d23fe6f..3828c3df8e 100644 --- a/engines/mads/font.cpp +++ b/engines/mads/font.cpp @@ -167,16 +167,13 @@ int Font::writeString(MSurface *surface, const Common::String &msg, const Common return x; int bottom = y + height - 1; - if (bottom > surface->getHeight() - 1) { - height -= MIN(height, bottom - (surface->getHeight() - 1)); + if (bottom > surface->h - 1) { + height -= MIN(height, bottom - (surface->h - 1)); } if (height <= 0) return x; - byte *destPtr = surface->getBasePtr(x, y); - uint8 *oldDestPtr = destPtr; - int xPos = x; const char *text = msg.c_str(); @@ -185,10 +182,11 @@ int Font::writeString(MSurface *surface, const Common::String &msg, const Common int charWidth = _charWidths[(byte)theChar]; if (charWidth > 0) { - if (xPos + charWidth > xEnd) return xPos; + Graphics::Surface dest = surface->getSubArea( + Common::Rect(xPos, y, xPos + charWidth, y + height)); uint8 *charData = &_charData[_charOffs[(byte)theChar]]; int bpp = getBpp(charWidth); @@ -196,6 +194,8 @@ int Font::writeString(MSurface *surface, const Common::String &msg, const Common charData += bpp * skipY; for (int i = 0; i < height; i++) { + byte *destPtr = (byte *)dest.getBasePtr(0, i); + for (int j = 0; j < bpp; j++) { if (*charData & 0xc0) *destPtr = _fontColors[(*charData & 0xc0) >> 6]; @@ -211,22 +211,13 @@ int Font::writeString(MSurface *surface, const Common::String &msg, const Common destPtr++; charData++; } - - destPtr += surface->getWidth() - bpp * 4; - } - - destPtr = oldDestPtr + charWidth + spaceWidth; - oldDestPtr = destPtr; - } xPos += charWidth + spaceWidth; - } return xPos; - } int Font::getWidth(const Common::String &msg, int spaceWidth) { diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp index 8ebea2a3b2..0a6741ba7a 100644 --- a/engines/mads/game.cpp +++ b/engines/mads/game.cpp @@ -498,7 +498,7 @@ void Game::loadGame(int slotNumber) { _scene._currentSceneId = -2; _sectionNumber = _scene._nextSceneId / 100; _scene._frameStartTime = _vm->_events->getFrameCounter(); - _vm->_screen._shakeCountdown = -1; + _vm->_screen->_shakeCountdown = -1; // Default the selected inventory item to the first one, if the player has any _scene._userInterface._selectedInvIndex = _objects._inventoryList.size() > 0 ? 0 : -1; @@ -600,7 +600,8 @@ void Game::createThumbnail() { uint8 thumbPalette[PALETTE_SIZE]; _vm->_palette->grabPalette(thumbPalette, 0, PALETTE_COUNT); _saveThumb = new Graphics::Surface(); - ::createThumbnail(_saveThumb, _vm->_screen.getData(), MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, thumbPalette); + ::createThumbnail(_saveThumb, (const byte *)_vm->_screen->getPixels(), + MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, thumbPalette); } void Game::syncTimers(SyncType slaveType, int slaveId, SyncType masterType, int masterId) { diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp index deccb5ba4f..5776d813cf 100644 --- a/engines/mads/mads.cpp +++ b/engines/mads/mads.cpp @@ -58,6 +58,7 @@ MADSEngine::MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc) : _resources = nullptr; _sound = nullptr; _audio = nullptr; + _screen = nullptr; } MADSEngine::~MADSEngine() { @@ -94,7 +95,7 @@ void MADSEngine::initialize() { _palette = new Palette(this); Font::init(this); _font = new Font(); - _screen.init(); + _screen = new Screen(); _sound = new SoundManager(this, _mixer); _audio = new AudioPlayer(_mixer, getGameID()); _game = Game::init(this); @@ -102,7 +103,7 @@ void MADSEngine::initialize() { loadOptions(); - _screen.empty(); + _screen->clear(); } void MADSEngine::loadOptions() { diff --git a/engines/mads/mads.h b/engines/mads/mads.h index eb808de32f..52f71f7c79 100644 --- a/engines/mads/mads.h +++ b/engines/mads/mads.h @@ -100,7 +100,7 @@ public: GameConversations * _gameConv; Palette *_palette; Resources *_resources; - ScreenSurface _screen; + Screen *_screen; SoundManager *_sound; AudioPlayer *_audio; bool _easyMouse; diff --git a/engines/mads/menu_views.cpp b/engines/mads/menu_views.cpp index 10d5a2179a..9050ca6081 100644 --- a/engines/mads/menu_views.cpp +++ b/engines/mads/menu_views.cpp @@ -253,7 +253,7 @@ void TextView::processCommand() { SceneInfo *sceneInfo = SceneInfo::init(_vm); sceneInfo->_width = MADS_SCREEN_WIDTH; sceneInfo->_height = MADS_SCENE_HEIGHT; - _spareScreens[spareIndex].setSize(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT); + _spareScreens[spareIndex].create(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT); sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE, _spareScreens[spareIndex]); @@ -346,9 +346,11 @@ void TextView::doFrame() { // If a screen transition is in progress and it's time for another column, handle it if (_spareScreen) { - byte *srcP = _spareScreen->getBasePtr(_translationX, 0); - byte *bgP = scene._backgroundSurface.getBasePtr(_translationX, 0); - byte *screenP = (byte *)_vm->_screen.getBasePtr(_translationX, 0); + const byte *srcP = (const byte *)_spareScreen->getBasePtr(_translationX, 0); + byte *bgP = (byte *)scene._backgroundSurface.getBasePtr(_translationX, 0); + + Graphics::Surface dest = _vm->_screen->getSubArea(Common::Rect(_translationX, 0, _translationX + 1, 0)); + byte *screenP = (byte *)dest.getBasePtr(0, 0); for (int y = 0; y < MADS_SCENE_HEIGHT; ++y, srcP += MADS_SCREEN_WIDTH, bgP += MADS_SCREEN_WIDTH, screenP += MADS_SCREEN_WIDTH) { @@ -356,10 +358,6 @@ void TextView::doFrame() { *screenP = *srcP; } - // Flag the column of the screen is modified - _vm->_screen.copyRectToScreen(Common::Rect(_translationX, 0, - _translationX + 1, MADS_SCENE_HEIGHT)); - // Keep moving the column to copy to the right if (++_translationX == MADS_SCREEN_WIDTH) { // Surface transition is complete @@ -571,6 +569,7 @@ void AnimationView::doFrame() { void AnimationView::loadNextResource() { Scene &scene = _vm->_game->_scene; Palette &palette = *_vm->_palette; + Screen &screen = *_vm->_screen; ResourceEntry &resEntry = _resources[_resourceIndex]; Common::Array<PaletteCycle> paletteCycles; @@ -587,12 +586,15 @@ void AnimationView::loadNextResource() { // Handle the bars at the top/bottom if (resEntry._showWhiteBars) { // For animations the screen has been clipped to the middle 156 rows. - // So although it's slightly messy, bypass our screen class entirely, - // and draw the horizontal lines directly on the physiacl screen surface - Graphics::Surface *s = g_system->lockScreen(); - s->hLine(0, 20, MADS_SCREEN_WIDTH, 253); - s->hLine(0, 179, MADS_SCREEN_WIDTH, 253); - g_system->unlockScreen(); + // So although it's slightly messy, temporarily reset clip bounds + // so we can redraw the white lines + Common::Rect clipBounds = screen.getClipBounds(); + screen.resetClipBounds(); + + screen.hLine(0, 20, MADS_SCREEN_WIDTH, 253); + screen.hLine(0, 179, MADS_SCREEN_WIDTH, 253); + + screen.setClipBounds(clipBounds); } // Load the new animation diff --git a/engines/mads/menu_views.h b/engines/mads/menu_views.h index c203248ad9..e22b6223a7 100644 --- a/engines/mads/menu_views.h +++ b/engines/mads/menu_views.h @@ -8,20 +8,12 @@ * 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. -<<<<<<< HEAD - -======= * ->>>>>>> master * 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. -<<<<<<< HEAD - -======= * ->>>>>>> master * 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. diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp index f768624278..40c69c0f08 100644 --- a/engines/mads/msurface.cpp +++ b/engines/mads/msurface.cpp @@ -32,37 +32,6 @@ namespace MADS { MADSEngine *MSurface::_vm = nullptr; -MSurface::MSurface() { - pixels = nullptr; - _freeFlag = false; -} - -MSurface::MSurface(int width, int height) { - pixels = nullptr; - _freeFlag = false; - setSize(width, height); -} - -MSurface::~MSurface() { - if (_freeFlag) - Graphics::Surface::free(); -} - -void MSurface::setSize(int width, int height) { - if (_freeFlag) - Graphics::Surface::free(); - Graphics::Surface::create(width, height, Graphics::PixelFormat::createFormatCLUT8()); - _freeFlag = true; -} - -void MSurface::setPixels(byte *pData, int horizSize, int vertSize) { - _freeFlag = false; - pixels = pData; - w = pitch = horizSize; - h = vertSize; - format.bytesPerPixel = 1; -} - int MSurface::scaleValue(int value, int scale, int err) { int scaled = 0; while (value--) { @@ -76,7 +45,6 @@ int MSurface::scaleValue(int value, int scale, int err) { } void MSurface::drawSprite(const Common::Point &pt, SpriteInfo &info, const Common::Rect &clipRect) { - enum { kStatusSkip, kStatusScale, @@ -116,8 +84,8 @@ void MSurface::drawSprite(const Common::Point &pt, SpriteInfo &info, const Commo return; int heightAmt = scaledHeight; - byte *src = info.sprite->getData(); - byte *dst = getBasePtr(x - info.hotX - clipX, y - info.hotY - clipY); + const byte *src = (const byte *)info.sprite->getPixels(); + byte *dst = (byte *)getBasePtr(x - info.hotX - clipX, y - info.hotY - clipY); int status = kStatusSkip; byte *scaledLineBuf = new byte[scaledWidth]; @@ -138,7 +106,7 @@ void MSurface::drawSprite(const Common::Point &pt, SpriteInfo &info, const Commo byte *lineDst = scaledLineBuf; int curErrX = errX; int width = scaledWidth; - byte *tempSrc = src; + const byte *tempSrc = src; int startX = clipX; while (width > 0) { byte pixel = *tempSrc++; @@ -201,63 +169,136 @@ void MSurface::drawSprite(const Common::Point &pt, SpriteInfo &info, const Commo } delete[] scaledLineBuf; - } -void MSurface::empty() { - Common::fill(getBasePtr(0, 0), getBasePtr(0, h), 0); +void MSurface::scrollX(int xAmount) { + if (xAmount == 0) + return; + + byte buffer[80]; + int direction = (xAmount > 0) ? -1 : 1; + int xSize = ABS(xAmount); + assert(xSize <= 80); + + byte *srcP = (byte *)getBasePtr(0, 0); + + for (int y = 0; y < this->h; ++y, srcP += pitch) { + if (direction < 0) { + // Copy area to be overwritten + Common::copy(srcP, srcP + xSize, &buffer[0]); + // Shift the remainder of the line over the given area + Common::copy(srcP + xSize, srcP + this->w, srcP); + // Move buffered area to the end of the line + Common::copy(&buffer[0], &buffer[xSize], srcP + this->w - xSize); + } else { + // Copy area to be overwritten + Common::copy_backward(srcP + this->w - xSize, srcP + this->w, &buffer[80]); + // Shift the remainder of the line over the given area + Common::copy_backward(srcP, srcP + this->w - xSize, srcP + this->w); + // Move buffered area to the start of the line + Common::copy_backward(&buffer[80 - xSize], &buffer[80], srcP + xSize); + } + } + + markAllDirty(); } -void MSurface::copyFrom(MSurface *src, const Common::Rect &srcBounds, - const Common::Point &destPos, int transparentColor) { - // Validation of the rectangle and position - int destX = destPos.x, destY = destPos.y; - if ((destX >= w) || (destY >= h)) +void MSurface::scrollY(int yAmount) { + if (yAmount == 0) return; - Common::Rect copyRect = srcBounds; - if (destX < 0) { - copyRect.left += -destX; - destX = 0; - } else if (destX + copyRect.width() > w) { - copyRect.right -= destX + copyRect.width() - w; - } - if (destY < 0) { - copyRect.top += -destY; - destY = 0; - } else if (destY + copyRect.height() > h) { - copyRect.bottom -= destY + copyRect.height() - h; + int direction = (yAmount > 0) ? 1 : -1; + int ySize = ABS(yAmount); + assert(ySize < (this->h / 2)); + assert(this->w == pitch); + + int blockSize = ySize * this->w; + byte *tempData = new byte[blockSize]; + byte *pixelsP = (byte *)getBasePtr(0, 0); + + if (direction > 0) { + // Buffer the lines to be overwritten + byte *srcP = (byte *)getBasePtr(0, this->h - ySize); + Common::copy(srcP, srcP + (pitch * ySize), tempData); + // Vertically shift all the lines + Common::copy_backward(pixelsP, pixelsP + (pitch * (this->h - ySize)), + pixelsP + (pitch * this->h)); + // Transfer the buffered lines top the top of the screen + Common::copy(tempData, tempData + blockSize, pixelsP); + } else { + // Buffer the lines to be overwritten + Common::copy(pixelsP, pixelsP + (pitch * ySize), tempData); + // Vertically shift all the lines + Common::copy(pixelsP + (pitch * ySize), pixelsP + (pitch * this->h), pixelsP); + // Transfer the buffered lines to the bottom of the screen + Common::copy(tempData, tempData + blockSize, pixelsP + (pitch * (this->h - ySize))); } - if (!copyRect.isValidRect()) - return; + markAllDirty(); + delete[] tempData; +} - // Copy the specified area +void MSurface::translate(Common::Array<RGB6> &palette) { + for (int y = 0; y < this->h; ++y) { + byte *pDest = (byte *)getBasePtr(0, y); + + for (int x = 0; x < this->w; ++x, ++pDest) { + if (*pDest < 255) // scene 752 has some palette indices of 255 + *pDest = palette[*pDest]._palIndex; + } + } - byte *data = src->getData(); - byte *srcPtr = data + (src->getWidth() * copyRect.top + copyRect.left); - byte *destPtr = (byte *)pixels + (destY * getWidth()) + destX; + markAllDirty(); +} - for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) { - if (transparentColor == -1) { - // No transparency, so copy line over - Common::copy(srcPtr, srcPtr + copyRect.width(), destPtr); - } else { - // Copy each byte one at a time checking for the transparency color - for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr) - if (srcPtr[xCtr] != transparentColor) destPtr[xCtr] = srcPtr[xCtr]; +void MSurface::translate(byte map[PALETTE_COUNT]) { + for (int y = 0; y < this->h; ++y) { + byte *pDest = (byte *)getBasePtr(0, y); + + for (int x = 0; x < this->w; ++x, ++pDest) { + *pDest = map[*pDest]; } + } + + markAllDirty(); +} + +MSurface *MSurface::flipHorizontal() const { + MSurface *dest = new MSurface(this->w, this->h); + + for (int y = 0; y < this->h; ++y) { + const byte *srcP = getBasePtr(this->w - 1, y); + byte *destP = dest->getBasePtr(0, y); - srcPtr += src->getWidth(); - destPtr += getWidth(); + for (int x = 0; x < this->w; ++x) + *destP++ = *srcP--; + } + + return dest; +} + +void MSurface::copyRectTranslate(MSurface &srcSurface, const byte *paletteMap, + const Common::Point &destPos, const Common::Rect &srcRect) { + // Loop through the lines + for (int yCtr = 0; yCtr < srcRect.height(); ++yCtr) { + const byte *srcP = (const byte *)srcSurface.getBasePtr(srcRect.left, srcRect.top + yCtr); + byte *destP = (byte *)getBasePtr(destPos.x, destPos.y + yCtr); + + // Copy the line over + for (int xCtr = 0; xCtr < srcRect.width(); ++xCtr, ++srcP, ++destP) { + *destP = paletteMap[*srcP]; + } } + + addDirtyRect(Common::Rect(destPos.x, destPos.y, destPos.x + srcRect.width(), + destPos.y + srcRect.height())); } -void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth, +void MSurface::copyFrom(MSurface &src, const Common::Point &destPos, int depth, DepthSurface *depthSurface, int scale, bool flipped, int transparentColor) { int destX = destPos.x, destY = destPos.y; - int frameWidth = src->getWidth(); - int frameHeight = src->getHeight(); + int frameWidth = src.w; + int frameHeight = src.h; int direction = flipped ? -1 : 1; int highestDim = MAX(frameWidth, frameHeight); @@ -271,7 +312,8 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth, distCtr += scale; if (distCtr < 100) { lineDist[distIndex] = false; - } else { + } + else { lineDist[distIndex] = true; distCtr -= 100; @@ -290,18 +332,20 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth, // Special case for quicker drawing of non-scaled images if (scale == 100 || scale == -1) { // Copy the specified area - Common::Rect copyRect(0, 0, src->getWidth(), src->getHeight()); + Common::Rect copyRect(0, 0, src.w, src.h); if (destX < 0) { copyRect.left += -destX; destX = 0; - } else if (destX + copyRect.width() > w) { + } + else if (destX + copyRect.width() > w) { copyRect.right -= destX + copyRect.width() - w; } if (destY < 0) { copyRect.top += -destY; destY = 0; - } else if (destY + copyRect.height() > h) { + } + else if (destY + copyRect.height() > h) { copyRect.bottom -= destY + copyRect.height() - h; } @@ -311,9 +355,9 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth, if (flipped) copyRect.moveTo(0, copyRect.top); - byte *data = src->getData(); - byte *srcPtr = data + (src->getWidth() * copyRect.top + copyRect.left); - byte *destPtr = (byte *)pixels + (destY * pitch) + destX; + byte *data = src.getPixels(); + byte *srcPtr = data + (src.w * copyRect.top + copyRect.left); + byte *destPtr = (byte *)getPixels() + (destY * pitch) + destX; if (flipped) srcPtr += copyRect.width() - 1; @@ -329,18 +373,18 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth, destPtr[xCtr] = *srcP; } - srcPtr += src->getWidth(); - destPtr += getWidth(); + srcPtr += src.w; + destPtr += this->w; } return; } // Start of draw logic for scaled sprites - const byte *srcPixelsP = src->getData(); + const byte *srcPixelsP = src.getPixels(); - int destRight = this->getWidth() - 1; - int destBottom = this->getHeight() - 1; + int destRight = this->w - 1; + int destBottom = this->h - 1; // Check x bounding area int spriteLeft = 0; @@ -387,7 +431,7 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth, spriteLeft = spriteLeft * direction; // Loop through the lines of the sprite - for (int yp = 0, sprY = -1; yp < frameHeight; ++yp, srcPixelsP += src->pitch) { + for (int yp = 0, sprY = -1; yp < frameHeight; ++yp, srcPixelsP += src.pitch) { if (!lineDist[yp]) // Not a display line, so skip it continue; @@ -411,8 +455,8 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth, continue; // Get depth of current output pixel in depth surface - Common::Point pt((destP - (byte *)this->pixels) % this->pitch, - (destP - (byte *)this->pixels) / this->pitch); + Common::Point pt((destP - (byte *)getPixels()) % this->pitch, + (destP - (byte *)getPixels()) / this->pitch); int pixelDepth = (depthSurface == nullptr) ? 15 : depthSurface->getDepth(pt); if ((*srcP != transparentColor) && (depth <= pixelDepth)) @@ -424,119 +468,8 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth, // Move to the next destination line destPixelsP += this->pitch; } -} - -void MSurface::scrollX(int xAmount) { - if (xAmount == 0) - return; - - byte buffer[80]; - int direction = (xAmount > 0) ? -1 : 1; - int xSize = ABS(xAmount); - assert(xSize <= 80); - - byte *srcP = getBasePtr(0, 0); - - for (int y = 0; y < this->h; ++y, srcP += pitch) { - if (direction < 0) { - // Copy area to be overwritten - Common::copy(srcP, srcP + xSize, &buffer[0]); - // Shift the remainder of the line over the given area - Common::copy(srcP + xSize, srcP + this->w, srcP); - // Move buffered area to the end of the line - Common::copy(&buffer[0], &buffer[xSize], srcP + this->w - xSize); - } else { - // Copy area to be overwritten - Common::copy_backward(srcP + this->w - xSize, srcP + this->w, &buffer[80]); - // Shift the remainder of the line over the given area - Common::copy_backward(srcP, srcP + this->w - xSize, srcP + this->w); - // Move buffered area to the start of the line - Common::copy_backward(&buffer[80 - xSize], &buffer[80], srcP + xSize); - } - } -} - -void MSurface::scrollY(int yAmount) { - if (yAmount == 0) - return; - - int direction = (yAmount > 0) ? 1 : -1; - int ySize = ABS(yAmount); - assert(ySize < (this->h / 2)); - assert(this->w == pitch); - - int blockSize = ySize * this->w; - byte *tempData = new byte[blockSize]; - byte *pixelsP = getBasePtr(0, 0); - - if (direction > 0) { - // Buffer the lines to be overwritten - byte *srcP = (byte *)getBasePtr(0, this->h - ySize); - Common::copy(srcP, srcP + (pitch * ySize), tempData); - // Vertically shift all the lines - Common::copy_backward(pixelsP, pixelsP + (pitch * (this->h - ySize)), - pixelsP + (pitch * this->h)); - // Transfer the buffered lines top the top of the screen - Common::copy(tempData, tempData + blockSize, pixelsP); - } else { - // Buffer the lines to be overwritten - Common::copy(pixelsP, pixelsP + (pitch * ySize), tempData); - // Vertically shift all the lines - Common::copy(pixelsP + (pitch * ySize), pixelsP + (pitch * this->h), pixelsP); - // Transfer the buffered lines to the bottom of the screen - Common::copy(tempData, tempData + blockSize, pixelsP + (pitch * (this->h - ySize))); - } - - delete[] tempData; -} - -void MSurface::translate(Common::Array<RGB6> &palette) { - for (int y = 0; y < this->h; ++y) { - byte *pDest = getBasePtr(0, y); - - for (int x = 0; x < this->w; ++x, ++pDest) { - if (*pDest < 255) // scene 752 has some palette indices of 255 - *pDest = palette[*pDest]._palIndex; - } - } -} - -void MSurface::translate(byte map[PALETTE_COUNT]) { - for (int y = 0; y < this->h; ++y) { - byte *pDest = getBasePtr(0, y); - - for (int x = 0; x < this->w; ++x, ++pDest) { - *pDest = map[*pDest]; - } - } -} - -MSurface *MSurface::flipHorizontal() const { - MSurface *dest = new MSurface(this->w, this->h); - - for (int y = 0; y < this->h; ++y) { - const byte *srcP = getBasePtr(this->w - 1, y); - byte *destP = dest->getBasePtr(0, y); - - for (int x = 0; x < this->w; ++x) - *destP++ = *srcP--; - } - - return dest; -} - -void MSurface::copyRectTranslate(MSurface &srcSurface, const byte *paletteMap, - const Common::Point &destPos, const Common::Rect &srcRect) { - // Loop through the lines - for (int yCtr = 0; yCtr < srcRect.height(); ++yCtr) { - const byte *srcP = srcSurface.getBasePtr(srcRect.left, srcRect.top + yCtr); - byte *destP = getBasePtr(destPos.x, destPos.y + yCtr); - // Copy the line over - for (int xCtr = 0; xCtr < srcRect.width(); ++xCtr, ++srcP, ++destP) { - *destP = paletteMap[*srcP]; - } - } + addDirtyRect(Common::Rect(destX, destY, destX + frameWidth, destY + frameHeight)); } /*------------------------------------------------------------------------*/ @@ -544,26 +477,26 @@ void MSurface::copyRectTranslate(MSurface &srcSurface, const byte *paletteMap, int DepthSurface::getDepth(const Common::Point &pt) { if (_depthStyle == 2) { int bits = (3 - (pt.x % 4)) * 2; - byte v = *getBasePtr(pt.x >> 2, pt.y); + byte v = *(const byte *)getBasePtr(pt.x >> 2, pt.y); return v >> bits; } else { if (pt.x < 0 || pt.y < 0 || pt.x >= this->w || pt.y >= this->h) return 0; - return *getBasePtr(pt.x, pt.y) & 0xF; + return *(const byte *)getBasePtr(pt.x, pt.y) & 0xF; } } int DepthSurface::getDepthHighBit(const Common::Point &pt) { if (_depthStyle == 2) { int bits = (3 - (pt.x % 4)) * 2; - byte v = *getBasePtr(pt.x >> 2, pt.y); + byte v = *(const byte *)getBasePtr(pt.x >> 2, pt.y); return (v >> bits) & 2; } else { if (pt.x < 0 || pt.y < 0 || pt.x >= this->w || pt.y >= this->h) return 0; - return *getBasePtr(pt.x, pt.y) & 0x80; + return *(const byte *)getBasePtr(pt.x, pt.y) & 0x80; } } diff --git a/engines/mads/msurface.h b/engines/mads/msurface.h index 8930737b0a..e92770900d 100644 --- a/engines/mads/msurface.h +++ b/engines/mads/msurface.h @@ -25,7 +25,7 @@ #include "common/scummsys.h" #include "common/rect.h" -#include "graphics/surface.h" +#include "graphics/managed_surface.h" #include "mads/palette.h" namespace MADS { @@ -50,10 +50,14 @@ struct SpriteInfo { /* * MADS graphics surface */ -class MSurface : public Graphics::Surface { +class MSurface : virtual public Graphics::ManagedSurface { +private: + /** + * Helper method for calculating new dimensions when scaling a sprite + */ + int scaleValue(int value, int scale, int err); protected: static MADSEngine *_vm; - bool _freeFlag; public: /** * Sets the engine reference used all surfaces @@ -61,11 +65,6 @@ public: static void setVm(MADSEngine *vm) { _vm = vm; } /** - * Helper method for calculating new dimensions when scaling a sprite - */ - static int scaleValue(int value, int scale, int err); - - /** * Base method for descendents to load their contents */ virtual void load(const Common::String &resName) {} @@ -73,126 +72,50 @@ public: /** * Basic constructor */ - MSurface(); + MSurface() : Graphics::ManagedSurface() {} /** * Constructor for a surface with fixed dimensions */ - MSurface(int width, int height); + MSurface(int width, int height) : Graphics::ManagedSurface(width, height) {} /** * Destructor */ - virtual ~MSurface(); - - /** - * Reinitializes a surface to have a given set of dimensions - */ - void setSize(int width, int height); - - /** - * Sets the pixels the surface is associated with - * @remarks The surface will not free the data block - */ - void setPixels(byte *pData, int horizSize, int vertSize); - - /** - * Draws an arbitrary line on the screen using a specified color - * @param startPos Starting position - * @param endPos Ending position - * @param color Color to use - */ - void line(const Common::Point &startPos, const Common::Point &endPos, byte color); - - /** - * Draws a sprite - * @param pt Position to draw sprite at - * @param info General sprite details - * @param clipRect Clipping rectangle to constrain sprite drawing within - */ - void drawSprite(const Common::Point &pt, SpriteInfo &info, const Common::Rect &clipRect); - - /** - * Returns the width of the surface - */ - int getWidth() const { return w; } - - /** - * Returns the height of the surface - */ - int getHeight() const { return h; } + virtual ~MSurface() {} /** - * Returns the size of the surface as a Rect + * Return a rect containing the bounds of the surface */ - Common::Rect getBounds() const { - return Common::Rect(0, 0, w, h); - } + Common::Rect getBounds() { return Common::Rect(0, 0, this->w, this->h); } /** - * Returns a pointer to the surface data + * Return the pixels for the surface */ - byte *getData() { return (byte *)Graphics::Surface::getPixels(); } + inline byte *getPixels() { return (byte *)Graphics::ManagedSurface::getPixels(); } /** - * Returns a pointer to a given position within the surface + * Return the pixels for the surface */ - byte *getBasePtr(int x, int y) { return (byte *)Graphics::Surface::getBasePtr(x, y); } + inline const void *getPixels() const { return (const byte *)Graphics::ManagedSurface::getPixels(); } /** - * Returns a pointer to a given position within the surface - */ - const byte *getBasePtr(int x, int y) const { return (const byte *)Graphics::Surface::getBasePtr(x, y); } - - /** - * Clears the surface - */ - void empty(); - - /** - * Copys a sub-section of another surface into the current one. - * @param src Source surface - * @param srcBounds Area of source surface to copy - * @param destPos Destination position to draw in current surface - * @param transparentColor Transparency palette index - */ - void copyFrom(MSurface *src, const Common::Rect &srcBounds, const Common::Point &destPos, - int transparentColor = -1); - - /** - * Copys a sub-section of another surface into the current one. - * @param src Source surface - * @param destPos Destination position to draw in current surface - * @param depth Depth of sprite - * @param depthSurface Depth surface to use with sprite depth - * @param scale Scale for image - * @param flipped Flag for whether image is to be flipped - * @param transparentColor Transparency palette index - */ - void copyFrom(MSurface *src, const Common::Point &destPos, int depth, DepthSurface *depthSurface, - int scale, bool flipped, int transparentColor = -1); - - /** - * Copies the surface to a given destination surface + * Return a pointer to a given position on the surface */ - void copyTo(MSurface *dest, int transparentColor = -1) { - dest->copyFrom(this, Common::Rect(w, h), Common::Point(), transparentColor); - } + byte *getBasePtr(int x, int y) { return (byte *)Graphics::ManagedSurface::getBasePtr(x, y); } /** - * Copies the surface to a given destination surface + * Return a pointer to a given position on the surface */ - void copyTo(MSurface *dest, const Common::Point &pt, int transparentColor = -1) { - dest->copyFrom(this, Common::Rect(w, h), pt, transparentColor); - } + inline const byte *getBasePtr(int x, int y) const { return (const byte *)Graphics::ManagedSurface::getBasePtr(x, y); } /** - * Copies the surface to a given destination surface + * Draws a sprite + * @param pt Position to draw sprite at + * @param info General sprite details + * @param clipRect Clipping rectangle to constrain sprite drawing within */ - void copyTo(MSurface *dest, const Common::Rect &srcBounds, const Common::Point &destPos, - int transparentColor = -1) { - dest->copyFrom(this, srcBounds, destPos, transparentColor); - } + void drawSprite(const Common::Point &pt, SpriteInfo &info, const Common::Rect &clipRect); /** * Scroll the screen horizontally by a given amount @@ -227,6 +150,19 @@ public: */ void copyRectTranslate(MSurface &srcSurface, const byte *paletteMap, const Common::Point &destPos, const Common::Rect &srcRect); + + /** + * Copys a sub-section of another surface into the current one. + * @param src Source surface + * @param destPos Destination position to draw in current surface + * @param depth Depth of sprite + * @param depthSurface Depth surface to use with sprite depth + * @param scale Scale for image + * @param flipped Flag for whether image is to be flipped + * @param transparentColor Transparency palette index + */ + void copyFrom(MSurface &src, const Common::Point &destPos, int depth, DepthSurface *depthSurface, + int scale, bool flipped, int transparentColor = -1); }; class DepthSurface : public MSurface { @@ -239,7 +175,7 @@ public: /** * Constructor */ - DepthSurface() : _depthStyle(0) {} + DepthSurface() : MSurface(), _depthStyle(0) {} /** * Returns the depth at a given position diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index 58e60fe323..2af80f517e 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -438,11 +438,10 @@ void CopyProtectionDialog::show() { Common::KeyState curKey; const Common::Rect inputArea(110, 165, 210, 175); MSurface *origInput = new MSurface(inputArea.width(), inputArea.height()); - _vm->_screen.frameRect(inputArea, TEXTDIALOG_BLACK); - _vm->_screen.copyTo(origInput, inputArea, Common::Point(0, 0)); - _font->setColors(TEXTDIALOG_FE, TEXTDIALOG_FE, TEXTDIALOG_FE, TEXTDIALOG_FE); - _vm->_screen.copyRectToScreen(inputArea); - _vm->_screen.updateScreen(); + _vm->_screen->frameRect(inputArea, TEXTDIALOG_BLACK); + origInput->blitFrom(*_vm->_screen, inputArea, Common::Point(0, 0)); + _font->setColors(TEXTDIALOG_FE, TEXTDIALOG_FE, TEXTDIALOG_FE, TEXTDIALOG_FE); + _vm->_screen->update(); bool firstTime = true; @@ -470,11 +469,10 @@ void CopyProtectionDialog::show() { _textInput = _hogEntry._word[0]; } - _vm->_screen.copyFrom(origInput, Common::Rect(0, 0, inputArea.width(), inputArea.height()), Common::Point(inputArea.left, inputArea.top)); - _font->writeString(&_vm->_screen, _textInput, + _vm->_screen->blitFrom(*origInput, Common::Point(inputArea.left, inputArea.top)); + _font->writeString(_vm->_screen, _textInput, Common::Point(inputArea.left + 2, inputArea.top + 1), 1); - _vm->_screen.copyRectToScreen(inputArea); - _vm->_screen.updateScreen(); + _vm->_screen->update(); } origInput->free(); @@ -537,7 +535,7 @@ void PictureDialog::save() { // Save the entire screen _savedSurface = new MSurface(MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT); - _vm->_screen.copyTo(_savedSurface); + _savedSurface->blitFrom(*_vm->_screen); // Save palette information Common::copy(&palette._mainPalette[0], &palette._mainPalette[PALETTE_SIZE], &_palette[0]); @@ -568,7 +566,7 @@ void PictureDialog::save() { // Remap the greyed out screen to use the small greyscale range // at the top end of the palette - _vm->_screen.translate(map); + _vm->_screen->translate(map); // Load the inventory picture Common::String setName = Common::String::format("*OB%.3d.SS", _objectId); @@ -578,13 +576,12 @@ void PictureDialog::save() { // Get the inventory frame, and adjust the dialog position to allow for it MSprite *frame = asset->getFrame(0); _position.y = frame->h + 12; - if ((_position.y + _height) > _vm->_screen.getHeight()) - _position.y -= (_position.y + _height) - _vm->_screen.getHeight(); + if ((_position.y + _height) > _vm->_screen->h) + _position.y -= (_position.y + _height) - _vm->_screen->h; // Draw the inventory picture - frame->copyTo(&_vm->_screen, Common::Point(160 - frame->w / 2, 6), + _vm->_screen->transBlitFrom(*frame, Common::Point(160 - frame->w / 2, 6), frame->getTransparencyIndex()); - _vm->_screen.copyRectToScreen(_vm->_screen.getBounds()); // Adjust the dialog colors to use TEXTDIALOG_CONTENT1 -= 10; @@ -598,13 +595,11 @@ void PictureDialog::save() { void PictureDialog::restore() { if (_savedSurface) { - _savedSurface->copyTo(&_vm->_screen); + _vm->_screen->blitFrom(*_savedSurface); _savedSurface->free(); delete _savedSurface; _savedSurface = nullptr; - _vm->_screen.copyRectToScreen(_vm->_screen.getBounds()); - // Restore palette information Palette &palette = *_vm->_palette; Common::copy(&_palette[0], &_palette[PALETTE_SIZE], &palette._mainPalette[0]); @@ -691,7 +686,6 @@ void GameDialog::display() { } GameDialog::~GameDialog() { - _vm->_screen.resetClipBounds(); _vm->_game->_scene._currentSceneId = RETURNING_FROM_DIALOG; } diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp index 0520294b29..cd81efe0f0 100644 --- a/engines/mads/nebular/menu_nebular.cpp +++ b/engines/mads/nebular/menu_nebular.cpp @@ -384,8 +384,8 @@ void AdvertView::show() { // Load the advert background onto the screen SceneInfo *sceneInfo = SceneInfo::init(_vm); sceneInfo->load(screenId, 0, Common::String(), 0, _vm->_game->_scene._depthSurface, - _vm->_screen); - _vm->_screen.copyRectToScreen(_vm->_screen.getBounds()); + *_vm->_screen); + _vm->_screen->markAllDirty(); _vm->_palette->setFullPalette(_vm->_palette->_mainPalette); delete sceneInfo; diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index da419a70a2..40228b4b7d 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -323,8 +323,8 @@ void SceneInfoNebular::loadCodes(MSurface &depthSurface, int variant) { } void SceneInfoNebular::loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream) { - byte *destP = depthSurface.getData(); - byte *endP = depthSurface.getBasePtr(0, depthSurface.h); + byte *destP = (byte *)depthSurface.getPixels(); + byte *endP = (byte *)depthSurface.getBasePtr(0, depthSurface.h); byte runLength = stream->readByte(); while (destP < endP && runLength > 0) { diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp index 0fb13a706c..7323ee893d 100644 --- a/engines/mads/nebular/nebular_scenes3.cpp +++ b/engines/mads/nebular/nebular_scenes3.cpp @@ -2818,7 +2818,7 @@ void Scene318::step() { if (_internCounter >= 3600) { _vm->_sound->command(59); - _vm->_screen._shakeCountdown = 20; + _vm->_screen->_shakeCountdown = 20; _internWalkingFl = true; } } @@ -3288,22 +3288,22 @@ void Scene319::step() { if (_animMode == 2) { if (_animFrame == 13) - _vm->_screen._shakeCountdown = 40; + _vm->_screen->_shakeCountdown = 40; if (_animFrame == 16) - _vm->_screen._shakeCountdown = 1; + _vm->_screen->_shakeCountdown = 1; } if (_animMode == 3) { if (_animFrame == 11) - _vm->_screen._shakeCountdown = 60; + _vm->_screen->_shakeCountdown = 60; if (_animFrame == 18) - _vm->_screen._shakeCountdown = 1; + _vm->_screen->_shakeCountdown = 1; } if ((_animMode == 4) && (_animFrame == 16)) - _vm->_screen._shakeCountdown = 80; + _vm->_screen->_shakeCountdown = 80; if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) { _scene->_animation[0]->setCurrentFrame(nextFrame); @@ -3326,7 +3326,7 @@ void Scene319::step() { _animFrame = _scene->_animation[0]->getCurrentFrame(); _slacheTalkingFl = true; - _vm->_screen._shakeCountdown = 1; + _vm->_screen->_shakeCountdown = 1; for (int i = 0; i <= 1; i++) { int oldIdx = _globals._sequenceIndexes[i]; @@ -3350,7 +3350,7 @@ void Scene319::step() { _vm->_palette->setColorValues(0, 0, 0); _vm->_palette->fadeOut(_vm->_palette->_mainPalette, nullptr, 18, 228, 248, 0, 1, 16); - _vm->_screen._shakeCountdown = 1; + _vm->_screen->_shakeCountdown = 1; _scene->_reloadSceneFlag = true; break; @@ -3731,7 +3731,7 @@ void Scene320::step() { case 417: case 457: - _vm->_screen._shakeCountdown = 40; + _vm->_screen->_shakeCountdown = 40; _vm->_sound->command(59); break; diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp index 4c360b23d5..5f71c99a94 100644 --- a/engines/mads/nebular/sound_nebular.cpp +++ b/engines/mads/nebular/sound_nebular.cpp @@ -20,16 +20,15 @@ * */ -#include "audio/audiostream.h" #include "audio/fmopl.h" -#include "audio/decoders/raw.h" #include "common/algorithm.h" -#include "common/debug.h" #include "common/md5.h" -#include "common/memstream.h" -#include "mads/sound.h" #include "mads/nebular/sound_nebular.h" +namespace Audio { +class Mixer; +} + namespace MADS { namespace Nebular { diff --git a/engines/mads/nebular/sound_nebular.h b/engines/mads/nebular/sound_nebular.h index 2b80b08d89..a9e1493109 100644 --- a/engines/mads/nebular/sound_nebular.h +++ b/engines/mads/nebular/sound_nebular.h @@ -27,8 +27,14 @@ #include "common/file.h" #include "common/mutex.h" #include "common/queue.h" -#include "audio/audiostream.h" -#include "audio/mixer.h" + +namespace Audio { +class Mixer; +} + +namespace Common { +class SeekableReadStream; +} namespace OPL { class OPL; @@ -36,8 +42,6 @@ class OPL; namespace MADS { -class SoundManager; - namespace Nebular { class ASound; diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp index f7a7153fbe..7ef627ceeb 100644 --- a/engines/mads/phantom/phantom_scenes.cpp +++ b/engines/mads/phantom/phantom_scenes.cpp @@ -191,7 +191,7 @@ void SceneInfoPhantom::loadCodes(MSurface &depthSurface, int variant) { } void SceneInfoPhantom::loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream) { - byte *destP = depthSurface.getData(); + byte *destP = (byte *)depthSurface.getPixels(); byte *walkMap = new byte[stream->size()]; stream->read(walkMap, stream->size()); diff --git a/engines/mads/rails.cpp b/engines/mads/rails.cpp index ee0ca98cd3..46d9e0ebd3 100644 --- a/engines/mads/rails.cpp +++ b/engines/mads/rails.cpp @@ -149,7 +149,7 @@ int Rails::scanPath(const Common::Point &srcPos, const Common::Point &destPos) { ++xDiff; ++yDiff; - const byte *srcP = _depthSurface->getBasePtr(srcPos.x, srcPos.y); + const byte *srcP = (const byte *)_depthSurface->getBasePtr(srcPos.x, srcPos.y); int index = xAmount; // Outer loop diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index 83ab1151a9..66f56f9407 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -89,8 +89,7 @@ Scene::~Scene() { } void Scene::restrictScene() { - _sceneSurface.init(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH, - _vm->_screen.getPixels(), Graphics::PixelFormat::createFormatCLUT8()); + _sceneSurface.create(*_vm->_screen, Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT)); } void Scene::clearVocab() { @@ -517,7 +516,7 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) { if (_posAdjust != Common::Point(0, 0)) warning("Adjust used %d %d", _posAdjust.x, _posAdjust.y); // Copy background for the dirty areas to the screen - _dirtyAreas.copy(&_backgroundSurface, &_vm->_screen, _posAdjust); + _dirtyAreas.copy(&_backgroundSurface, _vm->_screen, _posAdjust); // Handle dirty areas for foreground objects _spriteSlots.setDirtyAreas(); @@ -528,11 +527,11 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) { _spriteSlots.drawSprites(&_sceneSurface); // Draw text elements onto the view - _textDisplay.draw(&_vm->_screen); + _textDisplay.draw(_vm->_screen); if (transitionType) { // Fading in the screen - _vm->_screen.transition(transitionType, surfaceFlag); + _vm->_screen->transition(transitionType, surfaceFlag); _vm->_sound->startQueuedCommands(); } else { // Copy dirty areas to the screen diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp index 7b0e64c1fe..5323178ec7 100644 --- a/engines/mads/scene_data.cpp +++ b/engines/mads/scene_data.cpp @@ -242,13 +242,13 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName, int height = _height; if (!bgSurface.getPixels() || (bgSurface.w != width) || (bgSurface.h != height)) { - bgSurface.setSize(width, height); + bgSurface.create(width, height); } if (_depthStyle == 2) width >>= 2; if (!depthSurface.getPixels()) { - depthSurface.setSize(width, height); + depthSurface.create(width, height); } loadCodes(depthSurface, variant); @@ -288,7 +288,7 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName, assert(asset && _depthStyle != 2); MSprite *spr = asset->getFrame(si._frameNumber); - bgSurface.copyFrom(spr, si._position, si._depth, &depthSurface, + bgSurface.copyFrom(*spr, si._position, si._depth, &depthSurface, si._scale, false, spr->getTransparencyIndex()); } @@ -455,7 +455,7 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName, newHeight = tileCount * tileHeight; if (bgSurface.w != newWidth || bgSurface.h != newHeight) - bgSurface.setSize(newWidth, newHeight); + bgSurface.create(newWidth, newHeight); // -------------------------------------------------------------------------------- @@ -477,7 +477,7 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName, //debugCN(kDebugGraphics, "Tile: %i, compressed size: %i\n", i, compressedTileDataSize); - newTile->empty(); + newTile->clear(); byte *compressedTileData = new byte[compressedTileDataSize]; @@ -503,7 +503,8 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName, TileSetIterator tile = tileSet.begin(); for (int i = 0; i < tileIndex; i++) ++tile; - ((*tile).get())->copyTo(&bgSurface, Common::Point(x * tileWidth, y * tileHeight)); + + bgSurface.blitFrom(*(*tile).get(), Common::Point(x * tileWidth, y * tileHeight)); ((*tile).get())->free(); } } diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp index 90fbbe7e2a..05f9de61e2 100644 --- a/engines/mads/screen.cpp +++ b/engines/mads/screen.cpp @@ -69,7 +69,6 @@ void DirtyArea::setArea(int width, int height, int maxWidth, int maxHeight) { _active = true; } - void DirtyArea::setSpriteSlot(const SpriteSlot *spriteSlot) { int width, height; Scene &scene = _vm->_game->_scene; @@ -215,12 +214,13 @@ void DirtyAreas::copy(MSurface *srcSurface, MSurface *destSurface, const Common: Common::Point destPos(srcBounds.left, srcBounds.top); if ((*this)[i]._active && bounds.isValidRect()) { - srcSurface->copyTo(destSurface, bounds, destPos); + destSurface->blitFrom(*srcSurface, bounds, destPos); } } } void DirtyAreas::copyToScreen() { +/* for (uint i = 0; i < size(); ++i) { const Common::Rect &bounds = (*this)[i]._bounds; @@ -229,9 +229,10 @@ void DirtyAreas::copyToScreen() { continue; if ((*this)[i]._active && (*this)[i]._bounds.isValidRect()) { - _vm->_screen.copyRectToScreen(bounds); + _vm->_screen->copyRectToScreen(bounds); } } + */ } void DirtyAreas::reset() { @@ -554,38 +555,17 @@ void ScreenObjects::synchronize(Common::Serializer &s) { /*------------------------------------------------------------------------*/ -ScreenSurface::ScreenSurface() { +Screen::Screen(): Graphics::Screen(), MSurface() { + // Create the screen surface separately on another surface, since the screen + // surface will be subject to change as the clipping area is altered + _rawSurface.create(MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT); + resetClipBounds(); + _shakeCountdown = -1; _random = 0x4D2; - _surfacePixels = nullptr; -} - -void ScreenSurface::init() { - // Set the size for the screen - setSize(MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT); - - // Store a copy of the raw pixels pointer for the screen, since the surface - // itself may be later changed to only a subset of the screen - _surfacePixels = (byte *)getPixels(); - _freeFlag = false; -} - -ScreenSurface::~ScreenSurface() { - ::free(_surfacePixels); } -void ScreenSurface::copyRectToScreen(const Common::Rect &bounds) { - const byte *buf = getBasePtr(bounds.left, bounds.top); - - Common::Rect destBounds = bounds; - destBounds.translate(_clipBounds.left, _clipBounds.top); - - if (bounds.width() != 0 && bounds.height() != 0) - g_system->copyRectToScreen(buf, this->pitch, destBounds.left, destBounds.top, - destBounds.width(), destBounds.height()); -} - -void ScreenSurface::updateScreen() { +void Screen::update() { if (_shakeCountdown >= 0) { _random = _random * 5 + 1; int offset = (_random >> 8) & 3; @@ -596,27 +576,42 @@ void ScreenSurface::updateScreen() { // offset width shown at the very right. The offset changes to give // an effect of shaking the screen offset *= 4; - const byte *buf = getBasePtr(offset, 0); - g_system->copyRectToScreen(buf, this->pitch, 0, 0, - this->pitch - offset, this->h); + const byte *buf = (const byte *)getBasePtr(offset, 0); + g_system->copyRectToScreen(buf, this->pitch, 0, 0, this->pitch - offset, this->h); if (offset > 0) - g_system->copyRectToScreen(this->pixels, this->pitch, + g_system->copyRectToScreen(getPixels(), this->pitch, this->pitch - offset, 0, offset, this->h); + return; } - g_system->updateScreen(); + // Reset any clip bounds if active whilst the screen is updated + Common::Rect clipBounds = getClipBounds(); + resetClipBounds(); + + // Update the screen + Graphics::Screen::update(); + + // Revert back to whatever clipping is active + setClipBounds(clipBounds); } -void ScreenSurface::transition(ScreenTransition transitionType, bool surfaceFlag) { +void Screen::transition(ScreenTransition transitionType, bool surfaceFlag) { Palette &pal = *_vm->_palette; Scene &scene = _vm->_game->_scene; byte palData[PALETTE_SIZE]; + // The original loads the new scene to the screen surface for some of the + // transition types like fade out/in, so we need to clear the dirty rects so + // it doesn't prematurely get blitted to the physical screen before fade out + Common::Rect clipBounds = getClipBounds(); + clearDirtyRects(); + switch (transitionType) { case kTransitionFadeIn: - case kTransitionFadeOutIn: + case kTransitionFadeOutIn: { Common::fill(&pal._colorValues[0], &pal._colorValues[3], 0); Common::fill(&pal._colorFlags[0], &pal._colorFlags[3], false); + resetClipBounds(); if (transitionType == kTransitionFadeOutIn) { // Fade out @@ -628,9 +623,11 @@ void ScreenSurface::transition(ScreenTransition transitionType, bool surfaceFlag Common::fill(&palData[0], &palData[PALETTE_SIZE], 0); pal.setFullPalette(palData); - copyRectToScreen(getBounds()); + markAllDirty(); + update(); pal.fadeIn(palData, pal._mainPalette, 0, 256, 0, 1, 1, 16); break; + } case kTransitionBoxInBottomLeft: case kTransitionBoxInBottomRight: @@ -666,19 +663,13 @@ void ScreenSurface::transition(ScreenTransition transitionType, bool surfaceFlag // Quick transitions break; } -} -void ScreenSurface::setClipBounds(const Common::Rect &r) { - _clipBounds = r; - setPixels(_surfacePixels + pitch * r.top + r.left, r.width(), r.height()); - this->pitch = MADS_SCREEN_WIDTH; + // Reset clipping + markAllDirty(); + setClipBounds(clipBounds); } -void ScreenSurface::resetClipBounds() { - setClipBounds(Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT)); -} - -void ScreenSurface::panTransition(MSurface &newScreen, byte *palData, int entrySide, +void Screen::panTransition(MSurface &newScreen, byte *palData, int entrySide, const Common::Point &srcPos, const Common::Point &destPos, ThroughBlack throughBlack, bool setPalette, int numTicks) { EventsManager &events = *_vm->_events; @@ -735,8 +726,6 @@ void ScreenSurface::panTransition(MSurface &newScreen, byte *palData, int entryS srcPos.x + xAt + 1, srcPos.y + size.y)); } - copyRectToScreen(Common::Rect(xAt, destPos.y, xAt + 1, destPos.y + size.y)); - // Slight delay events.pollEvents(); g_system->delayMillis(1); @@ -747,16 +736,18 @@ void ScreenSurface::panTransition(MSurface &newScreen, byte *palData, int entryS } if (throughBlack == THROUGH_BLACK2) { + /* Common::Rect r(srcPos.x, srcPos.y, srcPos.x + size.x, srcPos.y + size.y); copyRectToSurface(newScreen, destPos.x, destPos.y, r); copyRectToScreen(r); + */ } } /** * Translates the current screen from the old palette to the new palette */ -void ScreenSurface::swapForeground(byte newPalette[PALETTE_SIZE], byte *paletteMap) { +void Screen::swapForeground(byte newPalette[PALETTE_SIZE], byte *paletteMap) { Palette &palette = *_vm->_palette; byte oldPalette[PALETTE_SIZE]; byte oldMap[PALETTE_COUNT]; @@ -775,7 +766,7 @@ void ScreenSurface::swapForeground(byte newPalette[PALETTE_SIZE], byte *paletteM destP += 2 * RGB_SIZE; } - Common::Rect oldClip = _clipBounds; + Common::Rect oldClip = getClipBounds(); resetClipBounds(); copyRectTranslate(*this, oldMap, Common::Point(0, 0), @@ -790,7 +781,7 @@ void ScreenSurface::swapForeground(byte newPalette[PALETTE_SIZE], byte *paletteM * Palettes consist of 128 RGB entries for the foreground and background * respectively, with the two interleaved together. So the start */ -void ScreenSurface::swapPalette(const byte *palData, byte swapTable[PALETTE_COUNT], +void Screen::swapPalette(const byte *palData, byte swapTable[PALETTE_COUNT], bool foreground) { int start = foreground ? 1 : 0; const byte *dynamicList = &palData[start * RGB_SIZE]; @@ -815,5 +806,12 @@ void ScreenSurface::swapPalette(const byte *palData, byte swapTable[PALETTE_COUN } } +void Screen::setClipBounds(const Common::Rect &r) { + create(_rawSurface, r); +} + +void Screen::resetClipBounds() { + setClipBounds(Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT)); +} } // End of namespace MADS diff --git a/engines/mads/screen.h b/engines/mads/screen.h index d910e88633..626080580e 100644 --- a/engines/mads/screen.h +++ b/engines/mads/screen.h @@ -25,6 +25,7 @@ #include "common/scummsys.h" #include "common/array.h" +#include "graphics/screen.h" #include "mads/msurface.h" #include "mads/action.h" @@ -207,11 +208,10 @@ public: void synchronize(Common::Serializer &s); }; -class ScreenSurface : public MSurface { +class Screen : virtual public Graphics::Screen, virtual public MSurface { private: uint16 _random; - byte *_surfacePixels; - Common::Rect _clipBounds; + MSurface _rawSurface; void panTransition(MSurface &newScreen, byte *palData, int entrySide, const Common::Point &srcPos, const Common::Point &destPos, @@ -226,36 +226,40 @@ public: /** * Constructor */ - ScreenSurface(); + Screen(); /** * Destructor */ - ~ScreenSurface(); + virtual ~Screen() {} /** - * Initialize the surface + * Updates the physical screen with contents of the internal surface */ - void init(); + virtual void update(); /** - * Copys an area of the screen surface to the ScmmVM physical screen buffer - * @param bounds Area of screen surface to copy + * Transition to a new screen with a given effect */ - void copyRectToScreen(const Common::Rect &bounds); + void transition(ScreenTransition transitionType, bool surfaceFlag); /** - * Updates the screen with the contents of the surface + * Set the screen drawing area to a sub-section of the real screen */ - void updateScreen(); - - void transition(ScreenTransition transitionType, bool surfaceFlag); - void setClipBounds(const Common::Rect &r); + /** + * Reset back to drawing on the entirety of the screen + */ void resetClipBounds(); - const Common::Rect &getClipBounds() { return _clipBounds; } + /** + * Return the current drawing/clip area + */ + const Common::Rect getClipBounds() const { + const Common::Point pt = getOffsetFromOwner(); + return Common::Rect(pt.x, pt.y, pt.x + this->w, pt.y + this->h); + } }; } // End of namespace MADS diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index 50b37de7ea..2afe089d4a 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -237,8 +237,8 @@ bool SequenceList::loadSprites(int seqIndex) { if ((seqEntry._flags != 0) || (seqEntry._dynamicHotspotIndex >= 0)) { SpriteAsset &spriteSet = *scene._sprites[seqEntry._spritesIndex]; MSprite *frame = spriteSet.getFrame(seqEntry._frameIndex - 1); - int width = frame->getWidth() * seqEntry._scale / 200; - int height = frame->getHeight() * seqEntry._scale / 100; + int width = frame->w * seqEntry._scale / 200; + int height = frame->h * seqEntry._scale / 100; Common::Point pt = spriteSlot._position; // Handle sprite movement, if present diff --git a/engines/mads/sound.cpp b/engines/mads/sound.cpp index c96fd01882..5f2c9aca56 100644 --- a/engines/mads/sound.cpp +++ b/engines/mads/sound.cpp @@ -20,14 +20,16 @@ * */ -#include "audio/audiostream.h" #include "audio/fmopl.h" -#include "audio/decoders/raw.h" #include "common/memstream.h" #include "mads/sound.h" #include "mads/mads.h" #include "mads/nebular/sound_nebular.h" +namespace Audio { +class Mixer; +} + namespace MADS { SoundManager::SoundManager(MADSEngine *vm, Audio::Mixer *mixer) { diff --git a/engines/mads/sound.h b/engines/mads/sound.h index 2c4de6f21d..9674d4198d 100644 --- a/engines/mads/sound.h +++ b/engines/mads/sound.h @@ -25,12 +25,21 @@ #include "common/scummsys.h" #include "common/queue.h" -#include "audio/audiostream.h" -#include "audio/mixer.h" -#include "mads/nebular/sound_nebular.h" + +namespace Audio { +class Mixer; +} + +namespace OPL { +class OPL; +} namespace MADS { +namespace Nebular { +class ASound; +} + class MADSEngine; class SoundManager { diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp index 0a1c0b710d..fc8ddf22d2 100644 --- a/engines/mads/sprites.cpp +++ b/engines/mads/sprites.cpp @@ -59,10 +59,10 @@ MSprite::MSprite() : MSurface() { } MSprite::MSprite(Common::SeekableReadStream *source, const Common::Array<RGB6> &palette, - const Common::Rect &bounds) - : MSurface(bounds.width(), bounds.height()), - _offset(Common::Point(bounds.left, bounds.top)), _transparencyIndex(TRANSPARENT_COLOR_INDEX) { + const Common::Rect &bounds): MSurface(), _transparencyIndex(TRANSPARENT_COLOR_INDEX), + _offset(Common::Point(bounds.left, bounds.top)) { // Load the sprite data + create(bounds.width(), bounds.height()); loadSprite(source, palette); } @@ -74,8 +74,8 @@ void MSprite::loadSprite(Common::SeekableReadStream *source, byte *outp, *lineStart; bool newLine = false; - outp = getData(); - lineStart = getData(); + outp = getPixels(); + lineStart = getPixels(); int spriteSize = this->w * this->h; byte transIndex = getTransparencyIndex(); Common::fill(outp, outp + spriteSize, transIndex); @@ -84,7 +84,7 @@ void MSprite::loadSprite(Common::SeekableReadStream *source, byte cmd1, cmd2, count, pixel; if (newLine) { - outp = lineStart + getWidth(); + outp = lineStart + this->w; lineStart = outp; newLine = false; } @@ -126,7 +126,7 @@ void MSprite::loadSprite(Common::SeekableReadStream *source, // Do a final iteration over the sprite to convert it's pixels to // the final positions in the main palette spriteSize = this->w * this->h; - for (outp = getData(); spriteSize > 0; --spriteSize, ++outp) { + for (outp = getPixels(); spriteSize > 0; --spriteSize, ++outp) { if (*outp != transIndex) *outp = palette[*outp]._palIndex; } @@ -257,12 +257,12 @@ void SpriteSlots::drawBackground() { } if (spriteSlot._depth <= 1) { - frame->copyTo(&scene._backgroundSurface, pt, frame->getTransparencyIndex()); + scene._backgroundSurface.transBlitFrom(*frame, pt, frame->getTransparencyIndex()); } else if (scene._depthStyle == 0) { - scene._backgroundSurface.copyFrom(frame, pt, spriteSlot._depth, &scene._depthSurface, + scene._backgroundSurface.copyFrom(*frame, pt, spriteSlot._depth, &scene._depthSurface, -1, false, frame->getTransparencyIndex()); } else { - frame->copyTo(&scene._backgroundSurface, pt, frame->getTransparencyIndex()); + scene._backgroundSurface.transBlitFrom(*frame, pt, frame->getTransparencyIndex()); } } } @@ -319,7 +319,7 @@ void SpriteSlots::drawSprites(MSurface *s) { if ((slot._scale < 100) && (slot._scale != -1)) { // Scaled drawing - s->copyFrom(sprite, slot._position, slot._depth, &scene._depthSurface, + s->copyFrom(*sprite, slot._position, slot._depth, &scene._depthSurface, slot._scale, flipped, sprite->getTransparencyIndex()); } else { int xp, yp; @@ -334,7 +334,7 @@ void SpriteSlots::drawSprites(MSurface *s) { if (slot._depth > 1) { // Draw the frame with depth processing - s->copyFrom(sprite, Common::Point(xp, yp), slot._depth, &scene._depthSurface, + s->copyFrom(*sprite, Common::Point(xp, yp), slot._depth, &scene._depthSurface, -1, flipped, sprite->getTransparencyIndex()); } else { MSurface *spr = sprite; @@ -344,7 +344,7 @@ void SpriteSlots::drawSprites(MSurface *s) { } // No depth, so simply draw the image - spr->copyTo(s, Common::Point(xp, yp), sprite->getTransparencyIndex()); + s->transBlitFrom(*spr, Common::Point(xp, yp), sprite->getTransparencyIndex()); // Free sprite if it was a flipped one if (flipped) { diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index e4b09ff54c..8f7cb0a24b 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -112,7 +112,7 @@ void UISlots::draw(bool updateFlag, bool delFlag) { Common::Point(dirtyArea._bounds.left, dirtyArea._bounds.top)); } else { // Copy area - userInterface._surface.copyTo(&userInterface, dirtyArea._bounds, + userInterface.blitFrom(userInterface._surface, dirtyArea._bounds, Common::Point(dirtyArea._bounds.left, dirtyArea._bounds.top)); } } @@ -155,7 +155,7 @@ void UISlots::draw(bool updateFlag, bool delFlag) { if (slot._segmentId == IMG_SPINNING_OBJECT) { MSprite *sprite = asset->getFrame(frameNumber - 1); - sprite->copyTo(&userInterface, slot._position, + userInterface.transBlitFrom(*sprite, slot._position, sprite->getTransparencyIndex()); } else { MSprite *sprite = asset->getFrame(frameNumber - 1); @@ -185,7 +185,7 @@ void UISlots::draw(bool updateFlag, bool delFlag) { // Flag area of screen as needing update Common::Rect r = dirtyArea._bounds; r.translate(0, scene._interfaceY); - _vm->_screen.copyRectToScreen(r); + //_vm->_screen->copyRectToScreen(r); } } } @@ -339,10 +339,10 @@ UserInterface::UserInterface(MADSEngine *vm) : _vm(vm), _dirtyAreas(vm), Common::fill(&_categoryIndexes[0], &_categoryIndexes[7], 0); // Map the user interface to the bottom of the game's screen surface - byte *pData = _vm->_screen.getBasePtr(0, MADS_SCENE_HEIGHT); - setPixels(pData, MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT); + create(*_vm->_screen, Common::Rect(0, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH, + MADS_SCREEN_HEIGHT)); - _surface.setSize(MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT); + _surface.create(MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT); } void UserInterface::load(const Common::String &resName) { @@ -367,7 +367,7 @@ void UserInterface::load(const Common::String &resName) { // Read in the surface data Common::SeekableReadStream *pixelsStream = madsPack.getItemStream(1); - pixelsStream->read(_surface.getData(), MADS_SCREEN_WIDTH * MADS_INTERFACE_HEIGHT); + pixelsStream->read(_surface.getPixels(), MADS_SCREEN_WIDTH * MADS_INTERFACE_HEIGHT); delete pixelsStream; } @@ -390,7 +390,7 @@ void UserInterface::setup(InputMode inputMode) { resName += ".INT"; load(resName); - _surface.copyTo(this); + blitFrom(_surface); } _vm->_game->_screenObjects._inputMode = inputMode; @@ -455,9 +455,9 @@ void UserInterface::mergeFrom(MSurface *src, const Common::Rect &srcBounds, // Copy the specified area - byte *data = src->getData(); - byte *srcPtr = data + (src->getWidth() * copyRect.top + copyRect.left); - byte *destPtr = (byte *)this->pixels + (destY * getWidth()) + destX; + byte *data = src->getPixels(); + byte *srcPtr = data + (src->w * copyRect.top + copyRect.left); + byte *destPtr = (byte *)getPixels() + (destY * this->w) + destX; for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) { // Process each line of the area @@ -468,8 +468,8 @@ void UserInterface::mergeFrom(MSurface *src, const Common::Rect &srcBounds, destPtr[xCtr] = srcPtr[xCtr]; } - srcPtr += src->getWidth(); - destPtr += getWidth(); + srcPtr += src->w; + destPtr += this->w; } } @@ -593,7 +593,7 @@ void UserInterface::scrollbarChanged() { _uiSlots.add(r); _uiSlots.draw(false, false); drawScroller(); - updateRect(r); +// updateRect(r); } void UserInterface::writeVocab(ScrCategory category, int id) { @@ -1012,7 +1012,7 @@ void UserInterface::selectObject(int invIndex) { _uiSlots.add(bounds); _uiSlots.draw(false, false); drawItemVocabList(); - updateRect(bounds); + //updateRect(bounds); } } @@ -1036,7 +1036,7 @@ void UserInterface::updateSelection(ScrCategory category, int newIndex, int *idx _uiSlots.add(bounds); _uiSlots.draw(false, false); drawInventoryList(); - updateRect(bounds); + //updateRect(bounds); _inventoryChanged = false; if (invList.size() < 2) { @@ -1052,25 +1052,19 @@ void UserInterface::updateSelection(ScrCategory category, int newIndex, int *idx if (oldIndex >= 0) { writeVocab(category, oldIndex); - if (getBounds(category, oldIndex, bounds)) - updateRect(bounds); +/* if (getBounds(category, oldIndex, bounds)) + updateRect(bounds); */ } if (newIndex >= 0) { writeVocab(category, newIndex); - if (getBounds(category, newIndex, bounds)) - updateRect(bounds); +/* if (getBounds(category, newIndex, bounds)) + updateRect(bounds); */ } } } -void UserInterface::updateRect(const Common::Rect &bounds) { - Common::Rect r = bounds; - r.translate(0, MADS_SCENE_HEIGHT); - _vm->_screen.copyRectToScreen(r); -} - void UserInterface::scrollerChanged() { warning("TODO: scrollerChanged"); } diff --git a/engines/mads/user_interface.h b/engines/mads/user_interface.h index 60cc1f736d..9232dc1bb1 100644 --- a/engines/mads/user_interface.h +++ b/engines/mads/user_interface.h @@ -190,8 +190,6 @@ private: * Draw a UI textual element */ void writeVocab(ScrCategory category, int id); - - void updateRect(const Common::Rect &bounds); public: MSurface _surface; UISlots _uiSlots; diff --git a/engines/mohawk/POTFILES b/engines/mohawk/POTFILES index 54d9dcaa3a..036059da6a 100644 --- a/engines/mohawk/POTFILES +++ b/engines/mohawk/POTFILES @@ -1,3 +1,4 @@ +engines/mohawk/detection.cpp engines/mohawk/dialogs.cpp engines/mohawk/myst.cpp engines/mohawk/riven.cpp diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp index a64d7ff7df..7c202998eb 100644 --- a/engines/mohawk/detection.cpp +++ b/engines/mohawk/detection.cpp @@ -221,10 +221,25 @@ SaveStateList MohawkMetaEngine::listSaves(const char *target) const { // Loading games is only supported in Myst/Riven currently. #ifdef ENABLE_MYST if (strstr(target, "myst")) { - filenames = Mohawk::MystGameState::generateSaveGameList(); + filenames = g_system->getSavefileManager()->listSavefiles("myst-###.mys"); + size_t prefixLen = sizeof("myst") - 1; + + for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) { + // Extract the slot number from the filename + char slot[4]; + slot[0] = (*filename)[prefixLen + 1]; + slot[1] = (*filename)[prefixLen + 2]; + slot[2] = (*filename)[prefixLen + 3]; + slot[3] = '\0'; + + int slotNum = atoi(slot); + + // Read the description from the save + Common::String description = Mohawk::MystGameState::querySaveDescription(slotNum); + saveList.push_back(SaveStateDescriptor(slotNum, description)); + } - for (uint32 i = 0; i < filenames.size(); i++) - saveList.push_back(SaveStateDescriptor(i, filenames[i])); + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); } else #endif if (strstr(target, "riven")) { @@ -238,11 +253,11 @@ SaveStateList MohawkMetaEngine::listSaves(const char *target) const { } void MohawkMetaEngine::removeSaveState(const char *target, int slot) const { + // Removing saved games is only supported in Myst/Riven currently. #ifdef ENABLE_MYST if (strstr(target, "myst")) { - Common::StringArray filenames = Mohawk::MystGameState::generateSaveGameList(); - Mohawk::MystGameState::deleteSave(filenames[slot]); + Mohawk::MystGameState::deleteSave(slot); } else #endif if (strstr(target, "riven")) { @@ -254,13 +269,7 @@ void MohawkMetaEngine::removeSaveState(const char *target, int slot) const { SaveStateDescriptor MohawkMetaEngine::querySaveMetaInfos(const char *target, int slot) const { #ifdef ENABLE_MYST if (strstr(target, "myst")) { - Common::StringArray filenames = Mohawk::MystGameState::generateSaveGameList(); - - if (slot >= (int) filenames.size()) { - return SaveStateDescriptor(); - } - - return Mohawk::MystGameState::querySaveMetaInfos(filenames[slot]); + return Mohawk::MystGameState::querySaveMetaInfos(slot); } else #endif { diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h index 7941a0d51a..e3eab89a34 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_UNSTABLE, + ADGF_TESTING, 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_UNSTABLE, + ADGF_DEMO | ADGF_TESTING, 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_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST }, GType_MYST, @@ -94,7 +94,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "e0937cca1ab125e48e30dc3cd5046ddf"), Common::DE_DEU, Common::kPlatformWindows, - ADGF_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST }, GType_MYST, @@ -112,7 +112,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "f7e7d7ca69934f1351b5acd4fe4d44c2"), Common::ES_ESP, Common::kPlatformWindows, - ADGF_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST }, GType_MYST, @@ -130,7 +130,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "a5795ce1751fc42525e4f9a1859181d5"), Common::IT_ITA, Common::kPlatformWindows, - ADGF_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST }, GType_MYST, @@ -148,7 +148,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "032c88e3b7e8db4ca475e7b7db9a66bb"), Common::JA_JPN, Common::kPlatformWindows, - ADGF_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST }, GType_MYST, @@ -166,7 +166,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "d631d42567a941c67c78f2e491f4ea58"), Common::FR_FRA, Common::kPlatformWindows, - ADGF_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST }, GType_MYST, @@ -184,7 +184,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MAKING.DAT", "f6387e8f0f7b8a3e42c95294315d6a0e"), Common::EN_ANY, Common::kPlatformWindows, - ADGF_UNSTABLE, + ADGF_TESTING, 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_UNSTABLE, + ADGF_TESTING, 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_UNSTABLE, + ADGF_TESTING, 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_UNSTABLE, + ADGF_TESTING, 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_UNSTABLE, + ADGF_TESTING, 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_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST_ME }, GType_MYST, @@ -355,6 +355,23 @@ static const MohawkGameDescription gameDescriptions[] = { }, // Riven: The Sequel to Myst + // Version 1.0.0 (5CD) - Russian, Fargus + { + { + "riven", + "", + AD_ENTRY1s("a_Data.MHK", "2a840ed74fe5dc3a388bced674d379d5", 12024358), + Common::RU_RUS, + Common::kPlatformWindows, + ADGF_UNSTABLE, + GUIO1(GUIO_NOASPECT) + }, + GType_RIVEN, + 0, + 0, + }, + + // Riven: The Sequel to Myst // Version 1.1 (5CD) - Russian, Fargus { { @@ -1878,6 +1895,23 @@ static const MohawkGameDescription gameDescriptions[] = { "Living Books Player" }, + // From Matthew Winder in bug#6557 + // v1.0E, English, Windows + { + { + "arthurbday", + "", + AD_ENTRY1s("AB16B.LB", "c169be346de7b0bbfcd18761fc0a3e49", 3093), + Common::EN_ANY, + Common::kPlatformWindows, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + GType_LIVINGBOOKSV2, + 0, + 0, + }, + // From Torsten in bug#3422652 { { @@ -2100,6 +2134,22 @@ static const MohawkGameDescription gameDescriptions[] = { 0 }, + // From Matthew Winder in bug#6557 + { + { + "lilmonster", + "", + AD_ENTRY1s("lmasf.lb", "fcb665df1713d0411a41515efb20bebc", 4136), + Common::EN_ANY, + Common::kPlatformWindows, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + GType_LIVINGBOOKSV2, + 0, + 0 + }, + // From afholman in bug#3309308 { { @@ -2704,7 +2754,7 @@ static const MohawkGameDescription fallbackDescs[] = { AD_ENTRY1(0, 0), Common::UNK_LANG, Common::kPlatformWindows, - ADGF_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST }, GType_MYST, @@ -2719,7 +2769,7 @@ static const MohawkGameDescription fallbackDescs[] = { AD_ENTRY1(0, 0), Common::UNK_LANG, Common::kPlatformWindows, - ADGF_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST_MAKING_OF }, GType_MAKINGOF, @@ -2734,7 +2784,7 @@ static const MohawkGameDescription fallbackDescs[] = { AD_ENTRY1(0, 0), Common::UNK_LANG, Common::kPlatformWindows, - ADGF_UNSTABLE, + ADGF_TESTING, GUI_OPTIONS_MYST_ME }, GType_MYST, diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h index bc25c72a43..59b3e01fb7 100644 --- a/engines/mohawk/dialogs.h +++ b/engines/mohawk/dialogs.h @@ -29,11 +29,13 @@ #include "common/str.h" #include "gui/dialog.h" #include "gui/options.h" -#include "gui/widget.h" -#include "gui/widgets/list.h" namespace GUI { class SaveLoadChooser; +class ButtonWidget; +class CheckboxWidget; +class CommandSender; +class StaticTextWidget; } namespace Mohawk { diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index c16fab9131..633b67f7e9 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -231,11 +231,9 @@ Common::Error MohawkEngine_Myst::run() { // Load game from launcher/command line if requested if (ConfMan.hasKey("save_slot") && hasGameSaveSupport()) { - uint32 gameToLoad = ConfMan.getInt("save_slot"); - Common::StringArray savedGamesList = MystGameState::generateSaveGameList(); - if (gameToLoad > savedGamesList.size()) - error ("Could not find saved game"); - _gameState->load(savedGamesList[gameToLoad]); + int saveSlot = ConfMan.getInt("save_slot"); + if (!_gameState->load(saveSlot)) + error("Failed to load save game from slot %i", saveSlot); } else { // Start us on the first stack. if (getGameType() == GType_MAKINGOF) @@ -606,7 +604,8 @@ void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) { _gfx->runTransition(transition, Common::Rect(544, 333), 10, 0); } else { _gfx->copyBackBufferToScreen(Common::Rect(544, 333)); - _needsUpdate = true; + _system->updateScreen(); + _needsUpdate = false; } } @@ -1083,19 +1082,14 @@ void MohawkEngine_Myst::loadResources() { } Common::Error MohawkEngine_Myst::loadGameState(int slot) { - if (_gameState->load(MystGameState::generateSaveGameList()[slot])) + if (_gameState->load(slot)) return Common::kNoError; return Common::kUnknownError; } Common::Error MohawkEngine_Myst::saveGameState(int slot, const Common::String &desc) { - Common::StringArray saveList = MystGameState::generateSaveGameList(); - - if ((uint)slot < saveList.size()) - MystGameState::deleteSave(saveList[slot]); - - return _gameState->save(desc) ? Common::kNoError : Common::kUnknownError; + return _gameState->save(slot, desc) ? Common::kNoError : Common::kUnknownError; } bool MohawkEngine_Myst::hasGameSaveSupport() const { diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp index 04e7c5a9b7..596180ddb2 100644 --- a/engines/mohawk/myst_scripts.cpp +++ b/engines/mohawk/myst_scripts.cpp @@ -31,7 +31,6 @@ #include "common/system.h" #include "common/memstream.h" #include "common/textconsole.h" -#include "gui/message.h" namespace Mohawk { @@ -685,9 +684,14 @@ void MystScriptParser::o_changeBackgroundSound(uint16 op, uint16 var, uint16 arg // Used on Channelwood Card 3225 with argc = 8 i.e. Conditional Sound List debugC(kDebugScript, "Opcode %d: Process Sound Block", op); - Common::MemoryReadStream stream = Common::MemoryReadStream((const byte *) argv, argc * sizeof(uint16)); + Common::MemoryWriteStreamDynamic writeStream = Common::MemoryWriteStreamDynamic(DisposeAfterUse::YES); + for (uint i = 0; i < argc; i++) { + writeStream.writeUint16LE(argv[i]); + } + + Common::MemoryReadStream readStream = Common::MemoryReadStream(writeStream.getData(), writeStream.size()); - MystSoundBlock soundBlock = _vm->readSoundBlock(&stream); + MystSoundBlock soundBlock = _vm->readSoundBlock(&readStream); _vm->applySoundBlock(soundBlock); } diff --git a/engines/mohawk/myst_stacks/credits.cpp b/engines/mohawk/myst_stacks/credits.cpp index b4a2076528..c382263f7c 100644 --- a/engines/mohawk/myst_stacks/credits.cpp +++ b/engines/mohawk/myst_stacks/credits.cpp @@ -28,7 +28,6 @@ #include "mohawk/myst_stacks/credits.h" #include "common/system.h" -#include "gui/message.h" namespace Mohawk { namespace MystStacks { diff --git a/engines/mohawk/myst_stacks/intro.cpp b/engines/mohawk/myst_stacks/intro.cpp index 1d733d8100..f448108199 100644 --- a/engines/mohawk/myst_stacks/intro.cpp +++ b/engines/mohawk/myst_stacks/intro.cpp @@ -28,8 +28,6 @@ #include "mohawk/video.h" #include "mohawk/myst_stacks/intro.h" -#include "gui/message.h" - namespace Mohawk { namespace MystStacks { diff --git a/engines/mohawk/myst_stacks/makingof.cpp b/engines/mohawk/myst_stacks/makingof.cpp index 1059fd0c5e..a0a1f359ba 100644 --- a/engines/mohawk/myst_stacks/makingof.cpp +++ b/engines/mohawk/myst_stacks/makingof.cpp @@ -27,8 +27,6 @@ #include "mohawk/video.h" #include "mohawk/myst_stacks/makingof.h" -#include "gui/message.h" - namespace Mohawk { namespace MystStacks { diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp index 9d23d2fb10..bd50c4feb3 100644 --- a/engines/mohawk/myst_stacks/myst.cpp +++ b/engines/mohawk/myst_stacks/myst.cpp @@ -33,8 +33,6 @@ #include "common/system.h" #include "common/textconsole.h" -#include "gui/message.h" - namespace Mohawk { namespace MystStacks { @@ -3089,6 +3087,8 @@ void Myst::clockReset() { } void Myst::clockResetWeight() { + _vm->_sound->replaceSoundMyst(9113); + _clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack)); if (!_clockWeightVideo) error("Failed to open cl1wlfch movie"); diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp index 5402e5a581..454435cf92 100644 --- a/engines/mohawk/myst_stacks/selenitic.cpp +++ b/engines/mohawk/myst_stacks/selenitic.cpp @@ -31,7 +31,6 @@ #include "common/system.h" #include "common/textconsole.h" -#include "gui/message.h" namespace Mohawk { namespace MystStacks { diff --git a/engines/mohawk/myst_stacks/slides.cpp b/engines/mohawk/myst_stacks/slides.cpp index a1413f0d71..0560608b24 100644 --- a/engines/mohawk/myst_stacks/slides.cpp +++ b/engines/mohawk/myst_stacks/slides.cpp @@ -29,7 +29,6 @@ #include "mohawk/myst_stacks/slides.h" #include "common/system.h" -#include "gui/message.h" namespace Mohawk { namespace MystStacks { diff --git a/engines/mohawk/myst_state.cpp b/engines/mohawk/myst_state.cpp index 06cd69b23c..4324d6bde5 100644 --- a/engines/mohawk/myst_state.cpp +++ b/engines/mohawk/myst_state.cpp @@ -106,16 +106,12 @@ MystGameState::MystGameState(MohawkEngine_Myst *vm, Common::SaveFileManager *sav MystGameState::~MystGameState() { } -Common::StringArray MystGameState::generateSaveGameList() { - return g_system->getSavefileManager()->listSavefiles("*.mys"); -} - -bool MystGameState::load(const Common::String &filename) { - if (!loadState(filename)) { +bool MystGameState::load(int slot) { + if (!loadState(slot)) { return false; } - loadMetadata(filename); + loadMetadata(slot); // Set Channelwood elevator state to down, because we start on the lower level _channelwood.elevatorState = 0; @@ -136,7 +132,8 @@ bool MystGameState::load(const Common::String &filename) { return true; } -bool MystGameState::loadState(const Common::String &filename) { +bool MystGameState::loadState(int slot) { + Common::String filename = buildSaveFilename(slot); Common::InSaveFile *loadFile = _saveFileMan->openForLoading(filename); if (!loadFile) { return false; @@ -160,9 +157,10 @@ bool MystGameState::loadState(const Common::String &filename) { return true; } -void MystGameState::loadMetadata(const Common::String &filename) { +void MystGameState::loadMetadata(int slot) { // Open the metadata file - Common::InSaveFile *metadataFile = openMetadataFile(filename); + Common::String filename = buildMetadataFilename(slot); + Common::InSaveFile *metadataFile = _vm->getSaveFileManager()->openForLoading(filename); if (!metadataFile) { return; } @@ -179,25 +177,19 @@ void MystGameState::loadMetadata(const Common::String &filename) { delete metadataFile; } -bool MystGameState::save(const Common::String &filename) { - // Make sure the description does not have an extension - Common::String desc = filename; - if (filename.hasSuffix(".mys") || filename.hasSuffix(".MYS")) { - desc = removeExtension(filename); - } - - if (!saveState(desc)) { +bool MystGameState::save(int slot, const Common::String &desc) { + if (!saveState(slot)) { return false; } updateMetadateForSaving(desc); - return saveMetadata(desc); + return saveMetadata(slot); } -bool MystGameState::saveState(const Common::String &desc) { +bool MystGameState::saveState(int slot) { // Make sure we have the right extension - Common::String filename = desc + ".mys"; + Common::String filename = buildSaveFilename(slot); Common::OutSaveFile *saveFile = _saveFileMan->openForSaving(filename); if (!saveFile) { return false; @@ -213,6 +205,14 @@ bool MystGameState::saveState(const Common::String &desc) { return true; } +Common::String MystGameState::buildSaveFilename(int slot) { + return Common::String::format("myst-%03d.mys", slot); +} + +Common::String MystGameState::buildMetadataFilename(int slot) { + return Common::String::format("myst-%03d.mym", slot); +} + void MystGameState::updateMetadateForSaving(const Common::String &desc) { // Update save creation info TimeDate t; @@ -226,10 +226,10 @@ void MystGameState::updateMetadateForSaving(const Common::String &desc) { _metadata.totalPlayTime = _vm->getTotalPlayTime(); } -bool MystGameState::saveMetadata(const Common::String &desc) { +bool MystGameState::saveMetadata(int slot) { // Write the metadata to a separate file so that the save files // are still compatible with the original engine - Common::String metadataFilename = desc + ".mym"; + Common::String metadataFilename = buildMetadataFilename(slot); Common::OutSaveFile *metadataFile = _saveFileMan->openForSaving(metadataFilename); if (!metadataFile) { return false; @@ -248,14 +248,12 @@ bool MystGameState::saveMetadata(const Common::String &desc) { return true; } -SaveStateDescriptor MystGameState::querySaveMetaInfos(const Common::String filename) { - SaveStateDescriptor desc; - desc.setDescription(filename); - +SaveStateDescriptor MystGameState::querySaveMetaInfos(int slot) { // Open the metadata file - Common::InSaveFile *metadataFile = openMetadataFile(filename); + Common::String filename = buildMetadataFilename(slot); + Common::InSaveFile *metadataFile = g_system->getSavefileManager()->openForLoading(filename); if (!metadataFile) { - return desc; + return SaveStateDescriptor(); } Common::Serializer m(metadataFile, nullptr); @@ -264,10 +262,11 @@ SaveStateDescriptor MystGameState::querySaveMetaInfos(const Common::String filen Mohawk::MystSaveMetadata metadata; if (!metadata.sync(m)) { delete metadataFile; - return desc; + return SaveStateDescriptor(); } // Set the save description + SaveStateDescriptor desc; desc.setDescription(metadata.saveDescription); desc.setSaveDate(metadata.saveYear, metadata.saveMonth, metadata.saveDay); desc.setSaveTime(metadata.saveHour, metadata.saveMinute); @@ -279,20 +278,26 @@ SaveStateDescriptor MystGameState::querySaveMetaInfos(const Common::String filen return desc; } -Common::InSaveFile *MystGameState::openMetadataFile(const Common::String &filename) { - // Remove the extension - Common::String baseName = removeExtension(filename); - +Common::String MystGameState::querySaveDescription(int slot) { // Open the metadata file - return g_system->getSavefileManager()->openForLoading(baseName + ".mym"); -} + Common::String filename = buildMetadataFilename(slot); + Common::InSaveFile *metadataFile = g_system->getSavefileManager()->openForLoading(filename); + if (!metadataFile) { + return ""; + } + + Common::Serializer m(metadataFile, nullptr); -Common::String MystGameState::removeExtension(const Common::String &filename) { - Common::String baseName = filename; - for (uint i = 0; i < 4; i++) { - baseName.deleteLastChar(); + // Read the metadata file + Mohawk::MystSaveMetadata metadata; + if (!metadata.sync(m)) { + delete metadataFile; + return ""; } - return baseName; + + delete metadataFile; + + return metadata.saveDescription; } void MystGameState::syncGameState(Common::Serializer &s, bool isME) { @@ -471,12 +476,14 @@ void MystGameState::syncGameState(Common::Serializer &s, bool isME) { warning("Unexpected File Position 0x%03X At End of Save/Load", s.bytesSynced()); } -void MystGameState::deleteSave(const Common::String &saveName) { - debugC(kDebugSaveLoad, "Deleting save file \'%s\'", saveName.c_str()); - Common::String basename = removeExtension(saveName); +void MystGameState::deleteSave(int slot) { + Common::String filename = buildSaveFilename(slot); + Common::String metadataFilename = buildMetadataFilename(slot); + + debugC(kDebugSaveLoad, "Deleting save file \'%s\'", filename.c_str()); - g_system->getSavefileManager()->removeSavefile(saveName); - g_system->getSavefileManager()->removeSavefile(basename + ".mym"); + g_system->getSavefileManager()->removeSavefile(filename); + g_system->getSavefileManager()->removeSavefile(metadataFilename); } void MystGameState::addZipDest(uint16 stack, uint16 view) { diff --git a/engines/mohawk/myst_state.h b/engines/mohawk/myst_state.h index 50359a5b52..7d5f3f7102 100644 --- a/engines/mohawk/myst_state.h +++ b/engines/mohawk/myst_state.h @@ -58,12 +58,12 @@ public: MystGameState(MohawkEngine_Myst*, Common::SaveFileManager*); ~MystGameState(); - static Common::StringArray generateSaveGameList(); - static SaveStateDescriptor querySaveMetaInfos(const Common::String filename); + static SaveStateDescriptor querySaveMetaInfos(int slot); + static Common::String querySaveDescription(int slot); - bool load(const Common::String &filename); - bool save(const Common::String &filename); - static void deleteSave(const Common::String &saveName); + bool load(int slot); + bool save(int slot, const Common::String &desc); + static void deleteSave(int slot); void addZipDest(uint16 stack, uint16 view); bool isReachableZipDest(uint16 stack, uint16 view); @@ -292,13 +292,13 @@ public: private: void syncGameState(Common::Serializer &s, bool isME); - static Common::InSaveFile *openMetadataFile(const Common::String &filename); - bool loadState(const Common::String &filename); - void loadMetadata(const Common::String &filename); - bool saveState(const Common::String &desc); + static Common::String buildSaveFilename(int slot); + static Common::String buildMetadataFilename(int slot); + bool loadState(int slot); + void loadMetadata(int slot); + bool saveState(int slot); void updateMetadateForSaving(const Common::String &desc); - bool saveMetadata(const Common::String &desc); - static Common::String removeExtension(const Common::String &filename); + bool saveMetadata(int slot); // The values in these regions are lists of VIEW resources // which correspond to visited zip destinations diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 898f68c581..178139ab76 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -25,6 +25,7 @@ #include "common/keyboard.h" #include "common/translation.h" #include "common/system.h" +#include "gui/saveload.h" #include "mohawk/cursors.h" #include "mohawk/installer_archive.h" diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h index 9c23d07c52..3ea50bb38d 100644 --- a/engines/mohawk/riven.h +++ b/engines/mohawk/riven.h @@ -27,8 +27,6 @@ #include "mohawk/mohawk.h" #include "mohawk/riven_scripts.h" -#include "gui/saveload.h" - #include "common/hashmap.h" #include "common/hash-str.h" #include "common/random.h" diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp index a2c08d4a92..38cb0b3608 100644 --- a/engines/mohawk/sound.cpp +++ b/engines/mohawk/sound.cpp @@ -23,12 +23,12 @@ #include "common/debug.h" #include "common/events.h" #include "common/system.h" -#include "common/util.h" #include "common/textconsole.h" +#include "audio/mididrv.h" #include "audio/midiparser.h" -#include "audio/musicplugin.h" #include "audio/audiostream.h" +#include "audio/decoders/adpcm.h" #include "audio/decoders/mp3.h" #include "audio/decoders/raw.h" #include "audio/decoders/wave.h" diff --git a/engines/mohawk/sound.h b/engines/mohawk/sound.h index c62e6e9874..f09706e155 100644 --- a/engines/mohawk/sound.h +++ b/engines/mohawk/sound.h @@ -26,9 +26,7 @@ #include "common/scummsys.h" #include "common/str.h" -#include "audio/audiostream.h" #include "audio/mixer.h" -#include "audio/decoders/adpcm.h" #include "mohawk/mohawk.h" #include "mohawk/resource.h" @@ -36,6 +34,10 @@ class MidiDriver; class MidiParser; +namespace Audio { +class RewindableAudioStream; +} + namespace Mohawk { #define MAX_CHANNELS 2 // Can there be more than 2? diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 90d366ed7e..81b2edb57d 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -145,6 +145,7 @@ MortevielleEngine::MortevielleEngine(OSystem *system, const MortevielleGameDescr _endGame = false; _loseGame = false; _txxFileFl = false; + _is = 0; } MortevielleEngine::~MortevielleEngine() { diff --git a/engines/mortevielle/sound.cpp b/engines/mortevielle/sound.cpp index f02ccb69ea..77eba4cd6d 100644 --- a/engines/mortevielle/sound.cpp +++ b/engines/mortevielle/sound.cpp @@ -28,6 +28,7 @@ #include "mortevielle/mortevielle.h" #include "mortevielle/sound.h" +#include "audio/audiostream.h" #include "audio/decoders/raw.h" #include "common/scummsys.h" diff --git a/engines/mortevielle/sound.h b/engines/mortevielle/sound.h index d913684935..15b4667afa 100644 --- a/engines/mortevielle/sound.h +++ b/engines/mortevielle/sound.h @@ -28,11 +28,14 @@ #ifndef MORTEVIELLE_SOUND_H #define MORTEVIELLE_SOUND_H -#include "audio/audiostream.h" #include "audio/mixer.h" #include "common/mutex.h" #include "common/queue.h" +namespace Audio { +class QueuingAudioStream; +} + namespace Mortevielle { class MortevielleEngine; diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp index 826f175d47..0f2a421d83 100644 --- a/engines/neverhood/menumodule.cpp +++ b/engines/neverhood/menumodule.cpp @@ -609,7 +609,8 @@ void TextEditWidget::onClick() { ++newCursorPos; _cursorPos = MIN((int)_entryString.size(), newCursorPos); } - _cursorSurface->setVisible(true); + if (!_readOnly) + _cursorSurface->setVisible(true); refresh(); } Widget::onClick(); @@ -1058,7 +1059,7 @@ static const NRect kSaveGameMenuTextEditRect = { 0, 0, 377, 17 }; static const NRect kSaveGameMenuMouseRect = { 50, 47, 427, 64 }; SaveGameMenu::SaveGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList) - : GameStateMenu(vm, parentModule, savegameList, kSaveGameMenuButtonFileHashes, kSaveGameMenuButtonCollisionBounds, + : GameStateMenu(vm, parentModule, savegameList, kSaveGameMenuButtonFileHashes, kSaveGameMenuButtonCollisionBounds, 0x30084E25, 0x2328121A, 0x84E21308, &kSaveGameMenuMouseRect, 0x1115A223, 60, 142, kSaveGameMenuListBoxRect, @@ -1068,9 +1069,11 @@ SaveGameMenu::SaveGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameLi } void SaveGameMenu::performAction() { - ((MenuModule*)_parentModule)->setSavegameInfo(_textEditWidget->getString(), - _listBox->getCurrIndex(), _textEditWidget->isModified()); - leaveScene(0); + if (!_textEditWidget->getString().empty()) { + ((MenuModule*)_parentModule)->setSavegameInfo(_textEditWidget->getString(), + _listBox->getCurrIndex(), _textEditWidget->isModified()); + leaveScene(0); + } } static const uint32 kLoadGameMenuButtonFileHashes[] = { @@ -1089,12 +1092,21 @@ static const NRect kLoadGameMenuButtonCollisionBounds[] = { static const NRect kLoadGameMenuListBoxRect = { 0, 0, 320, 272 }; static const NRect kLoadGameMenuTextEditRect = { 0, 0, 320, 17 }; + +#if 0 +// Unlike the original game, the text widget in our load dialog is read-only so +// don't change the mouse cursor to indicate that you can type the name of the +// game to load. +// +// Since we allow multiple saved games to have the same name, it's probably +// better this way. static const NRect kLoadGameMenuMouseRect = { 263, 48, 583, 65 }; +#endif LoadGameMenu::LoadGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList) : GameStateMenu(vm, parentModule, savegameList, kLoadGameMenuButtonFileHashes, kLoadGameMenuButtonCollisionBounds, 0x98620234, 0x201C2474, - 0x2023098E, &kLoadGameMenuMouseRect, + 0x2023098E, NULL /* &kLoadGameMenuMouseRect */, 0x04040409, 263, 142, kLoadGameMenuListBoxRect, 0x10924C03, 0, 263, 48, kLoadGameMenuTextEditRect, 0x0BC600A3, 0x0F960021) { @@ -1102,8 +1114,11 @@ LoadGameMenu::LoadGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameLi } void LoadGameMenu::performAction() { - ((MenuModule*)_parentModule)->setLoadgameInfo(_listBox->getCurrIndex()); - leaveScene(0); + // TODO: The original would display a message here if nothing was selected. + if (!_textEditWidget->getString().empty()) { + ((MenuModule*)_parentModule)->setLoadgameInfo(_listBox->getCurrIndex()); + leaveScene(0); + } } static const uint32 kDeleteGameMenuButtonFileHashes[] = { @@ -1134,8 +1149,11 @@ DeleteGameMenu::DeleteGameMenu(NeverhoodEngine *vm, Module *parentModule, Savega } void DeleteGameMenu::performAction() { - ((MenuModule*)_parentModule)->setDeletegameInfo(_listBox->getCurrIndex()); - leaveScene(0); + // TODO: The original would display a message here if no game was selected. + if (!_textEditWidget->getString().empty()) { + ((MenuModule*)_parentModule)->setDeletegameInfo(_listBox->getCurrIndex()); + leaveScene(0); + } } QueryOverwriteMenu::QueryOverwriteMenu(NeverhoodEngine *vm, Module *parentModule, const Common::String &description) diff --git a/engines/neverhood/neverhood.h b/engines/neverhood/neverhood.h index 0661bcba0e..9eac4ffc44 100644 --- a/engines/neverhood/neverhood.h +++ b/engines/neverhood/neverhood.h @@ -30,7 +30,6 @@ #include "common/savefile.h" #include "common/str-array.h" #include "common/system.h" -#include "audio/mixer.h" #include "engines/engine.h" #include "gui/debugger.h" #include "neverhood/console.h" diff --git a/engines/neverhood/sound.h b/engines/neverhood/sound.h index 512b0fef98..24947f0191 100644 --- a/engines/neverhood/sound.h +++ b/engines/neverhood/sound.h @@ -24,6 +24,7 @@ #define NEVERHOOD_SOUND_H #include "audio/audiostream.h" +#include "audio/mixer.h" #include "common/array.h" #include "graphics/surface.h" #include "neverhood/neverhood.h" diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index 50a5b38d8d..8f895f1532 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -163,7 +163,7 @@ int16 Program::findLocal(const char* name) { int16 Program::addLocal(const char *name, int16 value, int16 min, int16 max) { assert(_numLocals < NUM_LOCALS); - strcpy(_localNames[_numLocals], name); + Common::strlcpy(_localNames[_numLocals], name, 10); _locals[_numLocals].setRange(min, max); _locals[_numLocals].setValue(value); diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 2b75e78582..bbe759dffe 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -60,6 +60,7 @@ Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gam DebugMan.addDebugChannel(kDebugMenu, "menu", "Menu debug level"); DebugMan.addDebugChannel(kDebugInventory, "inventory", "Inventory debug level"); + _screenWidth = 0; _screenHeight = 0; _screenSize = 0; _gameType = 0; @@ -86,6 +87,7 @@ Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gam _inventory = 0; _currentLocationIndex = 0; _numLocations = 0; + _language = 0; } Parallaction::~Parallaction() { @@ -208,7 +210,7 @@ void Parallaction::allocateLocationSlot(const char *name) { error("No more location slots available. Please report this immediately to ScummVM team"); if (_currentLocationIndex == -1) { - strcpy(_locationNames[_numLocations], name); + Common::strlcpy(_locationNames[_numLocations], name, 10); _currentLocationIndex = _numLocations; _numLocations++; diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 1e1c0b0a3d..9f045cb397 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -320,7 +320,7 @@ void Parallaction_br::changeLocation() { freeLocation(false); // load new location - strcpy(_location._name, _newLocationName.c_str()); + Common::strlcpy(_location._name, _newLocationName.c_str(), 100); parseLocation(_location._name); if (_location._startPosition.x != -1000) { diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 6d598d9557..eff088d5ee 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -25,10 +25,7 @@ #include "common/textconsole.h" #include "common/translation.h" -#include "gui/dialog.h" #include "gui/saveload.h" -#include "gui/widget.h" -#include "gui/widgets/list.h" #include "gui/message.h" #include "parallaction/parallaction.h" diff --git a/engines/pegasus/neighborhood/mars/mars.cpp b/engines/pegasus/neighborhood/mars/mars.cpp index df5a75541c..7c4a8a98ba 100644 --- a/engines/pegasus/neighborhood/mars/mars.cpp +++ b/engines/pegasus/neighborhood/mars/mars.cpp @@ -1950,7 +1950,7 @@ void Mars::pickedUpItem(Item *item) { } void Mars::dropItemIntoRoom(Item *item, Hotspot *dropSpot) { - if (dropSpot->getObjectID() == kAttackRobotHotSpotID) { + if (dropSpot && dropSpot->getObjectID() == kAttackRobotHotSpotID) { _attackingItem = (InventoryItem *)item; startExtraSequence(kMars48RobotDefends, kExtraCompletedFlag, kFilterNoInput); loadLoopSound2(""); diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index 55f12a6560..f1fd5a25d3 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -41,6 +41,7 @@ #include "engines/advancedDetector.h" #include "audio/audiostream.h" +#include "audio/decoders/wave.h" #include "prince/prince.h" #include "prince/font.h" @@ -1542,20 +1543,18 @@ void PrinceEngine::showAnim(Anim &anim) { // make_special_shadow if ((anim._flags & 0x80)) { - if (animSurface) { - DrawNode newDrawNode; - newDrawNode.posX = x; - newDrawNode.posY = y + animSurface->h - anim._shadowBack; - newDrawNode.posZ = Hero::kHeroShadowZ; - newDrawNode.width = 0; - newDrawNode.height = 0; - newDrawNode.scaleValue = _scaleValue; - newDrawNode.originalRoomSurface = nullptr; - newDrawNode.data = this; - newDrawNode.drawFunction = &Hero::showHeroShadow; - newDrawNode.s = animSurface; - _drawNodeList.push_back(newDrawNode); - } + DrawNode newDrawNode; + newDrawNode.posX = x; + newDrawNode.posY = y + animSurface->h - anim._shadowBack; + newDrawNode.posZ = Hero::kHeroShadowZ; + newDrawNode.width = 0; + newDrawNode.height = 0; + newDrawNode.scaleValue = _scaleValue; + newDrawNode.originalRoomSurface = nullptr; + newDrawNode.data = this; + newDrawNode.drawFunction = &Hero::showHeroShadow; + newDrawNode.s = animSurface; + _drawNodeList.push_back(newDrawNode); } //ShowFrameCodeShadow diff --git a/engines/prince/sound.cpp b/engines/prince/sound.cpp index 032297ee43..c9746842ef 100644 --- a/engines/prince/sound.cpp +++ b/engines/prince/sound.cpp @@ -20,15 +20,13 @@ * */ -#include "prince/prince.h" #include "prince/sound.h" #include "prince/musNum.h" -#include "common/config-manager.h" -#include "common/memstream.h" #include "common/archive.h" -#include "audio/decoders/raw.h" -#include "audio/audiostream.h" +#include "common/debug.h" +#include "audio/mididrv.h" +#include "audio/midiparser.h" namespace Prince { diff --git a/engines/prince/sound.h b/engines/prince/sound.h index cc44b0a110..4257a4a37b 100644 --- a/engines/prince/sound.h +++ b/engines/prince/sound.h @@ -23,13 +23,7 @@ #ifndef PRINCE_SOUND_H #define PRINCE_SOUND_H -#include "audio/audiostream.h" -#include "audio/decoders/wave.h" -#include "audio/fmopl.h" -#include "audio/mididrv.h" -#include "audio/midiparser.h" #include "audio/midiplayer.h" -#include "audio/mixer.h" #include "common/memstream.h" namespace Prince { diff --git a/engines/queen/detection.cpp b/engines/queen/detection.cpp index 81e0767836..aed8b7dcb1 100644 --- a/engines/queen/detection.cpp +++ b/engines/queen/detection.cpp @@ -105,6 +105,19 @@ static const QueenGameDescription gameDescriptions[] = { }, }, + // DOS Demo - English (from Bugreport #6946) + { + { + "queen", + "Demo Alt", + AD_ENTRY1s("queen.1", "2871fc6f8090f37fa1a0c556a1c97460", 3735447), + Common::EN_ANY, + Common::kPlatformDOS, + ADGF_DEMO, + GUIO1(GUIO_NOSPEECH) + }, + }, + // DOS Interview Demo - English { { @@ -131,20 +144,18 @@ static const QueenGameDescription gameDescriptions[] = { }, }, -#if 0 // Amiga Floppy - English { { "queen", "Floppy", - AD_ENTRY1s("queen.1", NULL, 351775), // TODO: Fill in correct MD5 + AD_ENTRY1s("queen.1", "9c209c2cbc1730e3138663c4fd29c2e8", 351775), Common::EN_ANY, Common::kPlatformAmiga, ADGF_NO_FLAGS, GUIO1(GUIO_NOSPEECH) }, }, -#endif // DOS Floppy - English { @@ -198,6 +209,19 @@ static const QueenGameDescription gameDescriptions[] = { }, }, + // DOS Floppy - Russian (From Bugreport #6946) + { + { + "queen", + "Floppy", + AD_ENTRY1s("queen.1", "f5e827645d3c887be3bdf4729d847756", 22677657), + Common::RU_RUS, + Common::kPlatformDOS, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOSPEECH) + }, + }, + // DOS CD - French { { @@ -211,35 +235,31 @@ static const QueenGameDescription gameDescriptions[] = { }, }, -#if 0 // DOS Floppy - German { { "queen", "Floppy", - AD_ENTRY1s("queen.1", NULL, 22240013), // TODO: Fill in correct MD5 + AD_ENTRY1s("queen.1", "f5e827645d3c887be3bdf4729d847756", 22240013), Common::DE_DEU, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GUIO_NOSPEECH) }, }, -#endif -#if 0 // DOS CD - German { { "queen", "Talkie", - AD_ENTRY1s("queen.1", NULL, 217648975), // TODO: Fill in correct MD5 + AD_ENTRY1s("queen.1", "551d595be8af890fc4cb8533c9c5f5f1", 217648975), Common::DE_DEU, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_ALT_INTRO) }, }, -#endif #if 0 // DOS CD - Hebrew @@ -256,20 +276,18 @@ static const QueenGameDescription gameDescriptions[] = { }, #endif -#if 0 // DOS Floppy - Italian { { "queen", "Floppy", - AD_ENTRY1s("queen.1", NULL, 22461366), // TODO: Fill in correct MD5 + AD_ENTRY1s("queen.1", "f5e827645d3c887be3bdf4729d847756", 22461366), Common::IT_ITA, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GUIO_NOSPEECH) }, }, -#endif // DOS CD - Italian { @@ -284,20 +302,18 @@ static const QueenGameDescription gameDescriptions[] = { }, }, -#if 0 // DOS CD - Spanish { { "queen", "Talkie", - AD_ENTRY1s("queen.1", NULL, 190730602), // TODO: Fill in correct MD5 + AD_ENTRY1s("queen.1", "b6302bccf70463de3d5faf0f0628f742", 190730602), Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_ALT_INTRO) }, }, -#endif // DOS CD - English (Compressed Freeware Release v1.0) { @@ -377,6 +393,19 @@ static const QueenGameDescription gameDescriptions[] = { }, }, + // DOS CD - Hungarian (Compressed Freeware Release v1.02) + { + { + "queen", + "Talkie", + AD_ENTRY1s("queen.1c", "21fd690b372f8a6289f6f33bc986276c", 51329031), + Common::HU_HUN, + Common::kPlatformDOS, + ADGF_NO_FLAGS, + GUIO1(GAMEOPTION_ALT_INTRO) + }, + }, + // TODO: Freeware Release for Spanish DOS CD is missing. #if 0 // DOS CD - Spanish (Compressed Freeware Release v1.0) diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp index 63e24454c1..d715d3737e 100644 --- a/engines/queen/sound.cpp +++ b/engines/queen/sound.cpp @@ -35,10 +35,10 @@ #include "audio/audiostream.h" #include "audio/decoders/flac.h" -#include "audio/mididrv.h" #include "audio/decoders/mp3.h" #include "audio/decoders/raw.h" #include "audio/decoders/vorbis.h" +#include "audio/mods/rjp1.h" #define SB_HEADER_SIZE_V104 110 #define SB_HEADER_SIZE_V110 122 diff --git a/engines/queen/sound.h b/engines/queen/sound.h index d06d93b9e1..f5d3970b80 100644 --- a/engines/queen/sound.h +++ b/engines/queen/sound.h @@ -23,10 +23,11 @@ #ifndef QUEEN_SOUND_H #define QUEEN_SOUND_H -#include "common/util.h" #include "audio/mixer.h" -#include "audio/mods/rjp1.h" -#include "queen/defs.h" + +namespace Audio { +class AudioStream; +} namespace Common { class File; diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h index 8b3a0e5207..71225ceb2f 100644 --- a/engines/saga/detection_tables.h +++ b/engines/saga/detection_tables.h @@ -733,6 +733,36 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO1(GUIO_NOASPECT) }, GID_IHNM, + GF_IHNM_COLOR_FIX, + IHNM_DEFAULT_SCENE, + &IHNM_Resources, + ARRAYSIZE(IHNMCD_GameFonts), + IHNMCD_GameFonts, + NULL, + }, + + // I Have No Mouth And I Must Scream - German fan CD translation + // English CD version with German text patch (with Nimdok) + // (English speech - German text) + { + { + "ihnm", + "fan-made", + { + {"musicfm.res", GAME_MUSICFILE_FM, "0439083e3dfdc51b486071d45872ae52", 302676}, + {"musicgm.res", GAME_MUSICFILE_GM, "80f875a1fb384160d1f4b27166eef583", 314020}, + {"scream.res", GAME_RESOURCEFILE, "46bbdc65d164ba7e89836a0935eec8e6", 79219797}, + {"scripts.res", GAME_SCRIPTFILE, "be38bbc5a26be809dbf39f13befebd01", 523800}, + {"patch.re_", GAME_PATCHFILE | GAME_RESOURCEFILE, "58b79e61594779513c7f2d35509fa89e", 5038599}, + {"sfx.res", GAME_SOUNDFILE, "1c610d543f32ec8b525e3f652536f269", 22561056}, + { NULL, 0, NULL, 0} + }, + Common::DE_DEU, + Common::kPlatformDOS, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + GID_IHNM, 0, IHNM_DEFAULT_SCENE, &IHNM_Resources, @@ -761,7 +791,7 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO1(GUIO_NOASPECT) }, GID_IHNM, - 0, + GF_IHNM_COLOR_FIX, IHNM_DEFAULT_SCENE, &IHNM_Resources, ARRAYSIZE(IHNMCD_GameFonts), @@ -790,7 +820,7 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO1(GUIO_NOASPECT) }, GID_IHNM, - 0, + GF_IHNM_COLOR_FIX, IHNM_DEFAULT_SCENE, &IHNM_Resources, ARRAYSIZE(IHNMCD_GameFonts), diff --git a/engines/saga/displayinfo.h b/engines/saga/displayinfo.h index a0cdf5733b..67448936ce 100644 --- a/engines/saga/displayinfo.h +++ b/engines/saga/displayinfo.h @@ -177,11 +177,11 @@ static PanelButton ITE_OptionPanelButtons[] = { {kPanelButtonOption, 241,98, 57,17, kTextSave,'s',0, 0,0,0}, //save {kPanelButtonOptionSaveFiles, 166,20, 112,74, 0,'-',0, 0,0,0}, //savefiles - {kPanelButtonOptionText,106,4, 0,0, kTextGameOptions,'-',0, 0,0,0}, // text: game options - {kPanelButtonOptionText,11,22, 0,0, kTextReadingSpeed,'-',0, 0,0,0}, // text: read speed - {kPanelButtonOptionText,28,22, 0,0, kTextShowDialog,'-',0, 0,0,0}, // text: read speed - {kPanelButtonOptionText,73,41, 0,0, kTextMusic,'-',0, 0,0,0}, // text: music - {kPanelButtonOptionText,69,60, 0,0, kTextSound,'-',0, 0,0,0}, // text: noise + {kPanelButtonOptionText,-1,4, 0,0, kTextGameOptions,'-',0, 0,0,0}, // text: game options + {kPanelButtonOptionText,5,18, 109,17, kTextReadingSpeed,'-',0, 0,0,0}, // text: read speed + {kPanelButtonOptionText,5,18, 109,17, kTextShowDialog,'-',0, 0,0,0}, // text: read speed + {kPanelButtonOptionText,5,37, 109,17, kTextMusic,'-',0, 0,0,0}, // text: music + {kPanelButtonOptionText,5,56, 109,17, kTextSound,'-',0, 0,0,0}, // text: noise }; static PanelButton ITE_QuitPanelButtons[] = { @@ -326,10 +326,10 @@ static PanelButton IHNM_ConversePanelButtons[] = { static PanelButton IHNM_OptionPanelButtons[] = { {kPanelButtonOptionSlider, 421,16, 16,138, 0,'-',0, 0,0,0}, //slider-scroller - {kPanelButtonOptionText,28,36, 0,0, kTextReadingSpeed,'-',0, 0,0,0}, // text: read speed - {kPanelButtonOptionText,60,61, 0,0, kTextMusic,'-',0, 0,0,0}, // text: music - {kPanelButtonOptionText,60,86, 0,0, kTextSound,'-',0, 0,0,0}, // text: noise - {kPanelButtonOptionText,56,111, 0,0, kTextVoices,'-',0, 0,0,0}, // text: voices + {kPanelButtonOptionText,11,30, 139,21, kTextReadingSpeed,'-',0, 0,0,0}, // text: read speed + {kPanelButtonOptionText,11,55, 139,21, kTextMusic,'-',0, 0,0,0}, // text: music + {kPanelButtonOptionText,11,80, 139,21, kTextSound,'-',0, 0,0,0}, // text: noise + {kPanelButtonOptionText,11,105, 139,21, kTextVoices,'-',0, 0,0,0}, // text: voices {kPanelButtonOption, 154,30, 79,23, kTextReadingSpeed,'r',0, 0,0,0}, //read speed {kPanelButtonOption, 154,55, 79,23, kTextMusic,'m',0, 0,0,0}, //music {kPanelButtonOption, 154,80, 79,23, kTextSound,'n',0, 0,0,0}, //sound-noise diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index ad940aaf8b..cb09d53762 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -867,7 +867,7 @@ void Interface::calcOptionSaveSlider() { void Interface::drawPanelText(InterfacePanel *panel, PanelButton *panelButton) { const char *text; - int textWidth; + int textWidth, textHeight; Rect rect; Point textPoint; KnownColor textShadowKnownColor = kKnownColorVerbTextShadow; @@ -900,12 +900,26 @@ void Interface::drawPanelText(InterfacePanel *panel, PanelButton *panelButton) { } panel->calcPanelButtonRect(panelButton, rect); + if (_vm->getGameId() == GID_ITE) { + textWidth = _vm->_font->getStringWidth(kKnownFontMedium, text, 0, kFontNormal); + textHeight = _vm->_font->getHeight(kKnownFontMedium); + } else { + textWidth = _vm->_font->getStringWidth(kKnownFontVerb, text, 0, kFontNormal); + textHeight = _vm->_font->getHeight(kKnownFontVerb); + } if (panelButton->xOffset < 0) { - if (_vm->getGameId() == GID_ITE) - textWidth = _vm->_font->getStringWidth(kKnownFontMedium, text, 0, kFontNormal); - else - textWidth = _vm->_font->getStringWidth(kKnownFontVerb, text, 0, kFontNormal); + // Special case: Centered to dialog. This is used for things like the + // title of a dialog. rect.left += 2 + (panel->imageWidth - 1 - textWidth) / 2; + } else { + // The standard case is used for the things that look a bit like buttons + // but are not clickable, e.g. texts like "Music", "Sound", etc. + if (_vm->getGameId() == GID_ITE) { + rect.left = rect.right - textWidth - 3; + } else { + rect.left = (rect.right + rect.left - textWidth) / 2; + } + rect.top = (rect.top + rect.bottom - textHeight) / 2; } textPoint.x = rect.left; @@ -1865,7 +1879,7 @@ void Interface::drawStatusBar() { // Fixes bug #1848016 - "IHNM: Wrong Subtitles Color (Spanish)". This // also applies to the German and French versions (bug #7064 - "IHNM: // text mistake in german version"). - int offset = (_vm->getLanguage() == Common::ES_ESP || _vm->getLanguage() == Common::DE_DEU || _vm->getLanguage() == Common::FR_FRA) ? 1 : 0; + int offset = (_vm->getFeatures() & GF_IHNM_COLOR_FIX) ? 1 : 0; // Disable the status text in IHNM when the chapter is 8 if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 8) diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp index 77680178c1..e50378b9c0 100644 --- a/engines/saga/isomap.cpp +++ b/engines/saga/isomap.cpp @@ -97,6 +97,23 @@ IsoMap::IsoMap(SagaEngine *vm) : _vm(vm) { _viewScroll.x = (128 - 8) * 16; _viewScroll.y = (128 - 8) * 16 - 64; _viewDiff = 1; + _platformHeight = 0; + _queueCount = _readCount = 0; + + for (int i = 0; i < SAGA_DRAGON_SEARCH_DIAMETER; i++) + for (int j = 0; j < SAGA_DRAGON_SEARCH_DIAMETER; j++) + _dragonSearchArray.cell[i][j].visited = _dragonSearchArray.cell[i][j].direction = 0; + + for (int i = 0; i < SAGA_SEARCH_DIAMETER; i++) + for (int j = 0; j < SAGA_SEARCH_DIAMETER; j++) + _searchArray.cell[i][j].visited = _searchArray.cell[i][j].direction = 0; + + for (int i = 0; i < SAGA_SEARCH_QUEUE_SIZE; i++) { + memset(&_dragonSearchArray.queue[i], 0, sizeof(DragonTilePoint)); + memset(&_searchArray.queue[i], 0, sizeof(TilePoint)); + } + + memset(&_tileMap, 0, sizeof(TileMapData)); } void IsoMap::loadImages(const ByteArray &resourceData) { diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index cd48ebaa4d..0bc1e8a2a0 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -32,7 +32,10 @@ #include "audio/midiparser.h" #include "audio/midiparser_qt.h" #include "audio/miles.h" +#include "audio/decoders/flac.h" +#include "audio/decoders/mp3.h" #include "audio/decoders/raw.h" +#include "audio/decoders/vorbis.h" #include "common/config-manager.h" #include "common/file.h" #include "common/substream.h" diff --git a/engines/saga/music.h b/engines/saga/music.h index 2e7cc4c5ec..0213f4108a 100644 --- a/engines/saga/music.h +++ b/engines/saga/music.h @@ -25,13 +25,10 @@ #ifndef SAGA_MUSIC_H #define SAGA_MUSIC_H +#include "audio/mididrv.h" #include "audio/midiplayer.h" #include "audio/midiparser.h" #include "audio/mixer.h" -#include "audio/decoders/mp3.h" -#include "audio/decoders/vorbis.h" -#include "audio/decoders/flac.h" -#include "common/mutex.h" namespace Saga { diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp index 099bf79e6b..2c9a02beec 100644 --- a/engines/saga/puzzle.cpp +++ b/engines/saga/puzzle.cpp @@ -86,6 +86,11 @@ Puzzle::Puzzle(SagaEngine *vm) : _vm(vm), _solved(false), _active(false) { _hintBox.setWidth(240); _hintBox.setHeight(30); + _hintNextRqState = kRQNoHint; + _hintGiver = 0; + _hintSpeaker = 0; + _slidePointX = _slidePointY = 0; + initPieceInfo( 0, 268, 18, 0, 0, 0 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 3, Point(0, 1), Point(0, 62), Point(15, 31), Point(0, 0), Point(0, 0), Point(0,0)); initPieceInfo( 1, 270, 52, 0, 0, 0 + PUZZLE_X_OFFSET, 32 + PUZZLE_Y_OFFSET, 0, 4, diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index 77a21e7f93..649888e7ea 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -582,7 +582,7 @@ ColorId SagaEngine::KnownColor2ColorId(KnownColor knownColor) { // Fixes bug #1848016 - "IHNM: Wrong Subtitles Color (Spanish)". This // also applies to the German and French versions (bug #7064 - "IHNM: // text mistake in german version"). - int offset = (getLanguage() == Common::ES_ESP || getLanguage() == Common::DE_DEU || getLanguage() == Common::FR_FRA) ? 1 : 0; + int offset = (getFeatures() & GF_IHNM_COLOR_FIX) ? 1 : 0; switch (knownColor) { case(kKnownColorTransparent): diff --git a/engines/saga/saga.h b/engines/saga/saga.h index 9c7b2f5295..06cb411e5a 100644 --- a/engines/saga/saga.h +++ b/engines/saga/saga.h @@ -139,7 +139,8 @@ enum GameFeatures { GF_ITE_FLOPPY = 1 << 0, GF_ITE_DOS_DEMO = 1 << 1, GF_EXTRA_ITE_CREDITS = 1 << 2, - GF_8BIT_UNSIGNED_PCM = 1 << 3 + GF_8BIT_UNSIGNED_PCM = 1 << 3, + GF_IHNM_COLOR_FIX = 1 << 4 }; enum VerbTypeIds { diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp index e659e09ce8..2d798bb0d6 100644 --- a/engines/saga/saveload.cpp +++ b/engines/saga/saveload.cpp @@ -56,7 +56,7 @@ SaveFileData *SagaEngine::getSaveFile(uint idx) { return &_saveFiles[_saveFilesCount - idx - 1]; } else { if (!emptySlot.name[0]) - strcpy(emptySlot.name, getTextString(kTextNewSave)); + Common::strlcpy(emptySlot.name, getTextString(kTextNewSave), SAVE_TITLE_SIZE); return (idx == 0) ? &emptySlot : &_saveFiles[_saveFilesCount - idx]; } diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp index 1e1c397212..db67d510bc 100644 --- a/engines/saga/shorten.cpp +++ b/engines/saga/shorten.cpp @@ -21,7 +21,9 @@ */ #include "common/scummsys.h" +#include "common/stream.h" #include "common/textconsole.h" +#include "audio/audiostream.h" #include "saga/shorten.h" diff --git a/engines/saga/shorten.h b/engines/saga/shorten.h index 556abaf311..4d4ec328c6 100644 --- a/engines/saga/shorten.h +++ b/engines/saga/shorten.h @@ -30,9 +30,14 @@ #define SOUND_SHORTEN_H #include "common/scummsys.h" -#include "common/stream.h" -#include "audio/audiostream.h" +namespace Audio { +class AudioStream; +} + +namespace Common { +class ReadStream; +} namespace Saga { diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp index 0eb6f8a82a..f4e31542fe 100644 --- a/engines/saga/sound.cpp +++ b/engines/saga/sound.cpp @@ -27,8 +27,6 @@ #include "audio/audiostream.h" #include "audio/mixer.h" -#include "audio/decoders/adpcm.h" -#include "audio/decoders/raw.h" namespace Saga { diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index a092e0676d..1661f92cfe 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -1861,7 +1861,7 @@ bool Console::cmdSavedBits(int argc, const char **argv) { for (uint i = 0; i < entries.size(); ++i) { uint16 offset = entries[i].getOffset(); - const Hunk& h = hunks->_table[offset]; + const Hunk& h = hunks->at(offset); if (strcmp(h.type, "SaveBits()") == 0) { byte* memoryPtr = (byte *)h.mem; @@ -1928,7 +1928,7 @@ bool Console::cmdShowSavedBits(int argc, const char **argv) { return true; } - const Hunk& h = hunks->_table[memoryHandle.getOffset()]; + const Hunk& h = hunks->at(memoryHandle.getOffset()); if (strcmp(h.type, "SaveBits()") != 0) { debugPrintf("Invalid address.\n"); @@ -2144,32 +2144,32 @@ bool Console::segmentInfo(int nr) { break; case SEG_TYPE_CLONES: { - CloneTable *ct = (CloneTable *)mobj; + CloneTable &ct = *(CloneTable *)mobj; debugPrintf("clones\n"); - for (uint i = 0; i < ct->_table.size(); i++) - if (ct->isValidEntry(i)) { + for (uint i = 0; i < ct.size(); i++) + if (ct.isValidEntry(i)) { reg_t objpos = make_reg(nr, i); debugPrintf(" [%04x] %s; copy of ", i, _engine->_gamestate->_segMan->getObjectName(objpos)); // Object header - const Object *obj = _engine->_gamestate->_segMan->getObject(ct->_table[i].getPos()); + const Object *obj = _engine->_gamestate->_segMan->getObject(ct[i].getPos()); if (obj) - debugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(ct->_table[i].getPos()), - _engine->_gamestate->_segMan->getObjectName(ct->_table[i].getPos()), + debugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(ct[i].getPos()), + _engine->_gamestate->_segMan->getObjectName(ct[i].getPos()), obj->getVarCount(), obj->getMethodCount()); } } break; case SEG_TYPE_LISTS: { - ListTable *lt = (ListTable *)mobj; + ListTable < = *(ListTable *)mobj; debugPrintf("lists\n"); - for (uint i = 0; i < lt->_table.size(); i++) - if (lt->isValidEntry(i)) { + for (uint i = 0; i < lt.size(); i++) + if (lt.isValidEntry(i)) { debugPrintf(" [%04x]: ", i); - printList(&(lt->_table[i])); + printList(<[i]); } } break; @@ -2180,13 +2180,13 @@ bool Console::segmentInfo(int nr) { } case SEG_TYPE_HUNK: { - HunkTable *ht = (HunkTable *)mobj; + HunkTable &ht = *(HunkTable *)mobj; - debugPrintf("hunk (total %d)\n", ht->entries_used); - for (uint i = 0; i < ht->_table.size(); i++) - if (ht->isValidEntry(i)) { + debugPrintf("hunk (total %d)\n", ht.entries_used); + for (uint i = 0; i < ht.size(); i++) + if (ht.isValidEntry(i)) { debugPrintf(" [%04x] %d bytes at %p, type=%s\n", - i, ht->_table[i].size, ht->_table[i].mem, ht->_table[i].type); + i, ht[i].size, ht[i].mem, ht[i].type); } } break; @@ -4362,7 +4362,7 @@ void Console::printList(List *list) { return; } - node = &(nt->_table[pos.getOffset()]); + node = &nt->at(pos.getOffset()); debugPrintf("\t%04x:%04x : %04x:%04x -> %04x:%04x\n", PRINT_REG(pos), PRINT_REG(node->key), PRINT_REG(node->value)); @@ -4392,7 +4392,7 @@ int Console::printNode(reg_t addr) { return 1; } - list = &(lt->_table[addr.getOffset()]); + list = <->at(addr.getOffset()); debugPrintf("%04x:%04x : first x last = (%04x:%04x, %04x:%04x)\n", PRINT_REG(addr), PRINT_REG(list->first), PRINT_REG(list->last)); } else { @@ -4411,7 +4411,7 @@ int Console::printNode(reg_t addr) { debugPrintf("Address does not contain a node\n"); return 1; } - node = &(nt->_table[addr.getOffset()]); + node = &nt->at(addr.getOffset()); debugPrintf("%04x:%04x : prev x next = (%04x:%04x, %04x:%04x); maps %04x:%04x -> %04x:%04x\n", PRINT_REG(addr), PRINT_REG(node->pred), PRINT_REG(node->succ), PRINT_REG(node->key), PRINT_REG(node->value)); diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 968eb784b1..c01613268a 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -239,6 +239,19 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Codename: Iceman - English Atari ST + // Game version 1.041 + // Executable reports "1.002.041" + { "iceman", "",{ + { "resource.map", 0, "066e89b685ad788e06bae0b76d0d37d3", 5718 }, + { "resource.000", 0, "053278385ce910a3f630f2e45e3c10be", 26987 }, + { "resource.001", 0, "32b351072fccf76fc82234d73d28c08b", 438880 }, + { "resource.002", 0, "36670a917550757d57df84c96cf9e6d9", 566667 }, + { "resource.003", 0, "d97a96f1ab91b41cf46a02cc89b0a04e", 624304 }, + { "resource.004", 0, "8613c45fc771d658e5a505b9a4a54f31", 670884 }, + AD_LISTEND }, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Codename: Iceman - English DOS Non-Interactive Demo // Executable scanning reports "0.000.685" {"iceman", "Demo", { @@ -336,6 +349,19 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Conquests of Camelot - English Atari ST + // Game version 1.019.000 + // Floppy: INT#10.12.90 + // Executable reports "1.002.038" + {"camelot", "", { + {"resource.map", 0, "0f80a11867be91a158823887a49cf443", 7290}, + {"resource.001", 0, "162f66c42e4146ee63f78fba6f1a6757", 596773}, + {"resource.002", 0, "162f66c42e4146ee63f78fba6f1a6757", 724615}, + {"resource.003", 0, "162f66c42e4146ee63f78fba6f1a6757", 713351}, + {"resource.004", 0, "162f66c42e4146ee63f78fba6f1a6757", 718766}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Conquests of Camelot - English DOS // SCI interpreter version 0.000.685 {"camelot", "", { @@ -926,6 +952,22 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Hoyle 1 - English Atari ST + // Game version 1.000.104, SCI interpreter version 1.002.024 + {"hoyle1", "", { + {"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 518127}, + {"resource.map", 0, "0af9a3dcd72a091960de070432e1f524", 4386}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + + // Hoyle 1 - English Atari ST + // Game version 1.000.108, SCI interpreter version 1.002.026 + {"hoyle1", "", { + {"resource.map", 0, "ed8355f84752e49ffa1f0cf9eca4b28e", 4140}, + {"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 517454}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Hoyle 2 - English DOS // SCI interpreter version 0.000.572 {"hoyle2", "", { @@ -969,6 +1011,15 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Hoyle 2 - English Atari ST + // Game version 1.001.017 + // Executable scanning reports "1.002.034" + {"hoyle2", "", { + {"resource.map", 0, "13c8cc977598b6ad61d24c6296a090fd", 1356}, + {"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 216280}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Hoyle 2 - English Macintosh // Executable scanning reports "x.yyy.zzz" {"hoyle2", "", { @@ -1964,6 +2015,17 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Larry 2 - English Atari ST + // Game version 1.001.006 + // Executable reports "1.000.159" 1988-12-02 12:22 p.m. + {"lsl2", "", { + {"resource.map", 0, "2fc3ce7da1346e4dadfee18606d814fc", 4758}, + {"resource.001", 0, "4a24443a25e2b1492462a52809605dc2", 477342}, + {"resource.002", 0, "4a24443a25e2b1492462a52809605dc2", 406698}, + {"resource.003", 0, "4a24443a25e2b1492462a52809605dc2", 592433}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Larry 2 - English DOS Non-Interactive Demo // Executable scanning reports "x.yyy.zzz" // SCI interpreter version 0.000.409 @@ -2021,6 +2083,17 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Larry 2 - English Atari ST (Kixx) + // Game version 1.002.000 + // Executable reports "1.001.008" 1989-01-12 16:30 + {"lsl2", "", { + {"resource.map", 0, "2c9c3b0923e3764f5ab999bcb71c2d47", 4758}, + {"resource.001", 0, "4a24443a25e2b1492462a52809605dc2", 477625}, + {"resource.002", 0, "4a24443a25e2b1492462a52809605dc2", 406935}, + {"resource.003", 0, "4a24443a25e2b1492462a52809605dc2", 592533}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Larry 3 - English Amiga (from www.back2roots.org) // Executable scanning reports "1.002.032" // SCI interpreter version 0.000.685 @@ -2035,6 +2108,19 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Larry 3 - English Atari ST + // Game version 1.021, 1990-01-27 + // Int#6.26.90 + // Executable scanning reports "1.002.026" + {"lsl3", "", { + {"resource.map", 0, "0b6bd3e039682830a51c5755c06591db", 5916}, + {"resource.001", 0, "f18441027154292836b973c655fa3175", 456722}, + {"resource.002", 0, "f18441027154292836b973c655fa3175", 578024}, + {"resource.003", 0, "f18441027154292836b973c655fa3175", 506807}, + {"resource.004", 0, "f18441027154292836b973c655fa3175", 513651}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Larry 3 - English DOS (supplied by ssburnout in bug report #3049193) // 1.021 8x5.25" (label: Int#5.15.90) {"lsl3", "", { @@ -2766,7 +2852,12 @@ static const struct ADGameDescription SciGameDescriptions[] = { Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, #ifdef ENABLE_SCI3_GAMES - // Phantasmagoria 2 - English Windows (from jvprat) + // Some versions of Phantasmagoria 2 were heavily censored. + // Censored versions (data files are currently unknown to us): UK, Australia, first English release in Germany + + // Phantasmagoria 2 - English Windows (from jvprat) - US release + // Note: Fully uncensored + // // Executable scanning reports "3.000.000", VERSION file reports "001.0.06" {"phantasmagoria2", "", { {"resmap.001", 0, "0a961e135f4f7effb195158325856633", 1108}, @@ -2782,11 +2873,23 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Phantasmagoria 2 - German DOS/Windows + // Phantasmagoria 2 - English DOS (GOG version) (supplied by littleboy in patch #1360) + // Note: Fully uncensored, basically the US release, but ressci.* merged into ressci.000 + // + // Executable scanning reports "3.000.000" - "Dec 07 1996 09:29:03" + // VERSION file reports "001.0.06" + {"phantasmagoria2", "", { + {"ressci.000", 0, "c54f26d9f43f908151263254b6d97053", 108134481}, + {"resmap.000", 0, "de154a223a9ef4ea7358b76adc38ef5b", 2956}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + + // Phantasmagoria 2 - German DOS/Windows (supplied by AReim1982) + // Note: Fully uncensored, but one scene is missing probably because of a mastering error (Curtis + Therese meeting near water cooler) + // // Windows executable scanning reports "unknown" - "Dec 07 1996 15:42:02" // DOS executable scanning reports "unknown" - "Dec 07 1996 08:35:12" // VERSION file reports "000.1.0vu" (HEX: 30 30 30 2E 31 00 2E 30 76 FA 0D 0A) - // Supplied by AReim1982 {"phantasmagoria2", "", { {"resmap.001", 0, "d62f48ff8bddb39503b97e33439482c9", 1114}, {"ressci.001", 0, "4ebc2b8455c74ad205ae592eec27313a", 24590716}, @@ -2800,16 +2903,6 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"ressci.005", 0, "e94005890d22dd3b7f605a2a7c025803", 68232146}, AD_LISTEND}, Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - - // Phantasmagoria 2 - English DOS (GOG version) - ressci.* merged in ressci.000 - // Executable scanning reports "3.000.000" - "Dec 07 1996 09:29:03" - // VERSION file reports "001.0.06" - // Supplied by littleboy in patch #3112884 - {"phantasmagoria2", "", { - {"ressci.000", 0, "c54f26d9f43f908151263254b6d97053", 108134481}, - {"resmap.000", 0, "de154a223a9ef4ea7358b76adc38ef5b", 2956}, - AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, #endif // ENABLE_SCI3_GAMES #endif // ENABLE_SCI32 @@ -2896,6 +2989,17 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Police Quest 2 - English Atari ST + // Game version 1.002.011 DS 1989-07-21 + // Executable reports "1.002.003" + {"pq2", "", { + {"resource.map", 0, "28a6f471c7900c2c92da40eecb615d9d", 4584}, + {"resource.001", 0, "77f02def3094af804fd2371db25b7100", 509525}, + {"resource.002", 0, "77f02def3094af804fd2371db25b7100", 546000}, + {"resource.003", 0, "77f02def3094af804fd2371db25b7100", 591851}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Police Quest 2 - English DOS (from FRG) // SCI interpreter version 0.000.395 {"pq2", "", { @@ -2915,6 +3019,17 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Police Quest 2 - English Atari ST + // Game version 1.001.006 1989-01-16 13:30 + // Executable reports "1.001.009" + {"pq2", "", { + {"resource.map", 0, "8e1161c684b342742d30f938a4839a4b", 4518}, + {"resource.001", 0, "77f02def3094af804fd2371db25b7100", 506563}, + {"resource.002", 0, "77f02def3094af804fd2371db25b7100", 541261}, + {"resource.003", 0, "77f02def3094af804fd2371db25b7100", 587511}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Police Quest 2 - Japanese PC-98 (also includes english language) // Executable scanning reports "x.yyy.zzz" // SCI interpreter version unknown @@ -3184,6 +3299,19 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Quest for Glory 1 / Hero's Quest - English Atari ST + // Game version 1.137 + // Executable reports "1.002.028" + {"qfg1", "", { + {"resource.map", 0, "2a794066ad161acbedac8fa14e46905d", 6438}, + {"resource.000", 0, "40332d3ebfc70a4b6a6a0443c2763287", 79204}, + {"resource.001", 0, "f7fc269d3db146830d6427d3e02d4187", 473547}, + {"resource.002", 0, "e64004e020fdf1813be52b639b08be89", 635687}, + {"resource.003", 0, "f0af87c60ec869946da442833aa5afa8", 640438}, + {"resource.004", 0, "f0af87c60ec869946da442833aa5afa8", 644452}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Quest for Glory 1 / Hero's Quest - English DOS Demo // Executable scanning reports "0.000.685" {"qfg1", "Demo", { @@ -3263,6 +3391,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Quest for Glory 2 - English Amiga + // Game version 1.109 // Executable scanning reports "1.003.004" // SCI interpreter version 0.001.010 {"qfg2", "", { @@ -3685,6 +3814,18 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Space Quest 3 - English Atari ST + // Game version 1.0Q 1989-27-03 17:00 + // Int#1.002.002 + // Executable reports "1.002.001" + {"sq3", "", { + {"resource.map", 0, "c36e322805949affd882a75803a6a54e", 5484}, + {"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 485146}, + {"resource.002", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 720227}, + {"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 688524}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Space Quest 3 - German Amiga (also includes english language) // Executable scanning reports "1.004.006" // SCI interpreter version 0.000.453 (just a guess) @@ -4215,6 +4356,16 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::FR_FRA, Common::kPlatformWindows, ADGF_UNSTABLE | ADGF_CD, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Torin's Passage - Russian Windows CD (SoftClub official translate) + // SCI interpreter version 2.100.002 + // VERSION file "1.0" + { "torin", "",{ + { "resource.aud", 0, "f66df699be5ed011b16b3f816cee8a04", 210583510 }, + { "ressci.000", 0, "e672da099fb1663b87c78abc6c8ba2a4", 130622695 }, + { "resmap.000", 0, "643859f8f2be8e7701611e29b3b65208", 9799 }, + AD_LISTEND }, + Common::RU_RUS, Common::kPlatformWindows, ADGF_UNSTABLE | ADGF_CD, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Torin's Passage - English Macintosh {"torin", "", { {"Data1", 0, "63887e33cc282c92dc1f916f54aea8eb", 700786}, diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 7850a10006..d5540f72b1 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -26,8 +26,6 @@ #include "graphics/cursorman.h" #include "graphics/surface.h" -#include "gui/message.h" - #include "sci/sci.h" #include "sci/event.h" #include "sci/resource.h" diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index fcb65157d8..0cc1e752e1 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -60,24 +60,125 @@ namespace Sci { #pragma mark - -// Experimental hack: Use syncWithSerializer to sync. By default, this assume -// the object to be synced is a subclass of Serializable and thus tries to invoke -// the saveLoadWithSerializer() method. But it is possible to specialize this -// template function to handle stuff that is not implementing that interface. -template<typename T> -void syncWithSerializer(Common::Serializer &s, T &obj) { +// These are serialization functions for various objects. + +void syncWithSerializer(Common::Serializer &s, Common::Serializable &obj) { + obj.saveLoadWithSerializer(s); +} + +// FIXME: Object could implement Serializable to make use of the function +// above. +void syncWithSerializer(Common::Serializer &s, Object &obj) { obj.saveLoadWithSerializer(s); } +void syncWithSerializer(Common::Serializer &s, reg_t &obj) { + // Segment and offset are accessed directly here + s.syncAsUint16LE(obj._segment); + s.syncAsUint16LE(obj._offset); +} + +void syncWithSerializer(Common::Serializer &s, synonym_t &obj) { + s.syncAsUint16LE(obj.replaceant); + s.syncAsUint16LE(obj.replacement); +} + +void syncWithSerializer(Common::Serializer &s, Class &obj) { + s.syncAsSint32LE(obj.script); + syncWithSerializer(s, obj.reg); +} + +void syncWithSerializer(Common::Serializer &s, List &obj) { + syncWithSerializer(s, obj.first); + syncWithSerializer(s, obj.last); +} + +void syncWithSerializer(Common::Serializer &s, Node &obj) { + syncWithSerializer(s, obj.pred); + syncWithSerializer(s, obj.succ); + syncWithSerializer(s, obj.key); + syncWithSerializer(s, obj.value); +} + +#ifdef ENABLE_SCI32 +void syncWithSerializer(Common::Serializer &s, SciArray<reg_t> &obj) { + byte type = 0; + uint32 size = 0; + + if (s.isSaving()) { + type = (byte)obj.getType(); + size = obj.getSize(); + } + s.syncAsByte(type); + s.syncAsUint32LE(size); + if (s.isLoading()) { + obj.setType((int8)type); + + // HACK: Skip arrays that have a negative type + if ((int8)type < 0) + return; + + obj.setSize(size); + } + + for (uint32 i = 0; i < size; i++) { + reg_t value; + + if (s.isSaving()) + value = obj.getValue(i); + + syncWithSerializer(s, value); + + if (s.isLoading()) + obj.setValue(i, value); + } +} + +void syncWithSerializer(Common::Serializer &s, SciString &obj) { + uint32 size = 0; + + if (s.isSaving()) { + size = obj.getSize(); + s.syncAsUint32LE(size); + } else { + s.syncAsUint32LE(size); + obj.setSize(size); + } + + for (uint32 i = 0; i < size; i++) { + char value = 0; + + if (s.isSaving()) + value = obj.getValue(i); + + s.syncAsByte(value); + + if (s.isLoading()) + obj.setValue(i, value); + } +} +#endif + +#pragma mark - + // By default, sync using syncWithSerializer, which in turn can easily be overloaded. template<typename T> struct DefaultSyncer : Common::BinaryFunction<Common::Serializer, T, void> { void operator()(Common::Serializer &s, T &obj) const { - //obj.saveLoadWithSerializer(s); syncWithSerializer(s, obj); } }; +// Syncer for entries in a segment obj table +template<typename T> +struct SegmentObjTableEntrySyncer : Common::BinaryFunction<Common::Serializer, typename T::Entry &, void> { + void operator()(Common::Serializer &s, typename T::Entry &entry) const { + s.syncAsSint32LE(entry.next_free); + + syncWithSerializer(s, entry.data); + } +}; + /** * Sync a Common::Array using a Common::Serializer. * When saving, this writes the length of the array, then syncs (writes) all entries. @@ -116,18 +217,10 @@ void syncArray(Common::Serializer &s, Common::Array<T> &arr) { sync(s, arr); } - -template<> -void syncWithSerializer(Common::Serializer &s, reg_t &obj) { - // Segment and offset are accessed directly here - s.syncAsUint16LE(obj._segment); - s.syncAsUint16LE(obj._offset); -} - -template<> -void syncWithSerializer(Common::Serializer &s, synonym_t &obj) { - s.syncAsUint16LE(obj.replaceant); - s.syncAsUint16LE(obj.replacement); +template<typename T, class Syncer> +void syncArray(Common::Serializer &s, Common::Array<T> &arr) { + ArraySyncer<T, Syncer> sync; + sync(s, arr); } void SegManager::saveLoadWithSerializer(Common::Serializer &s) { @@ -247,12 +340,6 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) { } -template<> -void syncWithSerializer(Common::Serializer &s, Class &obj) { - s.syncAsSint32LE(obj.script); - syncWithSerializer(s, obj.reg); -} - static void sync_SavegameMetadata(Common::Serializer &s, SavegameMetadata &obj) { s.syncString(obj.name); s.syncVersion(CURRENT_SAVEGAME_VERSION); @@ -331,102 +418,13 @@ void Object::saveLoadWithSerializer(Common::Serializer &s) { syncArray<reg_t>(s, _variables); } -template<> -void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Clone>::Entry &obj) { - s.syncAsSint32LE(obj.next_free); - - syncWithSerializer<Object>(s, obj); -} - -template<> -void syncWithSerializer(Common::Serializer &s, SegmentObjTable<List>::Entry &obj) { - s.syncAsSint32LE(obj.next_free); - - syncWithSerializer(s, obj.first); - syncWithSerializer(s, obj.last); -} - -template<> -void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Node>::Entry &obj) { - s.syncAsSint32LE(obj.next_free); - - syncWithSerializer(s, obj.pred); - syncWithSerializer(s, obj.succ); - syncWithSerializer(s, obj.key); - syncWithSerializer(s, obj.value); -} - -#ifdef ENABLE_SCI32 -template<> -void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciArray<reg_t> >::Entry &obj) { - s.syncAsSint32LE(obj.next_free); - - byte type = 0; - uint32 size = 0; - - if (s.isSaving()) { - type = (byte)obj.getType(); - size = obj.getSize(); - } - s.syncAsByte(type); - s.syncAsUint32LE(size); - if (s.isLoading()) { - obj.setType((int8)type); - - // HACK: Skip arrays that have a negative type - if ((int8)type < 0) - return; - - obj.setSize(size); - } - - for (uint32 i = 0; i < size; i++) { - reg_t value; - - if (s.isSaving()) - value = obj.getValue(i); - - syncWithSerializer(s, value); - - if (s.isLoading()) - obj.setValue(i, value); - } -} - -template<> -void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciString>::Entry &obj) { - s.syncAsSint32LE(obj.next_free); - - uint32 size = 0; - - if (s.isSaving()) { - size = obj.getSize(); - s.syncAsUint32LE(size); - } else { - s.syncAsUint32LE(size); - obj.setSize(size); - } - - for (uint32 i = 0; i < size; i++) { - char value = 0; - - if (s.isSaving()) - value = obj.getValue(i); - - s.syncAsByte(value); - - if (s.isLoading()) - obj.setValue(i, value); - } -} -#endif template<typename T> void sync_Table(Common::Serializer &s, T &obj) { s.syncAsSint32LE(obj.first_free); s.syncAsSint32LE(obj.entries_used); - syncArray<typename T::Entry>(s, obj._table); + syncArray<typename T::Entry, SegmentObjTableEntrySyncer<T> >(s, obj._table); } void CloneTable::saveLoadWithSerializer(Common::Serializer &s) { @@ -903,7 +901,7 @@ void SegManager::reconstructClones() { if (!isUsed) continue; - CloneTable::Entry &seeker = ct->_table[j]; + CloneTable::value_type &seeker = ct->at(j); const Object *baseObj = getObject(seeker.getSpeciesSelector()); seeker.cloneFromObject(baseObj); if (!baseObj) { diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 7d70f30d55..b017e62df7 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -741,13 +741,13 @@ void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunction *ke switch (mobj->getType()) { case SEG_TYPE_HUNK: { - HunkTable *ht = (HunkTable *)mobj; + HunkTable &ht = *(HunkTable *)mobj; int index = argv[parmNr].getOffset(); - if (ht->isValidEntry(index)) { + if (ht.isValidEntry(index)) { // NOTE: This ", deleted" isn't as useful as it could // be because it prints the status _after_ the kernel // call. - debugN(" ('%s' hunk%s)", ht->_table[index].type, ht->_table[index].mem ? "" : ", deleted"); + debugN(" ('%s' hunk%s)", ht[index].type, ht[index].mem ? "" : ", deleted"); } else debugN(" (INVALID hunk ref)"); break; diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 8090b1861d..95e3cd15f9 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -247,9 +247,9 @@ Object *SegManager::getObject(reg_t pos) const { if (mobj != NULL) { if (mobj->getType() == SEG_TYPE_CLONES) { - CloneTable *ct = (CloneTable *)mobj; - if (ct->isValidEntry(pos.getOffset())) - obj = &(ct->_table[pos.getOffset()]); + CloneTable &ct = *(CloneTable *)mobj; + if (ct.isValidEntry(pos.getOffset())) + obj = &(ct[pos.getOffset()]); else warning("getObject(): Trying to get an invalid object"); } else if (mobj->getType() == SEG_TYPE_SCRIPT) { @@ -313,7 +313,7 @@ reg_t SegManager::findObjectByName(const Common::String &name, int index) { } else if (mobj->getType() == SEG_TYPE_CLONES) { // It's clone table, scan all objects in it const CloneTable *ct = (const CloneTable *)mobj; - for (uint idx = 0; idx < ct->_table.size(); ++idx) { + for (uint idx = 0; idx < ct->size(); ++idx) { if (!ct->isValidEntry(idx)) continue; @@ -404,7 +404,7 @@ reg_t SegManager::allocateHunkEntry(const char *hunk_type, int size) { offset = table->allocEntry(); reg_t addr = make_reg(_hunksSegId, offset); - Hunk *h = &(table->_table[offset]); + Hunk *h = &table->at(offset); if (!h) return NULL_REG; @@ -424,7 +424,7 @@ byte *SegManager::getHunkPointer(reg_t addr) { return NULL; } - return (byte *)ht->_table[addr.getOffset()].mem; + return (byte *)ht->at(addr.getOffset()).mem; } Clone *SegManager::allocateClone(reg_t *addr) { @@ -439,7 +439,7 @@ Clone *SegManager::allocateClone(reg_t *addr) { offset = table->allocEntry(); *addr = make_reg(_clonesSegId, offset); - return &(table->_table[offset]); + return &table->at(offset); } List *SegManager::allocateList(reg_t *addr) { @@ -453,7 +453,7 @@ List *SegManager::allocateList(reg_t *addr) { offset = table->allocEntry(); *addr = make_reg(_listsSegId, offset); - return &(table->_table[offset]); + return &table->at(offset); } Node *SegManager::allocateNode(reg_t *addr) { @@ -467,7 +467,7 @@ Node *SegManager::allocateNode(reg_t *addr) { offset = table->allocEntry(); *addr = make_reg(_nodesSegId, offset); - return &(table->_table[offset]); + return &table->at(offset); } reg_t SegManager::newNode(reg_t value, reg_t key) { @@ -486,14 +486,14 @@ List *SegManager::lookupList(reg_t addr) { return NULL; } - ListTable *lt = (ListTable *)_heap[addr.getSegment()]; + ListTable < = *(ListTable *)_heap[addr.getSegment()]; - if (!lt->isValidEntry(addr.getOffset())) { + if (!lt.isValidEntry(addr.getOffset())) { error("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); return NULL; } - return &(lt->_table[addr.getOffset()]); + return &(lt[addr.getOffset()]); } Node *SegManager::lookupNode(reg_t addr, bool stopOnDiscarded) { @@ -507,9 +507,9 @@ Node *SegManager::lookupNode(reg_t addr, bool stopOnDiscarded) { return NULL; } - NodeTable *nt = (NodeTable *)_heap[addr.getSegment()]; + NodeTable &nt = *(NodeTable *)_heap[addr.getSegment()]; - if (!nt->isValidEntry(addr.getOffset())) { + if (!nt.isValidEntry(addr.getOffset())) { if (!stopOnDiscarded) return NULL; @@ -517,7 +517,7 @@ Node *SegManager::lookupNode(reg_t addr, bool stopOnDiscarded) { return NULL; } - return &(nt->_table[addr.getOffset()]); + return &(nt[addr.getOffset()]); } SegmentRef SegManager::dereference(reg_t pointer) { @@ -873,32 +873,32 @@ SciArray<reg_t> *SegManager::allocateArray(reg_t *addr) { offset = table->allocEntry(); *addr = make_reg(_arraysSegId, offset); - return &(table->_table[offset]); + return &table->at(offset); } SciArray<reg_t> *SegManager::lookupArray(reg_t addr) { if (_heap[addr.getSegment()]->getType() != SEG_TYPE_ARRAY) error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr)); - ArrayTable *arrayTable = (ArrayTable *)_heap[addr.getSegment()]; + ArrayTable &arrayTable = *(ArrayTable *)_heap[addr.getSegment()]; - if (!arrayTable->isValidEntry(addr.getOffset())) + if (!arrayTable.isValidEntry(addr.getOffset())) error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr)); - return &(arrayTable->_table[addr.getOffset()]); + return &(arrayTable[addr.getOffset()]); } void SegManager::freeArray(reg_t addr) { if (_heap[addr.getSegment()]->getType() != SEG_TYPE_ARRAY) error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr)); - ArrayTable *arrayTable = (ArrayTable *)_heap[addr.getSegment()]; + ArrayTable &arrayTable = *(ArrayTable *)_heap[addr.getSegment()]; - if (!arrayTable->isValidEntry(addr.getOffset())) + if (!arrayTable.isValidEntry(addr.getOffset())) error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr)); - arrayTable->_table[addr.getOffset()].destroy(); - arrayTable->freeEntry(addr.getOffset()); + arrayTable[addr.getOffset()].destroy(); + arrayTable.freeEntry(addr.getOffset()); } SciString *SegManager::allocateString(reg_t *addr) { @@ -913,32 +913,32 @@ SciString *SegManager::allocateString(reg_t *addr) { offset = table->allocEntry(); *addr = make_reg(_stringSegId, offset); - return &(table->_table[offset]); + return &table->at(offset); } SciString *SegManager::lookupString(reg_t addr) { if (_heap[addr.getSegment()]->getType() != SEG_TYPE_STRING) error("lookupString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - StringTable *stringTable = (StringTable *)_heap[addr.getSegment()]; + StringTable &stringTable = *(StringTable *)_heap[addr.getSegment()]; - if (!stringTable->isValidEntry(addr.getOffset())) + if (!stringTable.isValidEntry(addr.getOffset())) error("lookupString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - return &(stringTable->_table[addr.getOffset()]); + return &(stringTable[addr.getOffset()]); } void SegManager::freeString(reg_t addr) { if (_heap[addr.getSegment()]->getType() != SEG_TYPE_STRING) error("freeString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - StringTable *stringTable = (StringTable *)_heap[addr.getSegment()]; + StringTable &stringTable = *(StringTable *)_heap[addr.getSegment()]; - if (!stringTable->isValidEntry(addr.getOffset())) + if (!stringTable.isValidEntry(addr.getOffset())) error("freeString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - stringTable->_table[addr.getOffset()].destroy(); - stringTable->freeEntry(addr.getOffset()); + stringTable[addr.getOffset()].destroy(); + stringTable.freeEntry(addr.getOffset()); } #endif diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index bb90698e6a..2cff799f4b 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -97,7 +97,7 @@ Common::Array<reg_t> CloneTable::listAllOutgoingReferences(reg_t addr) const { error("Unexpected request for outgoing references from clone at %04x:%04x", PRINT_REG(addr)); } - const Clone *clone = &(_table[addr.getOffset()]); + const Clone *clone = &at(addr.getOffset()); // Emit all member variables (including references to the 'super' delegate) for (uint i = 0; i < clone->getVarCount(); i++) @@ -112,7 +112,7 @@ Common::Array<reg_t> CloneTable::listAllOutgoingReferences(reg_t addr) const { void CloneTable::freeAtAddress(SegManager *segMan, reg_t addr) { #ifdef GC_DEBUG - Object *victim_obj = &(_table[addr.getOffset()]); + Object *victim_obj = &at(addr.getOffset()); if (!(victim_obj->_flags & OBJECT_FLAG_FREED)) warning("[GC] Clone %04x:%04x not reachable and not freed (freeing now)", PRINT_REG(addr)); @@ -208,7 +208,7 @@ Common::Array<reg_t> ListTable::listAllOutgoingReferences(reg_t addr) const { error("Invalid list referenced for outgoing references: %04x:%04x", PRINT_REG(addr)); } - const List *list = &(_table[addr.getOffset()]); + const List *list = &at(addr.getOffset()); tmp.push_back(list->first); tmp.push_back(list->last); @@ -225,7 +225,7 @@ Common::Array<reg_t> NodeTable::listAllOutgoingReferences(reg_t addr) const { if (!isValidEntry(addr.getOffset())) { error("Invalid node referenced for outgoing references: %04x:%04x", PRINT_REG(addr)); } - const Node *node = &(_table[addr.getOffset()]); + const Node *node = &at(addr.getOffset()); // We need all four here. Can't just stick with 'pred' OR 'succ' because node operations allow us // to walk around from any given node @@ -252,13 +252,13 @@ SegmentRef DynMem::dereference(reg_t pointer) { SegmentRef ArrayTable::dereference(reg_t pointer) { SegmentRef ret; ret.isRaw = false; - ret.maxSize = _table[pointer.getOffset()].getSize() * 2; - ret.reg = _table[pointer.getOffset()].getRawData(); + ret.maxSize = at(pointer.getOffset()).getSize() * 2; + ret.reg = at(pointer.getOffset()).getRawData(); return ret; } void ArrayTable::freeAtAddress(SegManager *segMan, reg_t sub_addr) { - _table[sub_addr.getOffset()].destroy(); + at(sub_addr.getOffset()).destroy(); freeEntry(sub_addr.getOffset()); } @@ -268,7 +268,7 @@ Common::Array<reg_t> ArrayTable::listAllOutgoingReferences(reg_t addr) const { error("Invalid array referenced for outgoing references: %04x:%04x", PRINT_REG(addr)); } - const SciArray<reg_t> *array = &(_table[addr.getOffset()]); + const SciArray<reg_t> *array = &at(addr.getOffset()); for (uint32 i = 0; i < array->getSize(); i++) { reg_t value = array->getValue(i); @@ -305,8 +305,8 @@ void SciString::fromString(const Common::String &string) { SegmentRef StringTable::dereference(reg_t pointer) { SegmentRef ret; ret.isRaw = true; - ret.maxSize = _table[pointer.getOffset()].getSize(); - ret.raw = (byte *)_table[pointer.getOffset()].getRawData(); + ret.maxSize = at(pointer.getOffset()).getSize(); + ret.raw = (byte *)at(pointer.getOffset()).getRawData(); return ret; } diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 2699bc2e5b..50c77d0538 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -210,16 +210,17 @@ struct Hunk { template<typename T> struct SegmentObjTable : public SegmentObj { typedef T value_type; - struct Entry : public T { + struct Entry { + T data; int next_free; /* Only used for free entries */ }; enum { HEAPENTRY_INVALID = -1 }; - int first_free; /**< Beginning of a singly linked list for entries */ int entries_used; /**< Statistical information */ - Common::Array<Entry> _table; + typedef Common::Array<Entry> ArrayType; + ArrayType _table; public: SegmentObjTable(SegmentType type) : SegmentObj(type) { @@ -272,6 +273,14 @@ public: tmp.push_back(make_reg(segId, i)); return tmp; } + + uint size() const { return _table.size(); } + + T &at(uint index) { return _table[index].data; } + const T &at(uint index) const { return _table[index].data; } + + T &operator[](uint index) { return at(index); } + const T &operator[](uint index) const { return at(index); } }; @@ -323,8 +332,8 @@ struct HunkTable : public SegmentObjTable<Hunk> { } void freeEntryContents(int idx) { - free(_table[idx].mem); - _table[idx].mem = 0; + free(at(idx).mem); + at(idx).mem = 0; } virtual void freeEntry(int idx) { @@ -502,7 +511,7 @@ struct StringTable : public SegmentObjTable<SciString> { StringTable() : SegmentObjTable<SciString>(SEG_TYPE_STRING) {} virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr) { - _table[sub_addr.getOffset()].destroy(); + at(sub_addr.getOffset()).destroy(); freeEntry(sub_addr.getOffset()); } diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp index 57f0415285..a74bfa245f 100644 --- a/engines/sci/sound/audio.cpp +++ b/engines/sci/sound/audio.cpp @@ -28,6 +28,7 @@ #include "backends/audiocd/audiocd.h" +#include "common/config-manager.h" #include "common/file.h" #include "common/memstream.h" #include "common/system.h" @@ -44,7 +45,7 @@ namespace Sci { AudioPlayer::AudioPlayer(ResourceManager *resMan) : _resMan(resMan), _audioRate(11025), - _syncResource(NULL), _syncOffset(0), _audioCdStart(0) { + _syncResource(NULL), _syncOffset(0), _audioCdStart(0), _initCD(false) { _mixer = g_system->getMixer(); _wPlayFlag = false; @@ -511,6 +512,12 @@ void AudioPlayer::stopSoundSync() { } int AudioPlayer::audioCdPlay(int track, int start, int duration) { + if (!_initCD) { + // Initialize CD mode if we haven't already + g_system->getAudioCDManager()->open(); + _initCD = true; + } + if (getSciVersion() == SCI_VERSION_1_1) { // King's Quest VI CD Audio format _audioCdStart = g_system->getMillis(); diff --git a/engines/sci/sound/audio.h b/engines/sci/sound/audio.h index 9e65d6e0c8..4a8b26567d 100644 --- a/engines/sci/sound/audio.h +++ b/engines/sci/sound/audio.h @@ -97,6 +97,7 @@ private: uint _syncOffset; uint32 _audioCdStart; bool _wPlayFlag; + bool _initCD; }; } // End of namespace Sci diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp index aa464cdc19..5e82e4a729 100644 --- a/engines/sci/sound/drivers/midi.cpp +++ b/engines/sci/sound/drivers/midi.cpp @@ -27,7 +27,7 @@ #include "common/memstream.h" #include "common/system.h" -#include "audio/fmopl.h" +#include "audio/mididrv.h" #include "sci/resource.h" #include "sci/engine/features.h" diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index a610f32d89..047f63b3b7 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -27,12 +27,16 @@ #include "common/mutex.h" #include "audio/mixer.h" -#include "audio/audiostream.h" #include "sci/sci.h" #include "sci/resource.h" #include "sci/sound/drivers/mididriver.h" +namespace Audio { +class LoopingAudioStream; +class RewindableAudioStream; +} + namespace Sci { enum SoundStatus { diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index e7b25eb1fc..fe33ea1feb 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -21,6 +21,8 @@ */ #include "common/config-manager.h" +#include "audio/audiostream.h" +#include "audio/mixer.h" #include "sci/sound/audio.h" #include "sci/sound/music.h" #include "sci/sound/soundcmd.h" diff --git a/engines/scumm/POTFILES b/engines/scumm/POTFILES index 246f14d3f0..039aa16755 100644 --- a/engines/scumm/POTFILES +++ b/engines/scumm/POTFILES @@ -1,3 +1,4 @@ +engines/scumm/detection.cpp engines/scumm/dialogs.cpp engines/scumm/help.cpp engines/scumm/input.cpp diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 9264a6443b..4c9d1221aa 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -29,6 +29,7 @@ #include "common/md5.h" #include "common/savefile.h" #include "common/system.h" +#include "common/translation.h" #include "audio/mididrv.h" @@ -185,6 +186,11 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const { } if (_filenamePattern.genMethod == kGenHEPC || _filenamePattern.genMethod == kGenHEIOS) { + if (id == '3' && _game.id == GID_MOONBASE) { + result = Common::String::format("%s.u32", _filenamePattern.pattern); + break; + } + // For HE >= 98, we already called snprintf above. if (_game.heversion < 98 || room < 0) result = Common::String::format("%s.he%c", _filenamePattern.pattern, id); @@ -957,6 +963,7 @@ public: virtual int getMaximumSaveSlot() const; virtual void removeSaveState(const char *target, int slot) const; virtual SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const; + virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const; }; bool ScummMetaEngine::hasFeature(MetaEngineFeature f) const { @@ -1329,6 +1336,21 @@ SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int return desc; } +static const ExtraGuiOption comiObjectLabelsOption = { + _s("Show Object Line"), + _s("Show the names of objects at the bottom of the screen"), + "object_labels", + true +}; + +const ExtraGuiOptions ScummMetaEngine::getExtraGuiOptions(const Common::String &target) const { + ExtraGuiOptions options; + if (target.empty() || ConfMan.get("gameid", target) == "comi") { + options.push_back(comiObjectLabelsOption); + } + return options; +} + #if PLUGIN_ENABLED_DYNAMIC(SCUMM) REGISTER_PLUGIN_DYNAMIC(SCUMM, PLUGIN_TYPE_ENGINE, ScummMetaEngine); #else diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 5a994cb699..bb3e7f6ec3 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -245,9 +245,11 @@ static const GameSettings gameVariantsTable[] = { {"monkey", "CD", 0, GID_MONKEY, 5, 0, MDT_ADLIB, GF_AUDIOTRACKS, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)}, {"monkey", "FM-TOWNS", 0, GID_MONKEY, 5, 0, MDT_TOWNS, GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_NOASPECT)}, {"monkey", "SEGA", 0, GID_MONKEY, 5, 0, MDT_NONE, GF_AUDIOTRACKS, Common::kPlatformSegaCD, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)}, + {"monkey", "SE Talkie", 0, GID_MONKEY, 5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, GF_AUDIOTRACKS, UNK, GUIO0()}, {"monkey2", "", 0, GID_MONKEY2, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO1(GUIO_NOSPEECH)}, {"monkey2", "FM-TOWNS", 0, GID_MONKEY2, 5, 0, MDT_PCSPK | MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO5(GUIO_NOSPEECH, GUIO_MIDITOWNS, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_NOASPECT)}, + {"monkey2", "SE Talkie",0, GID_MONKEY2, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO0()}, {"atlantis", "", 0, GID_INDY4, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO0()}, {"atlantis", "Steam", "steam", GID_INDY4, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO0()}, diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 21c7428621..8a6b545bf2 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -33,10 +33,8 @@ #include "scummhelp.h" #endif -#include "gui/about.h" - #include "gui/gui-manager.h" -#include "gui/widgets/list.h" +#include "gui/widget.h" #include "gui/ThemeEval.h" #include "scumm/dialogs.h" @@ -45,14 +43,12 @@ #include "scumm/imuse/imuse.h" #include "scumm/imuse_digi/dimuse.h" #include "scumm/verbs.h" -#include "audio/mididrv.h" -#include "audio/mixer.h" #ifndef DISABLE_HELP #include "scumm/help.h" #endif -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG #include "gui/KeysDialog.h" #endif diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h index 08222dd8cd..bd0645597e 100644 --- a/engines/scumm/dialogs.h +++ b/engines/scumm/dialogs.h @@ -24,15 +24,13 @@ #define SCUMM_DIALOGS_H #include "common/str.h" +#include "common/keyboard.h" #include "gui/dialog.h" -#include "gui/widget.h" #include "engines/dialogs.h" -#include "scumm/detection.h" - namespace GUI { -class ListWidget; class CommandSender; +class StaticTextWidget; } diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 8483a8a402..0a3a56ceda 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -22,16 +22,21 @@ #ifdef ENABLE_HE +#include "common/scummsys.h" + #include "scumm/he/animation_he.h" #include "scumm/he/intern_he.h" -#include "audio/audiostream.h" #include "video/smk_decoder.h" #ifdef USE_BINK #include "video/bink_decoder.h" #endif +namespace Audio { +class Mixer; +} + namespace Scumm { MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer) : _vm(vm) { diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h index 677a4b4247..6891ed8bf0 100644 --- a/engines/scumm/he/animation_he.h +++ b/engines/scumm/he/animation_he.h @@ -23,7 +23,9 @@ #if !defined(SCUMM_HE_ANIMATION_H) && defined(ENABLE_HE) #define SCUMM_HE_ANIMATION_H -#include "audio/mixer.h" +namespace Audio { +class Mixer; +} namespace Common { class String; diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h index 370f54c1d8..06e6b249f6 100644 --- a/engines/scumm/he/intern_he.h +++ b/engines/scumm/he/intern_he.h @@ -184,8 +184,11 @@ protected: }; #ifdef ENABLE_HE +class Moonbase; + class ScummEngine_v71he : public ScummEngine_v70he { friend class Wiz; + friend class Moonbase; protected: bool _skipProcessActors; @@ -244,6 +247,10 @@ public: void queueAuxEntry(int actorNum, int subIndex); void remapHEPalette(const uint8 *src, uint8 *dst); + +public: + /* Moonbase stuff */ + Moonbase *_moonbase; }; class ScummEngine_v72he : public ScummEngine_v71he { @@ -433,7 +440,7 @@ protected: byte filename[260]; int32 status; int32 flags; - int32 unk2; + int32 number; int32 wizResNum; }; diff --git a/engines/scumm/he/logic/moonbase_logic.cpp b/engines/scumm/he/logic/moonbase_logic.cpp new file mode 100644 index 0000000000..a32356614f --- /dev/null +++ b/engines/scumm/he/logic/moonbase_logic.cpp @@ -0,0 +1,253 @@ +/* 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 "scumm/he/intern_he.h" +#include "scumm/he/logic_he.h" +#include "scumm/he/moonbase/moonbase.h" + +namespace Scumm { + +/** + * Logic code for: + * Moonbase Commander + */ +class LogicHEmoonbase : public LogicHE { +public: + LogicHEmoonbase(ScummEngine_v90he *vm) : LogicHE(vm) {} + + int versionID(); + + int32 dispatch(int op, int numArgs, int32 *args); + +private: + void op_create_multi_state_wiz(int op, int numArgs, int32 *args); + void op_load_multi_channel_wiz(int op, int numArgs, int32 *args); + void op_wiz_from_multi_channel_wiz(int op, int numArgs, int32 *args); + void op_dos_command(int op, int numArgs, int32 *args); + void op_set_fow_sentinel(int32 *args); + void op_set_fow_information(int op, int numArgs, int32 *args); + int op_set_fow_image(int op, int numArgs, int32 *args); + + void op_ai_test_kludge(int op, int numArgs, int32 *args); + void op_ai_master_control_program(int op, int numArgs, int32 *args); + void op_ai_reset(int op, int numArgs, int32 *args); + void op_ai_set_type(int op, int numArgs, int32 *args); + void op_ai_clean_up(int op, int numArgs, int32 *args); +}; + +int LogicHEmoonbase::versionID() { + if (_vm->_game.features & GF_DEMO) + return -100; + else if (strcmp(_vm->_game.variant, "1.1") == 0) + return 110; + else + return 100; +} + +#define OP_CREATE_MULTI_STATE_WIZ 100 +#define OP_LOAD_MULTI_CHANNEL_WIZ 101 +#define OP_WIZ_FROM_MULTI_CHANNEL_WIZ 102 +#define OP_DOS_COMMAND 103 +#define OP_SET_FOW_SENTINEL 104 +#define OP_SET_FOW_INFORMATION 105 +#define OP_SET_FOW_IMAGE 106 + +#define OP_AI_TEST_KLUDGE 10000 +#define OP_AI_MASTER_CONTROL_PROGRAM 10001 +#define OP_AI_RESET 10002 +#define OP_AI_SET_TYPE 10003 +#define OP_AI_CLEAN_UP 10004 + +#define OP_NET_REMOTE_START_SCRIPT 1492 +#define OP_NET_DO_INIT_ALL 1493 +#define OP_NET_DO_INIT_PROVIDER 1494 +#define OP_NET_DO_INIT_SESSION 1495 +#define OP_NET_DO_INIT_USER 1496 +#define OP_NET_QUERY_PROVIDERS 1497 +#define OP_NET_GET_PROVIDER_NAME 1498 +#define OP_NET_SET_PROVIDER 1499 +#define OP_NET_CLOSE_PROVIDER 1500 +#define OP_NET_QUERY_SESSIONS 1501 +#define OP_NET_GET_SESSION_NAME 1502 +#define OP_NET_CREATE_SESSION 1503 +#define OP_NET_JOIN_SESSION 1504 +#define OP_NET_END_SESSION 1505 +#define OP_NET_ADD_USER 1506 +#define OP_NET_REMOVE_USER 1507 +#define OP_NET_WHO_SENT_THIS 1508 +#define OP_NET_REMOTE_SEND_ARRAY 1509 +#define OP_NET_WHO_AM_I 1510 +#define OP_NET_REMOTE_START_FUNCTION 1511 +#define OP_NET_GET_PLAYER_LONG_NAME 1512 +#define OP_NET_GET_PLAYER_SHORT_NAME 1513 +#define OP_NET_SET_PROVIDER_BY_NAME 1516 +#define OP_NET_HOST_TCPIP_GAME 1517 +#define OP_NET_JOIN_TCPIP_GAME 1518 +#define OP_NET_SET_FAKE_LAG 1555 +#define OP_NET_GET_HOST_NAME 1556 +#define OP_NET_GET_IP_FROM_NAME 1557 +#define OP_NET_GET_SESSION_PLAYER_COUNT 1558 +#define OP_NET_DISABLE_SESSION_PLAYER_JOIN 1559 +#define OP_NET_START_QUERY_SESSIONS 1560 +#define OP_NET_UPDATE_QUERY_SESSIONS 1561 +#define OP_NET_STOP_QUERY_SESSIONS 1562 +#define OP_NET_DESTROY_PLAYER 1563 +#define OP_NET_ENABLE_SESSION_PLAYER_JOIN 1564 +#define OP_NET_SET_AI_PLAYER_COUNT 1565 + + +int32 LogicHEmoonbase::dispatch(int op, int numArgs, int32 *args) { + switch (op) { + case OP_CREATE_MULTI_STATE_WIZ: + op_create_multi_state_wiz(op, numArgs, args); + break; + case OP_LOAD_MULTI_CHANNEL_WIZ: + op_load_multi_channel_wiz(op, numArgs, args); + break; + case OP_WIZ_FROM_MULTI_CHANNEL_WIZ: + op_wiz_from_multi_channel_wiz(op, numArgs, args); + break; + case OP_DOS_COMMAND: + op_dos_command(op, numArgs, args); + break; + case OP_SET_FOW_SENTINEL: + op_set_fow_sentinel(args); + break; + case OP_SET_FOW_INFORMATION: + op_set_fow_information(op, numArgs, args); + break; + case OP_SET_FOW_IMAGE: + return op_set_fow_image(op, numArgs, args); + break; + + case OP_AI_TEST_KLUDGE: + op_ai_test_kludge(op, numArgs, args); + break; + case OP_AI_MASTER_CONTROL_PROGRAM: + op_ai_master_control_program(op, numArgs, args); + break; + case OP_AI_RESET: + op_ai_reset(op, numArgs, args); + break; + case OP_AI_SET_TYPE: + op_ai_set_type(op, numArgs, args); + break; + case OP_AI_CLEAN_UP: + op_ai_clean_up(op, numArgs, args); + break; + + default: + LogicHE::dispatch(op, numArgs, args); + } + + return 0; +} + +void LogicHEmoonbase::op_create_multi_state_wiz(int op, int numArgs, int32 *args) { + warning("STUB: op_create_multi_state_wiz()"); + LogicHE::dispatch(op, numArgs, args); +} + +void LogicHEmoonbase::op_load_multi_channel_wiz(int op, int numArgs, int32 *args) { + warning("STUB: op_load_multi_channel_wiz()"); + LogicHE::dispatch(op, numArgs, args); +} + +void LogicHEmoonbase::op_wiz_from_multi_channel_wiz(int op, int numArgs, int32 *args) { + warning("STUB: op_wiz_from_multi_channel_wiz()"); + LogicHE::dispatch(op, numArgs, args); +} + +void LogicHEmoonbase::op_dos_command(int op, int numArgs, int32 *args) { + warning("STUB: op_dos_command()"); + LogicHE::dispatch(op, numArgs, args); +} + +void LogicHEmoonbase::op_set_fow_sentinel(int32 *args) { + debug(2, "op_set_fow_sentinel(%d, %d, %d)", args[0], args[1], args[2]); + + _vm->_moonbase->_fowSentinelImage = args[0]; + _vm->_moonbase->_fowSentinelState = args[1]; + _vm->_moonbase->_fowSentinelConditionBits = args[2]; +} + +void LogicHEmoonbase::op_set_fow_information(int op, int numArgs, int32 *args) { + Common::String str; + + str = Common::String::format("op_set_fow_information(%d", args[0]); + for (int i = 1; i < numArgs; i++) { + str += Common::String::format(", %d", args[i]); + } + str += ")"; + + debug(2, "%s", str.c_str()); + + _vm->_moonbase->setFOWInfo( + args[0], // array + args[1], // array down dimension + args[2], // array across dimension + args[3], // logical view X coordinate + args[4], // logical view Y coordinate + args[5], // screen draw clip rect x1 + args[6], // screen draw clip rect y1 + args[7], // screen draw clip rect x2 + args[8], // screen draw clip rect y2 + args[9], // techinque + args[10] // frame + ); +} + +int LogicHEmoonbase::op_set_fow_image(int op, int numArgs, int32 *args) { + debug(2, "op_set_fow_image(%d)", args[0]); + return _vm->_moonbase->setFOWImage(args[0]) ? 1 : 0; +} + +void LogicHEmoonbase::op_ai_test_kludge(int op, int numArgs, int32 *args) { + warning("STUB: op_ai_test_kludge()"); + LogicHE::dispatch(op, numArgs, args); +} + +void LogicHEmoonbase::op_ai_master_control_program(int op, int numArgs, int32 *args) { + warning("STUB: op_ai_master_control_program()"); + LogicHE::dispatch(op, numArgs, args); +} + +void LogicHEmoonbase::op_ai_reset(int op, int numArgs, int32 *args) { + warning("STUB: op_ai_reset)"); + LogicHE::dispatch(op, numArgs, args); +} + +void LogicHEmoonbase::op_ai_set_type(int op, int numArgs, int32 *args) { + warning("STUB: op_ai_set_type()"); + LogicHE::dispatch(op, numArgs, args); +} + +void LogicHEmoonbase::op_ai_clean_up(int op, int numArgs, int32 *args) { + warning("STUB: op_ai_clean_up()"); + LogicHE::dispatch(op, numArgs, args); +} + +LogicHE *makeLogicHEmoonbase(ScummEngine_v90he *vm) { + return new LogicHEmoonbase(vm); +} + +} // End of namespace Scumm diff --git a/engines/scumm/he/moonbase/moonbase.cpp b/engines/scumm/he/moonbase/moonbase.cpp new file mode 100644 index 0000000000..34d4368725 --- /dev/null +++ b/engines/scumm/he/moonbase/moonbase.cpp @@ -0,0 +1,179 @@ +/* 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 "scumm/he/intern_he.h" +#include "scumm/he/moonbase/moonbase.h" + +namespace Scumm { + +Moonbase::Moonbase(ScummEngine_v71he *vm) : _vm(vm) { + initFOW(); +} + +Moonbase::~Moonbase() { +} + +void Moonbase::blitT14WizImage(uint8 *dst, int dstw, int dsth, int dstPitch, const Common::Rect *clipBox, + uint8 *wizd, int x, int y, int rawROP, int paramROP) { + bool premulAlpa = false; + + if (rawROP == 1) + premulAlpa = true; + + Common::Rect clippedDstRect(dstw, dsth); + if (clipBox) { + Common::Rect clip(clipBox->left, clipBox->top, clipBox->right, clipBox->bottom); + if (clippedDstRect.intersects(clip)) { + clippedDstRect.clip(clip); + } else { + return; + } + } + + int width = READ_LE_UINT16(wizd + 0x8 + 0); + int height = READ_LE_UINT16(wizd + 0x8 + 2); + + Common::Rect srcLimitsRect(width, height); + Common::Rect dstOperation(x, y, x + width, y + height); + if (!clippedDstRect.intersects(dstOperation)) + return; + Common::Rect clippedRect = clippedDstRect.findIntersectingRect(dstOperation); + + int cx = clippedRect.right - clippedRect.left; + int cy = clippedRect.bottom - clippedRect.top; + + int sx = ((clippedRect.left - x) + srcLimitsRect.left); + int sy = ((clippedRect.top - y) + srcLimitsRect.top); + + dst += clippedRect.top * dstPitch + clippedRect.left * 2; + + int headerSize = READ_LE_UINT32(wizd + 0x4); + uint8 *dataPointer = wizd + 0x8 + headerSize; + + for (int i = 0; i < sy; i++) { + uint16 lineSize = READ_LE_UINT16(dataPointer + 0); + + dataPointer += lineSize; + } + + for (int i = 0; i < cy; i++) { + uint16 lineSize = READ_LE_UINT16(dataPointer + 0); + uint8 *singlesOffset = READ_LE_UINT16(dataPointer + 2) + dataPointer; + uint8 *quadsOffset = READ_LE_UINT16(dataPointer + 4) + dataPointer; + + int pixels = 0; + byte *dst1 = dst; + byte *codes = dataPointer + 6; + + while (1) { + int code = *codes - 2; + codes++; + + if (code <= 0) { // quad or single + uint8 *src; + int cnt; + if (code == 0) { // quad + src = quadsOffset; + quadsOffset += 8; + cnt = 4; // 4 pixels + } else { // single + src = singlesOffset; + singlesOffset += 2; + cnt = 1; + } + + for (int c = 0; c < cnt; c++) { + if (pixels >= sx) { + if (rawROP == 1) { // MMX_PREMUL_ALPHA_COPY + WRITE_LE_UINT16(dst1, READ_LE_UINT16(src)); + } else if (rawROP == 2) { // MMX_ADDITIVE + uint16 color = READ_LE_UINT16(src); + uint16 orig = READ_LE_UINT16(dst1); + + uint32 r = MIN<uint32>(0x7c00, (orig & 0x7c00) + (color & 0x7c00)); + uint32 g = MIN<uint32>(0x03e0, (orig & 0x03e0) + (color & 0x03e0)); + uint32 b = MIN<uint32>(0x001f, (orig & 0x001f) + (color & 0x001f)); + WRITE_LE_UINT16(dst1, (r | g | b)); + } else if (rawROP == 5) { // MMX_CHEAP_50_50 + uint16 color = (READ_LE_UINT16(src) >> 1) & 0x3DEF; + uint16 orig = (READ_LE_UINT16(dst1) >> 1) & 0x3DEF; + WRITE_LE_UINT16(dst1, (color + orig)); + } + dst1 += 2; + } + src += 2; + pixels++; + } + } else { // skip + if ((code & 1) == 0) { + code >>= 1; + + for (int j = 0; j < code; j++) { + if (pixels >= sx) + dst1 += 2; + pixels++; + } + } else { // special case + if (pixels >= sx) { + int alpha = code >> 1; + uint16 color = READ_LE_UINT16(singlesOffset); + uint32 orig = READ_LE_UINT16(dst1); + + if (!premulAlpa) { + WRITE_LE_UINT16(dst1, color); // ENABLE_PREMUL_ALPHA = 0 + } else { + if (alpha > 32) { + alpha -= 32; + + uint32 oR = orig & 0x7c00; + uint32 oG = orig & 0x03e0; + uint32 oB = orig & 0x1f; + uint32 dR = ((((color & 0x7c00) - oR) * alpha) >> 5) + oR; + uint32 dG = ((((color & 0x3e0) - oG) * alpha) >> 5) + oG; + uint32 dB = ((((color & 0x1f) - oB) * alpha) >> 5) + oB; + + WRITE_LE_UINT16(dst1, (dR & 0x7c00) | (dG & 0x3e0) | (dB & 0x1f)); + } else { + uint32 pix = ((orig << 16) | orig) & 0x3e07c1f; + pix = (((pix * alpha) & 0xffffffff) >> 5) & 0x3e07c1f; + pix = ((pix >> 16) + pix + color) & 0xffff; + WRITE_LE_UINT16(dst1, pix); + } + } + + dst1 += 2; + } + singlesOffset += 2; + pixels++; + } + } + + if (pixels >= cx + sx) + break; + } + + dataPointer += lineSize; + dst += dstPitch; + } +} + +} // End of namespace Scumm diff --git a/engines/scumm/he/moonbase/moonbase.h b/engines/scumm/he/moonbase/moonbase.h new file mode 100644 index 0000000000..e82ae0164f --- /dev/null +++ b/engines/scumm/he/moonbase/moonbase.h @@ -0,0 +1,99 @@ +/* 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 SCUMM_HE_MOONBASE_H +#define SCUMM_HE_MOONBASE_H + +#ifdef ENABLE_HE + +#include "common/winexe_pe.h" + +namespace Scumm { + +class Moonbase { +public: + Moonbase(ScummEngine_v71he *vm); + ~Moonbase(); + + void blitT14WizImage(uint8 *dst, int dstw, int dsth, int dstPitch, const Common::Rect *clipBox, + uint8 *wizd, int srcx, int srcy, int rawROP, int paramROP); + + // FOW Stuff + void initFOW(); + void releaseFOWResources(); + + bool setFOWImage(int id); + + void setFOWInfo(int fowInfoArray, int downDim, int acrossDim, int viewX, int viewY, int clipX1, + int clipY1, int clipX2, int clipY2, int technique, int nFrame); + + + void renderFOW(uint8 *destSurface, int dstPitch, int dstType, int dstw, int dsth, int flags); + +private: + int readFOWVisibilityArray(int array, int y, int x); + void renderFOWState(uint8 *destSurface, int dstPitch, int dstType, int dstw, int dsth, int x, int y, int srcw, int srch, int state, int flags); + +public: + int _fowSentinelImage; + int _fowSentinelState; + uint32 _fowSentinelConditionBits; + +private: + ScummEngine_v71he *_vm; + + int _fowFrameBaseNumber; + int _fowAnimationFrames; + int _fowCurrentFOWFrame; + + int32 _fowTileW; + int32 _fowTileH; + + uint8 *_fowImage; + int _fowClipX1; + int _fowClipY1; + int _fowClipX2; + int _fowClipY2; + + int _fowDrawX; + int _fowDrawY; + + int _fowVtx1; + int _fowVty1; + int _fowMvx; + int _fowMvy; + int _fowVw; + int _fowVh; + + bool _fowBlackMode; + + int _fowRenderTable[32768]; + + Common::PEResources _exe; + Common::String _fileName; +}; + +} // End of namespace Scumm + +#endif // ENABLE_HE + +#endif // SCUMM_HE_MOONBASE_H diff --git a/engines/scumm/he/moonbase/moonbase_fow.cpp b/engines/scumm/he/moonbase/moonbase_fow.cpp new file mode 100644 index 0000000000..3f3730b6f1 --- /dev/null +++ b/engines/scumm/he/moonbase/moonbase_fow.cpp @@ -0,0 +1,417 @@ +/* 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/config-manager.h" + +#include "scumm/he/intern_he.h" +#include "scumm/he/moonbase/moonbase.h" + +namespace Scumm { + +#define FOW_ANIM_FRAME_COUNT 38 + +void Moonbase::initFOW() { + _fowSentinelImage = -1; + _fowSentinelState = -1; + _fowSentinelConditionBits = 0; + + _fowFrameBaseNumber = 0; + _fowAnimationFrames = 1; + _fowCurrentFOWFrame = 0; + + _fowTileW = 0; + _fowTileH = 0; + + _fowImage = nullptr; + _fowClipX1 = 0; + _fowClipY1 = 0; + _fowClipX2 = 0; + _fowClipY2 = 0; + + _fowDrawX = 0; + _fowDrawY = 0; + + _fowVtx1 = 0; + _fowVty1 = 0; + _fowMvx = 0; + _fowMvy = 0; + _fowVw = 0; + _fowVh = 0; + + _fowBlackMode = true; + + memset(_fowRenderTable, 0, 32768); +} + +void Moonbase::releaseFOWResources() { + if (_fowImage) { + free(_fowImage); + _fowImage = 0; + } +} + +bool Moonbase::setFOWImage(int image) { + releaseFOWResources(); + + if (!_fowImage) { + Common::String fowImageFilename(ConfMan.get("MOONX_FOWImageFilename").c_str()); + +#if 0 // TODO + if (!fowImageFilename.empty()) { + void *wiz = loadWizFromFilename(fowImageFilename); + + if (wiz) { + captureFOWImageFromLocation(wiz, file.size()); + free(wiz); + } + } +#endif + + if (!_fowImage && image < 0) { + int resId; + + // PIECES BUBBLES CIRCLES SIMPLE* WEDGEY BUBBLE2 + // WEDGE2 SPIKEY ANGLES SMOOTHED WUZZY SYS7-BEVELED + if (image >= -12 && image <= -1) + resId = 210 - image; // 211-222 range + else + resId = 214; // default, SIMPLE + + if (_fileName.empty()) { // We are running for the first time + _fileName = _vm->generateFilename(-3); + + if (!_exe.loadFromEXE(_fileName)) + error("Cannot open file %s", _fileName.c_str()); + } + + Common::SeekableReadStream *stream = _exe.getResource(Common::kPERCData, resId); + + if (stream->size()) { + _fowImage = (uint8 *)malloc(stream->size()); + + stream->read(_fowImage, stream->size()); + } + + delete stream; + } + + if (!_fowImage && image > 0) + _fowImage = _vm->getResourceAddress(rtImage, image); + + if (!_fowImage) + return false; + } + + int nStates = _vm->_wiz->getWizImageStates(_fowImage); + + if (nStates > FOW_ANIM_FRAME_COUNT) { + releaseFOWResources(); + return false; + } + + _fowAnimationFrames = (nStates + FOW_ANIM_FRAME_COUNT - 1) / FOW_ANIM_FRAME_COUNT; + + _vm->_wiz->getWizImageDim(_fowImage, (nStates - 1), _fowTileW, _fowTileH); + _fowBlackMode = !_vm->_wiz->isWizPixelNonTransparent(_fowImage, nStates - 1, 0, 0, 0); + + if (ConfMan.hasKey("EnableFOWRects")) + _fowBlackMode = (ConfMan.getInt("EnableFOWRects") == 1); + + return true; +} + +enum FOWElement { + FOW_EMPTY = 0, + FOW_SOLID = 1, + + FF_L = 0x01, + FF_R = 0x02, + FF_T = 0x04, + FF_B = 0x08, + FF_T_L = 0x10, + FF_T_R = 0x20, + FF_B_L = 0x40, + FF_B_R = 0x80, + FF_Q_A = (FF_L | FF_T | FF_T_L), + FF_Q_B = (FF_R | FF_T | FF_T_R), + FF_Q_C = (FF_L | FF_B | FF_B_L), + FF_Q_D = (FF_R | FF_B | FF_B_R) +}; + +int Moonbase::readFOWVisibilityArray(int array, int y, int x) { + _vm->VAR(116) = array; + + if (_vm->readArray(116, y, x) > 0) + return FOW_EMPTY; + + return FOW_SOLID; +} + +void Moonbase::setFOWInfo(int fowInfoArray, int downDim, int acrossDim, int viewX, int viewY, int clipX1, + int clipY1, int clipX2, int clipY2, int technique, int nFrame) { + if (!_fowImage) + return; + + _fowDrawX = clipX1; + _fowDrawY = clipY1; + + _fowClipX1 = clipX1; + _fowClipY1 = clipY1; + _fowClipX2 = clipX2; + _fowClipY2 = clipY2; + + // Figure out the number of tiles are involved + int view_W = (clipX2 - clipX1) + 1; + int view_H = (clipY2 - clipY1) + 1; + + int tw = _fowTileW; + int th = _fowTileH; + + int dw = acrossDim; + int dh = downDim; + + int dlw = dw * tw; + int dlh = dh * th; + + _fowMvx = (0 <= viewX) ? (viewX % dlw) : (dlw - (-viewX % dlw)); + _fowMvy = (0 <= viewY) ? (viewY % dlh) : (dlh - (-viewY % dlh)); + + _fowVtx1 = _fowMvx / tw; + _fowVty1 = _fowMvy / th; + + _fowVw = (((_fowMvx + view_W + tw - 1) / tw) - _fowVtx1) + 1; + _fowVh = (((_fowMvy + view_H + th - 1) / th) - _fowVty1) + 1; + + // Build the connectivity table + int t = (_fowVty1 - 1); if (t >= dh) { t = 0; } else if (t < 0) { t = (dh - 1); } + int m = (_fowVty1 + 0); if (m >= dh) { m = 0; } else if (m < 0) { m = (dh - 1); } + int b = (_fowVty1 + 1); if (b >= dh) { b = 0; } else if (b < 0) { b = (dh - 1); } + + int il = (_fowVtx1 - 1); if (il >= dh) { il = 0; } else if (il < 0) { il = (dw - 1); } + int ic = (_fowVtx1 + 0); if (ic >= dh) { ic = 0; } else if (ic < 0) { ic = (dw - 1); } + int ir = (_fowVtx1 + 1); if (ir >= dh) { ir = 0; } else if (ir < 0) { ir = (dw - 1); } + + int dataOffset = (_fowVw * 3); + int dataOffset2 = (dataOffset * 2); + int *pOutterRenderTableA = _fowRenderTable; + int *pOutterRenderTableB = pOutterRenderTableA + dataOffset; + + for (int ay = 0; ay < _fowVh; ay++) { + int l = il; + int c = ic; + int r = ir; + + int *pRenderTableA = pOutterRenderTableA; + int *pRenderTableB = pOutterRenderTableB; + + pOutterRenderTableA += dataOffset2; + pOutterRenderTableB += dataOffset2; + + for (int ax = 0; ax < _fowVw; ax++) { + int visibility = readFOWVisibilityArray(fowInfoArray, m, c); + + if (visibility == FOW_EMPTY) { + int bits = 0; + + if (readFOWVisibilityArray(fowInfoArray, t, l) != 0) bits |= FF_T_L; + if (readFOWVisibilityArray(fowInfoArray, t, c) != 0) bits |= FF_T; + if (readFOWVisibilityArray(fowInfoArray, t, r) != 0) bits |= FF_T_R; + if (readFOWVisibilityArray(fowInfoArray, m, l) != 0) bits |= FF_L; + if (readFOWVisibilityArray(fowInfoArray, m, r) != 0) bits |= FF_R; + if (readFOWVisibilityArray(fowInfoArray, b, l) != 0) bits |= FF_B_L; + if (readFOWVisibilityArray(fowInfoArray, b, c) != 0) bits |= FF_B; + if (readFOWVisibilityArray(fowInfoArray, b, r) != 0) bits |= FF_B_R; + + if (bits) { + *pRenderTableA++ = 1; + *pRenderTableB++ = 1; + + // Quadrant (A) + if (bits & FF_Q_A) { + *pRenderTableA++ = ( + ((FF_L & bits) ? 1 : 0) | + ((FF_T & bits) ? 2 : 0) | + ((FF_T_L & bits) ? 4 : 0) + ) + 0; + } else { + *pRenderTableA++ = 0; + } + + // Quadrant (B) + if (bits & FF_Q_B) { + *pRenderTableA++ = ( + ((FF_R & bits) ? 1 : 0) | + ((FF_T & bits) ? 2 : 0) | + ((FF_T_R & bits) ? 4 : 0) + ) + 8; + } else { + *pRenderTableA++ = 0; + } + + // Quadrant (C) + if (bits & FF_Q_C) { + *pRenderTableB++ = ( + ((FF_L & bits) ? 1 : 0) | + ((FF_B & bits) ? 2 : 0) | + ((FF_B_L & bits) ? 4 : 0) + ) + 16; + } else { + *pRenderTableB++ = 0; + } + + // Quadrant (D) + if (bits & FF_Q_D) { + *pRenderTableB++ = ( + ((FF_R & bits) ? 1 : 0) | + ((FF_B & bits) ? 2 : 0) | + ((FF_B_R & bits) ? 4 : 0) + ) + 24; + } else { + *pRenderTableB++ = 0; + } + } else { + *pRenderTableA++ = 0; + *pRenderTableB++ = 0; + } + } else { + if (_fowBlackMode) { + *pRenderTableA++ = 2; + *pRenderTableB++ = 2; + } else { + *pRenderTableA++ = 1; + *pRenderTableA++ = 33; + *pRenderTableA++ = 34; + + *pRenderTableB++ = 1; + *pRenderTableB++ = 35; + *pRenderTableB++ = 36; + } + } + + if (++l >= dw) { l = 0; } + if (++c >= dw) { c = 0; } + if (++r >= dw) { r = 0; } + } + + if (++t >= dh) { t = 0; } + if (++m >= dh) { m = 0; } + if (++b >= dh) { b = 0; } + } + + _fowCurrentFOWFrame = (nFrame >= 0) ? (nFrame % _fowAnimationFrames) : ((-nFrame) % _fowAnimationFrames); + _fowFrameBaseNumber = (_fowCurrentFOWFrame * FOW_ANIM_FRAME_COUNT); +} + +void Moonbase::renderFOWState(uint8 *destSurface, int dstPitch, int dstType, int dstw, int dsth, int x, int y, int srcw, int srch, int state, int flags) { + int32 spotx, spoty; + + _vm->_wiz->getWizImageSpot(_fowImage, state, spotx, spoty); + Common::Rect r(_fowClipX1, _fowClipY1, _fowClipX2, _fowClipY2); + + _vm->_wiz->drawWizImageEx(destSurface, _fowImage, 0, dstPitch, dstType, dstw, dsth, x - spotx, y - spoty, srcw, srch, state, &r, flags, 0, 0, 16, 0, 0); +} + +static void blackRect_16bpp(uint8 *destSurface, int dstPitch, int dstw, int dsth, int x1, int y1, int x2, int y2) { + byte *dst = destSurface + dstPitch * y1 + x1 * 2; + int h = y2 - y1; + int w = ((x2 - x1) + 1) * 2; + + while ( --h >= 0 ) { + memset(dst, 0, w); + dst += dstPitch; + } +} + +void Moonbase::renderFOW(uint8 *destSurface, int dstPitch, int dstType, int dstw, int dsth, int flags) { + if (!_fowImage) + return; + + const int *pOutterRenderTable = _fowRenderTable; + int ixPos = ((_fowVtx1 * _fowTileW) - _fowMvx) + _fowDrawX; + int yPos = ((_fowVty1 * _fowTileH) - _fowMvy) + _fowDrawY; + int dataOffset = _fowVw * 3; + int halfTileHeight = _fowTileH / 2; + int cx2 = MIN(_fowClipX2, (dstw - 1)); + int cy2 = MIN(_fowClipY2, (dsth - 1)); + + for (int ry = 0; ry < _fowVh; ry++) { + int real_yPos = yPos; + + for (int i = 0; i < 2; i++) { + const int *pRenderTable = pOutterRenderTable; + pOutterRenderTable += dataOffset; + + int xPos = ixPos; + + for (int rx = 0; rx < _fowVw; rx++) { + int nState = *pRenderTable++; + + if (nState != 0) { + if (nState == 2) { + int countLeft = (_fowVw - rx); + int count = 0; + + for (; count < countLeft; count++) { + if (*(pRenderTable + count) != 2) + break; + + pRenderTable++; + rx++; + } + count++; + + int x1 = xPos; + int y1 = real_yPos; + + xPos += _fowTileW * count; + int x2 = (xPos - 1); + int y2 = ((y1 + halfTileHeight) - 1); + + x1 = MAX(0, x1); + y1 = MAX(0, y1); + x2 = MIN(x2, cx2); + y2 = MIN(y2, cy2); + + if ((x2 >= x1) && (y2 >= y1) && (x1 <= _fowClipX2) && (y1 <= _fowClipY2)) + blackRect_16bpp(destSurface, dstPitch, dstw, dsth, x1, y1, x2, y2); + } else { + int subState; + + if ((subState = *pRenderTable++) != 0) + renderFOWState(destSurface, dstPitch, dstType, dstw, dsth, xPos, yPos, _fowTileW, _fowTileH, (subState + _fowFrameBaseNumber), flags); + + if ((subState = *pRenderTable++) != 0) + renderFOWState(destSurface, dstPitch, dstType, dstw, dsth, xPos, yPos, _fowTileW, _fowTileH, (subState + _fowFrameBaseNumber), flags); + + xPos += _fowTileW; + } + } else { + xPos += _fowTileW; + } + } + real_yPos += halfTileHeight; + } + yPos += _fowTileH; + } +} + +} // End of namespace Scumm diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index afc6633ef6..4388433c7e 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -549,20 +549,20 @@ void ScummEngine_v100he::o100_arrayOps() { debug(9,"o100_arrayOps: array %d case %d", array, subOp); switch (subOp) { - case 35: + case 35: // SO_FORMATTED_STRING decodeScriptString(string); len = resStrLen(string); data = defineArray(array, kStringArray, 0, 0, 0, len); memcpy(data, string, len); break; - case 77: // SO_ASSIGN_STRING + case 77: // SO_STRING copyScriptString(string, sizeof(string)); len = resStrLen(string); data = defineArray(array, kStringArray, 0, 0, 0, len); memcpy(data, string, len); break; - case 128: // SO_ASSIGN_2DIM_LIST + case 128: // SO_ASSIGN_2DIM_LIST len = getStackList(list, ARRAYSIZE(list)); id = readVar(array); if (id == 0) @@ -572,7 +572,7 @@ void ScummEngine_v100he::o100_arrayOps() { writeArray(array, c, len, list[len]); } break; - case 129: // SO_ASSIGN_INT_LIST + case 129: // SO_ASSIGN_INT_LIST b = pop(); c = pop(); id = readVar(array); @@ -583,7 +583,7 @@ void ScummEngine_v100he::o100_arrayOps() { writeArray(array, 0, b + c, pop()); } break; - case 130: + case 130: // len = getStackList(list, ARRAYSIZE(list)); dim1end = pop(); dim1start = pop(); @@ -607,7 +607,7 @@ void ScummEngine_v100he::o100_arrayOps() { dim2start++; } break; - case 131: + case 131: // SO_COMPLEX_ARRAY_COPY_OPERATION { int a2_dim1end = pop(); int a2_dim1start = pop(); @@ -624,7 +624,7 @@ void ScummEngine_v100he::o100_arrayOps() { copyArray(array, a1_dim2start, a1_dim2end, a1_dim1start, a1_dim1end, array2, a2_dim2start, a2_dim2end, a2_dim1start, a2_dim1end); } break; - case 132: + case 132: // SO_COMPLEX_ARRAY_MATH_OPERATION // TODO: Used by room 2 script 2180 in Moonbase Commander fetchScriptWord(); fetchScriptWord(); @@ -659,9 +659,9 @@ void ScummEngine_v100he::o100_arrayOps() { default: error("o100_arrayOps: case 132 unknown type %d)", type); } - debug(0, "o100_arrayOps: case 132 type %d", type); + warning("STUB: o100_arrayOps: case 132 type %d", type); break; - case 133: + case 133: // SO_RANGE_ARRAY_ASSIGNMENT b = pop(); c = pop(); dim1end = pop(); @@ -1110,6 +1110,7 @@ void ScummEngine_v100he::o100_resourceRoutines() { break; case 128: // TODO: Clear Heap + warning("STUB: o100_resourceRoutines: clear Heap"); break; case 129: // Dummy case @@ -1310,36 +1311,36 @@ void ScummEngine_v100he::o100_wizImageOps() { if (_wizParams.img.resNum) _wiz->processWizImage(&_wizParams); break; - case 128: - _wizParams.field_239D = pop(); - _wizParams.field_2399 = pop(); - _wizParams.field_23A5 = pop(); - _wizParams.field_23A1 = pop(); - copyScriptString(_wizParams.string2, sizeof(_wizParams.string2)); + case 128: // Font create _wizParams.processMode = 15; + _wizParams.fontProperties.bgColor = pop(); + _wizParams.fontProperties.fgColor = pop(); + _wizParams.fontProperties.size = pop(); + _wizParams.fontProperties.style = pop(); + copyScriptString(_wizParams.fontProperties.fontName, sizeof(_wizParams.fontProperties.fontName)); break; case 129: _wizParams.processMode = 14; break; - case 130: + case 130: // Font render _wizParams.processMode = 16; - _wizParams.field_23AD = pop(); - _wizParams.field_23A9 = pop(); - copyScriptString(_wizParams.string1, sizeof(_wizParams.string1)); + _wizParams.fontProperties.yPos = pop(); + _wizParams.fontProperties.xPos = pop(); + copyScriptString(_wizParams.fontProperties.string, sizeof(_wizParams.fontProperties.string)); break; case 131: _wizParams.processMode = 13; break; - case 133: + case 133: // Render ellipse _wizParams.processMode = 17; - _wizParams.field_23CD = pop(); - _wizParams.field_23C9 = pop(); - _wizParams.field_23C5 = pop(); - _wizParams.field_23C1 = pop(); - _wizParams.field_23BD = pop(); - _wizParams.field_23B9 = pop(); - _wizParams.field_23B5 = pop(); - _wizParams.field_23B1 = pop(); + _wizParams.ellipseProperties.color = pop(); + _wizParams.ellipseProperties.lod = pop(); + _wizParams.ellipseProperties.ky = pop(); + _wizParams.ellipseProperties.kx = pop(); + _wizParams.ellipseProperties.qy = pop(); + _wizParams.ellipseProperties.qx = pop(); + _wizParams.ellipseProperties.py = pop(); + _wizParams.ellipseProperties.px = pop(); break; case 134: _wizParams.processFlags |= kWPFFillColor | kWPFClipBox2; @@ -1781,14 +1782,14 @@ void ScummEngine_v100he::o100_setSpriteInfo() { byte subOp = fetchScriptByte(); switch (subOp) { - case 0: + case 0: // SO_INIT _curMaxSpriteId = pop(); _curSpriteId = pop(); if (_curSpriteId > _curMaxSpriteId) SWAP(_curSpriteId, _curMaxSpriteId); break; - case 2: + case 2: // SO_ANGLE args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1799,7 +1800,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteAngle(spriteId, args[0]); break; - case 3: + case 3: // SO_ANIMATION args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1810,7 +1811,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteFlagAutoAnim(spriteId, args[0]); break; - case 4: + case 4: // SO_ANIMATION_SPEED args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1821,7 +1822,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteAnimSpeed(spriteId, args[0]); break; - case 6: + case 6: // SO_AT args[1] = pop(); args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) @@ -1833,7 +1834,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpritePosition(spriteId, args[0], args[1]); break; - case 7: + case 7: // SO_AT_IMAGE args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1844,7 +1845,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteSourceImage(spriteId, args[0]); break; - case 16: + case 16: // SO_CLASS n = getStackList(args, ARRAYSIZE(args)); if (_curSpriteId != 0 && _curMaxSpriteId != 0 && n != 0) { int *p = &args[n - 1]; @@ -1867,7 +1868,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { } while (--n); } break; - case 32: + case 32: // SO_ERASE args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1878,7 +1879,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteFlagEraseType(spriteId, args[0]); break; - case 38: + case 38: // SO_GROUP args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1889,7 +1890,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteGroup(spriteId, args[0]); break; - case 40: + case 40: // SO_IMAGE args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1900,7 +1901,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteImage(spriteId, args[0]); break; - case 48: + case 48: // SO_MASK args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1911,7 +1912,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteMaskImage(spriteId, args[0]); break; - case 49: + case 49: // SO_MOVE args[1] = pop(); args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) @@ -1923,10 +1924,10 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->moveSprite(spriteId, args[0], args[1]); break; - case 52: + case 52: // SO_NAME copyScriptString(string, sizeof(string)); break; - case 53: + case 53: // SO_NEW if (_curSpriteId > _curMaxSpriteId) break; spriteId = _curSpriteId; @@ -1936,7 +1937,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->resetSprite(spriteId); break; - case 54: + case 54: // SO_NEW_GENERAL_PROPERTY args[1] = pop(); args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) @@ -1948,7 +1949,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteGeneralProperty(spriteId, args[0], args[1]); break; - case 57: + case 57: // SO_PALETTE args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1959,7 +1960,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpritePalette(spriteId, args[0]); break; - case 59: + case 59: // SO_PRIORITY args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -1970,7 +1971,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpritePriority(spriteId, args[0]); break; - case 60: + case 60: // SO_PROPERTY args[1] = pop(); args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) @@ -1997,13 +1998,14 @@ void ScummEngine_v100he::o100_setSpriteInfo() { _sprite->setSpriteFlagRemapPalette(spriteId, args[0]); break; default: + warning("Unknown sprite property %d for sprite %d", args[0], spriteId); break; } break; - case 61: + case 61: // SO_RESTART _sprite->resetTables(true); break; - case 65: + case 65: // SO_SCALE args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -2014,7 +2016,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteScale(spriteId, args[0]); break; - case 70: + case 70: // SO_SHADOW args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -2025,7 +2027,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteShadow(spriteId, args[0]); break; - case 73: + case 73: // SO_STATE args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -2036,7 +2038,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteImageState(spriteId, args[0]); break; - case 74: + case 74: // SO_STEP_DIST args[1] = pop(); args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) @@ -2048,7 +2050,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteDist(spriteId, args[0], args[1]); break; - case 75: + case 75: // SO_STEP_DIST_X args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -2061,7 +2063,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { _sprite->setSpriteDist(spriteId, args[0], tmp[1]); } break; - case 76: + case 76: // SO_STEP_DIST_Y args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -2074,7 +2076,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { _sprite->setSpriteDist(spriteId, tmp[0], args[0]); } break; - case 82: + case 82: // SO_UPDATE args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -2085,7 +2087,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteFlagUpdateType(spriteId, args[0]); break; - case 83: + case 83: // SO_VARIABLE args[1] = pop(); args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) @@ -2097,7 +2099,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { for (; spriteId <= _curMaxSpriteId; spriteId++) _sprite->setSpriteUserValue(spriteId, args[0], args[1]); break; - case 88: + case 88: // SO_IMAGE_ZCLIP args[0] = pop(); if (_curSpriteId > _curMaxSpriteId) break; @@ -2106,9 +2108,9 @@ void ScummEngine_v100he::o100_setSpriteInfo() { spriteId++; for (; spriteId <= _curMaxSpriteId; spriteId++) - _sprite->setSpriteField84(spriteId, args[0]); + _sprite->setSpriteZBuffer(spriteId, args[0]); break; - case 89: + case 89: // SO_NEVER_ZCLIP if (_curSpriteId > _curMaxSpriteId) break; spriteId = _curSpriteId; @@ -2116,7 +2118,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() { spriteId++; for (; spriteId <= _curMaxSpriteId; spriteId++) - _sprite->setSpriteField84(spriteId, 0); + _sprite->setSpriteZBuffer(spriteId, 0); break; default: error("o100_setSpriteInfo: Unknown case %d", subOp); @@ -2235,40 +2237,43 @@ void ScummEngine_v100he::o100_videoOps() { byte subOp = fetchScriptByte(); switch (subOp) { - case 0: + case 0: // SO_INIT memset(_videoParams.filename, 0, sizeof(_videoParams.filename)); _videoParams.status = 0; _videoParams.flags = 0; - _videoParams.unk2 = pop(); + _videoParams.number = pop(); _videoParams.wizResNum = 0; + + if (_videoParams.number != 1 && _videoParams.number != -1) + warning("o100_videoOps: number: %d", _videoParams.number); break; - case 19: + case 19: // SO_CLOSE _videoParams.status = 19; break; - case 40: + case 40: // SO_IMAGE _videoParams.wizResNum = pop(); if (_videoParams.wizResNum) _videoParams.flags |= 2; break; - case 47: + case 47: // SO_LOAD copyScriptString(_videoParams.filename, sizeof(_videoParams.filename)); _videoParams.status = 47; break; - case 67: + case 67: // SO_SET_FLAGS _videoParams.flags |= pop(); break; - case 92: - if (_videoParams.status == 47) { + case 92: // SO_END + if (_videoParams.status == 47) { // SO_LOAD // Start video if (_videoParams.flags == 0) _videoParams.flags = 4; - if (_videoParams.flags == 2) { + if (_videoParams.flags & 2) { VAR(119) = _moviePlay->load(convertFilePath(_videoParams.filename), _videoParams.flags, _videoParams.wizResNum); } else { VAR(119) = _moviePlay->load(convertFilePath(_videoParams.filename), _videoParams.flags); } - } else if (_videoParams.status == 19) { + } else if (_videoParams.status == 19) { // SO_CLOSE // Stop video _moviePlay->close(); } @@ -2468,6 +2473,7 @@ void ScummEngine_v100he::o100_getSpriteGroupInfo() { pop(); pop(); push(0); + warning("STUB: o100_getSpriteGroupInfo, subop 54"); break; case 59: spriteGroupId = pop(); diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp index f65d2f6077..f63973e3f1 100644 --- a/engines/scumm/he/script_v90he.cpp +++ b/engines/scumm/he/script_v90he.cpp @@ -285,29 +285,29 @@ void ScummEngine_v90he::o90_wizImageOps() { _wizParams.processMode = 13; break; case 142: // HE99+ - _wizParams.field_239D = pop(); - _wizParams.field_2399 = pop(); - _wizParams.field_23A5 = pop(); - _wizParams.field_23A1 = pop(); - copyScriptString(_wizParams.string2, sizeof(_wizParams.string2)); _wizParams.processMode = 15; + _wizParams.fontProperties.bgColor = pop(); + _wizParams.fontProperties.fgColor = pop(); + _wizParams.fontProperties.size = pop(); + _wizParams.fontProperties.style = pop(); + copyScriptString(_wizParams.fontProperties.fontName, sizeof(_wizParams.fontProperties.fontName)); break; case 143: // HE99+ _wizParams.processMode = 16; - _wizParams.field_23AD = pop(); - _wizParams.field_23A9 = pop(); - copyScriptString(_wizParams.string1, sizeof(_wizParams.string1)); + _wizParams.fontProperties.yPos = pop(); + _wizParams.fontProperties.xPos = pop(); + copyScriptString(_wizParams.fontProperties.string, sizeof(_wizParams.fontProperties.string)); break; case 189: // HE99+ _wizParams.processMode = 17; - _wizParams.field_23CD = pop(); - _wizParams.field_23C9 = pop(); - _wizParams.field_23C5 = pop(); - _wizParams.field_23C1 = pop(); - _wizParams.field_23BD = pop(); - _wizParams.field_23B9 = pop(); - _wizParams.field_23B5 = pop(); - _wizParams.field_23B1 = pop(); + _wizParams.ellipseProperties.color = pop(); + _wizParams.ellipseProperties.lod = pop(); + _wizParams.ellipseProperties.ky = pop(); + _wizParams.ellipseProperties.kx = pop(); + _wizParams.ellipseProperties.qy = pop(); + _wizParams.ellipseProperties.qx = pop(); + _wizParams.ellipseProperties.py = pop(); + _wizParams.ellipseProperties.px = pop(); break; case 196: // HE99+ _wizParams.processMode = 14; @@ -1412,7 +1412,7 @@ void ScummEngine_v90he::o90_videoOps() { memset(_videoParams.filename, 0, sizeof(_videoParams.filename)); _videoParams.status = 0; _videoParams.flags = 0; - _videoParams.unk2 = pop(); + _videoParams.number = pop(); _videoParams.wizResNum = 0; break; case 14: diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index b806a9f3cc..2e0a03af7f 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -34,14 +34,10 @@ #include "common/timer.h" #include "common/util.h" +#include "audio/audiostream.h" #include "audio/decoders/adpcm.h" -#include "audio/decoders/flac.h" -#include "audio/mididrv.h" #include "audio/mixer.h" -#include "audio/decoders/mp3.h" #include "audio/decoders/raw.h" -#include "audio/decoders/voc.h" -#include "audio/decoders/vorbis.h" #include "audio/decoders/wave.h" namespace Scumm { @@ -474,6 +470,10 @@ void SoundHE::processSoundOpcodes(int sound, byte *codePtr, int *soundVars) { if (arg == 2) { val = getSoundVar(sound, val); } + if (!val) { + val = 1; // Safeguard for division by zero + warning("Incorrect value 0 for processSoundOpcodes() kludge DIV"); + } val = getSoundVar(sound, var) / val; setSoundVar(sound, var, val); break; diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp index 245a986531..e3f04dfcf0 100644 --- a/engines/scumm/he/sprite_he.cpp +++ b/engines/scumm/he/sprite_he.cpp @@ -386,7 +386,7 @@ int Sprite::getSpriteGeneralProperty(int spriteId, int type) { case 0x7B: return _spriteTable[spriteId].imgFlags; case 0x7D: - return _spriteTable[spriteId].field_90; + return _spriteTable[spriteId].conditionBits; case 0x7E: return _spriteTable[spriteId].animProgress; default: @@ -739,26 +739,24 @@ void Sprite::setSpriteResetClass(int spriteId) { _spriteTable[spriteId].classFlags = 0; } -void Sprite::setSpriteField84(int spriteId, int value) { +void Sprite::setSpriteZBuffer(int spriteId, int value) { assertRange(1, spriteId, _varNumSprites, "sprite"); - _spriteTable[spriteId].field_84 = value; + _spriteTable[spriteId].zbufferImage = value; } void Sprite::setSpriteGeneralProperty(int spriteId, int type, int value) { - debug(0, "setSpriteGeneralProperty: spriteId %d type 0x%x", spriteId, type); + debug(6, "setSpriteGeneralProperty: spriteId %d type 0x%x value 0x%x", spriteId, type, value); assertRange(1, spriteId, _varNumSprites, "sprite"); int32 delay; - // XXX U32 related check - switch (type) { case 0x7B: _spriteTable[spriteId].imgFlags = value; _spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw; break; case 0x7D: - _spriteTable[spriteId].field_90 = value; + _spriteTable[spriteId].conditionBits = value; _spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw; break; case 0x7E: @@ -797,9 +795,9 @@ void Sprite::resetSprite(int spriteId) { _spriteTable[spriteId].sourceImage = 0; _spriteTable[spriteId].maskImage = 0; _spriteTable[spriteId].priority = 0; - _spriteTable[spriteId].field_84 = 0; + _spriteTable[spriteId].zbufferImage = 0; _spriteTable[spriteId].imgFlags = 0; - _spriteTable[spriteId].field_90 = 0; + _spriteTable[spriteId].conditionBits = 0; if (_vm->_game.heversion >= 100) { _spriteTable[spriteId].flags &= ~kSFMarkDirty; @@ -816,7 +814,7 @@ void Sprite::setSpriteImage(int spriteId, int imageNum) { origResWizStates = _spriteTable[spriteId].imageStateCount; _spriteTable[spriteId].image = imageNum; - _spriteTable[spriteId].field_74 = 0; + _spriteTable[spriteId].animIndex = 0; _spriteTable[spriteId].imageState = 0; if (_spriteTable[spriteId].image) { @@ -1292,7 +1290,7 @@ void Sprite::processImages(bool arg) { wiz.spriteId = spi->id; wiz.spriteGroup = spi->group; - wiz.field_23EA = spi->field_90; + wiz.conditionBits = spi->conditionBits; spi->curImageState = wiz.img.state = imageState; spi->curImage = wiz.img.resNum = image; wiz.processFlags = kWPFNewState | kWPFSetPos; @@ -1339,9 +1337,9 @@ void Sprite::processImages(bool arg) { } if (spr_flags & kSFRemapPalette) wiz.img.flags |= kWIFRemapPalette; - if (spi->field_84) { + if (spi->zbufferImage) { wiz.processFlags |= 0x200000; - wiz.img.field_390 = spi->field_84; + wiz.img.zbuffer = spi->zbufferImage; wiz.img.zorder = spi->priority; } if (spi->sourceImage) { @@ -1419,14 +1417,14 @@ void Sprite::saveOrLoadSpriteData(Serializer *s) { MKLINE(SpriteInfo, curAngle, sleInt32, VER(48)), MKLINE(SpriteInfo, curScale, sleInt32, VER(48)), MKLINE(SpriteInfo, curImgFlags, sleInt32, VER(48)), - MKLINE(SpriteInfo, field_74, sleInt32, VER(48)), + MKLINE(SpriteInfo, animIndex, sleInt32, VER(48)), MKLINE(SpriteInfo, animSpeed, sleInt32, VER(48)), MKLINE(SpriteInfo, sourceImage, sleInt32, VER(48)), MKLINE(SpriteInfo, maskImage, sleInt32, VER(48)), - MKLINE(SpriteInfo, field_84, sleInt32, VER(48)), + MKLINE(SpriteInfo, zbufferImage, sleInt32, VER(48)), MKLINE(SpriteInfo, classFlags, sleInt32, VER(48)), MKLINE(SpriteInfo, imgFlags, sleInt32, VER(48)), - MKLINE(SpriteInfo, field_90, sleInt32, VER(48)), + MKLINE(SpriteInfo, conditionBits, sleInt32, VER(48)), MKEND() }; diff --git a/engines/scumm/he/sprite_he.h b/engines/scumm/he/sprite_he.h index e31ccbf790..3ea6bb9f84 100644 --- a/engines/scumm/he/sprite_he.h +++ b/engines/scumm/he/sprite_he.h @@ -72,14 +72,14 @@ struct SpriteInfo { int32 curAngle; int32 curScale; int32 curImgFlags; - int32 field_74; + int32 animIndex; int32 animSpeed; int32 sourceImage; int32 maskImage; - int32 field_84; + int32 zbufferImage; int32 classFlags; int32 imgFlags; - int32 field_90; + int32 conditionBits; }; struct SpriteGroup { @@ -182,7 +182,7 @@ public: void setSpriteAnimSpeed(int spriteId, int value); void setSpriteSetClass(int spriteId, int classId, int toggle); void setSpriteResetClass(int spriteId); - void setSpriteField84(int spriteId, int value); + void setSpriteZBuffer(int spriteId, int value); void setSpriteGeneralProperty(int spriteId, int type, int value); void moveGroupMembers(int spriteGroupId, int value1, int value2); diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 9a59609651..0976a532de 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -31,6 +31,7 @@ #include "scumm/scumm.h" #include "scumm/util.h" #include "scumm/he/wiz_he.h" +#include "scumm/he/moonbase/moonbase.h" namespace Scumm { @@ -976,7 +977,7 @@ void Wiz::decompressRawWizImage(uint8 *dst, int dstPitch, int dstType, const uin } } -int Wiz::isWizPixelNonTransparent(const uint8 *data, int x, int y, int w, int h, uint8 bitDepth) { +int Wiz::isPixelNonTransparent(const uint8 *data, int x, int y, int w, int h, uint8 bitDepth) { if (x < 0 || x >= w || y < 0 || y >= h) { return 0; } @@ -1422,19 +1423,19 @@ void Wiz::displayWizImage(WizImage *pwi) { wi->state = pwi->state; wi->flags = pwi->flags; wi->shadow = 0; - wi->field_390 = 0; + wi->zbuffer = 0; wi->palette = 0; ++_imagesNum; } else if (pwi->flags & kWIFIsPolygon) { drawWizPolygon(pwi->resNum, pwi->state, pwi->x1, pwi->flags, 0, 0, 0); } else { const Common::Rect *r = NULL; - drawWizImage(pwi->resNum, pwi->state, 0, 0, pwi->x1, pwi->y1, 0, 0, 0, r, pwi->flags, 0, _vm->getHEPaletteSlot(0)); + drawWizImage(pwi->resNum, pwi->state, 0, 0, pwi->x1, pwi->y1, 0, 0, 0, r, pwi->flags, 0, _vm->getHEPaletteSlot(0), 0); } } -uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr) { - debug(3, "drawWizImage(resNum %d, state %d maskNum %d maskState %d x1 %d y1 %d flags 0x%X zorder %d shadow %d field_390 %d dstResNum %d)", resNum, state, maskNum, maskState, x1, y1, flags, zorder, shadow, field_390, dstResNum); +uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int x1, int y1, int zorder, int shadow, int zbuffer, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr, uint32 conditionBits) { + debug(7, "drawWizImage(resNum %d, state %d maskNum %d maskState %d x1 %d y1 %d flags 0x%X zorder %d shadow %d zbuffer %d dstResNum %d conditionBits: 0x%x)", resNum, state, maskNum, maskState, x1, y1, flags, zorder, shadow, zbuffer, dstResNum, conditionBits); uint8 *dataPtr; uint8 *dst = NULL; @@ -1454,10 +1455,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int uint32 comp = READ_LE_UINT32(wizh + 0x0); uint32 width = READ_LE_UINT32(wizh + 0x4); uint32 height = READ_LE_UINT32(wizh + 0x8); - debug(3, "wiz_header.comp = %d wiz_header.w = %d wiz_header.h = %d", comp, width, height); - - uint8 *wizd = _vm->findWrappedBlock(MKTAG('W','I','Z','D'), dataPtr, state, 0); - assert(wizd); + debug(7, "wiz_header.comp = %d wiz_header.w = %d wiz_header.h = %d", comp, width, height); uint8 *mask = NULL; if (maskNum) { @@ -1574,58 +1572,261 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int transColor = (trns == NULL) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : -1; } + if (_vm->_game.id == GID_MOONBASE && + resNum == _vm->_moonbase->_fowSentinelImage && + state == _vm->_moonbase->_fowSentinelState && + conditionBits == _vm->_moonbase->_fowSentinelConditionBits) { + _vm->_moonbase->renderFOW(dst, dstPitch, dstType, cw, ch, flags); + x1 = 0; + y1 = 0; + width = rScreen.width(); + height = rScreen.height(); + } else { + drawWizImageEx(dst, dataPtr, mask, dstPitch, dstType, cw, ch, x1, y1, width, height, + state, &rScreen, flags, palPtr, transColor, _vm->_bytesPerPixel, xmapPtr, conditionBits); + } + + if (!(flags & kWIFBlitToMemBuffer) && dstResNum == 0) { + Common::Rect rImage(x1, y1, x1 + width, y1 + height); + if (rImage.intersects(rScreen)) { + rImage.clip(rScreen); + if (!(flags & kWIFBlitToFrontVideoBuffer) && (flags & (kWIFBlitToFrontVideoBuffer | kWIFMarkBufferDirty))) { + ++rImage.bottom; + _vm->markRectAsDirty(kMainVirtScreen, rImage); + } else { + _vm->restoreBackgroundHE(rImage); + } + } + } + + return dst; +} + +void Wiz::drawWizImageEx(uint8 *dst, uint8 *dataPtr, uint8 *maskPtr, int dstPitch, int dstType, + int dstw, int dsth, int srcx, int srcy, int srcw, int srch, int state, const Common::Rect *rect, + int flags, const uint8 *palPtr, int transColor, uint8 bitDepth, const uint8 *xmapPtr, uint32 conditionBits) { + uint8 *wizh = _vm->findWrappedBlock(MKTAG('W','I','Z','H'), dataPtr, state, 0); + assert(wizh); + uint32 comp = READ_LE_UINT32(wizh + 0x0); + uint32 width = READ_LE_UINT32(wizh + 0x4); + uint32 height = READ_LE_UINT32(wizh + 0x8); + debug(7, "wiz_header.comp = %d wiz_header.w = %d wiz_header.h = %d", comp, width, height); + + uint8 *wizd = _vm->findWrappedBlock(MKTAG('W','I','Z','D'), dataPtr, state, 0); + assert(wizd); + switch (comp) { case 0: - copyRawWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, transColor, _vm->_bytesPerPixel); + copyRawWizImage(dst, wizd, dstPitch, dstType, dstw, dsth, srcx, srcy, srcw, srch, rect, flags, palPtr, transColor, bitDepth); break; case 1: - if (flags & 0x80) { + if (flags & kWIFZPlaneOn) { dst = _vm->getMaskBuffer(0, 0, 1); dstPitch /= _vm->_bytesPerPixel; - copyWizImageWithMask(dst, wizd, dstPitch, cw, ch, x1, y1, width, height, &rScreen, 0, 2); - } else if (flags & 0x100) { + copyWizImageWithMask(dst, wizd, dstPitch, dstw, dsth, srcx, srcy, srcw, srch, rect, 0, 2); + } else if (flags & kWIFZPlaneOff) { dst = _vm->getMaskBuffer(0, 0, 1); dstPitch /= _vm->_bytesPerPixel; - copyWizImageWithMask(dst, wizd, dstPitch, cw, ch, x1, y1, width, height, &rScreen, 0, 1); + copyWizImageWithMask(dst, wizd, dstPitch, dstw, dsth, srcx, srcy, srcw, srch, rect, 0, 1); } else { - copyWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr, _vm->_bytesPerPixel); + copyWizImage(dst, wizd, dstPitch, dstType, dstw, dsth, srcx, srcy, srcw, srch, rect, flags, palPtr, xmapPtr, bitDepth); } break; #ifdef USE_RGB_COLOR case 2: - if (maskNum) { - copyMaskWizImage(dst, wizd, mask, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr); + if (maskPtr) { + copyMaskWizImage(dst, wizd, maskPtr, dstPitch, dstType, dstw, dsth, srcx, srcy, srcw, srch, rect, flags, palPtr); } else { - copyRaw16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, transColor); + copyRaw16BitWizImage(dst, wizd, dstPitch, dstType, dstw, dsth, srcx, srcy, srcw, srch, rect, flags, transColor); } break; case 4: - // TODO: Unknown image type + copyCompositeWizImage(dst, dataPtr, wizd, maskPtr, dstPitch, dstType, dstw, dsth, srcx, srcy, srcw, srch, state, rect, flags, palPtr, transColor, bitDepth, xmapPtr, conditionBits); break; case 5: - copy16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, xmapPtr); + copy16BitWizImage(dst, wizd, dstPitch, dstType, dstw, dsth, srcx, srcy, srcw, srch, rect, flags, xmapPtr); + break; + case 9: + copy555WizImage(dst, wizd, dstPitch, dstType, dstw, dsth, srcx, srcy, rect, conditionBits); break; #endif default: - error("drawWizImage: Unhandled wiz compression type %d", comp); + error("drawWizImageEx: Unhandled wiz compression type %d", comp); } +} - if (!(flags & kWIFBlitToMemBuffer) && dstResNum == 0) { - Common::Rect rImage(x1, y1, x1 + width, y1 + height); - if (rImage.intersects(rScreen)) { - rImage.clip(rScreen); - if (!(flags & kWIFBlitToFrontVideoBuffer) && (flags & (kWIFBlitToFrontVideoBuffer | kWIFMarkBufferDirty))) { - ++rImage.bottom; - _vm->markRectAsDirty(kMainVirtScreen, rImage); - } else { - _vm->restoreBackgroundHE(rImage); +#ifdef USE_RGB_COLOR + +void Wiz::copyCompositeWizImage(uint8 *dst, uint8 *wizPtr, uint8 *compositeInfoBlockPtr, uint8 *maskPtr, int dstPitch, int dstType, + int dstw, int dsth, int srcx, int srcy, int srcw, int srch, int state, const Common::Rect *clipBox, + int flags, const uint8 *palPtr, int transColor, uint8 bitDepth, const uint8 *xmapPtr, uint32 conditionBits) { + + uint8 *nestedBlockHeader = _vm->heFindResource(MKTAG('N','E','S','T'), wizPtr); + assert(nestedBlockHeader); + + uint8 *nestedWizHeader = _vm->heFindResource(MKTAG('M','U','L','T'), nestedBlockHeader); + assert(nestedWizHeader); + + uint16 layerCount = READ_LE_UINT16(compositeInfoBlockPtr); + compositeInfoBlockPtr += 2; + + uint16 defaultSubConditionBits = (conditionBits & kWMSBReservedBits); + + conditionBits &= ~kWMSBReservedBits; + + for (uint layerCounter = 0; layerCounter < layerCount; layerCounter++) { + int cmdSize = READ_LE_UINT16(compositeInfoBlockPtr); + uint8 *cmdPtr = compositeInfoBlockPtr + 2; + + compositeInfoBlockPtr += (cmdSize + 2); + uint32 layerCmdDataBits = READ_LE_UINT32(cmdPtr); + cmdPtr += 4; + + uint32 subConditionBits; + + if (layerCmdDataBits & kWCFConditionBits) { + uint32 layerConditionBits = READ_LE_UINT32(cmdPtr); + cmdPtr += 4; + + subConditionBits = (layerConditionBits & kWMSBReservedBits); + layerConditionBits &= ~kWMSBReservedBits; + + if (subConditionBits == 0) + subConditionBits = defaultSubConditionBits; + + uint32 conditionType = (layerConditionBits & kWSPCCTBits); + layerConditionBits &= ~kWSPCCTBits; + + switch (conditionType) { + case kWSPCCTAnd: + if (layerConditionBits != (layerConditionBits & conditionBits)) + continue; + break; + + case kWSPCCTNot: + if (layerConditionBits & conditionBits) + continue; + break; + + case kWSPCCTOr: + default: + if (!(layerConditionBits & conditionBits)) + continue; + break; } + } else { + subConditionBits = defaultSubConditionBits; } + + uint16 subState; + if (layerCmdDataBits & kWCFSubState) { + subState = READ_LE_UINT16(cmdPtr); + cmdPtr += 2; + } else { + subState = 0; + } + + int16 xPos; + if (layerCmdDataBits & kWCFXDelta) { + xPos = (int16)READ_LE_UINT16(cmdPtr); + cmdPtr += 2; + } else { + xPos = 0; + } + + int16 yPos; + if (layerCmdDataBits & kWCFYDelta) { + yPos = (int16)READ_LE_UINT16(cmdPtr); + cmdPtr += 2; + } else { + yPos = 0; + } + + uint32 drawFlags; + if (layerCmdDataBits & kWCFDrawFlags) { + drawFlags = READ_LE_UINT32(cmdPtr); + cmdPtr += 4; + } else { + drawFlags = flags; + } + + uint srcw1, srch1; + if (drawFlags & (kWIFFlipX | kWIFFlipY)) { + uint8 *wizh = _vm->findWrappedBlock(MKTAG('W','I','Z','H'), wizPtr, subState, 0); + assert(wizh); + srcw1 = READ_LE_UINT32(wizh + 0x4); + srch1 = READ_LE_UINT32(wizh + 0x8); + } + + if (drawFlags & kWIFFlipX) + xPos = (srcw - (xPos + srcw1)); + + if (drawFlags & kWIFFlipY) + yPos = (srch - (yPos + srch1)); + + if (layerCmdDataBits & kWCFSubConditionBits) { + subConditionBits = READ_LE_UINT32(cmdPtr); + cmdPtr += 4; + } + + drawWizImageEx(dst, nestedWizHeader, maskPtr, dstPitch, dstType, dstw, dsth, srcx + xPos, srcy + yPos, srcw, srch, + subState, clipBox, drawFlags, palPtr, transColor, bitDepth, xmapPtr, subConditionBits); + } +} + +void Wiz::copy555WizImage(uint8 *dst, uint8 *wizd, int dstPitch, int dstType, + int dstw, int dsth, int srcx, int srcy, const Common::Rect *clipBox, uint32 conditionBits) { + + int rawROP = conditionBits & kWMSBRopMask; + int paramROP = (conditionBits & kWMSBReservedBits) >> kWMSBRopParamRShift; + + switch (rawROP) { + default: + case 1: + rawROP = 1; + // MMX_PREMUL_ALPHA_COPY + break; + + case 2: + //warning("T14: MMX_ADDITIVE"); + break; + + case 3: + warning("T14: MMX_SUBTRACTIVE"); + break; + + case 4: + warning("T14: MMX_CONSTANT_ALPHA"); + break; + + case 5: + //warning("T14: MMX_CHEAP_50_50"); + break; + + case 6: + warning("T14: COPY"); + break; + + case 7: + warning("T14: CHEAP_50_50"); + break; + } + + + uint32 compID = READ_LE_UINT32(wizd); + + if (compID == 0x12340102) { + _vm->_moonbase->blitT14WizImage(dst, dstw, dsth, dstPitch, clipBox, wizd, srcx, srcy, rawROP, paramROP); + } else if (compID == 0x12340802) { + warning("Distorion codec"); + } else if (compID == 0x12340902) { + error("Unsupported Distortion"); } - return dst; } +#endif + struct PolygonDrawData { struct PolygonArea { int32 xmin; @@ -1747,7 +1948,7 @@ void Wiz::captureWizPolygon(int resNum, int maskNum, int maskState, int id1, int assert(maskNum); const Common::Rect *r = NULL; - const uint8 *src = drawWizImage(maskNum, maskState, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, 0); + const uint8 *src = drawWizImage(maskNum, maskState, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, 0, 0); getWizImageDim(maskNum, maskState, srcw, srch); dstw = wp->bound.width(); @@ -1815,7 +2016,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int debug(0, "drawWizPolygonTransform() unhandled flag 0x800000"); } - srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, 0, 0, shadow, 0, r, flags, 0, _vm->getHEPaletteSlot(palette)); + srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, 0, 0, shadow, 0, r, flags, 0, _vm->getHEPaletteSlot(palette), 0); } else { assert(_vm->_bytesPerPixel == 1); uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum); @@ -1826,7 +2027,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int } } else { if (getWizImageData(resNum, state, 0) != 0) { - srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, 0, 0, shadow, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); + srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, 0, 0, shadow, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette), 0); } else { uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum); assert(dataPtr); @@ -2001,7 +2202,7 @@ void Wiz::flushWizBuffer() { drawWizPolygon(pwi->resNum, pwi->state, pwi->x1, pwi->flags, pwi->shadow, 0, pwi->palette); } else { const Common::Rect *r = NULL; - drawWizImage(pwi->resNum, pwi->state, 0, 0, pwi->x1, pwi->y1, pwi->zorder, pwi->shadow, pwi->field_390, r, pwi->flags, 0, _vm->getHEPaletteSlot(pwi->palette)); + drawWizImage(pwi->resNum, pwi->state, 0, 0, pwi->x1, pwi->y1, pwi->zorder, pwi->shadow, pwi->zbuffer, r, pwi->flags, 0, _vm->getHEPaletteSlot(pwi->palette), 0); } } _imagesNum = 0; @@ -2023,7 +2224,7 @@ void Wiz::loadWizCursor(int resId, int palette) { const Common::Rect *r = NULL; _cursorImage = true; - uint8 *cursor = drawWizImage(resId, 0, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); + uint8 *cursor = drawWizImage(resId, 0, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette), 0); _cursorImage = false; int32 cw, ch; @@ -2073,10 +2274,10 @@ void Wiz::displayWizComplexImage(const WizParameters *params) { if (params->processFlags & kWPFShadow) { shadow = params->img.shadow; } - int field_390 = 0; - if (params->processFlags & 0x200000) { - field_390 = params->img.field_390; - debug(0, "displayWizComplexImage() unhandled flag 0x200000"); + int zbuffer = 0; + if (params->processFlags & kWPFZBuffer) { + zbuffer = params->img.zbuffer; + debug(0, "displayWizComplexImage() unhandled flag kWPFZBuffer"); } const Common::Rect *r = NULL; if (params->processFlags & kWPFClipBox) { @@ -2104,19 +2305,19 @@ void Wiz::displayWizComplexImage(const WizParameters *params) { pwi->state = state; pwi->flags = flags; pwi->shadow = shadow; - pwi->field_390 = field_390; + pwi->zbuffer = zbuffer; pwi->palette = palette; ++_imagesNum; } else { if (sourceImage != 0) { - drawWizImage(params->sourceImage, 0, params->img.resNum, state, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, _vm->getHEPaletteSlot(palette)); + drawWizImage(params->sourceImage, 0, params->img.resNum, state, po_x, po_y, params->img.zorder, shadow, zbuffer, r, flags, dstResNum, _vm->getHEPaletteSlot(palette), 0); } else if (params->processFlags & (kWPFScaled | kWPFRotate)) { drawWizComplexPolygon(params->img.resNum, state, po_x, po_y, shadow, rotationAngle, scale, r, flags, dstResNum, palette); } else { if (flags & kWIFIsPolygon) { drawWizPolygon(params->img.resNum, state, po_x, flags, shadow, dstResNum, palette); } else { - drawWizImage(params->img.resNum, state, 0, 0, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, _vm->getHEPaletteSlot(palette)); + drawWizImage(params->img.resNum, state, 0, 0, po_x, po_y, params->img.zorder, shadow, zbuffer, r, flags, dstResNum, _vm->getHEPaletteSlot(palette), params->conditionBits); } } } @@ -2501,6 +2702,10 @@ void Wiz::processWizImage(const WizParameters *params) { void Wiz::getWizImageDim(int resNum, int state, int32 &w, int32 &h) { uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum); assert(dataPtr); + getWizImageDim(dataPtr, state, w, h); +} + +void Wiz::getWizImageDim(uint8 *dataPtr, int state, int32 &w, int32 &h) { uint8 *wizh = _vm->findWrappedBlock(MKTAG('W','I','Z','H'), dataPtr, state, 0); assert(wizh); w = READ_LE_UINT32(wizh + 0x4); @@ -2510,6 +2715,10 @@ void Wiz::getWizImageDim(int resNum, int state, int32 &w, int32 &h) { void Wiz::getWizImageSpot(int resId, int state, int32 &x, int32 &y) { uint8 *dataPtr = _vm->getResourceAddress(rtImage, resId); assert(dataPtr); + getWizImageSpot(dataPtr, state, x, y); +} + +void Wiz::getWizImageSpot(uint8 *dataPtr, int state, int32 &x, int32 &y) { uint8 *spotPtr = _vm->findWrappedBlock(MKTAG('S','P','O','T'), dataPtr, state, 0); if (spotPtr) { x = READ_LE_UINT32(spotPtr + 0); @@ -2547,6 +2756,11 @@ int Wiz::getWizImageData(int resNum, int state, int type) { int Wiz::getWizImageStates(int resNum) { const uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum); assert(dataPtr); + + return getWizImageStates(dataPtr); +} + +int Wiz::getWizImageStates(const uint8 *dataPtr) { if (READ_BE_UINT32(dataPtr) == MKTAG('M','U','L','T')) { const byte *offs, *wrap; @@ -2565,9 +2779,14 @@ int Wiz::getWizImageStates(int resNum) { } int Wiz::isWizPixelNonTransparent(int resNum, int state, int x, int y, int flags) { - int ret = 0; uint8 *data = _vm->getResourceAddress(rtImage, resNum); assert(data); + + return isWizPixelNonTransparent(data, state, x, y, flags); +} + +int Wiz::isWizPixelNonTransparent(uint8 *data, int state, int x, int y, int flags) { + int ret = 0; uint8 *wizh = _vm->findWrappedBlock(MKTAG('W','I','Z','H'), data, state, 0); assert(wizh); int c = READ_LE_UINT32(wizh + 0x0); @@ -2591,19 +2810,20 @@ int Wiz::isWizPixelNonTransparent(int resNum, int state, int x, int y, int flags } break; case 1: - ret = isWizPixelNonTransparent(wizd, x, y, w, h, 1); + ret = isPixelNonTransparent(wizd, x, y, w, h, 1); break; #ifdef USE_RGB_COLOR case 2: ret = getRawWizPixelColor(wizd, x, y, w, h, 2, _vm->VAR(_vm->VAR_WIZ_TCOLOR)) != _vm->VAR(_vm->VAR_WIZ_TCOLOR) ? 1 : 0; break; - case 4: - // TODO: Unknown image type - ret = 1; - debug(0, "isWizPixelNonTransparent: Unhandled wiz compression type %d", c); + case 4: { + uint16 color = 0xffff; + copyCompositeWizImage((byte *)&color, data, wizd, 0, 2, kDstMemory, 1, 1, -x, -y, w, h, state, 0, 0, 0, 0, 2, 0, 0); + ret = color != 0xffff; break; + } case 5: - ret = isWizPixelNonTransparent(wizd, x, y, w, h, 2); + ret = isPixelNonTransparent(wizd, x, y, w, h, 2); break; #endif default: @@ -2641,8 +2861,7 @@ uint16 Wiz::getWizPixelColor(int resNum, int state, int x, int y) { color = getRawWizPixelColor(wizd, x, y, w, h, 2, _vm->VAR(_vm->VAR_WIZ_TCOLOR)); break; case 4: - // TODO: Unknown image type - debug(0, "getWizPixelColor: Unhandled wiz compression type %d", c); + copyCompositeWizImage((byte *)&color, data, wizd, 0, 2, kDstMemory, 1, 1, -x, -y, w, h, state, 0, 0, 0, 0, 2, 0, 0); break; case 5: color = getWizPixelColor(wizd, x, y, w, h, 2, _vm->VAR(_vm->VAR_WIZ_TCOLOR)); diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h index 8db438a074..692ad76db5 100644 --- a/engines/scumm/he/wiz_he.h +++ b/engines/scumm/he/wiz_he.h @@ -43,10 +43,32 @@ struct WizImage { int state; int flags; int shadow; - int field_390; + int zbuffer; int palette; }; +struct FontProperties { + byte string[4096]; + byte fontName[4096]; + int fgColor; + int bgColor; + int style; + int size; + int xPos; + int yPos; +}; + +struct EllipseProperties { + int px; + int py; + int qx; + int qy; + int kx; + int ky; + int lod; + int color; +}; + struct WizParameters { int field_0; byte filename[260]; @@ -77,27 +99,13 @@ struct WizParameters { int remapNum; int dstResNum; uint16 fillColor; - byte string1[4096]; - byte string2[4096]; - int field_2399; - int field_239D; - int field_23A1; - int field_23A5; - int field_23A9; - int field_23AD; - int field_23B1; - int field_23B5; - int field_23B9; - int field_23BD; - int field_23C1; - int field_23C5; - int field_23C9; - int field_23CD; + FontProperties fontProperties; + EllipseProperties ellipseProperties; Common::Rect box2; - int field_23DE; + int blendFlags; int spriteId; int spriteGroup; - int field_23EA; + int conditionBits; WizImage img; }; @@ -109,6 +117,9 @@ enum WizImageFlags { kWIFMarkBufferDirty = 0x10, kWIFBlitToMemBuffer = 0x20, kWIFIsPolygon = 0x40, + kWIFZPlaneOn = 0x80, + kWIFZPlaneOff = 0x100, + kWIFUseShadow = 0x200, kWIFFlipX = 0x400, kWIFFlipY = 0x800 }; @@ -130,7 +141,31 @@ enum WizProcessFlags { kWPFFillColor = 0x20000, kWPFClipBox2 = 0x40000, kWPFMaskImg = 0x80000, - kWPFParams = 0x100000 + kWPFParams = 0x100000, + kWPFZBuffer = 0x200000 +}; + +enum WizCompositeFlags { + kWCFConditionBits = 0x01, + kWCFSubState = 0x02, + kWCFXDelta = 0x04, + kWCFYDelta = 0x08, + kWCFDrawFlags = 0x10, + kWCFSubConditionBits = 0x20 +}; + +enum WizSpcConditionTypes { + kWSPCCTBits = 0xc0000000, + kWSPCCTOr = 0x00000000, + kWSPCCTAnd = 0x40000000, + kWSPCCTNot = 0x80000000 +}; + +enum WizMoonSystemBits { + kWMSBRopMask = 0xff, + kWMSBRopParamMask = 0xff00, + kWMSBReservedBits = (kWMSBRopMask | kWMSBRopParamMask), + kWMSBRopParamRShift = 8 }; enum { @@ -185,14 +220,19 @@ public: void remapWizImagePal(const WizParameters *params); void getWizImageDim(int resNum, int state, int32 &w, int32 &h); + void getWizImageDim(uint8 *dataPtr, int state, int32 &w, int32 &h); int getWizImageStates(int resnum); + int getWizImageStates(const uint8 *ptr); int isWizPixelNonTransparent(int resnum, int state, int x, int y, int flags); + int isWizPixelNonTransparent(uint8 *data, int state, int x, int y, int flags); + int isPixelNonTransparent(const uint8 *data, int x, int y, int w, int h, uint8 bitdepth); uint16 getWizPixelColor(int resnum, int state, int x, int y); int getWizImageData(int resNum, int state, int type); void flushWizBuffer(); void getWizImageSpot(int resId, int state, int32 &x, int32 &y); + void getWizImageSpot(uint8 *data, int state, int32 &x, int32 &y); void loadWizCursor(int resId, int palette); void captureWizImage(int resNum, const Common::Rect& r, bool frontBuffer, int compType); @@ -202,7 +242,8 @@ public: void displayWizImage(WizImage *pwi); void processWizImage(const WizParameters *params); - uint8 *drawWizImage(int resNum, int state, int maskNum, int maskState, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr); + uint8 *drawWizImage(int resNum, int state, int maskNum, int maskState, int x1, int y1, int zorder, int shadow, int zbuffer, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr, uint32 conditionBits); + void drawWizImageEx(uint8 *dst, uint8 *src, uint8 *mask, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, int state, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor, uint8 bitDepth, const uint8 *xmapPtr, uint32 conditionBits); void drawWizPolygon(int resNum, int state, int id, int flags, int shadow, int dstResNum, int palette); void drawWizComplexPolygon(int resNum, int state, int po_x, int po_y, int shadow, int angle, int zoom, const Common::Rect *r, int flags, int dstResNum, int palette); void drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int flags, int shadow, int dstResNum, int palette); @@ -210,6 +251,12 @@ public: #ifdef USE_RGB_COLOR static void copyMaskWizImage(uint8 *dst, const uint8 *src, const uint8 *mask, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr); + + void copyCompositeWizImage(uint8 *dst, uint8 *wizPtr, uint8 *wizd, uint8 *maskPtr, int dstPitch, int dstType, + int dstw, int dsth, int srcx, int srcy, int srcw, int srch, int state, const Common::Rect *clipBox, + int flags, const uint8 *palPtr, int transColor, uint8 bitDepth, const uint8 *xmapPtr, uint32 conditionBits); + void copy555WizImage(uint8 *dst, uint8 *wizd, int dstPitch, int dstType, + int dstw, int dsth, int srcx, int srcy, const Common::Rect *clipBox, uint32 conditionBits); #endif static void copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, uint8 bitdepth); @@ -230,7 +277,6 @@ public: template<int type> static void write8BitColor(uint8 *dst, const uint8 *src, int dstType, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth); static void writeColor(uint8 *dstPtr, int dstType, uint16 color); - int isWizPixelNonTransparent(const uint8 *data, int x, int y, int w, int h, uint8 bitdepth); uint16 getWizPixelColor(const uint8 *data, int x, int y, int w, int h, uint8 bitDepth, uint16 color); uint16 getRawWizPixelColor(const uint8 *data, int x, int y, int w, int h, uint8 bitDepth, uint16 color); void computeWizHistogram(uint32 *histogram, const uint8 *data, const Common::Rect& rCapt); diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h index f04c2f7826..11b1ea678b 100644 --- a/engines/scumm/imuse_digi/dimuse.h +++ b/engines/scumm/imuse_digi/dimuse.h @@ -34,8 +34,10 @@ #include "scumm/music.h" #include "scumm/sound.h" -#include "audio/mixer.h" -#include "audio/audiostream.h" +namespace Audio { +class AudioStream; +class Mixer; +} namespace Scumm { diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp index 78d05c2051..b2ff3aadbb 100644 --- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -22,8 +22,8 @@ #include "common/scummsys.h" -#include "common/util.h" +#include "audio/audiostream.h" #include "audio/decoders/flac.h" #include "audio/decoders/voc.h" #include "audio/decoders/vorbis.h" @@ -31,8 +31,6 @@ #include "scumm/resource.h" #include "scumm/scumm.h" -#include "scumm/util.h" -#include "scumm/imuse_digi/dimuse.h" #include "scumm/imuse_digi/dimuse_bndmgr.h" #include "scumm/imuse_digi/dimuse_codecs.h" #include "scumm/imuse_digi/dimuse_sndmgr.h" diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.h b/engines/scumm/imuse_digi/dimuse_sndmgr.h index aebf4d7f11..2f91405588 100644 --- a/engines/scumm/imuse_digi/dimuse_sndmgr.h +++ b/engines/scumm/imuse_digi/dimuse_sndmgr.h @@ -25,13 +25,20 @@ #include "common/scummsys.h" -#include "audio/audiostream.h" -#include "scumm/imuse_digi/dimuse_bndmgr.h" + +namespace Audio { +class SeekableAudioStream; +} + +namespace Common { +class SeekableReadStream; +} namespace Scumm { class ScummEngine; class BundleMgr; +class BundleDirCache; class ImuseDigiSndMgr { public: diff --git a/engines/scumm/imuse_digi/dimuse_track.h b/engines/scumm/imuse_digi/dimuse_track.h index 7e360268e5..a007903139 100644 --- a/engines/scumm/imuse_digi/dimuse_track.h +++ b/engines/scumm/imuse_digi/dimuse_track.h @@ -24,6 +24,11 @@ #define SCUMM_IMUSE_DIGI_TRACK_H #include "common/scummsys.h" +#include "audio/mixer.h" + +namespace Audio { +class QueuingAudioStream; +} namespace Scumm { diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index 1234eda3cc..12047635a0 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -25,9 +25,6 @@ #include "common/system.h" #include "common/translation.h" -#include "gui/message.h" -#include "gui/gui-manager.h" - #include "scumm/debugger.h" #include "scumm/dialogs.h" #include "scumm/insane/insane.h" diff --git a/engines/scumm/midiparser_ro.cpp b/engines/scumm/midiparser_ro.cpp index 35eb9f7eb7..5fc1ae41ab 100644 --- a/engines/scumm/midiparser_ro.cpp +++ b/engines/scumm/midiparser_ro.cpp @@ -22,9 +22,7 @@ #include "audio/midiparser.h" -#include "audio/mididrv.h" #include "common/textconsole.h" -#include "common/util.h" namespace Scumm { diff --git a/engines/scumm/module.mk b/engines/scumm/module.mk index 416a8f7ef9..c56ef7e5f4 100644 --- a/engines/scumm/module.mk +++ b/engines/scumm/module.mk @@ -136,9 +136,11 @@ MODULE_OBJS += \ he/logic/basketball.o \ he/logic/football.o \ he/logic/funshop.o \ - he/logic/moonbase.o \ + he/logic/moonbase_logic.o \ he/logic/puttrace.o \ - he/logic/soccer.o + he/logic/soccer.o \ + he/moonbase/moonbase.o \ + he/moonbase/moonbase_fow.o endif # This module can be built as a plugin diff --git a/engines/scumm/players/player_ad.h b/engines/scumm/players/player_ad.h index 9cd1a06261..1e665e82d5 100644 --- a/engines/scumm/players/player_ad.h +++ b/engines/scumm/players/player_ad.h @@ -25,8 +25,6 @@ #include "scumm/music.h" -#include "audio/audiostream.h" - #include "common/mutex.h" namespace OPL { @@ -36,6 +34,7 @@ class OPL; namespace Scumm { class ScummEngine; +class Serializer; /** * Sound output for v3/v4 AdLib data. diff --git a/engines/scumm/players/player_apple2.h b/engines/scumm/players/player_apple2.h index 8efb951f20..2e897d58f4 100644 --- a/engines/scumm/players/player_apple2.h +++ b/engines/scumm/players/player_apple2.h @@ -25,11 +25,9 @@ #include "common/mutex.h" #include "common/scummsys.h" -#include "common/memstream.h" #include "scumm/music.h" #include "audio/audiostream.h" #include "audio/mixer.h" -#include "audio/softsynth/sid.h" namespace Scumm { diff --git a/engines/scumm/players/player_mac.cpp b/engines/scumm/players/player_mac.cpp index 634fd2de2b..87406f4e34 100644 --- a/engines/scumm/players/player_mac.cpp +++ b/engines/scumm/players/player_mac.cpp @@ -22,7 +22,6 @@ #include "common/macresman.h" #include "engines/engine.h" -#include "gui/message.h" #include "scumm/players/player_mac.h" #include "scumm/resource.h" #include "scumm/scumm.h" diff --git a/engines/scumm/players/player_v2cms.cpp b/engines/scumm/players/player_v2cms.cpp index 08321932c3..1a1cd1ed8c 100644 --- a/engines/scumm/players/player_v2cms.cpp +++ b/engines/scumm/players/player_v2cms.cpp @@ -22,7 +22,6 @@ #include "scumm/players/player_v2cms.h" #include "scumm/scumm.h" -#include "audio/mididrv.h" #include "audio/mixer.h" #include "audio/softsynth/cms.h" diff --git a/engines/scumm/players/player_v3m.h b/engines/scumm/players/player_v3m.h index 81dda801fc..645f1fb1c9 100644 --- a/engines/scumm/players/player_v3m.h +++ b/engines/scumm/players/player_v3m.h @@ -28,10 +28,10 @@ #include "common/mutex.h" #include "scumm/music.h" #include "scumm/players/player_mac.h" -#include "audio/audiostream.h" -#include "audio/mixer.h" +namespace Audio { class Mixer; +} namespace Scumm { diff --git a/engines/scumm/players/player_v5m.h b/engines/scumm/players/player_v5m.h index f60a3f9346..152aa1541a 100644 --- a/engines/scumm/players/player_v5m.h +++ b/engines/scumm/players/player_v5m.h @@ -28,10 +28,10 @@ #include "common/mutex.h" #include "scumm/music.h" #include "scumm/players/player_mac.h" -#include "audio/audiostream.h" -#include "audio/mixer.h" +namespace Audio { class Mixer; +} namespace Scumm { diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index f3df24ff51..40dc83c7f3 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -41,8 +41,6 @@ #include "scumm/he/sprite_he.h" #include "scumm/verbs.h" -#include "audio/mixer.h" - #include "backends/audiocd/audiocd.h" #include "graphics/thumbnail.h" diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 41c59cb521..68e4887b00 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Tue Jan 12 23:47:54 2016 + This file was generated by the md5table tool on Sat Apr 30 14:24:41 2016 DO NOT EDIT MANUALLY! */ @@ -189,6 +189,7 @@ static const MD5Table md5table[] = { { "3b832f4a90740bf22e9b8ed42ca0128c", "freddi4", "HE 99", "", -1, Common::EN_GRB, Common::kPlatformUnknown }, { "3c4c471342bd95505a42334367d8f127", "puttmoon", "HE 70", "", 12161, Common::RU_RUS, Common::kPlatformWindows }, { "3cce1913a3bc586b51a75c3892ff18dd", "indy3", "VGA", "VGA", -1, Common::RU_RUS, Common::kPlatformDOS }, + { "3cf4b6ff78f735b671d8ccc2bc110b15", "maniac", "V2", "V2", -1, Common::ES_ESP, Common::kPlatformAmiga }, { "3d219e7546039543307b55a91282bf18", "funpack", "", "", -1, Common::EN_ANY, Common::kPlatformDOS }, { "3de99ef0523f8ca7958faa3afccd035a", "spyfox", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown }, { "3df6ead57930488bc61e6e41901d0e97", "fbear", "HE 62", "", -1, Common::EN_ANY, Common::kPlatformMacintosh }, @@ -531,6 +532,7 @@ static const MD5Table md5table[] = { { "bf8b52fdd9a69c67f34e8e9fec72661c", "farm", "HE 71", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, { "bfdf584b01503f0762baded581f6a0a2", "SoccerMLS", "", "", -1, Common::EN_ANY, Common::kPlatformWindows }, { "c0039ad982999c92d0de81910d640fa0", "freddi", "HE 71", "", 26159, Common::NL_NLD, Common::kPlatformWindows }, + { "c0c9de81fb965e6cbe77f6e5631ca705", "monkey", "SE Talkie", "Unofficial SE Talkie v1.02", 9135, Common::EN_ANY, Common::kPlatformDOS }, { "c13225cb1bbd3bc9fe578301696d8021", "monkey", "SEGA", "", -1, Common::EN_ANY, Common::kPlatformSegaCD }, { "c20848f53c2d48bfacdc840993843765", "freddi2", "HE 80", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown }, { "c225bec1b6c0798a2b8c89ac226dc793", "pajama", "HE 101", "", -1, Common::EN_ANY, Common::kPlatformWii }, @@ -671,6 +673,7 @@ static const MD5Table md5table[] = { { "f3c5d9bf3f091bd1f18dc1013fba5396", "atlantis", "Steam", "Steam", 638976, Common::EN_ANY, Common::kPlatformWindows }, { "f3d55aea441e260e9e9c7d2a187097e0", "puttzoo", "", "Demo", 14337, Common::EN_ANY, Common::kPlatformWindows }, { "f40a7f495f59188ca57a9d1d50301bb6", "puttputt", "HE 60", "Demo", -1, Common::EN_ANY, Common::kPlatformMacintosh }, + { "f4d20ab4ce19743a646cb48bd93aee72", "monkey2", "SE Talkie", "Unofficial SE Talkie v0.2", 10835, Common::EN_ANY, Common::kPlatformDOS }, { "f5228b0cc1c19e6ea8268ba2eeb61f60", "freddi", "HE 73", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows }, { "f73883f13b5a302749a5bad31d909780", "tentacle", "", "CD", -1, Common::DE_DEU, Common::kPlatformMacintosh }, { "f7635a0e2ab82c9a0f9ace5f232a488f", "catalog", "HE 72", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 89d2d3dc72..1f8a85b8c3 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -30,7 +30,6 @@ #include "engines/util.h" #include "gui/message.h" -#include "gui/gui-manager.h" #include "graphics/cursorman.h" @@ -67,6 +66,7 @@ #include "scumm/players/player_v5m.h" #include "scumm/resource.h" #include "scumm/he/resource_he.h" +#include "scumm/he/moonbase/moonbase.h" #include "scumm/scumm_v0.h" #include "scumm/scumm_v8.h" #include "scumm/sound.h" @@ -734,7 +734,7 @@ ScummEngine_v0::ScummEngine_v0(OSystem *syst, const DetectorResult &dr) VAR_ACTIVE_VERB = 0xFF; if (strcmp(dr.fp.pattern, "maniacdemo.d64") == 0 ) - _game.features |= GF_DEMO; + _game.features |= GF_DEMO; } ScummEngine_v6::ScummEngine_v6(OSystem *syst, const DetectorResult &dr) @@ -833,9 +833,16 @@ ScummEngine_v71he::ScummEngine_v71he(OSystem *syst, const DetectorResult &dr) _skipProcessActors = 0; VAR_WIZ_TCOLOR = 0xFF; + + /* Moonbase stuff */ + _moonbase = 0; + + if (_game.id == GID_MOONBASE) + _moonbase = new Moonbase(this); } ScummEngine_v71he::~ScummEngine_v71he() { + delete _moonbase; delete _wiz; } @@ -875,7 +882,7 @@ ScummEngine_v90he::ScummEngine_v90he(OSystem *syst, const DetectorResult &dr) memset(_videoParams.filename, 0, sizeof(_videoParams.filename)); _videoParams.status = 0; _videoParams.flags = 0; - _videoParams.unk2 = 0; + _videoParams.number = 0; _videoParams.wizResNum = 0; VAR_NUM_SPRITE_GROUPS = 0xFF; @@ -1275,10 +1282,7 @@ void ScummEngine::setupScumm() { // On some systems it's not safe to run CD audio games from the CD. if (_game.features & GF_AUDIOTRACKS && !Common::File::exists("CDDA.SOU")) { checkCD(); - - int cd_num = ConfMan.getInt("cdrom"); - if (cd_num >= 0) - _system->getAudioCDManager()->openCD(cd_num); + _system->getAudioCDManager()->open(); } // Create the sound manager diff --git a/engines/scumm/smush/smush_mixer.cpp b/engines/scumm/smush/smush_mixer.cpp index 42e8f645be..445186d62b 100644 --- a/engines/scumm/smush/smush_mixer.cpp +++ b/engines/scumm/smush/smush_mixer.cpp @@ -21,14 +21,11 @@ */ -#include "common/util.h" - #include "scumm/smush/smush_mixer.h" #include "scumm/smush/channel.h" #include "scumm/scumm.h" -#include "scumm/sound.h" -#include "scumm/imuse/imuse.h" +#include "audio/audiostream.h" #include "audio/mixer.h" #include "audio/decoders/raw.h" diff --git a/engines/scumm/smush/smush_mixer.h b/engines/scumm/smush/smush_mixer.h index 18ec7f96fb..1bd6adac16 100644 --- a/engines/scumm/smush/smush_mixer.h +++ b/engines/scumm/smush/smush_mixer.h @@ -28,6 +28,10 @@ #include "common/mutex.h" #include "scumm/sound.h" +namespace Audio { +class QueuingAudioStream; +} + namespace Scumm { class SmushChannel; diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index 05c7ff2d9a..2ca2579b54 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -20,8 +20,6 @@ * */ -#include "engines/engine.h" - #include "common/config-manager.h" #include "common/file.h" #include "common/system.h" @@ -30,14 +28,11 @@ #include "graphics/cursorman.h" #include "graphics/palette.h" -#include "scumm/bomp.h" #include "scumm/file.h" #include "scumm/imuse_digi/dimuse.h" -#include "scumm/imuse/imuse.h" #include "scumm/scumm.h" #include "scumm/scumm_v7.h" #include "scumm/sound.h" -#include "scumm/util.h" #include "scumm/smush/channel.h" #include "scumm/smush/codec37.h" #include "scumm/smush/codec47.h" @@ -47,6 +42,7 @@ #include "scumm/insane/insane.h" +#include "audio/audiostream.h" #include "audio/mixer.h" #include "audio/decoders/mp3.h" #include "audio/decoders/raw.h" diff --git a/engines/scumm/smush/smush_player.h b/engines/scumm/smush/smush_player.h index 81c498a516..b0d6e6a9f0 100644 --- a/engines/scumm/smush/smush_player.h +++ b/engines/scumm/smush/smush_player.h @@ -26,6 +26,10 @@ #include "common/util.h" #include "scumm/sound.h" +namespace Audio { +class QueuingAudioStream; +} + namespace Scumm { class ScummEngine_v7; diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 4d70ee8482..f66452e99c 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -35,9 +35,9 @@ #include "scumm/resource.h" #include "scumm/scumm.h" #include "scumm/sound.h" -#include "scumm/util.h" -#include "audio/decoders/adpcm.h" +#include "audio/audiostream.h" +#include "audio/timestamp.h" #include "audio/decoders/flac.h" #include "audio/mididrv.h" #include "audio/mixer.h" @@ -45,7 +45,6 @@ #include "audio/decoders/raw.h" #include "audio/decoders/voc.h" #include "audio/decoders/vorbis.h" -#include "audio/decoders/wave.h" namespace Scumm { @@ -1093,7 +1092,7 @@ int Sound::pollCD() const { void Sound::updateCD() { if (!_isLoomSteam) - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } AudioCDManager::Status Sound::getCDStatus() { diff --git a/engines/scumm/sound.h b/engines/scumm/sound.h index a479ad5731..8c11c7b5b2 100644 --- a/engines/scumm/sound.h +++ b/engines/scumm/sound.h @@ -24,23 +24,17 @@ #define SCUMM_SOUND_H #include "common/scummsys.h" -#include "audio/audiostream.h" +#include "common/str.h" #include "audio/mididrv.h" #include "audio/mixer.h" #include "backends/audiocd/audiocd.h" #include "scumm/saveload.h" -namespace Audio { -class Mixer; -} - namespace Scumm { class ScummEngine; -class BaseScummFile; struct MP3OffsetTable; -struct SaveLoadEntry; enum { kTalkSoundID = 10000 diff --git a/engines/sherlock/animation.cpp b/engines/sherlock/animation.cpp index 681e71d0f6..4442c1da85 100644 --- a/engines/sherlock/animation.cpp +++ b/engines/sherlock/animation.cpp @@ -23,6 +23,8 @@ #include "sherlock/animation.h" #include "sherlock/sherlock.h" #include "sherlock/scalpel/scalpel_screen.h" +#include "sherlock/scalpel/3do/scalpel_3do_screen.h" + #include "common/algorithm.h" namespace Sherlock { @@ -89,7 +91,7 @@ bool Animation::play(const Common::String &filename, bool intro, int minDelay, i // Draw the sprite. Note that we explicitly use the raw frame below, rather than the ImageFrame, // since we don't want the offsets in the image file to be used, just the explicit position we specify - screen.transBlitFrom(images[imageFrame]._frame, pt); + screen.SHtransBlitFrom(images[imageFrame]._frame, pt); } else { // At this point, either the sprites for the frame has been complete, or there weren't any sprites // at all to draw for the frame @@ -201,7 +203,7 @@ bool Animation::play3DO(const Common::String &filename, bool intro, int minDelay // Draw the sprite. Note that we explicitly use the raw frame below, rather than the ImageFrame, // since we don't want the offsets in the image file to be used, just the explicit position we specify - screen._backBuffer1.transBlitFrom(images[imageFrame]._frame, pt); + screen._backBuffer1.SHtransBlitFrom(images[imageFrame]._frame, pt); if (!fadeActive) screen.slamArea(pt.x, pt.y, images[imageFrame]._frame.w, images[imageFrame]._frame.h); } else { diff --git a/engines/sherlock/debugger.cpp b/engines/sherlock/debugger.cpp index 39f8da3806..55243c4bc7 100644 --- a/engines/sherlock/debugger.cpp +++ b/engines/sherlock/debugger.cpp @@ -26,9 +26,6 @@ #include "sherlock/scalpel/scalpel.h" #include "sherlock/scalpel/scalpel_debugger.h" #include "sherlock/tattoo/tattoo_debugger.h" -#include "audio/mixer.h" -#include "audio/decoders/aiff.h" -#include "audio/decoders/wave.h" #include "common/str-array.h" namespace Sherlock { diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp index 4b0b7dfb3f..6cfee5d822 100644 --- a/engines/sherlock/events.cpp +++ b/engines/sherlock/events.cpp @@ -143,7 +143,7 @@ void Events::setCursor(CursorId cursorId, const Common::Point &cursorPos, const // Form a single surface containing both frames Surface s(r.width(), r.height()); - s.fill(TRANSPARENCY); + s.clear(TRANSPARENCY); // Draw the passed image Common::Point drawPos; @@ -151,11 +151,11 @@ void Events::setCursor(CursorId cursorId, const Common::Point &cursorPos, const drawPos.x = -cursorPt.x; if (cursorPt.y < 0) drawPos.y = -cursorPt.y; - s.blitFrom(surface, Common::Point(drawPos.x, drawPos.y)); + s.SHblitFrom(surface, Common::Point(drawPos.x, drawPos.y)); // Draw the cursor image drawPos = Common::Point(MAX(cursorPt.x, (int16)0), MAX(cursorPt.y, (int16)0)); - s.transBlitFrom(cursorImg, Common::Point(drawPos.x, drawPos.y)); + s.SHtransBlitFrom(cursorImg, Common::Point(drawPos.x, drawPos.y)); // Set up hotspot position for cursor, adjusting for cursor image's position within the surface Common::Point hotspot; @@ -163,7 +163,7 @@ void Events::setCursor(CursorId cursorId, const Common::Point &cursorPos, const hotspot = Common::Point(8, 8); hotspot += drawPos; // Set the cursor - setCursor(s.getRawSurface(), hotspot.x, hotspot.y); + setCursor(s, hotspot.x, hotspot.y); } void Events::animateCursorIfNeeded() { diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp index 8e36c3908a..5a14881f1c 100644 --- a/engines/sherlock/fonts.cpp +++ b/engines/sherlock/fonts.cpp @@ -43,7 +43,7 @@ void Fonts::setVm(SherlockEngine *vm) { _charCount = 0; } -void Fonts::free() { +void Fonts::freeFont() { delete _font; } @@ -213,7 +213,7 @@ void Fonts::writeString(Surface *surface, const Common::String &str, if (curChar < _charCount) { ImageFrame &frame = (*_font)[curChar]; - surface->transBlitFrom(frame, Common::Point(charPos.x, charPos.y + _yOffsets[curChar]), false, overrideColor); + surface->SHtransBlitFrom(frame, Common::Point(charPos.x, charPos.y + _yOffsets[curChar]), false, overrideColor); charPos.x += frame._frame.w + 1; } else { warning("Invalid character encountered - %d", (int)curChar); diff --git a/engines/sherlock/fonts.h b/engines/sherlock/fonts.h index a527cc73c0..3594d466c2 100644 --- a/engines/sherlock/fonts.h +++ b/engines/sherlock/fonts.h @@ -57,7 +57,7 @@ public: /** * Frees the font manager */ - static void free(); + static void freeFont(); /** * Set the font to use for writing text on the screen diff --git a/engines/sherlock/image_file.h b/engines/sherlock/image_file.h index da260ab30b..778332b726 100644 --- a/engines/sherlock/image_file.h +++ b/engines/sherlock/image_file.h @@ -46,6 +46,11 @@ struct ImageFrame { Graphics::Surface _frame; /** + * Converts an ImageFrame record to a surface for convenience in passing to drawing methods + */ + operator const Graphics::Surface &() { return _frame; } + + /** * Decompress a single frame for the sprite */ void decompressFrame(const byte *src, bool isRoseTattoo); diff --git a/engines/sherlock/module.mk b/engines/sherlock/module.mk index 7fa7896691..0d17d0b249 100644 --- a/engines/sherlock/module.mk +++ b/engines/sherlock/module.mk @@ -3,6 +3,7 @@ MODULE := engines/sherlock MODULE_OBJS = \ scalpel/scalpel.o \ scalpel/3do/movie_decoder.o \ + scalpel/3do/scalpel_3do_screen.o \ scalpel/drivers/adlib.o \ scalpel/drivers/mt32.o \ scalpel/tsage/logo.o \ @@ -30,6 +31,7 @@ MODULE_OBJS = \ tattoo/tattoo_people.o \ tattoo/tattoo_resources.o \ tattoo/tattoo_scene.o \ + tattoo/tattoo_screen.o \ tattoo/tattoo_talk.o \ tattoo/tattoo_user_interface.o \ tattoo/widget_base.o \ diff --git a/engines/sherlock/music.cpp b/engines/sherlock/music.cpp index 5ea3318bd7..c52c30191a 100644 --- a/engines/sherlock/music.cpp +++ b/engines/sherlock/music.cpp @@ -26,6 +26,7 @@ #include "sherlock/sherlock.h" #include "sherlock/music.h" #include "sherlock/scalpel/drivers/mididriver.h" +#include "audio/audiostream.h" // for Miles Audio (Sherlock Holmes 2) #include "audio/miles.h" // for 3DO digital music diff --git a/engines/sherlock/music.h b/engines/sherlock/music.h index 186e2aa2dc..b1eba1d889 100644 --- a/engines/sherlock/music.h +++ b/engines/sherlock/music.h @@ -23,12 +23,9 @@ #ifndef SHERLOCK_MUSIC_H #define SHERLOCK_MUSIC_H -#include "audio/midiplayer.h" #include "audio/midiparser.h" -//#include "audio/mididrv.h" -#include "sherlock/scalpel/drivers/mididriver.h" +#include "audio/mididrv.h" // for 3DO digital music -#include "audio/audiostream.h" #include "audio/mixer.h" #include "common/mutex.h" #include "common/str-array.h" diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index a89b8dce86..644c0c74c9 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -365,8 +365,8 @@ bool BaseObject::checkEndOfSequence() { if (seq == 99) { --_frameNumber; - screen._backBuffer1.transBlitFrom(*_imageFrame, _position); - screen._backBuffer2.transBlitFrom(*_imageFrame, _position); + screen._backBuffer1.SHtransBlitFrom(*_imageFrame, _position); + screen._backBuffer2.SHtransBlitFrom(*_imageFrame, _position); _type = INVALID; } else if (IS_ROSE_TATTOO && _talkSeq && seq == 0) { setObjTalkSequence(_talkSeq); diff --git a/engines/sherlock/scalpel/3do/movie_decoder.cpp b/engines/sherlock/scalpel/3do/movie_decoder.cpp index da4d08ca47..da0d16c145 100644 --- a/engines/sherlock/scalpel/3do/movie_decoder.cpp +++ b/engines/sherlock/scalpel/3do/movie_decoder.cpp @@ -25,7 +25,6 @@ #include "common/textconsole.h" #include "audio/audiostream.h" -#include "audio/decoders/raw.h" #include "audio/decoders/3do.h" #include "sherlock/scalpel/3do/movie_decoder.h" diff --git a/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp b/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp new file mode 100644 index 0000000000..f8112d8add --- /dev/null +++ b/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp @@ -0,0 +1,286 @@ +/* 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 "sherlock/scalpel/scalpel_screen.h" +#include "sherlock/scalpel/scalpel.h" +#include "sherlock/scalpel/3do/scalpel_3do_screen.h" + +namespace Sherlock { + +namespace Scalpel { + +Scalpel3DOScreen::Scalpel3DOScreen(SherlockEngine *vm): ScalpelScreen(vm) { +} + +void Scalpel3DOScreen::SHblitFrom(const Graphics::Surface &src, const Common::Point &pt, const Common::Rect &srcBounds) { + if (!_vm->_isScreenDoubled) { + ScalpelScreen::SHblitFrom(src, pt, srcBounds); + return; + } + + Common::Rect srcRect = srcBounds; + Common::Rect destRect(pt.x, pt.y, pt.x + srcRect.width(), pt.y + srcRect.height()); + + if (!srcRect.isValidRect() || !clip(srcRect, destRect)) + return; + + // Add dirty area remapped to the 640x200 surface + addDirtyRect(Common::Rect(destRect.left * 2, destRect.top * 2, destRect.right * 2, destRect.bottom * 2)); + + // Transfer the area, doubling each pixel + for (int yp = 0; yp < srcRect.height(); ++yp) { + const uint16 *srcP = (const uint16 *)src.getBasePtr(srcRect.left, srcRect.top + yp); + uint16 *destP = (uint16 *)getBasePtr(destRect.left * 2, (destRect.top + yp) * 2); + + for (int xp = srcRect.left; xp < srcRect.right; ++xp, ++srcP, destP += 2) { + *destP = *srcP; + *(destP + 1) = *srcP; + *(destP + 640) = *srcP; + *(destP + 640 + 1) = *srcP; + } + } +} + +void Scalpel3DOScreen::transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, + bool flipped, int overrideColor) { + error("TODO: Refactor"); +#if 0 + if (!_vm->_isScreenDoubled) { + ScalpelScreen::transBlitFromUnscaled(src, pt, flipped, overrideColor); + return; + } + + Common::Rect drawRect(0, 0, src.w, src.h); + Common::Rect destRect(pt.x, pt.y, pt.x + src.w, pt.y + src.h); + + // Clip the display area to on-screen + if (!clip(drawRect, destRect)) + // It's completely off-screen + return; + + if (flipped) + drawRect = Common::Rect(src.w - drawRect.right, src.h - drawRect.bottom, + src.w - drawRect.left, src.h - drawRect.top); + + Common::Point destPt(destRect.left, destRect.top); + addDirtyRect(Common::Rect(destPt.x * 2, destPt.y * 2, (destPt.x + drawRect.width()) * 2, + (destPt.y + drawRect.height()) * 2)); + + assert(src.format.bytesPerPixel == 2 && _surface.format.bytesPerPixel == 2); + + for (int yp = 0; yp < drawRect.height(); ++yp) { + const uint16 *srcP = (const uint16 *)src.getBasePtr( + flipped ? drawRect.right - 1 : drawRect.left, drawRect.top + yp); + uint16 *destP = (uint16 *)getBasePtr(destPt.x * 2, (destPt.y + yp) * 2); + + for (int xp = 0; xp < drawRect.width(); ++xp, destP += 2) { + // RGB 0, 0, 0 -> transparent on 3DO + if (*srcP) { + *destP = *srcP; + *(destP + 1) = *srcP; + *(destP + 640) = *srcP; + *(destP + 640 + 1) = *srcP; + } + + srcP = flipped ? srcP - 1 : srcP + 1; + } + } +#endif +} + +void Scalpel3DOScreen::fillRect(const Common::Rect &r, uint color) { + if (_vm->_isScreenDoubled) + ScalpelScreen::fillRect(Common::Rect(r.left * 2, r.top * 2, r.right * 2, r.bottom * 2), color); + else + ScalpelScreen::fillRect(r, color); +} + +void Scalpel3DOScreen::fadeIntoScreen3DO(int speed) { + Events &events = *_vm->_events; + uint16 *currentScreenBasePtr = (uint16 *)getPixels(); + uint16 *targetScreenBasePtr = (uint16 *)_backBuffer.getPixels(); + uint16 currentScreenPixel = 0; + uint16 targetScreenPixel = 0; + + uint16 currentScreenPixelRed = 0; + uint16 currentScreenPixelGreen = 0; + uint16 currentScreenPixelBlue = 0; + + uint16 targetScreenPixelRed = 0; + uint16 targetScreenPixelGreen = 0; + uint16 targetScreenPixelBlue = 0; + + uint16 screenWidth = SHERLOCK_SCREEN_WIDTH; + uint16 screenHeight = SHERLOCK_SCREEN_HEIGHT; + uint16 screenX = 0; + uint16 screenY = 0; + uint16 pixelsChanged = 0; + + clearDirtyRects(); + + do { + pixelsChanged = 0; + uint16 *currentScreenPtr = currentScreenBasePtr; + uint16 *targetScreenPtr = targetScreenBasePtr; + + for (screenY = 0; screenY < screenHeight; screenY++) { + for (screenX = 0; screenX < screenWidth; screenX++) { + currentScreenPixel = *currentScreenPtr; + targetScreenPixel = *targetScreenPtr; + + if (currentScreenPixel != targetScreenPixel) { + // pixel doesn't match, adjust accordingly + currentScreenPixelRed = currentScreenPixel & 0xF800; + currentScreenPixelGreen = currentScreenPixel & 0x07E0; + currentScreenPixelBlue = currentScreenPixel & 0x001F; + targetScreenPixelRed = targetScreenPixel & 0xF800; + targetScreenPixelGreen = targetScreenPixel & 0x07E0; + targetScreenPixelBlue = targetScreenPixel & 0x001F; + + if (currentScreenPixelRed != targetScreenPixelRed) { + if (currentScreenPixelRed < targetScreenPixelRed) { + currentScreenPixelRed += 0x0800; + } else { + currentScreenPixelRed -= 0x0800; + } + } + if (currentScreenPixelGreen != targetScreenPixelGreen) { + // Adjust +2/-2 because we are running RGB555 at RGB565 + if (currentScreenPixelGreen < targetScreenPixelGreen) { + currentScreenPixelGreen += 0x0040; + } else { + currentScreenPixelGreen -= 0x0040; + } + } + if (currentScreenPixelBlue != targetScreenPixelBlue) { + if (currentScreenPixelBlue < targetScreenPixelBlue) { + currentScreenPixelBlue += 0x0001; + } else { + currentScreenPixelBlue -= 0x0001; + } + } + + uint16 v = currentScreenPixelRed | currentScreenPixelGreen | currentScreenPixelBlue; + *currentScreenPtr = v; + if (_vm->_isScreenDoubled) { + *(currentScreenPtr + 1) = v; + *(currentScreenPtr + 640) = v; + *(currentScreenPtr + 640 + 1) = v; + } + + pixelsChanged++; + } + + currentScreenPtr += _vm->_isScreenDoubled ? 2 : 1; + targetScreenPtr++; + } + + if (_vm->_isScreenDoubled) + currentScreenPtr += 640; + } + + // Too much considered dirty at the moment + if (_vm->_isScreenDoubled) + addDirtyRect(Common::Rect(0, 0, screenWidth * 2, screenHeight * 2)); + else + addDirtyRect(Common::Rect(0, 0, screenWidth, screenHeight)); + + events.pollEvents(); + events.delay(10 * speed); + } while ((pixelsChanged) && (!_vm->shouldQuit())); +} + +void Scalpel3DOScreen::blitFrom3DOcolorLimit(uint16 limitColor) { + uint16 *currentScreenPtr = (uint16 *)getPixels(); + uint16 *targetScreenPtr = (uint16 *)_backBuffer.getPixels(); + uint16 currentScreenPixel = 0; + + uint16 screenWidth = SHERLOCK_SCREEN_WIDTH; + uint16 screenHeight = SHERLOCK_SCREEN_HEIGHT; + uint16 screenX = 0; + uint16 screenY = 0; + + uint16 currentScreenPixelRed = 0; + uint16 currentScreenPixelGreen = 0; + uint16 currentScreenPixelBlue = 0; + + uint16 limitPixelRed = limitColor & 0xF800; + uint16 limitPixelGreen = limitColor & 0x07E0; + uint16 limitPixelBlue = limitColor & 0x001F; + + for (screenY = 0; screenY < screenHeight; screenY++) { + for (screenX = 0; screenX < screenWidth; screenX++) { + currentScreenPixel = *targetScreenPtr; + + currentScreenPixelRed = currentScreenPixel & 0xF800; + currentScreenPixelGreen = currentScreenPixel & 0x07E0; + currentScreenPixelBlue = currentScreenPixel & 0x001F; + + if (currentScreenPixelRed < limitPixelRed) + currentScreenPixelRed = limitPixelRed; + if (currentScreenPixelGreen < limitPixelGreen) + currentScreenPixelGreen = limitPixelGreen; + if (currentScreenPixelBlue < limitPixelBlue) + currentScreenPixelBlue = limitPixelBlue; + + uint16 v = currentScreenPixelRed | currentScreenPixelGreen | currentScreenPixelBlue; + *currentScreenPtr = v; + if (_vm->_isScreenDoubled) { + *(currentScreenPtr + 1) = v; + *(currentScreenPtr + 640) = v; + *(currentScreenPtr + 640 + 1) = v; + } + + currentScreenPtr += _vm->_isScreenDoubled ? 2 : 1; + targetScreenPtr++; + } + + if (_vm->_isScreenDoubled) + currentScreenPtr += 640; + } + + // Too much considered dirty at the moment + if (_vm->_isScreenDoubled) + addDirtyRect(Common::Rect(0, 0, screenWidth * 2, screenHeight * 2)); + else + addDirtyRect(Common::Rect(0, 0, screenWidth, screenHeight)); +} + +uint16 Scalpel3DOScreen::width() const { + return _vm->_isScreenDoubled ? this->w / 2 : this->w; +} + +uint16 Scalpel3DOScreen::height() const { + return _vm->_isScreenDoubled ? this->h / 2 : this->h; +} + +void Scalpel3DOScreen::rawBlitFrom(const Graphics::Surface &src, const Common::Point &pt) { + Common::Rect srcRect(0, 0, src.w, src.h); + Common::Rect destRect(pt.x, pt.y, pt.x + src.w, pt.y + src.h); + + addDirtyRect(destRect); + copyRectToSurface(src, destRect.left, destRect.top, srcRect); +} + +} // End of namespace Scalpel + +} // End of namespace Sherlock diff --git a/engines/sherlock/scalpel/3do/scalpel_3do_screen.h b/engines/sherlock/scalpel/3do/scalpel_3do_screen.h new file mode 100644 index 0000000000..422f588b17 --- /dev/null +++ b/engines/sherlock/scalpel/3do/scalpel_3do_screen.h @@ -0,0 +1,76 @@ +/* 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 SHERLOCK_SCALPEL_3DO_SCREEN_H +#define SHERLOCK_SCALPEL_3DO_SCREEN_H + +#include "sherlock/scalpel/scalpel_screen.h" + +namespace Sherlock { + +class SherlockEngine; + +namespace Scalpel { + +class Scalpel3DOScreen : public ScalpelScreen { +protected: + /** + * Draws a sub-section of a surface at a given position within this surface + * Overriden for the 3DO to automatically double the size of everything to the underlying 640x400 surface + */ + virtual void SHblitFrom(const Graphics::Surface &src, const Common::Point &pt, const Common::Rect &srcBounds); + + /** + * Draws a surface at a given position within this surface with transparency + */ + virtual void transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, bool flipped, + int overrideColor); +public: + Scalpel3DOScreen(SherlockEngine *vm); + virtual ~Scalpel3DOScreen() {} + + /** + * Draws a sub-section of a surface at a given position within this surface + */ + void rawBlitFrom(const Graphics::Surface &src, const Common::Point &pt); + + /** + * Fade backbuffer 1 into screen (3DO RGB!) + */ + void fadeIntoScreen3DO(int speed); + + void blitFrom3DOcolorLimit(uint16 color); + + /** + * Fill a given area of the surface with a given color + */ + virtual void fillRect(const Common::Rect &r, uint color); + + virtual uint16 width() const; + virtual uint16 height() const; +}; + +} // End of namespace Scalpel + +} // End of namespace Sherlock + +#endif diff --git a/engines/sherlock/scalpel/drivers/adlib.cpp b/engines/sherlock/scalpel/drivers/adlib.cpp index 29a39f0c39..3d29d0c5ed 100644 --- a/engines/sherlock/scalpel/drivers/adlib.cpp +++ b/engines/sherlock/scalpel/drivers/adlib.cpp @@ -21,14 +21,12 @@ */ #include "sherlock/sherlock.h" -#include "sherlock/scalpel/drivers/mididriver.h" -#include "common/file.h" #include "common/system.h" #include "common/textconsole.h" #include "audio/fmopl.h" -#include "audio/softsynth/emumidi.h" +#include "audio/mididrv.h" namespace Sherlock { diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp index b17f38b218..cbb202095f 100644 --- a/engines/sherlock/scalpel/scalpel.cpp +++ b/engines/sherlock/scalpel/scalpel.cpp @@ -29,6 +29,7 @@ #include "sherlock/scalpel/scalpel_people.h" #include "sherlock/scalpel/scalpel_scene.h" #include "sherlock/scalpel/scalpel_screen.h" +#include "sherlock/scalpel/3do/scalpel_3do_screen.h" #include "sherlock/scalpel/tsage/logo.h" #include "sherlock/sherlock.h" #include "sherlock/music.h" @@ -371,8 +372,8 @@ bool ScalpelEngine::showCityCutscene() { if (finished) { ImageFile titleImages_LondonNovember("title2.vgs", true); - _screen->_backBuffer1.blitFrom(*_screen); - _screen->_backBuffer2.blitFrom(*_screen); + _screen->_backBuffer1.SHblitFrom(*_screen); + _screen->_backBuffer2.SHblitFrom(*_screen); Common::Point londonPosition; @@ -386,19 +387,19 @@ bool ScalpelEngine::showCityCutscene() { } // London, England - _screen->_backBuffer1.transBlitFrom(titleImages_LondonNovember[0], londonPosition); + _screen->_backBuffer1.SHtransBlitFrom(titleImages_LondonNovember[0], londonPosition); _screen->randomTransition(); finished = _events->delay(1000, true); // November, 1888 if (finished) { - _screen->_backBuffer1.transBlitFrom(titleImages_LondonNovember[1], Common::Point(100, 100)); + _screen->_backBuffer1.SHtransBlitFrom(titleImages_LondonNovember[1], Common::Point(100, 100)); _screen->randomTransition(); finished = _events->delay(5000, true); } // Transition out the title - _screen->_backBuffer1.blitFrom(_screen->_backBuffer2); + _screen->_backBuffer1.SHblitFrom(_screen->_backBuffer2); _screen->randomTransition(); } @@ -407,8 +408,8 @@ bool ScalpelEngine::showCityCutscene() { if (finished) { ImageFile titleImages_SherlockHolmesTitle("title.vgs", true); - _screen->_backBuffer1.blitFrom(*_screen); - _screen->_backBuffer2.blitFrom(*_screen); + _screen->_backBuffer1.SHblitFrom(*_screen); + _screen->_backBuffer2.SHblitFrom(*_screen); Common::Point lostFilesPosition; Common::Point sherlockHolmesPosition; @@ -427,17 +428,17 @@ bool ScalpelEngine::showCityCutscene() { } // The Lost Files of - _screen->_backBuffer1.transBlitFrom(titleImages_SherlockHolmesTitle[0], lostFilesPosition); + _screen->_backBuffer1.SHtransBlitFrom(titleImages_SherlockHolmesTitle[0], lostFilesPosition); // Sherlock Holmes - _screen->_backBuffer1.transBlitFrom(titleImages_SherlockHolmesTitle[1], sherlockHolmesPosition); + _screen->_backBuffer1.SHtransBlitFrom(titleImages_SherlockHolmesTitle[1], sherlockHolmesPosition); // copyright - _screen->_backBuffer1.transBlitFrom(titleImages_SherlockHolmesTitle[2], copyrightPosition); + _screen->_backBuffer1.SHtransBlitFrom(titleImages_SherlockHolmesTitle[2], copyrightPosition); _screen->verticalTransition(); finished = _events->delay(4000, true); if (finished) { - _screen->_backBuffer1.blitFrom(_screen->_backBuffer2); + _screen->_backBuffer1.SHblitFrom(_screen->_backBuffer2); _screen->randomTransition(); finished = _events->delay(2000); } @@ -461,7 +462,7 @@ bool ScalpelEngine::showCityCutscene() { // English, width 175, height 38 alleyPosition = Common::Point(72, 51); } - _screen->transBlitFrom(titleImages_SherlockHolmesTitle[3], alleyPosition); + _screen->SHtransBlitFrom(titleImages_SherlockHolmesTitle[3], alleyPosition); _screen->fadeIn(palette, 3); // Wait until the track got looped and the first few notes were played @@ -537,7 +538,7 @@ bool ScalpelEngine::showAlleyCutscene() { earlyTheFollowingMorningPosition = Common::Point(35, 52); } - _screen->transBlitFrom(titleImages_EarlyTheFollowingMorning[0], earlyTheFollowingMorningPosition); + _screen->SHtransBlitFrom(titleImages_EarlyTheFollowingMorning[0], earlyTheFollowingMorningPosition); // fast fade-in _screen->fadeIn(palette, 1); @@ -641,23 +642,23 @@ bool ScalpelEngine::scrollCredits() { delete stream; // Save a copy of the screen background for use in drawing each credit frame - _screen->_backBuffer1.blitFrom(*_screen); + _screen->_backBuffer1.SHblitFrom(*_screen); // Loop for showing the credits for(int idx = 0; idx < 600 && !_events->kbHit() && !shouldQuit(); ++idx) { // Copy the entire screen background before writing text - _screen->blitFrom(_screen->_backBuffer1); + _screen->SHblitFrom(_screen->_backBuffer1); // Write the text appropriate for the next frame if (idx < 400) - _screen->transBlitFrom(creditsImages[0], Common::Point(10, 200 - idx), false, 0); + _screen->SHtransBlitFrom(creditsImages[0], Common::Point(10, 200 - idx), false, 0); if (idx > 200) - _screen->transBlitFrom(creditsImages[1], Common::Point(10, 400 - idx), false, 0); + _screen->SHtransBlitFrom(creditsImages[1], Common::Point(10, 400 - idx), false, 0); // Don't show credit text on the top and bottom ten rows of the screen - _screen->blitFrom(_screen->_backBuffer1, Common::Point(0, 0), Common::Rect(0, 0, _screen->w(), 10)); - _screen->blitFrom(_screen->_backBuffer1, Common::Point(0, _screen->h() - 10), - Common::Rect(0, _screen->h() - 10, _screen->w(), _screen->h())); + _screen->SHblitFrom(_screen->_backBuffer1, Common::Point(0, 0), Common::Rect(0, 0, _screen->width(), 10)); + _screen->SHblitFrom(_screen->_backBuffer1, Common::Point(0, _screen->height() - 10), + Common::Rect(0, _screen->height() - 10, _screen->width(), _screen->height())); _events->delay(100); } @@ -670,7 +671,7 @@ bool ScalpelEngine::show3DOSplash() { // 3DO EA Splash screen ImageFile3DO titleImage_3DOSplash("3DOSplash.cel", kImageFile3DOType_Cel); - _screen->transBlitFrom(titleImage_3DOSplash[0]._frame, Common::Point(0, -20)); + _screen->SHtransBlitFrom(titleImage_3DOSplash[0]._frame, Common::Point(0, -20)); bool finished = _events->delay(3000, true); if (finished) { @@ -706,7 +707,7 @@ bool ScalpelEngine::showCityCutscene3DO() { _sound->playAiff("prologue/sounds/rain.aiff", 15, true); // Fade screen to grey - screen._backBuffer1.fill(0xCE59); // RGB565: 25, 50, 25 (grey) + screen._backBuffer1.clear(0xCE59); // RGB565: 25, 50, 25 (grey) screen.fadeIntoScreen3DO(2); } @@ -715,16 +716,16 @@ bool ScalpelEngine::showCityCutscene3DO() { } if (finished) { - screen._backBuffer1.fill(0); // fill backbuffer with black to avoid issues during fade from white + screen._backBuffer1.clear(0); // fill backbuffer with black to avoid issues during fade from white finished = _animation->play3DO("26open1", true, 1, true, 2); } if (finished) { - screen._backBuffer2.blitFrom(screen._backBuffer1); + screen._backBuffer2.SHblitFrom(screen._backBuffer1); // "London, England" ImageFile3DO titleImage_London("title2a.cel", kImageFile3DOType_Cel); - screen._backBuffer1.transBlitFrom(titleImage_London[0]._frame, Common::Point(30, 50)); + screen._backBuffer1.SHtransBlitFrom(titleImage_London[0]._frame, Common::Point(30, 50)); screen.fadeIntoScreen3DO(1); finished = _events->delay(1500, true); @@ -732,7 +733,7 @@ bool ScalpelEngine::showCityCutscene3DO() { if (finished) { // "November, 1888" ImageFile3DO titleImage_November("title2b.cel", kImageFile3DOType_Cel); - screen._backBuffer1.transBlitFrom(titleImage_November[0]._frame, Common::Point(100, 100)); + screen._backBuffer1.SHtransBlitFrom(titleImage_November[0]._frame, Common::Point(100, 100)); screen.fadeIntoScreen3DO(1); finished = _music->waitUntilMSec(14700, 0, 0, 5000); @@ -740,8 +741,8 @@ bool ScalpelEngine::showCityCutscene3DO() { if (finished) { // Restore screen - _screen->_backBuffer1.blitFrom(screen._backBuffer2); - _screen->blitFrom(screen._backBuffer1); + _screen->_backBuffer1.SHblitFrom(screen._backBuffer2); + _screen->SHblitFrom(screen._backBuffer1); } } @@ -751,7 +752,7 @@ bool ScalpelEngine::showCityCutscene3DO() { if (finished) { // "Sherlock Holmes" (title) ImageFile3DO titleImage_SherlockHolmesTitle("title1ab.cel", kImageFile3DOType_Cel); - screen._backBuffer1.transBlitFrom(titleImage_SherlockHolmesTitle[0]._frame, Common::Point(34, 5)); + screen._backBuffer1.SHtransBlitFrom(titleImage_SherlockHolmesTitle[0]._frame, Common::Point(34, 5)); // Blend in screen.fadeIntoScreen3DO(2); @@ -761,7 +762,7 @@ bool ScalpelEngine::showCityCutscene3DO() { if (finished) { ImageFile3DO titleImage_Copyright("title1c.cel", kImageFile3DOType_Cel); - screen.transBlitFrom(titleImage_Copyright[0]._frame, Common::Point(20, 190)); + screen.SHtransBlitFrom(titleImage_Copyright[0]._frame, Common::Point(20, 190)); finished = _events->delay(3500, true); } } @@ -780,7 +781,7 @@ bool ScalpelEngine::showCityCutscene3DO() { if (finished) { // "In the alley behind the Regency Theatre..." ImageFile3DO titleImage_InTheAlley("title1d.cel", kImageFile3DOType_Cel); - screen._backBuffer1.transBlitFrom(titleImage_InTheAlley[0]._frame, Common::Point(72, 51)); + screen._backBuffer1.SHtransBlitFrom(titleImage_InTheAlley[0]._frame, Common::Point(72, 51)); // Fade in screen.fadeIntoScreen3DO(4); @@ -819,7 +820,7 @@ bool ScalpelEngine::showAlleyCutscene3DO() { ImageFile3DO titleImage_ScreamingVictim("scream.cel", kImageFile3DOType_Cel); screen.clear(); - screen.transBlitFrom(titleImage_ScreamingVictim[0]._frame, Common::Point(0, 0)); + screen.SHtransBlitFrom(titleImage_ScreamingVictim[0]._frame, Common::Point(0, 0)); // Play "scream.aiff" if (_sound->_voices) @@ -848,7 +849,7 @@ bool ScalpelEngine::showAlleyCutscene3DO() { if (finished) { // "Early the following morning on Baker Street..." ImageFile3DO titleImage_EarlyTheFollowingMorning("title3.cel", kImageFile3DOType_Cel); - screen._backBuffer1.transBlitFrom(titleImage_EarlyTheFollowingMorning[0]._frame, Common::Point(35, 51)); + screen._backBuffer1.SHtransBlitFrom(titleImage_EarlyTheFollowingMorning[0]._frame, Common::Point(35, 51)); // Fade in screen.fadeIntoScreen3DO(4); @@ -908,7 +909,7 @@ bool ScalpelEngine::showOfficeCutscene3DO() { ImageFile3DO titleImage_CoffeeNote("note.cel", kImageFile3DOType_Cel); _screen->clear(); - _screen->transBlitFrom(titleImage_CoffeeNote[0]._frame, Common::Point(0, 0)); + _screen->SHtransBlitFrom(titleImage_CoffeeNote[0]._frame, Common::Point(0, 0)); if (_sound->_voices) { finished = _sound->playSound("prologue/sounds/note.aiff", WAIT_KBD_OR_FINISH); @@ -937,7 +938,7 @@ bool ScalpelEngine::showOfficeCutscene3DO() { // TODO: Brighten the image, possibly by doing a partial fade // to white. - _screen->_backBuffer2.blitFrom(_screen->_backBuffer1); + _screen->_backBuffer2.SHblitFrom(_screen->_backBuffer1); for (int nr = 1; finished && nr <= 4; nr++) { char filename[15]; @@ -945,8 +946,8 @@ bool ScalpelEngine::showOfficeCutscene3DO() { ImageFile3DO *creditsImage = new ImageFile3DO(filename, kImageFile3DOType_Cel); ImageFrame *creditsFrame = &(*creditsImage)[0]; for (int i = 0; finished && i < 200 + creditsFrame->_height; i++) { - _screen->blitFrom(_screen->_backBuffer2); - _screen->transBlitFrom(creditsFrame->_frame, Common::Point((320 - creditsFrame->_width) / 2, 200 - i)); + _screen->SHblitFrom(_screen->_backBuffer2); + _screen->SHtransBlitFrom(creditsFrame->_frame, Common::Point((320 - creditsFrame->_width) / 2, 200 - i)); if (!_events->delay(70, true)) finished = false; } @@ -998,7 +999,7 @@ void ScalpelEngine::showLBV(const Common::String &filename) { delete stream; _screen->setPalette(images._palette); - _screen->_backBuffer1.blitFrom(images[0]); + _screen->_backBuffer1.SHblitFrom(images[0]); _screen->verticalTransition(); } @@ -1156,7 +1157,7 @@ void ScalpelEngine::eraseBrumwellMirror() { // If player is in range of the mirror, then restore background from the secondary back buffer if (Common::Rect(70, 100, 200, 200).contains(pt)) { - _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(137, 18), + _screen->_backBuffer1.SHblitFrom(_screen->_backBuffer2, Common::Point(137, 18), Common::Rect(137, 18, 184, 74)); } } @@ -1218,20 +1219,20 @@ void ScalpelEngine::doBrumwellMirror() { bool flipped = people[HOLMES]._sequenceNumber == WALK_LEFT || people[HOLMES]._sequenceNumber == STOP_LEFT || people[HOLMES]._sequenceNumber == WALK_UPRIGHT || people[HOLMES]._sequenceNumber == STOP_UPRIGHT || people[HOLMES]._sequenceNumber == WALK_DOWNLEFT || people[HOLMES]._sequenceNumber == STOP_DOWNLEFT; - _screen->_backBuffer1.transBlitFrom(imageFrame, pt + Common::Point(38, -imageFrame._frame.h - 25), flipped); + _screen->_backBuffer1.SHtransBlitFrom(imageFrame, pt + Common::Point(38, -imageFrame._frame.h - 25), flipped); // Redraw the mirror borders to prevent the drawn image of Holmes from appearing outside of the mirror - _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(114, 18), + _screen->_backBuffer1.SHblitFrom(_screen->_backBuffer2, Common::Point(114, 18), Common::Rect(114, 18, 137, 114)); - _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(137, 70), + _screen->_backBuffer1.SHblitFrom(_screen->_backBuffer2, Common::Point(137, 70), Common::Rect(137, 70, 142, 114)); - _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(142, 71), + _screen->_backBuffer1.SHblitFrom(_screen->_backBuffer2, Common::Point(142, 71), Common::Rect(142, 71, 159, 114)); - _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(159, 72), + _screen->_backBuffer1.SHblitFrom(_screen->_backBuffer2, Common::Point(159, 72), Common::Rect(159, 72, 170, 116)); - _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(170, 73), + _screen->_backBuffer1.SHblitFrom(_screen->_backBuffer2, Common::Point(170, 73), Common::Rect(170, 73, 184, 114)); - _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(184, 18), + _screen->_backBuffer1.SHblitFrom(_screen->_backBuffer2, Common::Point(184, 18), Common::Rect(184, 18, 212, 114)); } } @@ -1272,7 +1273,7 @@ void ScalpelEngine::showScummVMRestoreDialog() { bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::Point &pos, bool isPortrait) { Scalpel3DOScreen &screen = *(Scalpel3DOScreen *)_screen; Scalpel3DOMovieDecoder *videoDecoder = new Scalpel3DOMovieDecoder(); - Graphics::Surface tempSurface; + Graphics::ManagedSurface tempSurface; Common::Point framePos(pos.x, pos.y); ImageFile3DO *frameImageFile = nullptr; @@ -1307,7 +1308,7 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P // If we're to show the movie at half-size, we'll need a temporary intermediate surface if (halfSize) - tempSurface.create(width / 2, height / 2, _screen->getPixelFormat()); + tempSurface.create(width / 2, height / 2); while (!shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) { if (videoDecoder->needsUpdate()) { @@ -1371,19 +1372,19 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P } // Point the drawing frame to the temporary surface - frame = &tempSurface; + frame = &tempSurface.rawSurface(); } if (isPortrait && !frameShown) { // Draw the frame (not the frame of the video, but a frame around the video) itself - _screen->transBlitFrom(frameImage->_frame, framePos); + _screen->SHtransBlitFrom(frameImage->_frame, framePos); frameShown = true; } if (isPortrait && !halfSize) { screen.rawBlitFrom(*frame, Common::Point(pos.x * 2, pos.y * 2)); } else { - _screen->blitFrom(*frame, pos); + _screen->SHblitFrom(*frame, pos); } _screen->update(); @@ -1413,9 +1414,9 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P } // Restore scene - screen._backBuffer1.blitFrom(screen._backBuffer2); + screen._backBuffer1.SHblitFrom(screen._backBuffer2); _scene->updateBackground(); - screen.slamArea(0, 0, screen.w(), CONTROLS_Y); + screen.slamArea(0, 0, screen.width(), CONTROLS_Y); return !skipVideo; } diff --git a/engines/sherlock/scalpel/scalpel_darts.cpp b/engines/sherlock/scalpel/scalpel_darts.cpp index 87f4566837..c5ba8032f3 100644 --- a/engines/sherlock/scalpel/scalpel_darts.cpp +++ b/engines/sherlock/scalpel/scalpel_darts.cpp @@ -102,7 +102,7 @@ void Darts::playDarts() { score -= lastDart; _roundScore += lastDart; - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(DART_INFO_X, DART_INFO_Y - 1), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(DART_INFO_X, DART_INFO_Y - 1), Common::Rect(DART_INFO_X, DART_INFO_Y - 1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); screen.print(Common::Point(DART_INFO_X, DART_INFO_Y), DART_COL_FORE, "Dart # %d", idx + 1); screen.print(Common::Point(DART_INFO_X, DART_INFO_Y + 10), DART_COL_FORE, "Scored %d points", lastDart); @@ -154,7 +154,7 @@ void Darts::playDarts() { events.wait(20); } - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(DART_INFO_X, DART_INFO_Y - 1), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(DART_INFO_X, DART_INFO_Y - 1), Common::Rect(DART_INFO_X, DART_INFO_Y - 1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); } @@ -166,8 +166,8 @@ void Darts::playDarts() { done |= _vm->shouldQuit(); if (!done) { - screen._backBuffer2.blitFrom((*_dartImages)[0], Common::Point(0, 0)); - screen._backBuffer1.blitFrom(screen._backBuffer2); + screen._backBuffer2.SHblitFrom((*_dartImages)[0], Common::Point(0, 0)); + screen._backBuffer1.SHblitFrom(screen._backBuffer2); screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); } } while (!done); @@ -185,7 +185,7 @@ void Darts::loadDarts() { _dartImages = new ImageFile("darts.vgs"); screen.setPalette(_dartImages->_palette); - screen._backBuffer1.blitFrom((*_dartImages)[0], Common::Point(0, 0)); + screen._backBuffer1.SHblitFrom((*_dartImages)[0], Common::Point(0, 0)); screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); } @@ -245,7 +245,7 @@ void Darts::showNames(int playerNum) { screen.slamArea(STATUS_INFO_X + 50, STATUS_INFO_Y + 10, 81, 12); // Make a copy of the back buffer to the secondary one - screen._backBuffer2.blitFrom(screen._backBuffer1); + screen._backBuffer2.SHblitFrom(screen._backBuffer1); } void Darts::showStatus(int playerNum) { @@ -253,7 +253,7 @@ void Darts::showStatus(int playerNum) { byte color; // Copy scoring screen from secondary back buffer. This will erase any previously displayed status/score info - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(STATUS_INFO_X, STATUS_INFO_Y + 10), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(STATUS_INFO_X, STATUS_INFO_Y + 10), Common::Rect(STATUS_INFO_X, STATUS_INFO_Y + 10, SHERLOCK_SCREEN_WIDTH, STATUS_INFO_Y + 48)); color = (playerNum == 0) ? PLAYER_COLOR : DART_COL_FORE; @@ -292,7 +292,7 @@ int Darts::throwDart(int dartNum, int computer) { if (_vm->shouldQuit()) return 0; - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(DART_INFO_X, DART_INFO_Y - 1), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(DART_INFO_X, DART_INFO_Y - 1), Common::Rect(DART_INFO_X, DART_INFO_Y - 1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); screen.slamRect(Common::Rect(DART_INFO_X, DART_INFO_Y - 1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); @@ -309,9 +309,9 @@ int Darts::throwDart(int dartNum, int computer) { // Copy the bars to the secondary back buffer so that they remain fixed at their selected values // whilst the dart is being animated at being thrown at the board - screen._backBuffer2.blitFrom(screen._backBuffer1, Common::Point(DARTBARHX - 1, DARTHORIZY - 1), + screen._backBuffer2.SHblitFrom(screen._backBuffer1, Common::Point(DARTBARHX - 1, DARTHORIZY - 1), Common::Rect(DARTBARHX - 1, DARTHORIZY - 1, DARTBARHX + DARTBARSIZE + 3, DARTHORIZY + 10)); - screen._backBuffer2.blitFrom(screen._backBuffer1, Common::Point(DARTBARVX - 1, DARTHEIGHTY - 1), + screen._backBuffer2.SHblitFrom(screen._backBuffer1, Common::Point(DARTBARVX - 1, DARTHEIGHTY - 1), Common::Rect(DARTBARVX - 1, DARTHEIGHTY - 1, DARTBARVX + 11, DARTHEIGHTY + DARTBARSIZE + 3)); // Convert height and width to relative range of -50 to 50, where 0,0 is the exact centre of the board @@ -344,7 +344,7 @@ void Darts::drawDartThrow(const Common::Point &pt) { // Draw the dart Common::Point drawPos(pos.x - frame._width / 2, pos.y - frame._height); - screen._backBuffer1.transBlitFrom(frame, drawPos); + screen._backBuffer1.SHtransBlitFrom(frame, drawPos); screen.slamArea(drawPos.x, drawPos.y, frame._width, frame._height); // Handle erasing old dart frame area @@ -352,14 +352,14 @@ void Darts::drawDartThrow(const Common::Point &pt) { screen.slamRect(oldDrawBounds); oldDrawBounds = Common::Rect(drawPos.x, drawPos.y, drawPos.x + frame._width, drawPos.y + frame._height); - screen._backBuffer1.blitFrom(screen._backBuffer2, drawPos, oldDrawBounds); + screen._backBuffer1.SHblitFrom(screen._backBuffer2, drawPos, oldDrawBounds); events.wait(2); } // Draw dart in final "stuck to board" form - screen._backBuffer1.transBlitFrom((*_dartImages)[22], Common::Point(oldDrawBounds.left, oldDrawBounds.top)); - screen._backBuffer2.transBlitFrom((*_dartImages)[22], Common::Point(oldDrawBounds.left, oldDrawBounds.top)); + screen._backBuffer1.SHtransBlitFrom((*_dartImages)[22], Common::Point(oldDrawBounds.left, oldDrawBounds.top)); + screen._backBuffer2.SHtransBlitFrom((*_dartImages)[22], Common::Point(oldDrawBounds.left, oldDrawBounds.top)); screen.slamRect(oldDrawBounds); } @@ -368,8 +368,8 @@ void Darts::erasePowerBars() { screen._backBuffer1.fillRect(Common::Rect(DARTBARHX, DARTHORIZY, DARTBARHX + DARTBARSIZE, DARTHORIZY + 10), BLACK); screen._backBuffer1.fillRect(Common::Rect(DARTBARVX, DARTHEIGHTY, DARTBARVX + 10, DARTHEIGHTY + DARTBARSIZE), BLACK); - screen._backBuffer1.transBlitFrom((*_dartImages)[2], Common::Point(DARTBARHX - 1, DARTHORIZY - 1)); - screen._backBuffer1.transBlitFrom((*_dartImages)[3], Common::Point(DARTBARVX - 1, DARTHEIGHTY - 1)); + screen._backBuffer1.SHtransBlitFrom((*_dartImages)[2], Common::Point(DARTBARHX - 1, DARTHORIZY - 1)); + screen._backBuffer1.SHtransBlitFrom((*_dartImages)[3], Common::Point(DARTBARVX - 1, DARTHEIGHTY - 1)); screen.slamArea(DARTBARHX - 1, DARTHORIZY - 1, DARTBARSIZE + 3, 11); screen.slamArea(DARTBARVX - 1, DARTHEIGHTY - 1, 11, DARTBARSIZE + 3); } @@ -398,11 +398,11 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i if (isVertical) { screen._backBuffer1.hLine(pt.x, pt.y + DARTBARSIZE - 1 - idx, pt.x + 8, color); - screen._backBuffer1.transBlitFrom((*_dartImages)[3], Common::Point(pt.x - 1, pt.y - 1)); + screen._backBuffer1.SHtransBlitFrom((*_dartImages)[3], Common::Point(pt.x - 1, pt.y - 1)); screen.slamArea(pt.x, pt.y + DARTBARSIZE - 1 - idx, 8, 2); } else { screen._backBuffer1.vLine(pt.x + idx, pt.y, pt.y + 8, color); - screen._backBuffer1.transBlitFrom((*_dartImages)[2], Common::Point(pt.x - 1, pt.y - 1)); + screen._backBuffer1.SHtransBlitFrom((*_dartImages)[2], Common::Point(pt.x - 1, pt.y - 1)); screen.slamArea(pt.x + idx, pt.y, 1, 8); } diff --git a/engines/sherlock/scalpel/scalpel_debugger.cpp b/engines/sherlock/scalpel/scalpel_debugger.cpp index 1495c76b43..02b39ade9b 100644 --- a/engines/sherlock/scalpel/scalpel_debugger.cpp +++ b/engines/sherlock/scalpel/scalpel_debugger.cpp @@ -22,10 +22,9 @@ #include "sherlock/scalpel/scalpel_debugger.h" #include "sherlock/sherlock.h" +#include "audio/audiostream.h" #include "audio/mixer.h" -#include "audio/decoders/3do.h" #include "audio/decoders/aiff.h" -#include "audio/decoders/wave.h" namespace Sherlock { diff --git a/engines/sherlock/scalpel/scalpel_inventory.cpp b/engines/sherlock/scalpel/scalpel_inventory.cpp index c3e20295fd..6eb8c2c05c 100644 --- a/engines/sherlock/scalpel/scalpel_inventory.cpp +++ b/engines/sherlock/scalpel/scalpel_inventory.cpp @@ -72,11 +72,11 @@ void ScalpelInventory::drawInventory(InvNewMode mode) { loadInv(); if (mode == INVENTORY_DONT_DISPLAY) { - screen._backBuffer = &screen._backBuffer2; + screen.activateBackBuffer2(); } // Draw the window background - Surface &bb = *screen._backBuffer; + Surface &bb = *screen.getBackBuffer(); bb.fillRect(Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH, CONTROLS_Y1 + 10), BORDER_COLOR); bb.fillRect(Common::Rect(0, CONTROLS_Y1 + 10, 2, SHERLOCK_SCREEN_HEIGHT), BORDER_COLOR); bb.fillRect(Common::Rect(SHERLOCK_SCREEN_WIDTH - 2, CONTROLS_Y1 + 10, @@ -128,7 +128,7 @@ void ScalpelInventory::drawInventory(InvNewMode mode) { ui._windowOpen = true; } else { // Reset the screen back buffer to the first buffer now that drawing is done - screen._backBuffer = &screen._backBuffer1; + screen.activateBackBuffer1(); } assert(IS_SERRATED_SCALPEL); @@ -196,12 +196,12 @@ void ScalpelInventory::invCommands(bool slamIt) { void ScalpelInventory::highlight(int index, byte color) { Screen &screen = *_vm->_screen; - Surface &bb = *screen._backBuffer; + Surface &bb = *screen.getBackBuffer(); int slot = index - _invIndex; ImageFrame &frame = (*_invShapes[slot])[0]; bb.fillRect(Common::Rect(8 + slot * 52, 165, (slot + 1) * 52, 194), color); - bb.transBlitFrom(frame, Common::Point(6 + slot * 52 + ((47 - frame._width) / 2), + bb.SHtransBlitFrom(frame, Common::Point(6 + slot * 52 + ((47 - frame._width) / 2), 163 + ((33 - frame._height) / 2))); screen.slamArea(8 + slot * 52, 165, 44, 30); } @@ -217,12 +217,12 @@ void ScalpelInventory::refreshInv() { ui._infoFlag = true; ui.clearInfo(); - screen._backBuffer2.blitFrom(screen._backBuffer1, Common::Point(0, CONTROLS_Y), + screen._backBuffer2.SHblitFrom(screen._backBuffer1, Common::Point(0, CONTROLS_Y), Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); ui.examine(); if (!talk._talkToAbort) { - screen._backBuffer2.blitFrom((*ui._controlPanel)[0], Common::Point(0, CONTROLS_Y)); + screen._backBuffer2.SHblitFrom((*ui._controlPanel)[0], Common::Point(0, CONTROLS_Y)); loadInv(); } } @@ -264,7 +264,7 @@ void ScalpelInventory::putInv(InvSlamMode slamIt) { // Draw the item image ImageFrame &frame = (*_invShapes[itemNum])[0]; - bb.transBlitFrom(frame, Common::Point(6 + itemNum * 52 + ((47 - frame._width) / 2), + bb.SHtransBlitFrom(frame, Common::Point(6 + itemNum * 52 + ((47 - frame._width) / 2), 163 + ((33 - frame._height) / 2))); } @@ -278,9 +278,9 @@ void ScalpelInventory::putInv(InvSlamMode slamIt) { invCommands(0); } else if (slamIt == SLAM_SECONDARY_BUFFER) { - screen._backBuffer = &screen._backBuffer2; + screen.activateBackBuffer2(); invCommands(0); - screen._backBuffer = &screen._backBuffer1; + screen.activateBackBuffer1(); } } diff --git a/engines/sherlock/scalpel/scalpel_journal.cpp b/engines/sherlock/scalpel/scalpel_journal.cpp index d6f8021e5b..151d986d81 100644 --- a/engines/sherlock/scalpel/scalpel_journal.cpp +++ b/engines/sherlock/scalpel/scalpel_journal.cpp @@ -485,11 +485,6 @@ int ScalpelJournal::getSearchString(bool printError) { screen.makeField(Common::Rect(12, 185, 307, 196)); - screen.fillRect(Common::Rect(12, 185, 307, 186), BUTTON_BOTTOM); - screen.vLine(12, 185, 195, BUTTON_BOTTOM); - screen.hLine(13, 195, 306, BUTTON_TOP); - screen.hLine(306, 186, 195, BUTTON_TOP); - if (printError) { screen.gPrint(Common::Point((SHERLOCK_SCREEN_WIDTH - screen.stringWidth(_fixedTextSearchNotFound)) / 2, 185), INV_FOREGROUND, "%s", _fixedTextSearchNotFound.c_str()); diff --git a/engines/sherlock/scalpel/scalpel_map.cpp b/engines/sherlock/scalpel/scalpel_map.cpp index 0924581e38..ba14b5b300 100644 --- a/engines/sherlock/scalpel/scalpel_map.cpp +++ b/engines/sherlock/scalpel/scalpel_map.cpp @@ -167,13 +167,13 @@ int ScalpelMap::show() { setupSprites(); if (!IS_3DO) { - screen._backBuffer1.blitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); - screen._backBuffer1.blitFrom((*bigMap)[1], Common::Point(-_bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); - screen._backBuffer1.blitFrom((*bigMap)[2], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, -_bigPos.y)); - screen._backBuffer1.blitFrom((*bigMap)[3], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[1], Common::Point(-_bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[2], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, -_bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[3], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); } else { - screen._backBuffer1.blitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); - screen.blitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); + screen.SHblitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); } _drawMap = true; @@ -238,12 +238,12 @@ int ScalpelMap::show() { changed = false; if (!IS_3DO) { - screen._backBuffer1.blitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); - screen._backBuffer1.blitFrom((*bigMap)[1], Common::Point(-_bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); - screen._backBuffer1.blitFrom((*bigMap)[2], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, -_bigPos.y)); - screen._backBuffer1.blitFrom((*bigMap)[3], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[1], Common::Point(-_bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[2], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, -_bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[3], Common::Point(SHERLOCK_SCREEN_WIDTH - _bigPos.x, SHERLOCK_SCREEN_HEIGHT - _bigPos.y)); } else { - screen._backBuffer1.blitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); + screen._backBuffer1.SHblitFrom((*bigMap)[0], Common::Point(-_bigPos.x, -_bigPos.y)); } showPlaces(); @@ -359,7 +359,6 @@ void ScalpelMap::freeSprites() { delete _mapCursors; delete _shapes; delete _iconShapes; - _iconSave.free(); } void ScalpelMap::showPlaces() { @@ -376,7 +375,7 @@ void ScalpelMap::showPlaces() { if (pt.x >= _bigPos.x && (pt.x - _bigPos.x) < SHERLOCK_SCREEN_WIDTH && pt.y >= _bigPos.y && (pt.y - _bigPos.y) < SHERLOCK_SCREEN_HEIGHT) { if (_vm->readFlags(idx)) { - screen._backBuffer1.transBlitFrom((*_iconShapes)[pt._translate], + screen._backBuffer1.SHtransBlitFrom((*_iconShapes)[pt._translate], Common::Point(pt.x - _bigPos.x - 6, pt.y - _bigPos.y - 12)); } } @@ -388,13 +387,13 @@ void ScalpelMap::showPlaces() { } void ScalpelMap::saveTopLine() { - _topLine.blitFrom(_vm->_screen->_backBuffer1, Common::Point(0, 0), Common::Rect(0, 0, SHERLOCK_SCREEN_WIDTH, 12)); + _topLine.SHblitFrom(_vm->_screen->_backBuffer1, Common::Point(0, 0), Common::Rect(0, 0, SHERLOCK_SCREEN_WIDTH, 12)); } void ScalpelMap::eraseTopLine() { Screen &screen = *_vm->_screen; - screen._backBuffer1.blitFrom(_topLine, Common::Point(0, 0)); - screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, _topLine.h()); + screen._backBuffer1.SHblitFrom(_topLine, Common::Point(0, 0)); + screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, _topLine.height()); } void ScalpelMap::showPlaceName(int idx, bool highlighted) { @@ -409,7 +408,7 @@ void ScalpelMap::showPlaceName(int idx, bool highlighted) { bool flipped = people[HOLMES]._sequenceNumber == MAP_DOWNLEFT || people[HOLMES]._sequenceNumber == MAP_LEFT || people[HOLMES]._sequenceNumber == MAP_UPLEFT; - screen._backBuffer1.transBlitFrom(*people[HOLMES]._imageFrame, _lDrawnPos, flipped); + screen._backBuffer1.SHtransBlitFrom(*people[HOLMES]._imageFrame, _lDrawnPos, flipped); } if (highlighted) { @@ -451,9 +450,9 @@ void ScalpelMap::updateMap(bool flushScreen) { saveIcon(people[HOLMES]._imageFrame, hPos); if (people[HOLMES]._sequenceNumber == MAP_DOWNLEFT || people[HOLMES]._sequenceNumber == MAP_LEFT || people[HOLMES]._sequenceNumber == MAP_UPLEFT) - screen._backBuffer1.transBlitFrom(*people[HOLMES]._imageFrame, hPos, true); + screen._backBuffer1.SHtransBlitFrom(*people[HOLMES]._imageFrame, hPos, true); else - screen._backBuffer1.transBlitFrom(*people[HOLMES]._imageFrame, hPos, false); + screen._backBuffer1.SHtransBlitFrom(*people[HOLMES]._imageFrame, hPos, false); if (flushScreen) { screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); @@ -553,8 +552,8 @@ void ScalpelMap::saveIcon(ImageFrame *src, const Common::Point &pt) { return; } - assert(size.x <= _iconSave.w() && size.y <= _iconSave.h()); - _iconSave.blitFrom(screen._backBuffer1, Common::Point(0, 0), + assert(size.x <= _iconSave.width() && size.y <= _iconSave.height()); + _iconSave.SHblitFrom(screen._backBuffer1, Common::Point(0, 0), Common::Rect(pos.x, pos.y, pos.x + size.x, pos.y + size.y)); _savedPos = pos; _savedSize = size; @@ -565,7 +564,7 @@ void ScalpelMap::restoreIcon() { if (_savedPos.x >= 0 && _savedPos.y >= 0 && _savedPos.x <= SHERLOCK_SCREEN_WIDTH && _savedPos.y < SHERLOCK_SCREEN_HEIGHT) - screen._backBuffer1.blitFrom(_iconSave, _savedPos, Common::Rect(0, 0, _savedSize.x, _savedSize.y)); + screen._backBuffer1.SHblitFrom(_iconSave, _savedPos, Common::Rect(0, 0, _savedSize.x, _savedSize.y)); } void ScalpelMap::highlightIcon(const Common::Point &pt) { diff --git a/engines/sherlock/scalpel/scalpel_scene.cpp b/engines/sherlock/scalpel/scalpel_scene.cpp index b62703e0fb..11fb807c3b 100644 --- a/engines/sherlock/scalpel/scalpel_scene.cpp +++ b/engines/sherlock/scalpel/scalpel_scene.cpp @@ -71,26 +71,26 @@ void ScalpelScene::drawAllShapes() { // Draw all active shapes which are behind the person for (uint idx = 0; idx < _bgShapes.size(); ++idx) { if (_bgShapes[idx]._type == ACTIVE_BG_SHAPE && _bgShapes[idx]._misc == BEHIND) - screen._backBuffer->transBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position, _bgShapes[idx]._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position, _bgShapes[idx]._flags & OBJ_FLIPPED); } // Draw all canimations which are behind the person for (uint idx = 0; idx < _canimShapes.size(); ++idx) { if (_canimShapes[idx]->_type == ACTIVE_BG_SHAPE && _canimShapes[idx]->_misc == BEHIND) - screen._backBuffer->transBlitFrom(*_canimShapes[idx]->_imageFrame, + screen.getBackBuffer()->SHtransBlitFrom(*_canimShapes[idx]->_imageFrame, _canimShapes[idx]->_position, _canimShapes[idx]->_flags & OBJ_FLIPPED); } // Draw all active shapes which are normal and behind the person for (uint idx = 0; idx < _bgShapes.size(); ++idx) { if (_bgShapes[idx]._type == ACTIVE_BG_SHAPE && _bgShapes[idx]._misc == NORMAL_BEHIND) - screen._backBuffer->transBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position, _bgShapes[idx]._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position, _bgShapes[idx]._flags & OBJ_FLIPPED); } // Draw all canimations which are normal and behind the person for (uint idx = 0; idx < _canimShapes.size(); ++idx) { if (_canimShapes[idx]->_type == ACTIVE_BG_SHAPE && _canimShapes[idx]->_misc == NORMAL_BEHIND) - screen._backBuffer->transBlitFrom(*_canimShapes[idx]->_imageFrame, _canimShapes[idx]->_position, + screen.getBackBuffer()->SHtransBlitFrom(*_canimShapes[idx]->_imageFrame, _canimShapes[idx]->_position, _canimShapes[idx]->_flags & OBJ_FLIPPED); } @@ -103,7 +103,7 @@ void ScalpelScene::drawAllShapes() { p._sequenceNumber == WALK_UPLEFT || p._sequenceNumber == STOP_UPLEFT || p._sequenceNumber == WALK_DOWNRIGHT || p._sequenceNumber == STOP_DOWNRIGHT); - screen._backBuffer->transBlitFrom(*p._imageFrame, Common::Point(p._position.x / FIXED_INT_MULTIPLIER, + screen.getBackBuffer()->SHtransBlitFrom(*p._imageFrame, Common::Point(p._position.x / FIXED_INT_MULTIPLIER, p._position.y / FIXED_INT_MULTIPLIER - p.frameHeight()), flipped); } } @@ -112,7 +112,7 @@ void ScalpelScene::drawAllShapes() { for (uint idx = 0; idx < _bgShapes.size(); ++idx) { if ((_bgShapes[idx]._type == ACTIVE_BG_SHAPE || _bgShapes[idx]._type == STATIC_BG_SHAPE) && _bgShapes[idx]._misc == NORMAL_FORWARD) - screen._backBuffer->transBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position, + screen.getBackBuffer()->SHtransBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position, _bgShapes[idx]._flags & OBJ_FLIPPED); } @@ -120,7 +120,7 @@ void ScalpelScene::drawAllShapes() { for (uint idx = 0; idx < _canimShapes.size(); ++idx) { if ((_canimShapes[idx]->_type == ACTIVE_BG_SHAPE || _canimShapes[idx]->_type == STATIC_BG_SHAPE) && _canimShapes[idx]->_misc == NORMAL_FORWARD) - screen._backBuffer->transBlitFrom(*_canimShapes[idx]->_imageFrame, _canimShapes[idx]->_position, + screen.getBackBuffer()->SHtransBlitFrom(*_canimShapes[idx]->_imageFrame, _canimShapes[idx]->_position, _canimShapes[idx]->_flags & OBJ_FLIPPED); } @@ -132,7 +132,7 @@ void ScalpelScene::drawAllShapes() { if ((_bgShapes[idx]._type == ACTIVE_BG_SHAPE || _bgShapes[idx]._type == STATIC_BG_SHAPE) && _bgShapes[idx]._misc == FORWARD) - screen._backBuffer->transBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position, + screen.getBackBuffer()->SHtransBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position, _bgShapes[idx]._flags & OBJ_FLIPPED); } @@ -140,7 +140,7 @@ void ScalpelScene::drawAllShapes() { for (uint idx = 0; idx < _canimShapes.size(); ++idx) { if ((_canimShapes[idx]->_type == ACTIVE_BG_SHAPE || _canimShapes[idx]->_type == STATIC_BG_SHAPE) && _canimShapes[idx]->_misc == FORWARD) - screen._backBuffer->transBlitFrom(*_canimShapes[idx]->_imageFrame, _canimShapes[idx]->_position, + screen.getBackBuffer()->SHtransBlitFrom(*_canimShapes[idx]->_imageFrame, _canimShapes[idx]->_position, _canimShapes[idx]->_flags & OBJ_FLIPPED); } @@ -242,7 +242,7 @@ void ScalpelScene::doBgAnim() { if (people[HOLMES]._type == CHARACTER) screen.restoreBackground(bounds); else if (people[HOLMES]._type == REMOVE) - screen._backBuffer->blitFrom(screen._backBuffer2, pt, bounds); + screen.getBackBuffer()->SHblitFrom(screen._backBuffer2, pt, bounds); for (uint idx = 0; idx < _bgShapes.size(); ++idx) { Object &o = _bgShapes[idx]; @@ -261,7 +261,7 @@ void ScalpelScene::doBgAnim() { Object &o = _bgShapes[idx]; if (o._type == NO_SHAPE && ((o._flags & OBJ_BEHIND) == 0)) { // Restore screen area - screen._backBuffer->blitFrom(screen._backBuffer2, o._position, + screen.getBackBuffer()->SHblitFrom(screen._backBuffer2, o._position, Common::Rect(o._position.x, o._position.y, o._position.x + o._noShapeSize.x, o._position.y + o._noShapeSize.y)); @@ -309,14 +309,14 @@ void ScalpelScene::doBgAnim() { for (uint idx = 0; idx < _bgShapes.size(); ++idx) { Object &o = _bgShapes[idx]; if (o._type == ACTIVE_BG_SHAPE && o._misc == BEHIND) - screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); } // Draw all canimations which are behind the person for (uint idx = 0; idx < _canimShapes.size(); ++idx) { Object &o = *_canimShapes[idx]; if (o._type == ACTIVE_BG_SHAPE && o._misc == BEHIND) { - screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); } } @@ -324,14 +324,14 @@ void ScalpelScene::doBgAnim() { for (uint idx = 0; idx < _bgShapes.size(); ++idx) { Object &o = _bgShapes[idx]; if (o._type == ACTIVE_BG_SHAPE && o._misc == NORMAL_BEHIND) - screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); } // Draw all canimations which are NORMAL and behind the person for (uint idx = 0; idx < _canimShapes.size(); ++idx) { Object &o = *_canimShapes[idx]; if (o._type == ACTIVE_BG_SHAPE && o._misc == NORMAL_BEHIND) { - screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); } } @@ -344,7 +344,7 @@ void ScalpelScene::doBgAnim() { bool flipped = people[HOLMES]._sequenceNumber == WALK_LEFT || people[HOLMES]._sequenceNumber == STOP_LEFT || people[HOLMES]._sequenceNumber == WALK_UPLEFT || people[HOLMES]._sequenceNumber == STOP_UPLEFT || people[HOLMES]._sequenceNumber == WALK_DOWNRIGHT || people[HOLMES]._sequenceNumber == STOP_DOWNRIGHT; - screen._backBuffer->transBlitFrom(*people[HOLMES]._imageFrame, + screen.getBackBuffer()->SHtransBlitFrom(*people[HOLMES]._imageFrame, Common::Point(tempX, people[HOLMES]._position.y / FIXED_INT_MULTIPLIER - people[HOLMES]._imageFrame->_frame.h), flipped); } @@ -352,14 +352,14 @@ void ScalpelScene::doBgAnim() { for (uint idx = 0; idx < _bgShapes.size(); ++idx) { Object &o = _bgShapes[idx]; if ((o._type == ACTIVE_BG_SHAPE || o._type == STATIC_BG_SHAPE) && o._misc == NORMAL_FORWARD) - screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); } // Draw all static and active canimations that are NORMAL and are in front of the person for (uint idx = 0; idx < _canimShapes.size(); ++idx) { Object &o = *_canimShapes[idx]; if ((o._type == ACTIVE_BG_SHAPE || o._type == STATIC_BG_SHAPE) && o._misc == NORMAL_FORWARD) { - screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); } } @@ -367,19 +367,19 @@ void ScalpelScene::doBgAnim() { for (uint idx = 0; idx < _bgShapes.size(); ++idx) { Object &o = _bgShapes[idx]; if ((o._type == ACTIVE_BG_SHAPE || o._type == STATIC_BG_SHAPE) && o._misc == FORWARD) - screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); } // Draw any active portrait if (people._portraitLoaded && people._portrait._type == ACTIVE_BG_SHAPE) - screen._backBuffer->transBlitFrom(*people._portrait._imageFrame, + screen.getBackBuffer()->SHtransBlitFrom(*people._portrait._imageFrame, people._portrait._position, people._portrait._flags & OBJ_FLIPPED); // Draw all static and active canimations that are in front of the person for (uint idx = 0; idx < _canimShapes.size(); ++idx) { Object &o = *_canimShapes[idx]; if ((o._type == ACTIVE_BG_SHAPE || o._type == STATIC_BG_SHAPE) && o._misc == FORWARD) { - screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); } } @@ -387,7 +387,7 @@ void ScalpelScene::doBgAnim() { for (uint idx = 0; idx < _bgShapes.size(); ++idx) { Object &o = _bgShapes[idx]; if (o._type == NO_SHAPE && (o._flags & OBJ_BEHIND) == 0) - screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); + screen.getBackBuffer()->SHtransBlitFrom(*o._imageFrame, o._position, o._flags & OBJ_FLIPPED); } // Bring the newly built picture to the screen diff --git a/engines/sherlock/scalpel/scalpel_screen.cpp b/engines/sherlock/scalpel/scalpel_screen.cpp index 197a2a2634..15e8436be6 100644 --- a/engines/sherlock/scalpel/scalpel_screen.cpp +++ b/engines/sherlock/scalpel/scalpel_screen.cpp @@ -28,12 +28,15 @@ namespace Sherlock { namespace Scalpel { ScalpelScreen::ScalpelScreen(SherlockEngine *vm) : Screen(vm) { + _backBuffer1.create(320, 200); + _backBuffer2.create(320, 200); + activateBackBuffer1(); } void ScalpelScreen::makeButton(const Common::Rect &bounds, int textX, const Common::String &buttonText, bool textContainsHotkey) { - Surface &bb = *_backBuffer; + Surface &bb = _backBuffer; bb.fillRect(Common::Rect(bounds.left, bounds.top, bounds.right, bounds.top + 1), BUTTON_TOP); bb.fillRect(Common::Rect(bounds.left, bounds.top, bounds.left + 1, bounds.bottom), BUTTON_TOP); bb.fillRect(Common::Rect(bounds.right - 1, bounds.top, bounds.right, bounds.bottom), BUTTON_BOTTOM); @@ -103,273 +106,24 @@ void ScalpelScreen::buttonPrint(const Common::Point &pt, uint color, bool slamIt } void ScalpelScreen::makePanel(const Common::Rect &r) { - _backBuffer->fillRect(r, BUTTON_MIDDLE); - _backBuffer->hLine(r.left, r.top, r.right - 2, BUTTON_TOP); - _backBuffer->hLine(r.left + 1, r.top + 1, r.right - 3, BUTTON_TOP); - _backBuffer->vLine(r.left, r.top, r.bottom - 1, BUTTON_TOP); - _backBuffer->vLine(r.left + 1, r.top + 1, r.bottom - 2, BUTTON_TOP); - - _backBuffer->vLine(r.right - 1, r.top, r.bottom - 1, BUTTON_BOTTOM); - _backBuffer->vLine(r.right - 2, r.top + 1, r.bottom - 2, BUTTON_BOTTOM); - _backBuffer->hLine(r.left, r.bottom - 1, r.right - 1, BUTTON_BOTTOM); - _backBuffer->hLine(r.left + 1, r.bottom - 2, r.right - 1, BUTTON_BOTTOM); + _backBuffer.fillRect(r, BUTTON_MIDDLE); + _backBuffer.hLine(r.left, r.top, r.right - 2, BUTTON_TOP); + _backBuffer.hLine(r.left + 1, r.top + 1, r.right - 3, BUTTON_TOP); + _backBuffer.vLine(r.left, r.top, r.bottom - 1, BUTTON_TOP); + _backBuffer.vLine(r.left + 1, r.top + 1, r.bottom - 2, BUTTON_TOP); + + _backBuffer.vLine(r.right - 1, r.top, r.bottom - 1, BUTTON_BOTTOM); + _backBuffer.vLine(r.right - 2, r.top + 1, r.bottom - 2, BUTTON_BOTTOM); + _backBuffer.hLine(r.left, r.bottom - 1, r.right - 1, BUTTON_BOTTOM); + _backBuffer.hLine(r.left + 1, r.bottom - 2, r.right - 1, BUTTON_BOTTOM); } void ScalpelScreen::makeField(const Common::Rect &r) { - _backBuffer->fillRect(r, BUTTON_MIDDLE); - _backBuffer->hLine(r.left, r.top, r.right - 1, BUTTON_BOTTOM); - _backBuffer->hLine(r.left + 1, r.bottom - 1, r.right - 1, BUTTON_TOP); - _backBuffer->vLine(r.left, r.top + 1, r.bottom - 1, BUTTON_BOTTOM); - _backBuffer->vLine(r.right - 1, r.top + 1, r.bottom - 2, BUTTON_TOP); -} - -/*----------------------------------------------------------------*/ - -void Scalpel3DOScreen::blitFrom(const Graphics::Surface &src, const Common::Point &pt, const Common::Rect &srcBounds) { - if (!_vm->_isScreenDoubled) { - ScalpelScreen::blitFrom(src, pt, srcBounds); - return; - } - - Common::Rect srcRect = srcBounds; - Common::Rect destRect(pt.x, pt.y, pt.x + srcRect.width(), pt.y + srcRect.height()); - - if (!srcRect.isValidRect() || !clip(srcRect, destRect)) - return; - - // Add dirty area remapped to the 640x200 surface - addDirtyRect(Common::Rect(destRect.left * 2, destRect.top * 2, destRect.right * 2, destRect.bottom * 2)); - - // Transfer the area, doubling each pixel - for (int yp = 0; yp < srcRect.height(); ++yp) { - const uint16 *srcP = (const uint16 *)src.getBasePtr(srcRect.left, srcRect.top + yp); - uint16 *destP = (uint16 *)getBasePtr(destRect.left * 2, (destRect.top + yp) * 2); - - for (int xp = srcRect.left; xp < srcRect.right; ++xp, ++srcP, destP += 2) { - *destP = *srcP; - *(destP + 1) = *srcP; - *(destP + 640) = *srcP; - *(destP + 640 + 1) = *srcP; - } - } -} - -void Scalpel3DOScreen::transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, - bool flipped, int overrideColor) { - if (!_vm->_isScreenDoubled) { - ScalpelScreen::transBlitFromUnscaled(src, pt, flipped, overrideColor); - return; - } - - Common::Rect drawRect(0, 0, src.w, src.h); - Common::Rect destRect(pt.x, pt.y, pt.x + src.w, pt.y + src.h); - - // Clip the display area to on-screen - if (!clip(drawRect, destRect)) - // It's completely off-screen - return; - - if (flipped) - drawRect = Common::Rect(src.w - drawRect.right, src.h - drawRect.bottom, - src.w - drawRect.left, src.h - drawRect.top); - - Common::Point destPt(destRect.left, destRect.top); - addDirtyRect(Common::Rect(destPt.x * 2, destPt.y * 2, (destPt.x + drawRect.width()) * 2, - (destPt.y + drawRect.height()) * 2)); - - assert(src.format.bytesPerPixel == 2 && _surface.format.bytesPerPixel == 2); - - for (int yp = 0; yp < drawRect.height(); ++yp) { - const uint16 *srcP = (const uint16 *)src.getBasePtr( - flipped ? drawRect.right - 1 : drawRect.left, drawRect.top + yp); - uint16 *destP = (uint16 *)getBasePtr(destPt.x * 2, (destPt.y + yp) * 2); - - for (int xp = 0; xp < drawRect.width(); ++xp, destP += 2) { - // RGB 0, 0, 0 -> transparent on 3DO - if (*srcP) { - *destP = *srcP; - *(destP + 1) = *srcP; - *(destP + 640) = *srcP; - *(destP + 640 + 1) = *srcP; - } - - srcP = flipped ? srcP - 1 : srcP + 1; - } - } -} - -void Scalpel3DOScreen::fillRect(const Common::Rect &r, uint color) { - if (_vm->_isScreenDoubled) - ScalpelScreen::fillRect(Common::Rect(r.left * 2, r.top * 2, r.right * 2, r.bottom * 2), color); - else - ScalpelScreen::fillRect(r, color); -} - -void Scalpel3DOScreen::fadeIntoScreen3DO(int speed) { - Events &events = *_vm->_events; - uint16 *currentScreenBasePtr = (uint16 *)getPixels(); - uint16 *targetScreenBasePtr = (uint16 *)_backBuffer->getPixels(); - uint16 currentScreenPixel = 0; - uint16 targetScreenPixel = 0; - - uint16 currentScreenPixelRed = 0; - uint16 currentScreenPixelGreen = 0; - uint16 currentScreenPixelBlue = 0; - - uint16 targetScreenPixelRed = 0; - uint16 targetScreenPixelGreen = 0; - uint16 targetScreenPixelBlue = 0; - - uint16 screenWidth = SHERLOCK_SCREEN_WIDTH; - uint16 screenHeight = SHERLOCK_SCREEN_HEIGHT; - uint16 screenX = 0; - uint16 screenY = 0; - uint16 pixelsChanged = 0; - - clearDirtyRects(); - - do { - pixelsChanged = 0; - uint16 *currentScreenPtr = currentScreenBasePtr; - uint16 *targetScreenPtr = targetScreenBasePtr; - - for (screenY = 0; screenY < screenHeight; screenY++) { - for (screenX = 0; screenX < screenWidth; screenX++) { - currentScreenPixel = *currentScreenPtr; - targetScreenPixel = *targetScreenPtr; - - if (currentScreenPixel != targetScreenPixel) { - // pixel doesn't match, adjust accordingly - currentScreenPixelRed = currentScreenPixel & 0xF800; - currentScreenPixelGreen = currentScreenPixel & 0x07E0; - currentScreenPixelBlue = currentScreenPixel & 0x001F; - targetScreenPixelRed = targetScreenPixel & 0xF800; - targetScreenPixelGreen = targetScreenPixel & 0x07E0; - targetScreenPixelBlue = targetScreenPixel & 0x001F; - - if (currentScreenPixelRed != targetScreenPixelRed) { - if (currentScreenPixelRed < targetScreenPixelRed) { - currentScreenPixelRed += 0x0800; - } else { - currentScreenPixelRed -= 0x0800; - } - } - if (currentScreenPixelGreen != targetScreenPixelGreen) { - // Adjust +2/-2 because we are running RGB555 at RGB565 - if (currentScreenPixelGreen < targetScreenPixelGreen) { - currentScreenPixelGreen += 0x0040; - } else { - currentScreenPixelGreen -= 0x0040; - } - } - if (currentScreenPixelBlue != targetScreenPixelBlue) { - if (currentScreenPixelBlue < targetScreenPixelBlue) { - currentScreenPixelBlue += 0x0001; - } else { - currentScreenPixelBlue -= 0x0001; - } - } - - uint16 v = currentScreenPixelRed | currentScreenPixelGreen | currentScreenPixelBlue; - *currentScreenPtr = v; - if (_vm->_isScreenDoubled) { - *(currentScreenPtr + 1) = v; - *(currentScreenPtr + 640) = v; - *(currentScreenPtr + 640 + 1) = v; - } - - pixelsChanged++; - } - - currentScreenPtr += _vm->_isScreenDoubled ? 2 : 1; - targetScreenPtr++; - } - - if (_vm->_isScreenDoubled) - currentScreenPtr += 640; - } - - // Too much considered dirty at the moment - if (_vm->_isScreenDoubled) - addDirtyRect(Common::Rect(0, 0, screenWidth * 2, screenHeight * 2)); - else - addDirtyRect(Common::Rect(0, 0, screenWidth, screenHeight)); - - events.pollEvents(); - events.delay(10 * speed); - } while ((pixelsChanged) && (!_vm->shouldQuit())); -} - -void Scalpel3DOScreen::blitFrom3DOcolorLimit(uint16 limitColor) { - uint16 *currentScreenPtr = (uint16 *)getPixels(); - uint16 *targetScreenPtr = (uint16 *)_backBuffer->getPixels(); - uint16 currentScreenPixel = 0; - - uint16 screenWidth = SHERLOCK_SCREEN_WIDTH; - uint16 screenHeight = SHERLOCK_SCREEN_HEIGHT; - uint16 screenX = 0; - uint16 screenY = 0; - - uint16 currentScreenPixelRed = 0; - uint16 currentScreenPixelGreen = 0; - uint16 currentScreenPixelBlue = 0; - - uint16 limitPixelRed = limitColor & 0xF800; - uint16 limitPixelGreen = limitColor & 0x07E0; - uint16 limitPixelBlue = limitColor & 0x001F; - - for (screenY = 0; screenY < screenHeight; screenY++) { - for (screenX = 0; screenX < screenWidth; screenX++) { - currentScreenPixel = *targetScreenPtr; - - currentScreenPixelRed = currentScreenPixel & 0xF800; - currentScreenPixelGreen = currentScreenPixel & 0x07E0; - currentScreenPixelBlue = currentScreenPixel & 0x001F; - - if (currentScreenPixelRed < limitPixelRed) - currentScreenPixelRed = limitPixelRed; - if (currentScreenPixelGreen < limitPixelGreen) - currentScreenPixelGreen = limitPixelGreen; - if (currentScreenPixelBlue < limitPixelBlue) - currentScreenPixelBlue = limitPixelBlue; - - uint16 v = currentScreenPixelRed | currentScreenPixelGreen | currentScreenPixelBlue; - *currentScreenPtr = v; - if (_vm->_isScreenDoubled) { - *(currentScreenPtr + 1) = v; - *(currentScreenPtr + 640) = v; - *(currentScreenPtr + 640 + 1) = v; - } - - currentScreenPtr += _vm->_isScreenDoubled ? 2 : 1; - targetScreenPtr++; - } - - if (_vm->_isScreenDoubled) - currentScreenPtr += 640; - } - - // Too much considered dirty at the moment - if (_vm->_isScreenDoubled) - addDirtyRect(Common::Rect(0, 0, screenWidth * 2, screenHeight * 2)); - else - addDirtyRect(Common::Rect(0, 0, screenWidth, screenHeight)); -} - -uint16 Scalpel3DOScreen::w() const { - return _vm->_isScreenDoubled ? _surface.w / 2 : _surface.w; -} - -uint16 Scalpel3DOScreen::h() const { - return _vm->_isScreenDoubled ? _surface.h / 2 : _surface.h; -} - -void Scalpel3DOScreen::rawBlitFrom(const Graphics::Surface &src, const Common::Point &pt) { - Common::Rect srcRect(0, 0, src.w, src.h); - Common::Rect destRect(pt.x, pt.y, pt.x + src.w, pt.y + src.h); - - addDirtyRect(destRect); - _surface.copyRectToSurface(src, destRect.left, destRect.top, srcRect); + _backBuffer.fillRect(r, BUTTON_MIDDLE); + _backBuffer.hLine(r.left, r.top, r.right - 1, BUTTON_BOTTOM); + _backBuffer.hLine(r.left + 1, r.bottom - 1, r.right - 1, BUTTON_TOP); + _backBuffer.vLine(r.left, r.top + 1, r.bottom - 1, BUTTON_BOTTOM); + _backBuffer.vLine(r.right - 1, r.top + 1, r.bottom - 2, BUTTON_TOP); } } // End of namespace Scalpel diff --git a/engines/sherlock/scalpel/scalpel_screen.h b/engines/sherlock/scalpel/scalpel_screen.h index cee33b8c6c..d9be29c8b2 100644 --- a/engines/sherlock/scalpel/scalpel_screen.h +++ b/engines/sherlock/scalpel/scalpel_screen.h @@ -61,44 +61,6 @@ public: void makeField(const Common::Rect &r); }; -class Scalpel3DOScreen : public ScalpelScreen { -protected: - /** - * Draws a sub-section of a surface at a given position within this surface - * Overriden for the 3DO to automatically double the size of everything to the underlying 640x400 surface - */ - virtual void blitFrom(const Graphics::Surface &src, const Common::Point &pt, const Common::Rect &srcBounds); - - /** - * Draws a surface at a given position within this surface with transparency - */ - virtual void transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, bool flipped, - int overrideColor); -public: - Scalpel3DOScreen(SherlockEngine *vm) : ScalpelScreen(vm) {} - virtual ~Scalpel3DOScreen() {} - - /** - * Draws a sub-section of a surface at a given position within this surface - */ - void rawBlitFrom(const Graphics::Surface &src, const Common::Point &pt); - - /** - * Fade backbuffer 1 into screen (3DO RGB!) - */ - void fadeIntoScreen3DO(int speed); - - void blitFrom3DOcolorLimit(uint16 color); - - /** - * Fill a given area of the surface with a given color - */ - virtual void fillRect(const Common::Rect &r, uint color); - - virtual uint16 w() const; - virtual uint16 h() const; -}; - } // End of namespace Scalpel } // End of namespace Sherlock diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp index b6e9482e3c..ff38c07537 100644 --- a/engines/sherlock/scalpel/scalpel_talk.cpp +++ b/engines/sherlock/scalpel/scalpel_talk.cpp @@ -684,7 +684,7 @@ Common::Point ScalpelTalk::get3doPortraitPosition() const { void ScalpelTalk::drawInterface() { ScalpelScreen &screen = *(ScalpelScreen *)_vm->_screen; - Surface &bb = *screen._backBuffer; + Surface &bb = *screen.getBackBuffer(); bb.fillRect(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, CONTROLS_Y1 + 10), BORDER_COLOR); bb.fillRect(Common::Rect(0, CONTROLS_Y + 10, 2, SHERLOCK_SCREEN_HEIGHT), BORDER_COLOR); diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp index 7ac8d0d5cf..8dae24ecd4 100644 --- a/engines/sherlock/scalpel/scalpel_user_interface.cpp +++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp @@ -148,23 +148,24 @@ void ScalpelUserInterface::reset() { void ScalpelUserInterface::drawInterface(int bufferNum) { Screen &screen = *_vm->_screen; - const ImageFrame &src = (*_controlPanel)[0]; + const Graphics::Surface &src = (*_controlPanel)[0]._frame; int16 x = (!IS_3DO) ? 0 : UI_OFFSET_3DO; if (bufferNum & 1) { if (IS_3DO) screen._backBuffer1.fillRect(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT), BLACK); - screen._backBuffer1.transBlitFrom(src, Common::Point(x, CONTROLS_Y)); + screen._backBuffer1.SHtransBlitFrom(src, Common::Point(x, CONTROLS_Y)); } if (bufferNum & 2) { if (IS_3DO) screen._backBuffer2.fillRect(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT), BLACK); - screen._backBuffer2.transBlitFrom(src, Common::Point(x, CONTROLS_Y)); + screen._backBuffer2.SHtransBlitFrom(src, Common::Point(x, CONTROLS_Y)); } if (bufferNum == 3) - screen._backBuffer2.fillRect(0, INFO_LINE, SHERLOCK_SCREEN_WIDTH, INFO_LINE + 10, INFO_BLACK); + screen._backBuffer2.SHfillRect(Common::Rect(0, INFO_LINE, + SHERLOCK_SCREEN_WIDTH, INFO_LINE + 10), INFO_BLACK); } void ScalpelUserInterface::handleInput() { @@ -426,7 +427,7 @@ void ScalpelUserInterface::depressButton(int num) { offsetButton3DO(pt, num); ImageFrame &frame = (*_controls)[num]; - screen._backBuffer1.transBlitFrom(frame, pt); + screen._backBuffer1.SHtransBlitFrom(frame, pt); screen.slamArea(pt.x, pt.y, pt.x + frame._width, pt.y + frame._height); } @@ -442,7 +443,7 @@ void ScalpelUserInterface::restoreButton(int num) { events.setCursor(ARROW); // Restore the UI on the back buffer - screen._backBuffer1.blitFrom(screen._backBuffer2, pt, + screen._backBuffer1.SHblitFrom(screen._backBuffer2, pt, Common::Rect(pt.x, pt.y, pt.x + 90, pt.y + 19)); screen.slamArea(pt.x, pt.y, pt.x + frame.w, pt.y + frame.h); @@ -489,7 +490,7 @@ void ScalpelUserInterface::toggleButton(uint16 num) { ImageFrame &frame = (*_controls)[num]; Common::Point pt(MENU_POINTS[num][0], MENU_POINTS[num][1]); offsetButton3DO(pt, num); - screen._backBuffer1.transBlitFrom(frame, pt); + screen._backBuffer1.SHtransBlitFrom(frame, pt); screen.slamArea(pt.x, pt.y, pt.x + frame._width, pt.y + frame._height); } } else { @@ -1272,7 +1273,7 @@ void ScalpelUserInterface::doLookControl() { // Need to close the window and depress the Look button Common::Point pt(MENU_POINTS[0][0], MENU_POINTS[0][1]); offsetButton3DO(pt, 0); - screen._backBuffer2.blitFrom((*_controls)[0], pt); + screen._backBuffer2.SHblitFrom((*_controls)[0], pt); banishWindow(true); _windowBounds.top = CONTROLS_Y1; @@ -1296,14 +1297,14 @@ void ScalpelUserInterface::doLookControl() { // Looking at an inventory object // Backup the user interface Surface tempSurface(SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT - CONTROLS_Y1); - tempSurface.blitFrom(screen._backBuffer2, Common::Point(0, 0), + tempSurface.SHblitFrom(screen._backBuffer2, Common::Point(0, 0), Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); inv.drawInventory(INVENTORY_DONT_DISPLAY); banishWindow(true); // Restore the ui - screen._backBuffer2.blitFrom(tempSurface, Common::Point(0, CONTROLS_Y1)); + screen._backBuffer2.SHblitFrom(tempSurface, Common::Point(0, CONTROLS_Y1)); _windowBounds.top = CONTROLS_Y1; _key = _oldKey = _hotkeyLook; @@ -1887,7 +1888,7 @@ void ScalpelUserInterface::journalControl() { // Reset the palette screen.setPalette(screen._cMap); - screen._backBuffer1.blitFrom(screen._backBuffer2); + screen._backBuffer1.SHblitFrom(screen._backBuffer2); scene.updateBackground(); screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); } @@ -1921,9 +1922,9 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first Common::Point pt(MENU_POINTS[0][0], MENU_POINTS[0][1]); offsetButton3DO(pt, 0); - tempSurface.blitFrom(screen._backBuffer2, Common::Point(0, 0), - Common::Rect(pt.x, pt.y, pt.x + tempSurface.w(), pt.y + tempSurface.h())); - screen._backBuffer2.transBlitFrom((*_controls)[0], pt); + tempSurface.SHblitFrom(screen._backBuffer2, Common::Point(0, 0), + Common::Rect(pt.x, pt.y, pt.x + tempSurface.width(), pt.y + tempSurface.height())); + screen._backBuffer2.SHtransBlitFrom((*_controls)[0], pt); banishWindow(1); events.setCursor(MAGNIFY); @@ -1933,7 +1934,7 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first _menuMode = LOOK_MODE; events.clearEvents(); - screen._backBuffer2.blitFrom(tempSurface, pt); + screen._backBuffer2.SHblitFrom(tempSurface, pt); } else { events.setCursor(ARROW); banishWindow(true); @@ -1967,7 +1968,7 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first return; } - Surface &bb = *screen._backBuffer; + Surface &bb = *screen.getBackBuffer(); if (firstTime) { // Only draw the border on the first call _infoFlag = true; @@ -2071,9 +2072,9 @@ void ScalpelUserInterface::summonWindow(const Surface &bgSurface, bool slideUp) if (slideUp) { // Gradually slide up the display of the window - for (int idx = 1; idx <= bgSurface.h(); idx += 2) { - screen._backBuffer->blitFrom(bgSurface, Common::Point(0, SHERLOCK_SCREEN_HEIGHT - idx), - Common::Rect(0, 0, bgSurface.w(), idx)); + for (int idx = 1; idx <= bgSurface.height(); idx += 2) { + screen.getBackBuffer()->SHblitFrom(bgSurface, Common::Point(0, SHERLOCK_SCREEN_HEIGHT - idx), + Common::Rect(0, 0, bgSurface.width(), idx)); screen.slamRect(Common::Rect(0, SHERLOCK_SCREEN_HEIGHT - idx, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); @@ -2081,21 +2082,21 @@ void ScalpelUserInterface::summonWindow(const Surface &bgSurface, bool slideUp) } } else { // Gradually slide down the display of the window - for (int idx = 1; idx <= bgSurface.h(); idx += 2) { - screen._backBuffer->blitFrom(bgSurface, - Common::Point(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.h()), - Common::Rect(0, bgSurface.h() - idx, bgSurface.w(), bgSurface.h())); - screen.slamRect(Common::Rect(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.h(), - SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT - bgSurface.h() + idx)); + for (int idx = 1; idx <= bgSurface.height(); idx += 2) { + screen.getBackBuffer()->SHblitFrom(bgSurface, + Common::Point(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.height()), + Common::Rect(0, bgSurface.height() - idx, bgSurface.width(), bgSurface.height())); + screen.slamRect(Common::Rect(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.height(), + SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT - bgSurface.height() + idx)); events.delay(10); } } // Final display of the entire window - screen._backBuffer->blitFrom(bgSurface, Common::Point(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.h()), - Common::Rect(0, 0, bgSurface.w(), bgSurface.h())); - screen.slamArea(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.h(), bgSurface.w(), bgSurface.h()); + screen.getBackBuffer()->SHblitFrom(bgSurface, Common::Point(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.height()), + Common::Rect(0, 0, bgSurface.width(), bgSurface.height())); + screen.slamArea(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.height(), bgSurface.width(), bgSurface.height()); _windowOpen = true; } @@ -2106,10 +2107,10 @@ void ScalpelUserInterface::summonWindow(bool slideUp, int height) { // Extract the window that's been drawn on the back buffer Surface tempSurface(SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT - height); Common::Rect r(0, height, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); - tempSurface.blitFrom(screen._backBuffer1, Common::Point(0, 0), r); + tempSurface.SHblitFrom(screen._backBuffer1, Common::Point(0, 0), r); // Remove drawn window with original user interface - screen._backBuffer1.blitFrom(screen._backBuffer2, + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(0, height), r); // Display the window gradually on-screen @@ -2133,7 +2134,7 @@ void ScalpelUserInterface::banishWindow(bool slideUp) { Common::copy_backward(pSrc, pSrcEnd, pDest); // Restore lines from the ui in the secondary back buffer - screen._backBuffer1.blitFrom(screen._backBuffer2, + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(0, CONTROLS_Y), Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, CONTROLS_Y + idx)); @@ -2143,14 +2144,14 @@ void ScalpelUserInterface::banishWindow(bool slideUp) { } // Restore final two old lines - screen._backBuffer1.blitFrom(screen._backBuffer2, + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(0, SHERLOCK_SCREEN_HEIGHT - 2), Common::Rect(0, SHERLOCK_SCREEN_HEIGHT - 2, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); screen.slamArea(0, SHERLOCK_SCREEN_HEIGHT - 2, SHERLOCK_SCREEN_WIDTH, 2); } else { // Restore old area to completely erase window - screen._backBuffer1.blitFrom(screen._backBuffer2, + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(0, CONTROLS_Y), Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); screen.slamRect(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, @@ -2170,7 +2171,7 @@ void ScalpelUserInterface::banishWindow(bool slideUp) { } // Show entire final area - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(0, CONTROLS_Y1), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(0, CONTROLS_Y1), Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); screen.slamRect(Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); } diff --git a/engines/sherlock/scalpel/tsage/logo.cpp b/engines/sherlock/scalpel/tsage/logo.cpp index 273d26df74..a885057f35 100644 --- a/engines/sherlock/scalpel/tsage/logo.cpp +++ b/engines/sherlock/scalpel/tsage/logo.cpp @@ -217,7 +217,7 @@ void Object::erase() { Screen &screen = *_vm->_screen; if (_visage.isLoaded() && !_oldBounds.isEmpty()) - screen.blitFrom(screen._backBuffer1, Common::Point(_oldBounds.left, _oldBounds.top), _oldBounds); + screen.SHblitFrom(screen._backBuffer1, Common::Point(_oldBounds.left, _oldBounds.top), _oldBounds); } void Object::update() { @@ -246,9 +246,9 @@ void Object::update() { _visage.getFrame(s, _frame); // Display the frame - _oldBounds = Common::Rect(_position.x, _position.y, _position.x + s.w(), _position.y + s.h()); + _oldBounds = Common::Rect(_position.x, _position.y, _position.x + s.width(), _position.y + s.height()); _oldBounds.translate(-s._centroid.x, -s._centroid.y); - screen.transBlitFrom(s, Common::Point(_oldBounds.left, _oldBounds.top)); + screen.SHtransBlitFrom(s, Common::Point(_oldBounds.left, _oldBounds.top)); } } @@ -652,7 +652,7 @@ void Logo::loadBackground() { screen.setPalette(palette); // Copy the surface to the screen - screen.blitFrom(screen._backBuffer1); + screen.SHblitFrom(screen._backBuffer1); } void Logo::fade(const byte palette[PALETTE_SIZE], int step) { diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index 6f9ef179a3..78d0cd862c 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -27,6 +27,7 @@ #include "sherlock/scalpel/scalpel_people.h" #include "sherlock/scalpel/scalpel_scene.h" #include "sherlock/scalpel/scalpel_screen.h" +#include "sherlock/scalpel/3do/scalpel_3do_screen.h" #include "sherlock/tattoo/tattoo.h" #include "sherlock/tattoo/tattoo_scene.h" #include "sherlock/tattoo/tattoo_user_interface.h" @@ -356,7 +357,7 @@ bool Scene::loadScene(const Common::String &filename) { if (IS_ROSE_TATTOO) { // Resize the screen if necessary int fullWidth = SHERLOCK_SCREEN_WIDTH + bgHeader._scrollSize; - if (screen._backBuffer1.w() != fullWidth) { + if (screen._backBuffer1.width() != fullWidth) { screen._backBuffer1.create(fullWidth, SHERLOCK_SCREEN_HEIGHT); screen._backBuffer2.create(fullWidth, SHERLOCK_SCREEN_HEIGHT); } @@ -649,7 +650,7 @@ bool Scene::loadScene(const Common::String &filename) { } // Backup the image and set the palette - screen._backBuffer2.blitFrom(screen._backBuffer1); + screen._backBuffer2.SHblitFrom(screen._backBuffer1); screen.setPalette(screen._cMap); delete rrmStream; @@ -996,12 +997,12 @@ bool Scene::loadScene(const Common::String &filename) { #if 0 // code to show the background - screen.blitFrom(screen._backBuffer1); + screen.SHblitFrom(screen._backBuffer1); _vm->_events->wait(10000); #endif // Backup the image - screen._backBuffer2.blitFrom(screen._backBuffer1); + screen._backBuffer2.SHblitFrom(screen._backBuffer1); } // Handle drawing any on-screen interface @@ -1236,7 +1237,7 @@ void Scene::transitionToScene() { // If the scene is capable of scrolling, set the current scroll so that whoever has control // of the scroll code is in the middle of the screen - if (screen._backBuffer1.w() > SHERLOCK_SCREEN_WIDTH) + if (screen._backBuffer1.width() > SHERLOCK_SCREEN_WIDTH) people[people._walkControl].centerScreenOnPerson(); for (uint objIdx = 0; objIdx < _bgShapes.size(); ++objIdx) { diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp index 74da2a80ea..d96310abb3 100644 --- a/engines/sherlock/screen.cpp +++ b/engines/sherlock/screen.cpp @@ -23,6 +23,8 @@ #include "sherlock/screen.h" #include "sherlock/sherlock.h" #include "sherlock/scalpel/scalpel_screen.h" +#include "sherlock/scalpel/3do/scalpel_3do_screen.h" +#include "sherlock/tattoo/tattoo_screen.h" #include "common/system.h" #include "common/util.h" #include "graphics/palette.h" @@ -31,17 +33,14 @@ namespace Sherlock { Screen *Screen::init(SherlockEngine *vm) { if (vm->getGameID() == GType_RoseTattoo) - return new Screen(vm); + return new Tattoo::TattooScreen(vm); else if (vm->getPlatform() == Common::kPlatform3DO) return new Scalpel::Scalpel3DOScreen(vm); else return new Scalpel::ScalpelScreen(vm); } -Screen::Screen(SherlockEngine *vm) : Surface(g_system->getWidth(), g_system->getHeight()), _vm(vm), - _backBuffer1(vm->getGameID() == GType_RoseTattoo ? 640 : 320, vm->getGameID() == GType_RoseTattoo ? 480 : 200), - _backBuffer2(vm->getGameID() == GType_RoseTattoo ? 640 : 320, vm->getGameID() == GType_RoseTattoo ? 480 : 200), - _backBuffer(&_backBuffer1) { +Screen::Screen(SherlockEngine *vm) : Graphics::Screen(), _vm(vm) { _transitionSeed = 1; _fadeStyle = false; Common::fill(&_cMap[0], &_cMap[PALETTE_SIZE], 0); @@ -55,40 +54,20 @@ Screen::Screen(SherlockEngine *vm) : Surface(g_system->getWidth(), g_system->get _fadeBytesRead = _fadeBytesToRead = 0; _oldFadePercent = 0; _flushScreen = false; -} - -Screen::~Screen() { - Fonts::free(); -} - -void Screen::update() { - // Merge the dirty rects - mergeDirtyRects(); - - // Loop through copying dirty areas to the physical screen - Common::List<Common::Rect>::iterator i; - for (i = _dirtyRects.begin(); i != _dirtyRects.end(); ++i) { - const Common::Rect &r = *i; - const byte *srcP = (const byte *)getBasePtr(r.left, r.top); - g_system->copyRectToScreen(srcP, _surface.pitch, r.left, r.top, - r.width(), r.height()); - } - // Signal the physical screen to update - g_system->updateScreen(); - _dirtyRects.clear(); + _backBuffer.create(_backBuffer1, _backBuffer1.getBounds()); } -void Screen::makeAllDirty() { - addDirtyRect(Common::Rect(0, 0, this->w(), this->h())); +Screen::~Screen() { + Fonts::freeFont(); } -void Screen::getPalette(byte palette[PALETTE_SIZE]) { - g_system->getPaletteManager()->grabPalette(palette, 0, PALETTE_COUNT); +void Screen::activateBackBuffer1() { + _backBuffer.create(_backBuffer1, _backBuffer1.getBounds()); } -void Screen::setPalette(const byte palette[PALETTE_SIZE]) { - g_system->getPaletteManager()->setPalette(palette, 0, PALETTE_COUNT); +void Screen::activateBackBuffer2() { + _backBuffer.create(_backBuffer2, _backBuffer2.getBounds()); } int Screen::equalizePalette(const byte palette[PALETTE_SIZE]) { @@ -124,7 +103,7 @@ void Screen::fadeToBlack(int speed) { } setPalette(tempPalette); - fillRect(Common::Rect(0, 0, _surface.w, _surface.h), 0); + fillRect(Common::Rect(0, 0, this->w, this->h), 0); } void Screen::fadeIn(const byte palette[PALETTE_SIZE], int speed) { @@ -136,59 +115,23 @@ void Screen::fadeIn(const byte palette[PALETTE_SIZE], int speed) { setPalette(palette); } -void Screen::addDirtyRect(const Common::Rect &r) { - _dirtyRects.push_back(r); - assert(r.width() > 0 && r.height() > 0); -} - -void Screen::mergeDirtyRects() { - Common::List<Common::Rect>::iterator rOuter, rInner; - - // Process the dirty rect list to find any rects to merge - for (rOuter = _dirtyRects.begin(); rOuter != _dirtyRects.end(); ++rOuter) { - rInner = rOuter; - while (++rInner != _dirtyRects.end()) { - - if ((*rOuter).intersects(*rInner)) { - // these two rectangles overlap or - // are next to each other - merge them - - unionRectangle(*rOuter, *rOuter, *rInner); - - // remove the inner rect from the list - _dirtyRects.erase(rInner); - - // move back to beginning of list - rInner = rOuter; - } - } - } -} - -bool Screen::unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2) { - destRect = src1; - destRect.extend(src2); - - return !destRect.isEmpty(); -} - void Screen::randomTransition() { Events &events = *_vm->_events; const int TRANSITION_MULTIPLIER = 0x15a4e35; - _dirtyRects.clear(); + clearDirtyRects(); assert(IS_SERRATED_SCALPEL); for (int idx = 0; idx <= 65535 && !_vm->shouldQuit(); ++idx) { _transitionSeed = _transitionSeed * TRANSITION_MULTIPLIER + 1; int offset = _transitionSeed & 0xFFFF; - if (offset < (this->w() * this->h())) - *((byte *)getPixels() + offset) = *((const byte *)_backBuffer->getPixels() + offset); + if (offset < (this->width() * this->height())) + *((byte *)getPixels() + offset) = *((const byte *)_backBuffer.getPixels() + offset); if (idx != 0 && (idx % 300) == 0) { // Ensure there's a full screen dirty rect for the next frame update - if (_dirtyRects.empty()) - addDirtyRect(Common::Rect(0, 0, _surface.w, _surface.h)); + if (!isDirty()) + addDirtyRect(Common::Rect(0, 0, this->w, this->h)); events.pollEvents(); events.delay(1); @@ -196,7 +139,7 @@ void Screen::randomTransition() { } // Make sure everything has been transferred - blitFrom(*_backBuffer); + SHblitFrom(_backBuffer); } void Screen::verticalTransition() { @@ -205,13 +148,13 @@ void Screen::verticalTransition() { byte table[640]; Common::fill(&table[0], &table[640], 0); - for (int yp = 0; yp < this->h(); ++yp) { - for (int xp = 0; xp < this->w(); ++xp) { - int temp = (table[xp] >= (this->h() - 3)) ? this->h() - table[xp] : + for (int yp = 0; yp < this->height(); ++yp) { + for (int xp = 0; xp < this->width(); ++xp) { + int temp = (table[xp] >= (this->height() - 3)) ? this->height() - table[xp] : _vm->getRandomNumber(3) + 1; if (temp) { - blitFrom(_backBuffer1, Common::Point(xp, table[xp]), + SHblitFrom(_backBuffer1, Common::Point(xp, table[xp]), Common::Rect(xp, table[xp], xp + 1, table[xp] + temp)); table[xp] += temp; } @@ -223,7 +166,7 @@ void Screen::verticalTransition() { void Screen::restoreBackground(const Common::Rect &r) { if (r.width() > 0 && r.height() > 0) - _backBuffer->blitFrom(_backBuffer2, Common::Point(r.left, r.top), r); + _backBuffer.SHblitFrom(_backBuffer2, Common::Point(r.left, r.top), r); } void Screen::slamArea(int16 xp, int16 yp, int16 width, int16 height) { @@ -254,11 +197,10 @@ void Screen::slamRect(const Common::Rect &r) { } if (srcRect.isValidRect()) - blitFrom(*_backBuffer, Common::Point(destRect.left, destRect.top), srcRect); + SHblitFrom(_backBuffer, Common::Point(destRect.left, destRect.top), srcRect); } } - void Screen::flushImage(ImageFrame *frame, const Common::Point &pt, int16 *xp, int16 *yp, int16 *width, int16 *height) { Common::Point imgPos = pt + frame->_offset; @@ -335,7 +277,7 @@ void Screen::blockMove(const Common::Rect &r) { } void Screen::blockMove() { - blockMove(Common::Rect(0, 0, w(), h())); + blockMove(Common::Rect(0, 0, width(), height())); } void Screen::print(const Common::Point &pt, uint color, const char *formatStr, ...) { @@ -351,13 +293,13 @@ void Screen::print(const Common::Point &pt, uint color, const char *formatStr, . pos.y--; // Font is always drawing one line higher if (!pos.x) // Center text horizontally - pos.x = (this->w() - width) / 2; + pos.x = (this->width() - width) / 2; Common::Rect textBounds(pos.x, pos.y, pos.x + width, pos.y + _fontHeight); - if (textBounds.right > this->w()) - textBounds.moveTo(this->w() - width, textBounds.top); - if (textBounds.bottom > this->h()) - textBounds.moveTo(textBounds.left, this->h() - _fontHeight); + if (textBounds.right > this->width()) + textBounds.moveTo(this->width() - width, textBounds.top); + if (textBounds.bottom > this->height()) + textBounds.moveTo(textBounds.left, this->height() - _fontHeight); // Write out the string at the given position writeString(str, Common::Point(textBounds.left, textBounds.top), color); @@ -378,27 +320,26 @@ void Screen::gPrint(const Common::Point &pt, uint color, const char *formatStr, } void Screen::writeString(const Common::String &str, const Common::Point &pt, uint overrideColor) { - Fonts::writeString(_backBuffer, str, pt, overrideColor); + Fonts::writeString(&_backBuffer, str, pt, overrideColor); } void Screen::vgaBar(const Common::Rect &r, int color) { - _backBuffer->fillRect(r, color); + _backBuffer.fillRect(r, color); slamRect(r); } void Screen::setDisplayBounds(const Common::Rect &r) { - _sceneSurface.setPixels(_backBuffer1.getBasePtr(r.left, r.top), r.width(), r.height(), _backBuffer1.getPixelFormat()); - - _backBuffer = &_sceneSurface; + _backBuffer.create(_backBuffer1, r); + assert(_backBuffer.width() == r.width()); + assert(_backBuffer.height() == r.height()); } void Screen::resetDisplayBounds() { - _backBuffer = &_backBuffer1; + _backBuffer.create(_backBuffer1, _backBuffer1.getBounds()); } Common::Rect Screen::getDisplayBounds() { - return (_backBuffer == &_sceneSurface) ? Common::Rect(0, 0, _sceneSurface.w(), _sceneSurface.h()) : - Common::Rect(0, 0, this->w(), this->h()); + return _backBuffer.getBounds(); } void Screen::synchronize(Serializer &s) { diff --git a/engines/sherlock/screen.h b/engines/sherlock/screen.h index 04a0c1e505..f05a4f0a90 100644 --- a/engines/sherlock/screen.h +++ b/engines/sherlock/screen.h @@ -25,55 +25,33 @@ #include "common/list.h" #include "common/rect.h" +#include "graphics/screen.h" +#include "sherlock/image_file.h" #include "sherlock/surface.h" #include "sherlock/resources.h" #include "sherlock/saveload.h" namespace Sherlock { -#define PALETTE_SIZE 768 -#define PALETTE_COUNT 256 #define VGA_COLOR_TRANS(x) ((x) * 255 / 63) #define BG_GREYSCALE_RANGE_END 229 #define BLACK 0 class SherlockEngine; -class Screen : public Surface { +class Screen : virtual public Graphics::Screen, virtual public Surface { private: - Common::List<Common::Rect> _dirtyRects; uint32 _transitionSeed; - Surface _sceneSurface; // Rose Tattoo fields int _fadeBytesRead, _fadeBytesToRead; int _oldFadePercent; -private: - /** - * Merges together overlapping dirty areas of the screen - */ - void mergeDirtyRects(); - - /** - * Returns the union of two dirty area rectangles - */ - bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2); protected: SherlockEngine *_vm; + Surface _backBuffer; - /** - * Clear the current dirty rects list - */ - void clearDirtyRects() { _dirtyRects.clear(); } - - /** - * Adds a rectangle to the list of modified areas of the screen during the - * current frame - */ - virtual void addDirtyRect(const Common::Rect &r); public: Surface _backBuffer1, _backBuffer2; - Surface *_backBuffer; bool _fadeStyle; byte _cMap[PALETTE_SIZE]; byte _sMap[PALETTE_SIZE]; @@ -86,24 +64,19 @@ public: virtual ~Screen(); /** - * Handles updating any dirty areas of the screen Surface object to the physical screen - */ - void update(); - - /** - * Makes the whole screen dirty + * Obtain the currently active back buffer. */ - void makeAllDirty(); + Surface *getBackBuffer() { return &_backBuffer; } /** - * Return the currently active palette + * Makes first back buffer active. */ - void getPalette(byte palette[PALETTE_SIZE]); + void activateBackBuffer1(); /** - * Set the palette + * Makes second back buffer active. */ - void setPalette(const byte palette[PALETTE_SIZE]); + void activateBackBuffer2(); /** * Fades from the currently active palette to the passed palette diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index b85321c385..d3b2d0cac8 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -63,9 +63,9 @@ enum GameType { GType_RoseTattoo = 1 }; -#define SHERLOCK_SCREEN_WIDTH _vm->_screen->w() -#define SHERLOCK_SCREEN_HEIGHT _vm->_screen->h() -#define SHERLOCK_SCENE_WIDTH _vm->_screen->_backBuffer1.w() +#define SHERLOCK_SCREEN_WIDTH _vm->_screen->width() +#define SHERLOCK_SCREEN_HEIGHT _vm->_screen->height() +#define SHERLOCK_SCENE_WIDTH _vm->_screen->_backBuffer1.width() #define SHERLOCK_SCENE_HEIGHT (IS_SERRATED_SCALPEL ? 138 : 480) #define SCENES_COUNT (IS_SERRATED_SCALPEL ? 63 : 101) #define MAX_BGSHAPES (IS_SERRATED_SCALPEL ? 64 : 150) diff --git a/engines/sherlock/sound.h b/engines/sherlock/sound.h index 0a0ff83d1f..a82aaf6730 100644 --- a/engines/sherlock/sound.h +++ b/engines/sherlock/sound.h @@ -25,11 +25,8 @@ #include "common/scummsys.h" #include "common/str.h" -#include "audio/audiostream.h" #include "audio/mixer.h" #include "access/files.h" -#include "audio/midiplayer.h" -#include "audio/midiparser.h" namespace Sherlock { diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp index b7fc76325c..47b7d4a780 100644 --- a/engines/sherlock/surface.cpp +++ b/engines/sherlock/surface.cpp @@ -21,245 +21,16 @@ */ #include "sherlock/surface.h" -#include "sherlock/sherlock.h" -#include "sherlock/resources.h" -#include "common/system.h" -#include "graphics/palette.h" +#include "sherlock/fonts.h" namespace Sherlock { -Surface::Surface(uint16 width, uint16 height) : Fonts(), _freePixels(true) { - create(width, height); -} - -Surface::Surface() : Fonts(), _freePixels(false) { -} - -Surface::~Surface() { - if (_freePixels) - _surface.free(); -} - -void Surface::create(uint16 width, uint16 height) { - if (_freePixels) - _surface.free(); - - if (_vm->getPlatform() == Common::kPlatform3DO) { - _surface.create(width, height, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0)); - } else { - _surface.create(width, height, Graphics::PixelFormat::createFormatCLUT8()); - } - _freePixels = true; -} - -Graphics::PixelFormat Surface::getPixelFormat() { - return _surface.format; -} - -void Surface::blitFrom(const Surface &src) { - blitFrom(src, Common::Point(0, 0)); -} - -void Surface::blitFrom(const ImageFrame &src) { - blitFrom(src._frame, Common::Point(0, 0)); -} - -void Surface::blitFrom(const Graphics::Surface &src) { - blitFrom(src, Common::Point(0, 0)); -} - -void Surface::blitFrom(const Surface &src, const Common::Point &pt) { - blitFrom(src, pt, Common::Rect(0, 0, src._surface.w, src._surface.h)); -} - -void Surface::blitFrom(const ImageFrame &src, const Common::Point &pt) { - blitFrom(src._frame, pt, Common::Rect(0, 0, src._frame.w, src._frame.h)); -} - -void Surface::blitFrom(const Graphics::Surface &src, const Common::Point &pt) { - blitFrom(src, pt, Common::Rect(0, 0, src.w, src.h)); -} - -void Surface::blitFrom(const Graphics::Surface &src, const Common::Point &pt, const Common::Rect &srcBounds) { - Common::Rect srcRect = srcBounds; - Common::Rect destRect(pt.x, pt.y, pt.x + srcRect.width(), pt.y + srcRect.height()); - - if (srcRect.isValidRect() && clip(srcRect, destRect)) { - // Surface is at least partially or completely on-screen - addDirtyRect(destRect); - _surface.copyRectToSurface(src, destRect.left, destRect.top, srcRect); - } -} - -void Surface::blitFrom(const ImageFrame &src, const Common::Point &pt, const Common::Rect &srcBounds) { - blitFrom(src._frame, pt, srcBounds); -} - -void Surface::blitFrom(const Surface &src, const Common::Point &pt, const Common::Rect &srcBounds) { - blitFrom(src._surface, pt, srcBounds); -} - -void Surface::transBlitFrom(const ImageFrame &src, const Common::Point &pt, - bool flipped, int overrideColor, int scaleVal) { - Common::Point drawPt(pt.x + src.sDrawXOffset(scaleVal), pt.y + src.sDrawYOffset(scaleVal)); - transBlitFrom(src._frame, drawPt, flipped, overrideColor, scaleVal); -} - -void Surface::transBlitFrom(const Surface &src, const Common::Point &pt, - bool flipped, int overrideColor, int scaleVal) { - const Graphics::Surface &s = src._surface; - transBlitFrom(s, pt, flipped, overrideColor, scaleVal); -} - -void Surface::transBlitFrom(const Graphics::Surface &src, const Common::Point &pt, - bool flipped, int overrideColor, int scaleVal) { - if (scaleVal == SCALE_THRESHOLD) { - transBlitFromUnscaled(src, pt, flipped, overrideColor); - return; - } - - int destWidth = src.w * SCALE_THRESHOLD / scaleVal; - int destHeight = src.h * SCALE_THRESHOLD / scaleVal; - - // Loop through drawing output lines - for (int destY = pt.y, scaleYCtr = 0; destY < (pt.y + destHeight); ++destY, scaleYCtr += scaleVal) { - if (destY < 0 || destY >= this->h()) - continue; - const byte *srcLine = (const byte *)src.getBasePtr(0, scaleYCtr / SCALE_THRESHOLD); - byte *destLine = (byte *)getBasePtr(pt.x, destY); - - // Loop through drawing individual rows - for (int xCtr = 0, scaleXCtr = 0; xCtr < destWidth; ++xCtr, scaleXCtr += scaleVal) { - int destX = pt.x + xCtr; - if (destX < 0 || destX >= this->w()) - continue; - - byte srcVal = srcLine[flipped ? src.w - scaleXCtr / SCALE_THRESHOLD - 1 : scaleXCtr / SCALE_THRESHOLD]; - if (srcVal != TRANSPARENCY) - destLine[xCtr] = srcVal; - } - } - - // Mark the affected area - addDirtyRect(Common::Rect(pt.x, pt.y, pt.x + destWidth, pt.y + destHeight)); -} - -void Surface::transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, - bool flipped, int overrideColor) { - Common::Rect drawRect(0, 0, src.w, src.h); - Common::Rect destRect(pt.x, pt.y, pt.x + src.w, pt.y + src.h); - - // Clip the display area to on-screen - if (!clip(drawRect, destRect)) - // It's completely off-screen - return; - - if (flipped) - drawRect = Common::Rect(src.w - drawRect.right, drawRect.top, - src.w - drawRect.left, drawRect.bottom); - - Common::Point destPt(destRect.left, destRect.top); - addDirtyRect(Common::Rect(destPt.x, destPt.y, destPt.x + drawRect.width(), - destPt.y + drawRect.height())); - - switch (src.format.bytesPerPixel) { - case 1: - // 8-bit palettized: Draw loop - assert(_surface.format.bytesPerPixel == 1); // Security check - for (int yp = 0; yp < drawRect.height(); ++yp) { - const byte *srcP = (const byte *)src.getBasePtr( - flipped ? drawRect.right - 1 : drawRect.left, drawRect.top + yp); - byte *destP = (byte *)getBasePtr(destPt.x, destPt.y + yp); - - for (int xp = 0; xp < drawRect.width(); ++xp, ++destP) { - if (*srcP != TRANSPARENCY) - *destP = overrideColor ? overrideColor : *srcP; - - srcP = flipped ? srcP - 1 : srcP + 1; - } - } - break; - case 2: - // 3DO 15-bit RGB565: Draw loop - assert(_surface.format.bytesPerPixel == 2); // Security check - for (int yp = 0; yp < drawRect.height(); ++yp) { - const uint16 *srcP = (const uint16 *)src.getBasePtr( - flipped ? drawRect.right - 1 : drawRect.left, drawRect.top + yp); - uint16 *destP = (uint16 *)getBasePtr(destPt.x, destPt.y + yp); - - for (int xp = 0; xp < drawRect.width(); ++xp, ++destP) { - if (*srcP) // RGB 0, 0, 0 -> transparent on 3DO - *destP = *srcP; // overrideColor ? overrideColor : *srcP; - - srcP = flipped ? srcP - 1 : srcP + 1; - } - } - break; - default: - error("Surface: unsupported bytesperpixel"); - break; - } -} - -void Surface::fillRect(int x1, int y1, int x2, int y2, uint color) { - fillRect(Common::Rect(x1, y1, x2, y2), color); -} - -void Surface::fillRect(const Common::Rect &r, uint color) { - _surface.fillRect(r, color); - addDirtyRect(r); -} - -void Surface::fill(uint color) { - fillRect(Common::Rect(_surface.w, _surface.h), color); +Surface::Surface() : Graphics::ManagedSurface(), Fonts() { } -bool Surface::clip(Common::Rect &srcBounds, Common::Rect &destBounds) { - if (destBounds.left >= w() || destBounds.top >= h() || - destBounds.right <= 0 || destBounds.bottom <= 0) - return false; - - // Clip the bounds if necessary to fit on-screen - if (destBounds.right > w()) { - srcBounds.right -= destBounds.right - w(); - destBounds.right = w(); - } - - if (destBounds.bottom > h()) { - srcBounds.bottom -= destBounds.bottom - h(); - destBounds.bottom = h(); - } - - if (destBounds.top < 0) { - srcBounds.top += -destBounds.top; - destBounds.top = 0; - } - - if (destBounds.left < 0) { - srcBounds.left += -destBounds.left; - destBounds.left = 0; - } - - return true; -} - -void Surface::clear() { - fillRect(Common::Rect(0, 0, w(), h()), 0); -} - -void Surface::free() { - if (_freePixels) { - _surface.free(); - _freePixels = false; - } -} - -void Surface::setPixels(byte *pixels, int width, int height, Graphics::PixelFormat pixelFormat) { - _surface.format = pixelFormat; - _surface.w = width; - _surface.h = height; - _surface.pitch = width * pixelFormat.bytesPerPixel; - _surface.setPixels(pixels); +Surface::Surface(int width, int height) : Graphics::ManagedSurface(width, height), + Fonts() { + create(width, height); } void Surface::writeString(const Common::String &str, const Common::Point &pt, uint overrideColor) { @@ -278,4 +49,21 @@ void Surface::writeFancyString(const Common::String &str, const Common::Point &p writeString(str, Common::Point(pt.x + 1, pt.y + 1), overrideColor2); } +void Surface::SHtransBlitFrom(const ImageFrame &src, const Common::Point &pt, + bool flipped, int overrideColor, int scaleVal) { + Common::Point drawPt(pt.x + src.sDrawXOffset(scaleVal), pt.y + src.sDrawYOffset(scaleVal)); + SHtransBlitFrom(src._frame, drawPt, flipped, overrideColor, scaleVal); +} + +void Surface::SHtransBlitFrom(const Graphics::Surface &src, const Common::Point &pt, + bool flipped, int overrideColor, int scaleVal) { + Common::Rect srcRect(0, 0, src.w, src.h); + Common::Rect destRect(pt.x, pt.y, pt.x + src.w * SCALE_THRESHOLD / scaleVal, + pt.y + src.h * SCALE_THRESHOLD / scaleVal); + + Graphics::ManagedSurface::transBlitFrom(src, srcRect, destRect, TRANSPARENCY, + flipped, overrideColor); +} + + } // End of namespace Sherlock diff --git a/engines/sherlock/surface.h b/engines/sherlock/surface.h index 378c9be9cd..7f946b467f 100644 --- a/engines/sherlock/surface.h +++ b/engines/sherlock/surface.h @@ -20,165 +20,96 @@ * */ -#ifndef SHERLOCK_GRAPHICS_H -#define SHERLOCK_GRAPHICS_H +#ifndef SHERLOCK_SURFACE_H +#define SHERLOCK_SURFACE_H #include "common/rect.h" #include "common/platform.h" -#include "graphics/surface.h" +#include "graphics/managed_surface.h" #include "sherlock/fonts.h" +#include "sherlock/image_file.h" namespace Sherlock { #define SCALE_THRESHOLD 0x100 #define TRANSPARENCY 255 -struct ImageFrame; - -class Surface: public Fonts { -private: - bool _freePixels; - - /** - * Copy a surface into this one - */ - void blitFrom(const Graphics::Surface &src); -protected: - Graphics::Surface _surface; - - /** - * Clips the given source bounds so the passed destBounds will be entirely on-screen - */ - bool clip(Common::Rect &srcBounds, Common::Rect &destBounds); - - /** - * Base method stub for signalling dirty rect areas - */ - virtual void addDirtyRect(const Common::Rect &r) {} - - /** - * Draws a sub-section of a surface at a given position within this surface - */ - virtual void blitFrom(const Graphics::Surface &src, const Common::Point &pt, const Common::Rect &srcBounds); - - /** - * Draws a surface at a given position within this surface with transparency - */ - virtual void transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, bool flipped, - int overrideColor); +/** + * Implements a descendent surface that combines both a managed surface and the font + * drawing code. It also introduces a series of drawing method stubs that the 3DO + * Serrated Scalpel screen overrides to implement sprite doubling + */ +class Surface: virtual public Graphics::ManagedSurface, public Fonts { public: - Surface(uint16 width, uint16 height); - Surface(); - virtual ~Surface(); - /** - * Sets up an internal surface with the specified dimensions that will be automatically freed - * when the surface object is destroyed + * Constructor */ - void create(uint16 width, uint16 height); - - Graphics::PixelFormat getPixelFormat(); - + Surface(); + /** - * Copy a surface into this one + * Constructor */ - void blitFrom(const Surface &src); + Surface(int width, int height); /** - * Copy an image frame into this surface + * Draws a surface on this surface */ - void blitFrom(const ImageFrame &src); + virtual void SHblitFrom(const Graphics::Surface &src) { + Graphics::ManagedSurface::blitFrom(src); + } /** * Draws a surface at a given position within this surface */ - void blitFrom(const Surface &src, const Common::Point &pt); - - /** - * Copy an image frame onto this surface at a given position - */ - void blitFrom(const ImageFrame &src, const Common::Point &pt); + virtual void SHblitFrom(const Graphics::Surface &src, const Common::Point &destPos) { + Graphics::ManagedSurface::blitFrom(src, destPos); + } /** * Draws a sub-section of a surface at a given position within this surface */ - void blitFrom(const Surface &src, const Common::Point &pt, const Common::Rect &srcBounds); - - /** - * Copy a sub-area of a source image frame into this surface at a given position - */ - void blitFrom(const ImageFrame &src, const Common::Point &pt, const Common::Rect &srcBounds); - - /** - * Draws a surface at a given position within this surface - */ - void blitFrom(const Graphics::Surface &src, const Common::Point &pt); + virtual void SHblitFrom(const Graphics::Surface &src, const Common::Point &destPos, const Common::Rect &srcBounds) { + Graphics::ManagedSurface::blitFrom(src, srcBounds, destPos); + } /** * Draws an image frame at a given position within this surface with transparency */ - void transBlitFrom(const ImageFrame &src, const Common::Point &pt, - bool flipped = false, int overrideColor = 0, int scaleVal = 256); - - /** - * Draws a surface at a given position within this surface with transparency - */ - void transBlitFrom(const Surface &src, const Common::Point &pt, - bool flipped = false, int overrideColor = 0, int scaleVal = 256); + void SHtransBlitFrom(const ImageFrame &src, const Common::Point &pt, + bool flipped = false, int overrideColor = 0, int scaleVal = SCALE_THRESHOLD); /** - * Draws a surface at a given position within this surface with transparency + * Draws an image frame at a given position within this surface with transparency */ - void transBlitFrom(const Graphics::Surface &src, const Common::Point &pt, - bool flipped = false, int overrideColor = 0, int scaleVal = 256); + void SHtransBlitFrom(const Graphics::Surface &src, const Common::Point &pt, + bool flipped = false, int overrideColor = 0, int scaleVal = SCALE_THRESHOLD); /** * Fill a given area of the surface with a given color */ - void fillRect(int x1, int y1, int x2, int y2, uint color); - - /** - * Fill a given area of the surface with a given color - */ - virtual void fillRect(const Common::Rect &r, uint color); - - void fill(uint color); + virtual void SHfillRect(const Common::Rect &r, uint color) { + Graphics::ManagedSurface::fillRect(r, color); + } /** - * Clear the surface + * Return the width of the surface */ - void clear(); - - /** - * Free the underlying surface - */ - void free(); - + virtual uint16 width() const { return this->w; } + /** - * Returns true if the surface is empty + * Return the height of the surface */ - bool empty() const { return _surface.getPixels() == nullptr; } + virtual uint16 height() const { return this->h; } /** - * Set the pixels for the surface to an existing data block + * Draws the given string into the back buffer using the images stored in _font */ - void setPixels(byte *pixels, int width, int height, Graphics::PixelFormat format); - + void writeString(const Common::String &str, const Common::Point &pt, uint overrideColor); + /** - * Draws the given string into the back buffer using the images stored in _font + * Draws a fancy version of the given string at the given position */ - virtual void writeString(const Common::String &str, const Common::Point &pt, uint overrideColor); void writeFancyString(const Common::String &str, const Common::Point &pt, uint overrideColor1, uint overrideColor2); - - inline virtual uint16 w() const { return _surface.w; } - inline virtual uint16 h() const { return _surface.h; } - inline const byte *getPixels() const { return (const byte *)_surface.getPixels(); } - inline byte *getPixels() { return (byte *)_surface.getPixels(); } - inline byte *getBasePtr(int x, int y) { return (byte *)_surface.getBasePtr(x, y); } - inline const byte *getBasePtr(int x, int y) const { return (const byte *)_surface.getBasePtr(x, y); } - inline Graphics::Surface &getRawSurface() { return _surface; } - inline void hLine(int x, int y, int x2, uint color) { _surface.hLine(x, y, x2, color); } - inline void vLine(int x, int y, int y2, uint color) { _surface.vLine(x, y, y2, color); } }; } // End of namespace Sherlock diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index b543472513..3c6bf44837 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -28,9 +28,11 @@ #include "sherlock/scalpel/scalpel_talk.h" #include "sherlock/scalpel/scalpel_user_interface.h" #include "sherlock/tattoo/tattoo.h" +#include "sherlock/tattoo/tattoo_fixed_text.h" #include "sherlock/tattoo/tattoo_people.h" #include "sherlock/tattoo/tattoo_scene.h" #include "sherlock/tattoo/tattoo_talk.h" +#include "sherlock/tattoo/tattoo_user_interface.h" namespace Sherlock { @@ -306,8 +308,14 @@ void Talk::talkTo(const Common::String filename) { if (_scriptMoreFlag && _scriptSelect != 100) select = _scriptSelect; - if (select == -1) + if (select == -1) { + if (IS_ROSE_TATTOO) { + static_cast<Tattoo::TattooUserInterface *>(&ui)->putMessage( + "%s", _vm->_fixedText->getText(Tattoo::kFixedText_NoEffect)); + return; + } error("Couldn't find statement to display"); + } // Add the statement into the journal and talk history if (_talkTo != -1 && !_talkHistory[_converseNum][select]) diff --git a/engines/sherlock/tattoo/tattoo_darts.cpp b/engines/sherlock/tattoo/tattoo_darts.cpp index 0a815af39e..cbc3ea1fe8 100644 --- a/engines/sherlock/tattoo/tattoo_darts.cpp +++ b/engines/sherlock/tattoo/tattoo_darts.cpp @@ -163,7 +163,7 @@ void Darts::playDarts(GameType gameType) { // Show scores showStatus(playerNum); - screen._backBuffer2.blitFrom(screen._backBuffer1, Common::Point(_dartInfo.left, _dartInfo.top - 1), + screen._backBuffer2.SHblitFrom(screen._backBuffer1, Common::Point(_dartInfo.left, _dartInfo.top - 1), Common::Rect(_dartInfo.left, _dartInfo.top - 1, _dartInfo.right, _dartInfo.bottom - 1)); screen.print(Common::Point(_dartInfo.left, _dartInfo.top), 0, FIXED(DartsCurrentDart), idx + 1); @@ -267,10 +267,11 @@ void Darts::playDarts(GameType gameType) { } else { events.wait(40); } + // Clears the status part of the board - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(_dartInfo.left, _dartInfo.top - 1), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(_dartInfo.left, _dartInfo.top - 1), Common::Rect(_dartInfo.left, _dartInfo.top - 1, _dartInfo.right, _dartInfo.bottom - 1)); - screen.blitFrom(screen._backBuffer1); + screen.SHblitFrom(screen._backBuffer1); } playerNum ^= 1; @@ -278,9 +279,9 @@ void Darts::playDarts(GameType gameType) { ++_roundNum; if (!done) { - screen._backBuffer2.blitFrom((*_dartBoard)[0], Common::Point(0, 0)); - screen._backBuffer1.blitFrom(screen._backBuffer2); - screen.blitFrom(screen._backBuffer2); + screen._backBuffer2.SHblitFrom((*_dartBoard)[0], Common::Point(0, 0)); + screen._backBuffer1.SHblitFrom(screen._backBuffer2); + screen.SHblitFrom(screen._backBuffer2); } } @@ -367,9 +368,9 @@ void Darts::loadDarts() { delete stream; // Load the initial background - screen._backBuffer1.blitFrom((*_dartBoard)[0], Common::Point(0, 0)); - screen._backBuffer2.blitFrom(screen._backBuffer1); - screen.blitFrom(screen._backBuffer1); + screen._backBuffer1.SHblitFrom((*_dartBoard)[0], Common::Point(0, 0)); + screen._backBuffer2.SHblitFrom(screen._backBuffer1); + screen.SHblitFrom(screen._backBuffer1); } void Darts::closeDarts() { @@ -399,14 +400,14 @@ void Darts::showNames(int playerNum) { screen.fillRect(Common::Rect(STATUS2_INFO_X, STATUS_INFO_Y + _spacing + 1, STATUS2_INFO_X + 50, STATUS_INFO_Y + _spacing + 3), color); - screen._backBuffer2.blitFrom(screen._backBuffer1); + screen._backBuffer2.SHblitFrom(screen._backBuffer1); } void Darts::showStatus(int playerNum) { Screen &screen = *_vm->_screen; const char *const CRICKET_SCORE_NAME[7] = { "20", "19", "18", "17", "16", "15", FIXED(DartsBull) }; - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(STATUS_INFO_X, STATUS_INFO_Y + 10), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(STATUS_INFO_X, STATUS_INFO_Y + 10), Common::Rect(STATUS_INFO_X, STATUS_INFO_Y + 10, STATUS_INFO_X + STATUS_INFO_WIDTH, STATUS_INFO_Y + STATUS_INFO_HEIGHT - 10)); screen.print(Common::Point(STATUS_INFO_X + 30, STATUS_INFO_Y + _spacing + 4), 0, "%d", _score1); @@ -447,7 +448,7 @@ void Darts::showStatus(int playerNum) { } } - screen.blitFrom(screen._backBuffer1, Common::Point(STATUS_INFO_X, STATUS_INFO_Y + 10), + screen.SHblitFrom(screen._backBuffer1, Common::Point(STATUS_INFO_X, STATUS_INFO_Y + 10), Common::Rect(STATUS_INFO_X, STATUS_INFO_Y + 10, STATUS_INFO_X + STATUS_INFO_WIDTH, STATUS_INFO_Y + STATUS_INFO_HEIGHT - 10)); } @@ -457,7 +458,7 @@ void Darts::erasePowerBars() { // Erase the old power bars and replace them with empty ones screen._backBuffer1.fillRect(Common::Rect(DART_BAR_VX, DART_HEIGHT_Y, DART_BAR_VX + 9, DART_HEIGHT_Y + DART_BAR_SIZE), 0); - screen._backBuffer1.transBlitFrom((*_dartGraphics)[0], Common::Point(DART_BAR_VX - 1, DART_HEIGHT_Y - 1)); + screen._backBuffer1.SHtransBlitFrom((*_dartGraphics)[0], Common::Point(DART_BAR_VX - 1, DART_HEIGHT_Y - 1)); screen.slamArea(DART_BAR_VX - 1, DART_HEIGHT_Y - 1, 10, DART_BAR_SIZE + 2); } @@ -497,7 +498,7 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, int or } screen._backBuffer1.hLine(pt.x, pt.y + DART_BAR_SIZE- 1 - idx, pt.x + 8, color); - screen._backBuffer1.transBlitFrom((*_dartGraphics)[0], Common::Point(pt.x - 1, pt.y - 1)); + screen._backBuffer1.SHtransBlitFrom((*_dartGraphics)[0], Common::Point(pt.x - 1, pt.y - 1)); screen.slamArea(pt.x, pt.y + DART_BAR_SIZE - 1 - idx, 8, 2); if (!(idx % 8)) @@ -544,7 +545,7 @@ int Darts::drawHand(int goToPower, int computer) { break; } - screen._backBuffer1.transBlitFrom((*hands)[0], pt); + screen._backBuffer1.SHtransBlitFrom((*hands)[0], pt); screen.slamArea(pt.x - 1, pt.y, _handSize.x + 1, _handSize.y); screen.restoreBackground(Common::Rect(pt.x, pt.y, pt.x + _handSize.x, pt.y + _handSize.y)); @@ -631,7 +632,7 @@ void Darts::drawDartThrow(const Common::Point &dartPos, int computer) { _handSize.y = hands[idx]._offset.y + hands[idx]._height; int handCy = SHERLOCK_SCREEN_HEIGHT - _handSize.y; - screen._backBuffer1.transBlitFrom(hands[idx], Common::Point(_handX, handCy)); + screen._backBuffer1.SHtransBlitFrom(hands[idx], Common::Point(_handX, handCy)); screen.slamArea(_handX, handCy, _handSize.x + 1, _handSize.y); screen.slamArea(handOCx, handOCy, handOldxSize, handOldySize); screen.restoreBackground(Common::Rect(_handX, handCy, _handX + _handSize.x, handCy + _handSize.y)); @@ -653,7 +654,7 @@ void Darts::drawDartThrow(const Common::Point &dartPos, int computer) { ocy = drawPos.y = cy - (*_dartGraphics)[dartNum]._height; // Draw dart - screen._backBuffer1.transBlitFrom((*_dartGraphics)[dartNum], drawPos); + screen._backBuffer1.SHtransBlitFrom((*_dartGraphics)[dartNum], drawPos); if (drawPos.x < 0) { xSize += drawPos.x; @@ -675,7 +676,7 @@ void Darts::drawDartThrow(const Common::Point &dartPos, int computer) { // Flush the erased dart area screen.slamArea(oldDrawPos.x, oldDrawPos.y, oldxSize, oldySize); - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(drawPos.x, drawPos.y), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(drawPos.x, drawPos.y), Common::Rect(drawPos.x, drawPos.y, drawPos.x + xSize, drawPos.y + ySize)); oldDrawPos.x = drawPos.x; @@ -696,7 +697,7 @@ void Darts::drawDartThrow(const Common::Point &dartPos, int computer) { if (oldDrawPos.x != -1) screen.slamArea(oldDrawPos.x, oldDrawPos.y, oldxSize, oldySize); - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(drawPos.x, drawPos.y), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(drawPos.x, drawPos.y), Common::Rect(drawPos.x, drawPos.y, drawPos.x + xSize, drawPos.y + ySize)); cx = dartPos.x; @@ -722,7 +723,7 @@ void Darts::drawDartThrow(const Common::Point &dartPos, int computer) { ocx = drawPos.x = cx - (*_dartGraphics)[dartNum]._width / 2; ocy = drawPos.y = cy - (*_dartGraphics)[dartNum]._height; - screen._backBuffer1.transBlitFrom((*_dartGraphics)[dartNum], Common::Point(drawPos.x, drawPos.y)); + screen._backBuffer1.SHtransBlitFrom((*_dartGraphics)[dartNum], Common::Point(drawPos.x, drawPos.y)); if (drawPos.x < 0) { xSize += drawPos.x; @@ -744,7 +745,7 @@ void Darts::drawDartThrow(const Common::Point &dartPos, int computer) { screen.slamArea(oldDrawPos.x, oldDrawPos.y, oldxSize, oldySize); if (idx != 23) - screen._backBuffer1.blitFrom(screen._backBuffer2, drawPos, + screen._backBuffer1.SHblitFrom(screen._backBuffer2, drawPos, Common::Rect(drawPos.x, drawPos.y, drawPos.x + xSize, drawPos.y + ySize)); // erase dart events.wait(1); @@ -761,8 +762,8 @@ void Darts::drawDartThrow(const Common::Point &dartPos, int computer) { ySize = (*_dartGraphics)[dartNum]._height; // Draw final dart on the board - screen._backBuffer1.transBlitFrom((*_dartGraphics)[dartNum], Common::Point(ocx, ocy)); - screen._backBuffer2.transBlitFrom((*_dartGraphics)[dartNum], Common::Point(ocx, ocy)); + screen._backBuffer1.SHtransBlitFrom((*_dartGraphics)[dartNum], Common::Point(ocx, ocy)); + screen._backBuffer2.SHtransBlitFrom((*_dartGraphics)[dartNum], Common::Point(ocx, ocy)); screen.slamArea(ocx, ocy, xSize, ySize); } @@ -955,9 +956,9 @@ int Darts::throwDart(int dartNum, int computer) { } drawDartsLeft(dartNum + 1, computer); - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(_dartInfo.left, _dartInfo.top - 1), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(_dartInfo.left, _dartInfo.top - 1), Common::Rect(_dartInfo.left, _dartInfo.top - 1, _dartInfo.right, _dartInfo.bottom - 1)); - screen.blitFrom(screen._backBuffer1, Common::Point(_dartInfo.left, _dartInfo.top - 1), + screen.SHblitFrom(screen._backBuffer1, Common::Point(_dartInfo.left, _dartInfo.top - 1), Common::Rect(_dartInfo.left, _dartInfo.top - 1, _dartInfo.right, _dartInfo.bottom - 1)); if (computer) { @@ -979,7 +980,7 @@ int Darts::throwDart(int dartNum, int computer) { height = 101 - height; // Copy power bars to the secondary back buffer - screen._backBuffer2.blitFrom(screen._backBuffer1, Common::Point(DART_BAR_VX - 1, DART_HEIGHT_Y - 1), + screen._backBuffer2.SHblitFrom(screen._backBuffer1, Common::Point(DART_BAR_VX - 1, DART_HEIGHT_Y - 1), Common::Rect(DART_BAR_VX - 1, DART_HEIGHT_Y - 1, DART_BAR_VX - 1 + 10, DART_HEIGHT_Y - 1 + DART_BAR_SIZE + 2)); @@ -1023,14 +1024,14 @@ void Darts::drawDartsLeft(int dartNum, int computer) { const int DART_X2[3] = { 393, 441, 502 }; const int DART_Y2[3] = { 373, 373, 373 }; - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(DART_X1[0], DART_Y1[0]), + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(DART_X1[0], DART_Y1[0]), Common::Rect(DART_X1[0], DART_Y1[0], SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); for (int idx = 2; idx >= dartNum - 1; --idx) { if (computer) - screen._backBuffer1.transBlitFrom((*_dartsLeft)[idx + 3], Common::Point(DART_X2[idx], DART_Y2[idx])); + screen._backBuffer1.SHtransBlitFrom((*_dartsLeft)[idx + 3], Common::Point(DART_X2[idx], DART_Y2[idx])); else - screen._backBuffer1.transBlitFrom((*_dartsLeft)[idx], Common::Point(DART_X1[idx], DART_Y1[idx])); + screen._backBuffer1.SHtransBlitFrom((*_dartsLeft)[idx], Common::Point(DART_X1[idx], DART_Y1[idx])); } screen.slamArea(DART_X1[0], DART_Y1[0], SHERLOCK_SCREEN_WIDTH - DART_X1[0], SHERLOCK_SCREEN_HEIGHT - DART_Y1[0]); diff --git a/engines/sherlock/tattoo/tattoo_fixed_text.h b/engines/sherlock/tattoo/tattoo_fixed_text.h index 7dbe13bbb3..eb636cdada 100644 --- a/engines/sherlock/tattoo/tattoo_fixed_text.h +++ b/engines/sherlock/tattoo/tattoo_fixed_text.h @@ -233,7 +233,7 @@ public: virtual const Common::String getActionMessage(FixedTextActionId actionId, int messageIndex); }; -} // End of namespace Scalpel +} // End of namespace Tattoo } // End of namespace Sherlock diff --git a/engines/sherlock/tattoo/tattoo_journal.cpp b/engines/sherlock/tattoo/tattoo_journal.cpp index dac0760ad2..4d4f37f8d5 100644 --- a/engines/sherlock/tattoo/tattoo_journal.cpp +++ b/engines/sherlock/tattoo/tattoo_journal.cpp @@ -50,7 +50,7 @@ void TattooJournal::show() { Screen &screen = *_vm->_screen; TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui; byte palette[PALETTE_SIZE]; - + Common::Point oldScroll = screen._currentScroll; screen._currentScroll = Common::Point(0, 0); @@ -65,8 +65,8 @@ void TattooJournal::show() { delete stream; // Set screen to black, and set background - screen._backBuffer1.blitFrom((*_journalImages)[0], Common::Point(0, 0)); - screen.empty(); + screen._backBuffer1.SHblitFrom((*_journalImages)[0], Common::Point(0, 0)); + screen.clear(); screen.setPalette(palette); if (_journal.empty()) { @@ -87,12 +87,12 @@ void TattooJournal::show() { handleKeyboardEvents(); highlightJournalControls(true); - + handleButtons(); if (_wait) events.wait(2); - + } while (!_vm->shouldQuit() && !_exitJournal); // Clear events @@ -275,7 +275,7 @@ void TattooJournal::handleButtons() { if (frameCounter >= _scrollingTimer) { // Set next scrolling time _scrollingTimer = frameCounter + 6; - + // Handle different scrolling actions switch (_selector) { case JH_SCROLL_LEFT: @@ -355,13 +355,13 @@ void TattooJournal::handleButtons() { _savedIndex = _index; _savedSub = _sub; _savedPage = _page; - + bool drawResult = drawJournal(dir + 2, 1000 * LINES_PER_PAGE); if (!drawResult) { _index = _savedIndex; _sub = _savedSub; _page = _savedPage; - + drawFrame(); drawJournal(0, 0); notFound = true; @@ -461,7 +461,7 @@ void TattooJournal::loadLocations() { void TattooJournal::drawFrame() { Screen &screen = *_vm->_screen; - screen._backBuffer1.blitFrom((*_journalImages)[0], Common::Point(0, 0)); + screen._backBuffer1.SHblitFrom((*_journalImages)[0], Common::Point(0, 0)); drawControls(0); } @@ -486,10 +486,10 @@ void TattooJournal::drawControls(int mode) { screen._backBuffer1.fillRect(inner, MENU_BACKGROUND); // Draw the four corners of the info box - screen._backBuffer1.transBlitFrom(images[0], Common::Point(r.left, r.top)); - screen._backBuffer1.transBlitFrom(images[1], Common::Point(r.right - images[1]._width, r.top)); - screen._backBuffer1.transBlitFrom(images[1], Common::Point(r.left, r.bottom - images[1]._height)); - screen._backBuffer1.transBlitFrom(images[1], Common::Point(r.right - images[1]._width, r.bottom - images[1]._height)); + screen._backBuffer1.SHtransBlitFrom(images[0], Common::Point(r.left, r.top)); + screen._backBuffer1.SHtransBlitFrom(images[1], Common::Point(r.right - images[1]._width, r.top)); + screen._backBuffer1.SHtransBlitFrom(images[1], Common::Point(r.left, r.bottom - images[1]._height)); + screen._backBuffer1.SHtransBlitFrom(images[1], Common::Point(r.right - images[1]._width, r.bottom - images[1]._height)); // Draw the top of the info box screen._backBuffer1.hLine(r.left + images[0]._width, r.top, r.right - images[0]._height, INFO_TOP); @@ -513,8 +513,8 @@ void TattooJournal::drawControls(int mode) { // Draw the sides of the separator bar above the scroll bar int yp = r.top + screen.fontHeight() + 7; - screen._backBuffer1.transBlitFrom(images[4], Common::Point(r.left, yp - 1)); - screen._backBuffer1.transBlitFrom(images[5], Common::Point(r.right - images[5]._width, yp - 1)); + screen._backBuffer1.SHtransBlitFrom(images[4], Common::Point(r.left, yp - 1)); + screen._backBuffer1.SHtransBlitFrom(images[5], Common::Point(r.right - images[5]._width, yp - 1)); // Draw the bar above the scroll bar screen._backBuffer1.hLine(r.left + images[4]._width, yp, r.right - images[5]._width, INFO_TOP); @@ -523,15 +523,15 @@ void TattooJournal::drawControls(int mode) { if (mode != 2) { // Draw the Bars separating the Journal Commands - int xp = r.right / 3; + int xp = r.left + r.width() / 3; for (int idx = 0; idx < 2; ++idx) { - screen._backBuffer1.transBlitFrom(images[6], Common::Point(xp - 2, r.top + 1)); - screen._backBuffer1.transBlitFrom(images[7], Common::Point(xp - 2, yp - 1)); + screen._backBuffer1.SHtransBlitFrom(images[6], Common::Point(xp - 2, r.top + 1)); + screen._backBuffer1.SHtransBlitFrom(images[7], Common::Point(xp - 2, yp - 1)); - screen._backBuffer1.hLine(xp - 1, r.top + 4, yp - 2, INFO_TOP); - screen._backBuffer1.hLine(xp, r.top + 4, yp - 2, INFO_MIDDLE); - screen._backBuffer1.hLine(xp + 1, r.top + 4, yp - 2, INFO_BOTTOM); - xp = r.right / 3 * 2; + screen._backBuffer1.vLine(xp - 1, r.top + 4, yp - 2, INFO_TOP); + screen._backBuffer1.vLine(xp, r.top + 4, yp - 2, INFO_MIDDLE); + screen._backBuffer1.vLine(xp + 1, r.top + 4, yp - 2, INFO_BOTTOM); + xp += r.width() / 3; } } @@ -539,7 +539,7 @@ void TattooJournal::drawControls(int mode) { _oldSelector = 100; switch (mode) { - case 0: + case 0: highlightJournalControls(false); break; case 1: @@ -548,7 +548,7 @@ void TattooJournal::drawControls(int mode) { default: break; } - + _oldSelector = savedSelector; } @@ -558,7 +558,7 @@ void TattooJournal::highlightJournalControls(bool slamIt) { Common::Point mousePos = events.mousePos(); Common::Rect r(JOURNAL_BAR_WIDTH, BUTTON_SIZE + screen.fontHeight() + 13); r.moveTo((SHERLOCK_SCREEN_WIDTH - r.width()) / 2, SHERLOCK_SCREEN_HEIGHT - r.height()); - + if ((events._pressed || events._released) && _selector == JH_THUMBNAIL) { if (events._released) _selector = JH_NONE; @@ -576,7 +576,7 @@ void TattooJournal::highlightJournalControls(bool slamIt) { _selector = JH_NONE; if (bounds.contains(mousePos)) _selector = (mousePos.x - r.left) / (r.width() / 3); - + else if (events._pressed && mousePos.y >= (r.top + screen.fontHeight() + 10) && mousePos.y < (r.top + screen.fontHeight() + 10 + BUTTON_SIZE)) { if (mousePos.x >= r.left && mousePos.x < (r.left + BUTTON_SIZE)) @@ -628,7 +628,7 @@ void TattooJournal::highlightJournalControls(bool slamIt) { color = (_selector == JH_SAVE) ? COMMAND_HIGHLIGHTED : INFO_TOP; else color = INFO_BOTTOM; - screen.gPrint(Common::Point(xp - screen.stringWidth(FIXED(SaveJournal)) / 2, r.top + 5), + screen.gPrint(Common::Point(xp - screen.stringWidth(FIXED(SaveJournal)) / 2, r.top + 5), color, "%s", FIXED(SaveJournal)); // Draw the horizontal scrollbar @@ -701,7 +701,7 @@ void TattooJournal::drawScrollBar() { raised = _selector != JH_SCROLL_LEFT; screen._backBuffer1.fillRect(Common::Rect(r.left, r.top + screen.fontHeight() + 12, r.left + BUTTON_SIZE, r.top + screen.fontHeight() + BUTTON_SIZE + 9), INFO_MIDDLE); - ui.drawDialogRect(screen._backBuffer1, Common::Rect(r.left + 3, r.top + screen.fontHeight() + 10, r.left + 3 + BUTTON_SIZE, + ui.drawDialogRect(screen._backBuffer1, Common::Rect(r.left + 3, r.top + screen.fontHeight() + 10, r.left + 3 + BUTTON_SIZE, r.top + screen.fontHeight() + 10 + BUTTON_SIZE), raised); color = (_page > 1) ? INFO_BOTTOM + 2 : INFO_BOTTOM; @@ -716,15 +716,15 @@ void TattooJournal::drawScrollBar() { // Draw the Scroll Right button raised = _selector != JH_SCROLL_RIGHT; - screen._backBuffer1.fillRect(Common::Rect(r.right - BUTTON_SIZE - 1, r.top + screen.fontHeight() + 12, + screen._backBuffer1.fillRect(Common::Rect(r.right - BUTTON_SIZE - 1, r.top + screen.fontHeight() + 12, r.right - 5, r.top + screen.fontHeight() + BUTTON_SIZE + 9), INFO_MIDDLE); ui.drawDialogRect(screen._backBuffer1, Common::Rect(r.right - BUTTON_SIZE - 3, r.top + screen.fontHeight() + 10, r.right - 3, r.top + screen.fontHeight() + BUTTON_SIZE + 9), raised); color = _down ? INFO_BOTTOM + 2 : INFO_BOTTOM; - screen._backBuffer1.vLine(r.right - 1 - BUTTON_SIZE + BUTTON_SIZE / 2, r.top + screen.fontHeight() + 10 + BUTTON_SIZE / 2, + screen._backBuffer1.vLine(r.right - 1 - BUTTON_SIZE + BUTTON_SIZE / 2, r.top + screen.fontHeight() + 10 + BUTTON_SIZE / 2, r.top + screen.fontHeight() + 10 + BUTTON_SIZE / 2, color); - screen._backBuffer1.vLine(r.right - 2 - BUTTON_SIZE + BUTTON_SIZE / 2, r.top + screen.fontHeight() + 9 + BUTTON_SIZE / 2, + screen._backBuffer1.vLine(r.right - 2 - BUTTON_SIZE + BUTTON_SIZE / 2, r.top + screen.fontHeight() + 9 + BUTTON_SIZE / 2, r.top + screen.fontHeight() + 11 + BUTTON_SIZE / 2, color); screen._backBuffer1.vLine(r.right - 3 - BUTTON_SIZE + BUTTON_SIZE / 2, r.top + screen.fontHeight() + 8 + BUTTON_SIZE / 2, r.top + screen.fontHeight() + 12 + BUTTON_SIZE / 2, color); @@ -776,14 +776,14 @@ int TattooJournal::getFindName(bool printError) { drawControls(1); disableControls(); - + // Backup the area under the text entry Surface bgSurface(r.width() - 6, screen.fontHeight()); - bgSurface.blitFrom(screen._backBuffer1, Common::Point(0, 0), Common::Rect(r.left + 3, cursorY, + bgSurface.SHblitFrom(screen._backBuffer1, Common::Point(0, 0), Common::Rect(r.left + 3, cursorY, r.right - 3, cursorY + screen.fontHeight())); if (printError) { - screen.gPrint(Common::Point(r.left + (r.width() - screen.stringWidth(FIXED(TextNotFound))) / 2, cursorY), + screen.gPrint(Common::Point(r.left + (r.width() - screen.stringWidth(FIXED(TextNotFound))) / 2, cursorY), INFO_TOP, "%s", FIXED(TextNotFound)); } else { // If there was a name already entered, copy it to name and display it @@ -810,7 +810,7 @@ int TattooJournal::getFindName(bool printError) { events.clearEvents(); // Restore the text background - screen._backBuffer1.blitFrom(bgSurface, Common::Point(r.left, cursorY)); + screen._backBuffer1.SHblitFrom(bgSurface, Common::Point(r.left, cursorY)); // If there was a name already entered, copy it to name and display it if (!_find.empty()) { @@ -846,7 +846,7 @@ int TattooJournal::getFindName(bool printError) { } else { // Erase cursor by restoring background and writing current text - screen._backBuffer1.blitFrom(bgSurface, Common::Point(r.left + 3, cursorY)); + screen._backBuffer1.SHblitFrom(bgSurface, Common::Point(r.left + 3, cursorY)); screen.gPrint(Common::Point(r.left + screen.widestChar() + 3, cursorY), COMMAND_HIGHLIGHTED, "%s", name.c_str()); screen.slamArea(r.left + 3, cursorY, r.width() - 3, screen.fontHeight()); } @@ -912,7 +912,7 @@ int TattooJournal::getFindName(bool printError) { } // Redraw the text - screen._backBuffer1.blitFrom(bgSurface, Common::Point(r.left + 3, cursorY)); + screen._backBuffer1.SHblitFrom(bgSurface, Common::Point(r.left + 3, cursorY)); screen.gPrint(Common::Point(r.left + screen.widestChar() + 3, cursorY), COMMAND_HIGHLIGHTED, "%s", name.c_str()); screen.slamArea(r.left + 3, cursorY, r.right - 3, screen.fontHeight()); @@ -977,7 +977,7 @@ void TattooJournal::saveJournal() { int line = 0; // Copy all of the talk files entries into one big string - do { + do { if (_lines[line].hasPrefix("@")) { text += Common::String(_lines[line].c_str() + 1); if ((line + 1) < (int)_lines.size() && _lines[line + 1].hasPrefix("@")) @@ -992,7 +992,7 @@ void TattooJournal::saveJournal() { // which show up as a blank line with the next line starting // with a '@'. We have to add a line break here because the '@' handler // previously assumes that they're always following a blank line - + if ((_lines[line].empty() || _lines[line] == " ") && (line + 1) < (int)_lines.size() && _lines[line + 1].hasPrefix("@")) text += "\n"; @@ -1005,7 +1005,7 @@ void TattooJournal::saveJournal() { do { if (text.size() > 80) { const char *msgP = text.c_str() + 80; - + if (Common::String(text.c_str(), msgP).contains("\n")) { // The 80 characters contain a carriage return, // so we can print out that line @@ -1013,7 +1013,7 @@ void TattooJournal::saveJournal() { file->writeString(Common::String(text.c_str(), cr)); text = Common::String(cr + 1); } else { - // Move backwards to find a word break + // Move backwards to find a word break while (*msgP != ' ') --msgP; diff --git a/engines/sherlock/tattoo/tattoo_map.cpp b/engines/sherlock/tattoo/tattoo_map.cpp index 4c7e8c8fef..23e8bd9739 100644 --- a/engines/sherlock/tattoo/tattoo_map.cpp +++ b/engines/sherlock/tattoo/tattoo_map.cpp @@ -105,7 +105,8 @@ int TattooMap::show() { // Load the map image and draw it to the back buffer ImageFile *map = new ImageFile("map.vgs"); screen._backBuffer1.create(SHERLOCK_SCREEN_WIDTH * 2, SHERLOCK_SCREEN_HEIGHT * 2); - screen._backBuffer1.blitFrom((*map)[0], Common::Point(0, 0)); + screen._backBuffer1.SHblitFrom((*map)[0], Common::Point(0, 0)); + screen.activateBackBuffer1(); delete map; screen.clear(); @@ -114,7 +115,7 @@ int TattooMap::show() { // Copy the map drawn in the back buffer to the secondary back buffer screen._backBuffer2.create(SHERLOCK_SCREEN_WIDTH * 2, SHERLOCK_SCREEN_HEIGHT * 2); - screen._backBuffer2.blitFrom(screen._backBuffer1); + screen._backBuffer2.SHblitFrom(screen._backBuffer1); // Display the built map to the screen screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); @@ -148,12 +149,12 @@ int TattooMap::show() { if (_targetScroll.x < 0) _targetScroll.x = 0; - if ((_targetScroll.x + SHERLOCK_SCREEN_WIDTH) > screen._backBuffer1.w()) - _targetScroll.x = screen._backBuffer1.w() - SHERLOCK_SCREEN_WIDTH; + if ((_targetScroll.x + SHERLOCK_SCREEN_WIDTH) > screen._backBuffer1.width()) + _targetScroll.x = screen._backBuffer1.width() - SHERLOCK_SCREEN_WIDTH; if (_targetScroll.y < 0) _targetScroll.y = 0; - if ((_targetScroll.y + SHERLOCK_SCREEN_HEIGHT) > screen._backBuffer1.h()) - _targetScroll.y = screen._backBuffer1.h() - SHERLOCK_SCREEN_HEIGHT; + if ((_targetScroll.y + SHERLOCK_SCREEN_HEIGHT) > screen._backBuffer1.height()) + _targetScroll.y = screen._backBuffer1.height() - SHERLOCK_SCREEN_HEIGHT; // Check the keyboard if (events.kbHit()) { @@ -166,8 +167,8 @@ int TattooMap::show() { break; case Common::KEYCODE_END: - _targetScroll.x = screen._backBuffer1.w() - SHERLOCK_SCREEN_WIDTH; - _targetScroll.y = screen._backBuffer1.h() - SHERLOCK_SCREEN_HEIGHT; + _targetScroll.x = screen._backBuffer1.width() - SHERLOCK_SCREEN_WIDTH; + _targetScroll.y = screen._backBuffer1.height() - SHERLOCK_SCREEN_HEIGHT; break; case Common::KEYCODE_PAGEUP: @@ -178,8 +179,8 @@ int TattooMap::show() { case Common::KEYCODE_PAGEDOWN: _targetScroll.y += SHERLOCK_SCREEN_HEIGHT; - if (_targetScroll.y > (screen._backBuffer1.h() - SHERLOCK_SCREEN_HEIGHT)) - _targetScroll.y = screen._backBuffer1.h() - SHERLOCK_SCREEN_HEIGHT; + if (_targetScroll.y > (screen._backBuffer1.height() - SHERLOCK_SCREEN_HEIGHT)) + _targetScroll.y = screen._backBuffer1.height() - SHERLOCK_SCREEN_HEIGHT; break; case Common::KEYCODE_SPACE: @@ -224,6 +225,7 @@ int TattooMap::show() { // Reset the back buffers back to standard size screen._backBuffer1.create(SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); screen._backBuffer2.create(SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); + screen.activateBackBuffer1(); return result; } @@ -304,7 +306,7 @@ void TattooMap::drawMapIcons() { if (_data[idx]._iconNum != -1 && _vm->readFlags(idx + 1)) { MapEntry &mapEntry = _data[idx]; ImageFrame &img = (*_iconImages)[mapEntry._iconNum]; - screen._backBuffer1.transBlitFrom(img._frame, Common::Point(mapEntry.x - img._width / 2, + screen._backBuffer1.SHtransBlitFrom(img._frame, Common::Point(mapEntry.x - img._width / 2, mapEntry.y - img._height / 2)); } } @@ -355,10 +357,10 @@ void TattooMap::restoreArea(const Common::Rect &bounds) { Screen &screen = *_vm->_screen; Common::Rect r = bounds; - r.clip(Common::Rect(0, 0, screen._backBuffer1.w(), screen._backBuffer1.h())); + r.clip(Common::Rect(0, 0, screen._backBuffer1.width(), screen._backBuffer1.height())); if (!r.isEmpty()) - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(r.left, r.top), r); + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(r.left, r.top), r); } void TattooMap::showCloseUp(int closeUpNum) { @@ -407,7 +409,7 @@ void TattooMap::showCloseUp(int closeUpNum) { screen._currentScroll.y + closeUp.y / 100 - picSize.y / 2); restoreArea(oldBounds); - screen._backBuffer1.transBlitFrom(pic[0], pt, false, 0, scaleVal); + screen._backBuffer1.SHtransBlitFrom(pic[0], pt, false, 0, scaleVal); screen.slamRect(oldBounds); screen.slamArea(pt.x, pt.y, picSize.x, picSize.y); @@ -426,7 +428,7 @@ void TattooMap::showCloseUp(int closeUpNum) { screen._currentScroll.y + SHERLOCK_SCREEN_HEIGHT / 2 - pic[0]._height / 2 + pic[0]._height); restoreArea(oldBounds); - screen._backBuffer1.transBlitFrom(pic[0], Common::Point(r.left, r.top)); + screen._backBuffer1.SHtransBlitFrom(pic[0], Common::Point(r.left, r.top)); screen.slamRect(oldBounds); screen.slamRect(r); diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp index b83a977a77..65cc283b66 100644 --- a/engines/sherlock/tattoo/tattoo_people.cpp +++ b/engines/sherlock/tattoo/tattoo_people.cpp @@ -1042,7 +1042,7 @@ void TattooPerson::walkHolmesToNPC() { holmes._walkDest.x = MAX(_position.x / FIXED_INT_MULTIPLIER - imgFrame.sDrawXSize(scaleVal), 0); } else { holmes._walkDest.x = MIN(_position.x / FIXED_INT_MULTIPLIER + imgFrame.sDrawXSize(scaleVal) * 2, - screen._backBuffer1.w() - 1); + screen._backBuffer1.width() - 1); } // See where Holmes is with respect to the NPC (y coords) @@ -1168,7 +1168,7 @@ void TattooPerson::centerScreenOnPerson() { TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui; ui._targetScroll.x = CLIP(_position.x / FIXED_INT_MULTIPLIER - SHERLOCK_SCREEN_WIDTH / 2, - 0, screen._backBuffer1.w() - SHERLOCK_SCREEN_WIDTH); + 0, screen._backBuffer1.width() - SHERLOCK_SCREEN_WIDTH); screen._currentScroll = ui._targetScroll; // Reset the default look position to the center of the screen @@ -1478,7 +1478,7 @@ const Common::Point TattooPeople::restrictToZone(int zoneId, const Common::Point Screen &screen = *_vm->_screen; Common::Rect &r = scene._zones[zoneId]; - if (destPos.x < 0 || destPos.x > screen._backBuffer1.w()) + if (destPos.x < 0 || destPos.x > screen._backBuffer1.width()) return destPos; else if (destPos.y < r.top && r.left < destPos.x && destPos.x < r.right) return Common::Point(destPos.x, r.top); diff --git a/engines/sherlock/tattoo/tattoo_people.h b/engines/sherlock/tattoo/tattoo_people.h index e0d53c67dd..c844d86e19 100644 --- a/engines/sherlock/tattoo/tattoo_people.h +++ b/engines/sherlock/tattoo/tattoo_people.h @@ -273,9 +273,8 @@ public: virtual void setListenSequence(int speaker, int sequenceNum = 1); }; -} // End of namespace Scalpel +} // End of namespace Tattoo } // End of namespace Sherlock - #endif diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp index 27f37665dc..00015cb189 100644 --- a/engines/sherlock/tattoo/tattoo_scene.cpp +++ b/engines/sherlock/tattoo/tattoo_scene.cpp @@ -141,15 +141,15 @@ void TattooScene::drawAllShapes() { if (obj._type == ACTIVE_BG_SHAPE && obj._misc == BEHIND) { if (obj._quickDraw && obj._scaleVal == SCALE_THRESHOLD) - screen._backBuffer1.blitFrom(*obj._imageFrame, obj._position); + screen._backBuffer1.SHblitFrom(*obj._imageFrame, obj._position); else - screen._backBuffer1.transBlitFrom(*obj._imageFrame, obj._position, obj._flags & OBJ_FLIPPED, 0, obj._scaleVal); + screen._backBuffer1.SHtransBlitFrom(*obj._imageFrame, obj._position, obj._flags & OBJ_FLIPPED, 0, obj._scaleVal); } } // Draw the animation if it is behind the person if (_activeCAnim.active() && _activeCAnim._zPlacement == BEHIND) - screen._backBuffer1.transBlitFrom(_activeCAnim._imageFrame, _activeCAnim._position, + screen._backBuffer1.SHtransBlitFrom(_activeCAnim._imageFrame, _activeCAnim._position, (_activeCAnim._flags & 4) >> 1, 0, _activeCAnim._scaleVal); screen.resetDisplayBounds(); @@ -194,13 +194,13 @@ void TattooScene::drawAllShapes() { if (se._shape) { // it's a bg shape if (se._shape->_quickDraw && se._shape->_scaleVal == SCALE_THRESHOLD) - screen._backBuffer1.blitFrom(*se._shape->_imageFrame, se._shape->_position); + screen._backBuffer1.SHblitFrom(*se._shape->_imageFrame, se._shape->_position); else - screen._backBuffer1.transBlitFrom(*se._shape->_imageFrame, se._shape->_position, + screen._backBuffer1.SHtransBlitFrom(*se._shape->_imageFrame, se._shape->_position, se._shape->_flags & OBJ_FLIPPED, 0, se._shape->_scaleVal); } else if (se._isAnimation) { // It's an active animation - screen._backBuffer1.transBlitFrom(_activeCAnim._imageFrame, _activeCAnim._position, + screen._backBuffer1.SHtransBlitFrom(_activeCAnim._imageFrame, _activeCAnim._position, (_activeCAnim._flags & 4) >> 1, 0, _activeCAnim._scaleVal); } else { // Drawing person @@ -212,7 +212,7 @@ void TattooScene::drawAllShapes() { if (p._tempScaleVal == SCALE_THRESHOLD) { p._tempX += adjust.x; - screen._backBuffer1.transBlitFrom(*p._imageFrame, Common::Point(p._tempX, p._position.y / FIXED_INT_MULTIPLIER + screen._backBuffer1.SHtransBlitFrom(*p._imageFrame, Common::Point(p._tempX, p._position.y / FIXED_INT_MULTIPLIER - p.frameHeight() - adjust.y), p._walkSequences[p._sequenceNumber]._horizFlip, 0, p._tempScaleVal); } else { if (adjust.x) { @@ -242,7 +242,7 @@ void TattooScene::drawAllShapes() { ++adjust.y; } - screen._backBuffer1.transBlitFrom(*p._imageFrame, Common::Point(p._tempX, p._position.y / FIXED_INT_MULTIPLIER + screen._backBuffer1.SHtransBlitFrom(*p._imageFrame, Common::Point(p._tempX, p._position.y / FIXED_INT_MULTIPLIER - p._imageFrame->sDrawYSize(p._tempScaleVal) - adjust.y), p._walkSequences[p._sequenceNumber]._horizFlip, 0, p._tempScaleVal); } } @@ -255,15 +255,15 @@ void TattooScene::drawAllShapes() { if (obj._type == ACTIVE_BG_SHAPE && obj._misc == FORWARD) { if (obj._quickDraw && obj._scaleVal == SCALE_THRESHOLD) - screen._backBuffer1.blitFrom(*obj._imageFrame, obj._position); + screen._backBuffer1.SHblitFrom(*obj._imageFrame, obj._position); else - screen._backBuffer1.transBlitFrom(*obj._imageFrame, obj._position, obj._flags & OBJ_FLIPPED, 0, obj._scaleVal); + screen._backBuffer1.SHtransBlitFrom(*obj._imageFrame, obj._position, obj._flags & OBJ_FLIPPED, 0, obj._scaleVal); } } // Draw the canimation if it is set as FORWARD if (_activeCAnim.active() && _activeCAnim._zPlacement == FORWARD) - screen._backBuffer1.transBlitFrom(_activeCAnim._imageFrame, _activeCAnim._position, (_activeCAnim._flags & 4) >> 1, 0, _activeCAnim._scaleVal); + screen._backBuffer1.SHtransBlitFrom(_activeCAnim._imageFrame, _activeCAnim._position, (_activeCAnim._flags & 4) >> 1, 0, _activeCAnim._scaleVal); // Draw all NO_SHAPE shapes which have their flag bits clear for (uint idx = 0; idx < _bgShapes.size(); ++idx) { diff --git a/engines/sherlock/tattoo/tattoo_screen.cpp b/engines/sherlock/tattoo/tattoo_screen.cpp new file mode 100644 index 0000000000..159060b19e --- /dev/null +++ b/engines/sherlock/tattoo/tattoo_screen.cpp @@ -0,0 +1,38 @@ +/* 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 "sherlock/tattoo/tattoo_screen.h" +#include "sherlock/tattoo/tattoo.h" + +namespace Sherlock { + +namespace Tattoo { + +TattooScreen::TattooScreen(SherlockEngine *vm) : Screen(vm) { + _backBuffer1.create(640, 480); + _backBuffer2.create(640, 480); + activateBackBuffer1(); +} + +} // End of namespace Tattoo + +} // End of namespace Sherlock diff --git a/engines/sherlock/tattoo/tattoo_screen.h b/engines/sherlock/tattoo/tattoo_screen.h new file mode 100644 index 0000000000..b55e9bb0dd --- /dev/null +++ b/engines/sherlock/tattoo/tattoo_screen.h @@ -0,0 +1,44 @@ +/* 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 SHERLOCK_TATTOO_SCREEN_H +#define SHERLOCK_TATTOO_SCREEN_H + +#include "sherlock/screen.h" + +namespace Sherlock { + +class SherlockEngine; + +namespace Tattoo { + +class TattooScreen : public Screen { +public: + TattooScreen(SherlockEngine *vm); + virtual ~TattooScreen() {} +}; + +} // End of namespace Tattoo + +} // End of namespace Sherlock + +#endif diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp index ee028f89c2..677a662535 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.cpp +++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp @@ -72,7 +72,7 @@ TattooUserInterface::~TattooUserInterface() { void TattooUserInterface::initScrollVars() { Screen &screen = *_vm->_screen; - _scrollSize = screen._backBuffer1.w() - SHERLOCK_SCREEN_WIDTH; + _scrollSize = screen._backBuffer1.width() - SHERLOCK_SCREEN_WIDTH; _targetScroll = Common::Point(0, 0); screen._currentScroll = Common::Point(0, 0); } @@ -233,7 +233,7 @@ void TattooUserInterface::doJournal() { Common::copy(&lookupTable1[0], &lookupTable1[PALETTE_COUNT], &_lookupTable1[0]); // Restore the scene - screen._backBuffer1.blitFrom(screen._backBuffer2); + screen._backBuffer1.SHblitFrom(screen._backBuffer2); scene.updateBackground(); screen.slamArea(screen._currentScroll.x, screen._currentScroll.y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); } @@ -727,7 +727,7 @@ void TattooUserInterface::doBgAnimEraseBackground() { if (_mask != nullptr) { // Since a mask is active, restore the screen from the secondary back buffer prior to applying the mask - screen._backBuffer1.blitFrom(screen._backBuffer2, screen._currentScroll, Common::Rect(screen._currentScroll.x, 0, + screen._backBuffer1.SHblitFrom(screen._backBuffer2, screen._currentScroll, Common::Rect(screen._currentScroll.x, 0, screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT)); switch (scene._currentScene) { @@ -757,7 +757,7 @@ void TattooUserInterface::doBgAnimEraseBackground() { case 53: if (++_maskCounter == 2) { _maskCounter = 0; - if (++_maskOffset.x == screen._backBuffer1.w()) + if (++_maskOffset.x == screen._backBuffer1.width()) _maskOffset.x = 0; } break; @@ -779,7 +779,7 @@ void TattooUserInterface::doBgAnimEraseBackground() { if ((obj._type == ACTIVE_BG_SHAPE && (obj._maxFrames > 1 || obj._delta.x != 0 || obj._delta.y != 0)) || obj._type == HIDE_SHAPE || obj._type == REMOVE) - screen._backBuffer1.blitFrom(screen._backBuffer2, obj._oldPosition, + screen._backBuffer1.SHblitFrom(screen._backBuffer2, obj._oldPosition, Common::Rect(obj._oldPosition.x, obj._oldPosition.y, obj._oldPosition.x + obj._oldSize.x, obj._oldPosition.y + obj._oldSize.y)); } @@ -793,7 +793,7 @@ void TattooUserInterface::doBgAnimEraseBackground() { Object &obj = scene._bgShapes[idx]; if (obj._type == NO_SHAPE && (obj._flags & 1) == 0) { - screen._backBuffer1.blitFrom(screen._backBuffer2, obj._position, obj.getNoShapeBounds()); + screen._backBuffer1.SHblitFrom(screen._backBuffer2, obj._position, obj.getNoShapeBounds()); obj._oldPosition = obj._position; obj._oldSize = obj._noShapeSize; @@ -870,7 +870,7 @@ void TattooUserInterface::maskArea(Common::SeekableReadStream &mask, const Commo int pixel, len, xp, yp; for (yp = 0; yp < ySize; ++yp) { - byte *ptr = bb1.getBasePtr(pt.x, pt.y + yp); + byte *ptr = (byte *)bb1.getBasePtr(pt.x, pt.y + yp); for (xp = 0; xp < xSize;) { // The mask data consists of pairs of pixel/lengths, where all non-zero pixels means that the @@ -893,7 +893,7 @@ void TattooUserInterface::makeBGArea(const Common::Rect &r) { Screen &screen = *_vm->_screen; for (int yp = r.top; yp < r.bottom; ++yp) { - byte *ptr = screen._backBuffer1.getBasePtr(r.left, yp); + byte *ptr = (byte *)screen._backBuffer1.getBasePtr(r.left, yp); for (int xp = r.left; xp < r.right; ++xp, ++ptr) *ptr = _lookupTable[*ptr]; diff --git a/engines/sherlock/tattoo/widget_base.cpp b/engines/sherlock/tattoo/widget_base.cpp index 8f0649130a..a35f4e5d74 100644 --- a/engines/sherlock/tattoo/widget_base.cpp +++ b/engines/sherlock/tattoo/widget_base.cpp @@ -88,7 +88,7 @@ void WidgetBase::erase() { if (_oldBounds.width() > 0) { // Restore the affected area from the secondary back buffer into the first one, and then copy to screen - screen._backBuffer1.blitFrom(screen._backBuffer2, Common::Point(_oldBounds.left, _oldBounds.top), _oldBounds); + screen._backBuffer1.SHblitFrom(screen._backBuffer2, Common::Point(_oldBounds.left, _oldBounds.top), _oldBounds); screen.slamRect(_oldBounds); // Reset the old bounds so it won't be erased again @@ -111,7 +111,7 @@ void WidgetBase::draw() { drawBackground(); // Draw the widget onto the back buffer and then slam it to the screen - screen._backBuffer1.transBlitFrom(_surface, Common::Point(_bounds.left, _bounds.top)); + screen._backBuffer1.SHtransBlitFrom(_surface, Common::Point(_bounds.left, _bounds.top)); screen.slamRect(_bounds); // Store a copy of the drawn area for later erasing @@ -183,8 +183,8 @@ void WidgetBase::restrictToScreen() { _bounds.moveTo(_bounds.left, 0); if (_bounds.right > (screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH)) _bounds.moveTo(screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH - _bounds.width(), _bounds.top); - if (_bounds.bottom > screen._backBuffer1.h()) - _bounds.moveTo(_bounds.left, screen._backBuffer1.h() - _bounds.height()); + if (_bounds.bottom > screen._backBuffer1.height()) + _bounds.moveTo(_bounds.left, screen._backBuffer1.height() - _bounds.height()); } void WidgetBase::makeInfoArea(Surface &s) { @@ -192,30 +192,30 @@ void WidgetBase::makeInfoArea(Surface &s) { ImageFile &images = *ui._interfaceImages; // Draw the four corners of the Info Box - s.transBlitFrom(images[0], Common::Point(0, 0)); - s.transBlitFrom(images[1], Common::Point(s.w() - images[1]._width, 0)); - s.transBlitFrom(images[2], Common::Point(0, s.h() - images[2]._height)); - s.transBlitFrom(images[3], Common::Point(s.w() - images[3]._width, s.h())); + s.SHtransBlitFrom(images[0], Common::Point(0, 0)); + s.SHtransBlitFrom(images[1], Common::Point(s.width() - images[1]._width, 0)); + s.SHtransBlitFrom(images[2], Common::Point(0, s.height() - images[2]._height)); + s.SHtransBlitFrom(images[3], Common::Point(s.width() - images[3]._width, s.height())); // Draw the top of the Info Box - s.hLine(images[0]._width, 0, s.w() - images[1]._width, INFO_TOP); - s.hLine(images[0]._width, 1, s.w() - images[1]._width, INFO_MIDDLE); - s.hLine(images[0]._width, 2, s.w() - images[1]._width, INFO_BOTTOM); + s.hLine(images[0]._width, 0, s.width() - images[1]._width, INFO_TOP); + s.hLine(images[0]._width, 1, s.width() - images[1]._width, INFO_MIDDLE); + s.hLine(images[0]._width, 2, s.width() - images[1]._width, INFO_BOTTOM); // Draw the bottom of the Info Box - s.hLine(images[0]._width, s.h()- 3, s.w() - images[1]._width, INFO_TOP); - s.hLine(images[0]._width, s.h()- 2, s.w() - images[1]._width, INFO_MIDDLE); - s.hLine(images[0]._width, s.h()- 1, s.w() - images[1]._width, INFO_BOTTOM); + s.hLine(images[0]._width, s.height()- 3, s.width() - images[1]._width, INFO_TOP); + s.hLine(images[0]._width, s.height()- 2, s.width() - images[1]._width, INFO_MIDDLE); + s.hLine(images[0]._width, s.height()- 1, s.width() - images[1]._width, INFO_BOTTOM); // Draw the left Side of the Info Box - s.vLine(0, images[0]._height, s.h()- images[2]._height, INFO_TOP); - s.vLine(1, images[0]._height, s.h()- images[2]._height, INFO_MIDDLE); - s.vLine(2, images[0]._height, s.h()- images[2]._height, INFO_BOTTOM); + s.vLine(0, images[0]._height, s.height()- images[2]._height, INFO_TOP); + s.vLine(1, images[0]._height, s.height()- images[2]._height, INFO_MIDDLE); + s.vLine(2, images[0]._height, s.height()- images[2]._height, INFO_BOTTOM); // Draw the right Side of the Info Box - s.vLine(s.w() - 3, images[0]._height, s.h()- images[2]._height, INFO_TOP); - s.vLine(s.w() - 2, images[0]._height, s.h()- images[2]._height, INFO_MIDDLE); - s.vLine(s.w() - 1, images[0]._height, s.h()- images[2]._height, INFO_BOTTOM); + s.vLine(s.width() - 3, images[0]._height, s.height()- images[2]._height, INFO_TOP); + s.vLine(s.width() - 2, images[0]._height, s.height()- images[2]._height, INFO_MIDDLE); + s.vLine(s.width() - 1, images[0]._height, s.height()- images[2]._height, INFO_BOTTOM); } void WidgetBase::makeInfoArea() { diff --git a/engines/sherlock/tattoo/widget_credits.cpp b/engines/sherlock/tattoo/widget_credits.cpp index 2b37dd304b..1c878daaf6 100644 --- a/engines/sherlock/tattoo/widget_credits.cpp +++ b/engines/sherlock/tattoo/widget_credits.cpp @@ -37,7 +37,7 @@ void WidgetCredits::initCredits() { Screen &screen = *_vm->_screen; Common::SeekableReadStream *stream = res.load("credits.txt"); int spacing = screen.fontHeight() * 2; - int yp = screen.h(); + int yp = screen.height(); _creditsActive = true; _creditLines.clear(); @@ -60,7 +60,7 @@ void WidgetCredits::initCredits() { } else { int width = screen.stringWidth(line) + 2; - _creditLines.push_back(CreditLine(line, Common::Point((screen.w() - width) / 2 + 1, yp), width)); + _creditLines.push_back(CreditLine(line, Common::Point((screen.width() - width) / 2 + 1, yp), width)); yp += spacing; } } @@ -120,10 +120,10 @@ void WidgetCredits::close() { void WidgetCredits::drawCredits() { Screen &screen = *_vm->_screen; - Common::Rect screenRect(0, 0, screen.w(), screen.h()); + Common::Rect screenRect(0, 0, screen.width(), screen.height()); Surface &bb1 = screen._backBuffer1; - for (uint idx = 0; idx < _creditLines.size() && _creditLines[idx]._position.y < screen.h(); ++idx) { + for (uint idx = 0; idx < _creditLines.size() && _creditLines[idx]._position.y < screen.height(); ++idx) { if (screenRect.contains(_creditLines[idx]._position)) { if (!_creditLines[idx]._line2.empty()) { int x1 = _creditLines[idx]._position.x; @@ -176,7 +176,7 @@ void WidgetCredits::drawCredits() { void WidgetCredits::blitCredits() { Screen &screen = *_vm->_screen; - Common::Rect screenRect(0, -_creditSpeed, screen.w(), screen.h() + _creditSpeed); + Common::Rect screenRect(0, -_creditSpeed, screen.width(), screen.height() + _creditSpeed); for (uint idx = 0; idx < _creditLines.size(); ++idx) { if (screenRect.contains(_creditLines[idx]._position)) { @@ -190,7 +190,7 @@ void WidgetCredits::blitCredits() { void WidgetCredits::eraseCredits() { Screen &screen = *_vm->_screen; - Common::Rect screenRect(0, -_creditSpeed, screen.w(), screen.h() + _creditSpeed); + Common::Rect screenRect(0, -_creditSpeed, screen.width(), screen.height() + _creditSpeed); for (uint idx = 0; idx < _creditLines.size(); ++idx) { if (screenRect.contains(_creditLines[idx]._position)) { diff --git a/engines/sherlock/tattoo/widget_files.cpp b/engines/sherlock/tattoo/widget_files.cpp index ff8cb83dca..7666e81480 100644 --- a/engines/sherlock/tattoo/widget_files.cpp +++ b/engines/sherlock/tattoo/widget_files.cpp @@ -107,36 +107,36 @@ void WidgetFiles::render(FilesRenderMode mode) { byte color; if (mode == RENDER_ALL) { - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); makeInfoArea(); switch (_fileMode) { case SAVEMODE_LOAD: _surface.writeString(FIXED(LoadGame), - Common::Point((_surface.w() - _surface.stringWidth(FIXED(LoadGame))) / 2, 5), INFO_TOP); + Common::Point((_surface.width() - _surface.stringWidth(FIXED(LoadGame))) / 2, 5), INFO_TOP); break; case SAVEMODE_SAVE: _surface.writeString(FIXED(SaveGame), - Common::Point((_surface.w() - _surface.stringWidth(FIXED(SaveGame))) / 2, 5), INFO_TOP); + Common::Point((_surface.width() - _surface.stringWidth(FIXED(SaveGame))) / 2, 5), INFO_TOP); break; default: break; } - _surface.hLine(3, _surface.fontHeight() + 7, _surface.w() - 4, INFO_TOP); - _surface.hLine(3, _surface.fontHeight() + 8, _surface.w() - 4, INFO_MIDDLE); - _surface.hLine(3, _surface.fontHeight() + 9, _surface.w() - 4, INFO_BOTTOM); - _surface.transBlitFrom(images[4], Common::Point(0, _surface.fontHeight() + 6)); - _surface.transBlitFrom(images[5], Common::Point(_surface.w() - images[5]._width, _surface.fontHeight() + 6)); + _surface.hLine(3, _surface.fontHeight() + 7, _surface.width() - 4, INFO_TOP); + _surface.hLine(3, _surface.fontHeight() + 8, _surface.width() - 4, INFO_MIDDLE); + _surface.hLine(3, _surface.fontHeight() + 9, _surface.width() - 4, INFO_BOTTOM); + _surface.SHtransBlitFrom(images[4], Common::Point(0, _surface.fontHeight() + 6)); + _surface.SHtransBlitFrom(images[5], Common::Point(_surface.width() - images[5]._width, _surface.fontHeight() + 6)); - int xp = _surface.w() - BUTTON_SIZE - 6; + int xp = _surface.width() - BUTTON_SIZE - 6; _surface.vLine(xp, _surface.fontHeight() + 10, _bounds.height() - 4, INFO_TOP); _surface.vLine(xp + 1, _surface.fontHeight() + 10, _bounds.height() - 4, INFO_MIDDLE); _surface.vLine(xp + 2, _surface.fontHeight() + 10, _bounds.height() - 4, INFO_BOTTOM); - _surface.transBlitFrom(images[6], Common::Point(xp - 1, _surface.fontHeight() + 8)); - _surface.transBlitFrom(images[7], Common::Point(xp - 1, _bounds.height() - 4)); + _surface.SHtransBlitFrom(images[6], Common::Point(xp - 1, _surface.fontHeight() + 8)); + _surface.SHtransBlitFrom(images[7], Common::Point(xp - 1, _bounds.height() - 4)); } int xp = _surface.stringWidth("00.") + _surface.widestChar() + 5; @@ -149,7 +149,7 @@ void WidgetFiles::render(FilesRenderMode mode) { color = INFO_TOP; if (mode == RENDER_NAMES_AND_SCROLLBAR) - _surface.fillRect(Common::Rect(4, yp, _surface.w() - BUTTON_SIZE - 9, yp + _surface.fontHeight()), TRANSPARENCY); + _surface.fillRect(Common::Rect(4, yp, _surface.width() - BUTTON_SIZE - 9, yp + _surface.fontHeight()), TRANSPARENCY); Common::String numStr = Common::String::format("%d.", idx + 1); _surface.writeString(numStr, Common::Point(_surface.widestChar(), yp), color); @@ -324,7 +324,7 @@ bool WidgetFiles::getFilename() { filename.setChar(' ', index); } - _surface.fillRect(Common::Rect(pt.x, pt.y, _surface.w() - BUTTON_SIZE - 9, pt.y + _surface.fontHeight() - 1), TRANSPARENCY); + _surface.fillRect(Common::Rect(pt.x, pt.y, _surface.width() - BUTTON_SIZE - 9, pt.y + _surface.fontHeight() - 1), TRANSPARENCY); _surface.writeString(filename.c_str() + index, pt, COMMAND_HIGHLIGHTED); } else if ((keyState.keycode == Common::KEYCODE_LEFT && index > 0) @@ -387,7 +387,7 @@ bool WidgetFiles::getFilename() { } if ((keyState.ascii >= ' ') && (keyState.ascii <= 'z') && (index < 50)) { - if (pt.x + _surface.charWidth(keyState.ascii) < _surface.w() - BUTTON_SIZE - 20) { + if (pt.x + _surface.charWidth(keyState.ascii) < _surface.w - BUTTON_SIZE - 20) { if (insert) filename.insertChar(keyState.ascii, index); else diff --git a/engines/sherlock/tattoo/widget_foolscap.cpp b/engines/sherlock/tattoo/widget_foolscap.cpp index c8df71e873..8225946838 100644 --- a/engines/sherlock/tattoo/widget_foolscap.cpp +++ b/engines/sherlock/tattoo/widget_foolscap.cpp @@ -103,7 +103,7 @@ void WidgetFoolscap::show() { // Set up the window background _surface.create(_bounds.width(), _bounds.height()); - _surface.blitFrom(paperFrame, Common::Point(0, 0)); + _surface.SHblitFrom(paperFrame, Common::Point(0, 0)); // If they have already solved the puzzle, put the answer on the graphic if (_vm->readFlags(299)) { @@ -265,7 +265,7 @@ void WidgetFoolscap::handleKeyboardEvents() { void WidgetFoolscap::restoreChar() { Screen &screen = *_vm->_screen; ImageFrame &bgFrame = (*_images)[0]; - _surface.blitFrom(bgFrame, _cursorPos, Common::Rect(_cursorPos.x, _cursorPos.y, + _surface.SHblitFrom(bgFrame, _cursorPos, Common::Rect(_cursorPos.x, _cursorPos.y, _cursorPos.x + screen.widestChar(), _cursorPos.y + screen.fontHeight())); } diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp index b49e30b30d..9f126cf7a7 100644 --- a/engines/sherlock/tattoo/widget_inventory.cpp +++ b/engines/sherlock/tattoo/widget_inventory.cpp @@ -94,7 +94,7 @@ void WidgetInventoryTooltip::setText(const Common::String &str) { // Allocate a fresh surface for the new string _bounds = Common::Rect(width, height); _surface.create(width, height); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); if (line2.empty()) { _surface.writeFancyString(str, Common::Point(0, 0), BLACK, INFO_TOP); @@ -338,7 +338,7 @@ void WidgetInventoryVerbs::load() { // Create the surface _surface.create(_bounds.width(), _bounds.height()); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); makeInfoArea(); // Draw the Verb commands and the lines separating them @@ -352,8 +352,8 @@ void WidgetInventoryVerbs::load() { _surface.vLine(3, (_surface.fontHeight() + 7) * (idx + 1) + 1, _bounds.right - 4, INFO_MIDDLE); _surface.vLine(3, (_surface.fontHeight() + 7) * (idx + 1) + 2, _bounds.right - 4, INFO_BOTTOM); - _surface.transBlitFrom(images[4], Common::Point(0, (_surface.fontHeight() + 7) * (idx + 1))); - _surface.transBlitFrom(images[5], Common::Point(_bounds.width() - images[5]._width, + _surface.SHtransBlitFrom(images[4], Common::Point(0, (_surface.fontHeight() + 7) * (idx + 1))); + _surface.SHtransBlitFrom(images[5], Common::Point(_bounds.width() - images[5]._width, (_surface.fontHeight() + 7) * (idx + 1) - 1)); } } @@ -515,7 +515,7 @@ void WidgetInventory::load(int mode) { // Redraw the inventory menu on the widget surface _surface.create(_bounds.width(), _bounds.height()); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); // Draw the window background and then the inventory on top of it makeInfoArea(_surface); @@ -531,7 +531,7 @@ void WidgetInventory::drawBars() { _surface.hLine(3, INVENTORY_YSIZE + 3, _bounds.width() - 4, INFO_TOP); _surface.hLine(3, INVENTORY_YSIZE + 4, _bounds.width() - 4, INFO_MIDDLE); _surface.hLine(3, INVENTORY_YSIZE + 5, _bounds.width() - 4, INFO_BOTTOM); - _surface.transBlitFrom(images[4], Common::Point(0, INVENTORY_YSIZE + 2)); + _surface.SHtransBlitFrom(images[4], Common::Point(0, INVENTORY_YSIZE + 2)); for (int idx = 1; idx <= NUM_INVENTORY_SHOWN / 2; ++idx) { x = idx * (INVENTORY_XSIZE + 3); @@ -540,13 +540,13 @@ void WidgetInventory::drawBars() { _surface.vLine(x + 1, 3, _bounds.height() - 4, INFO_MIDDLE); _surface.vLine(x + 2, 3, _bounds.height() - 4, INFO_BOTTOM); - _surface.transBlitFrom(images[6], Common::Point(x - 1, 1)); - _surface.transBlitFrom(images[7], Common::Point(x - 1, _bounds.height() - 4)); - _surface.transBlitFrom(images[6], Common::Point(x - 1, INVENTORY_YSIZE + 5)); - _surface.transBlitFrom(images[7], Common::Point(x - 1, INVENTORY_YSIZE + 2)); + _surface.SHtransBlitFrom(images[6], Common::Point(x - 1, 1)); + _surface.SHtransBlitFrom(images[7], Common::Point(x - 1, _bounds.height() - 4)); + _surface.SHtransBlitFrom(images[6], Common::Point(x - 1, INVENTORY_YSIZE + 5)); + _surface.SHtransBlitFrom(images[7], Common::Point(x - 1, INVENTORY_YSIZE + 2)); } - _surface.hLine(x + 2, INVENTORY_YSIZE + 2, INVENTORY_YSIZE + 8, INFO_BOTTOM); + _surface.vLine(x + 2, INVENTORY_YSIZE + 2, INVENTORY_YSIZE + 8, INFO_BOTTOM); } void WidgetInventory::drawInventory() { @@ -566,7 +566,7 @@ void WidgetInventory::drawInventory() { // Draw the item if (itemId < inv._holdings) { ImageFrame &img = (*inv._invShapes[idx])[0]; - _surface.transBlitFrom(img, Common::Point(pt.x + (INVENTORY_XSIZE - img._width) / 2, + _surface.SHtransBlitFrom(img, Common::Point(pt.x + (INVENTORY_XSIZE - img._width) / 2, pt.y + (INVENTORY_YSIZE - img._height) / 2)); } } diff --git a/engines/sherlock/tattoo/widget_options.cpp b/engines/sherlock/tattoo/widget_options.cpp index 92bd10bbf6..81f50f3bc5 100644 --- a/engines/sherlock/tattoo/widget_options.cpp +++ b/engines/sherlock/tattoo/widget_options.cpp @@ -257,17 +257,17 @@ void WidgetOptions::render(OptionRenderMode mode) { // Setup the dialog _surface.create(_bounds.width(), _bounds.height()); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); makeInfoArea(); // Draw the lines separating options in the dialog int yp = _surface.fontHeight() + 7; for (int idx = 0; idx < 7; ++idx) { - _surface.transBlitFrom(images[4], Common::Point(0, yp - 1)); - _surface.transBlitFrom(images[5], Common::Point(_surface.w() - images[5]._width, yp - 1)); - _surface.hLine(3, yp, _surface.w() - 4, INFO_TOP); - _surface.hLine(3, yp + 1, _surface.w() - 4, INFO_MIDDLE); - _surface.hLine(3, yp + 2, _surface.w() - 4, INFO_BOTTOM); + _surface.SHtransBlitFrom(images[4], Common::Point(0, yp - 1)); + _surface.SHtransBlitFrom(images[5], Common::Point(_surface.width() - images[5]._width, yp - 1)); + _surface.hLine(3, yp, _surface.width() - 4, INFO_TOP); + _surface.hLine(3, yp + 1, _surface.width() - 4, INFO_MIDDLE); + _surface.hLine(3, yp + 2, _surface.width() - 4, INFO_BOTTOM); yp += _surface.fontHeight() + 7; if (idx == 1) @@ -281,7 +281,7 @@ void WidgetOptions::render(OptionRenderMode mode) { for (int idx = 0, yp = 5; idx < 11; ++idx, yp += _surface.fontHeight() + 7) { if (mode == OP_ALL || idx == _selector || idx == _oldSelector) { if (mode == OP_NAMES) - _surface.fillRect(Common::Rect(4, yp, _surface.w() - 5, yp + _surface.fontHeight() - 1), TRANSPARENCY); + _surface.fillRect(Common::Rect(4, yp, _surface.width() - 5, yp + _surface.fontHeight() - 1), TRANSPARENCY); byte color = (idx == _selector) ? COMMAND_HIGHLIGHTED : INFO_TOP; Common::String str; @@ -302,11 +302,11 @@ void WidgetOptions::render(OptionRenderMode mode) { int num = (_surface.fontHeight() + 4) & 0xfe; int sliderY = yp + num / 2 - 8; - _surface.fillRect(Common::Rect(4, sliderY - (num - 6) / 2, _surface.w() - 5, + _surface.fillRect(Common::Rect(4, sliderY - (num - 6) / 2, _surface.width() - 5, sliderY - (num - 6) / 2 + num - 1), TRANSPARENCY); _surface.fillRect(Common::Rect(_surface.widestChar(), sliderY + 2, - _surface.w() - _surface.widestChar() - 1, sliderY + 3), INFO_MIDDLE); - drawDialogRect(Common::Rect(_surface.widestChar(), sliderY, _surface.w() - _surface.widestChar(), sliderY + 6)); + _surface.width() - _surface.widestChar() - 1, sliderY + 3), INFO_MIDDLE); + drawDialogRect(Common::Rect(_surface.widestChar(), sliderY, _surface.width() - _surface.widestChar(), sliderY + 6)); _surface.fillRect(Common::Rect(_midiSliderX - 1, sliderY - (num - 6) / 2 + 2, _midiSliderX + 1, sliderY - (num - 6) / 2 + num - 3), INFO_MIDDLE); @@ -315,7 +315,7 @@ void WidgetOptions::render(OptionRenderMode mode) { if (_midiSliderX - 4 > _surface.widestChar()) _surface.fillRect(Common::Rect(_midiSliderX - 4, sliderY, _midiSliderX - 4, sliderY + 4), INFO_BOTTOM); - if (_midiSliderX + 4 < _surface.w() - _surface.widestChar()) + if (_midiSliderX + 4 < _surface.width() - _surface.widestChar()) _surface.fillRect(Common::Rect(_midiSliderX + 4, sliderY, _midiSliderX + 4, sliderY + 4), INFO_BOTTOM); break; } @@ -332,18 +332,18 @@ void WidgetOptions::render(OptionRenderMode mode) { int num = (_surface.fontHeight() + 4) & 0xfe; int sliderY = yp + num / 2 - 8; - _surface.fillRect(Common::Rect(4, sliderY - (num - 6) / 2, _surface.w() - 5, + _surface.fillRect(Common::Rect(4, sliderY - (num - 6) / 2, _surface.width() - 5, sliderY - (num - 6) / 2 + num - 1), TRANSPARENCY); - _surface.fillRect(Common::Rect(_surface.widestChar(), sliderY + 2, _surface.w() - _surface.widestChar() - 1, + _surface.fillRect(Common::Rect(_surface.widestChar(), sliderY + 2, _surface.width() - _surface.widestChar() - 1, sliderY + 3), INFO_MIDDLE); - drawDialogRect(Common::Rect(_surface.widestChar(), sliderY, _surface.w() - _surface.widestChar(), sliderY + 6)); + drawDialogRect(Common::Rect(_surface.widestChar(), sliderY, _surface.width() - _surface.widestChar(), sliderY + 6)); _surface.fillRect(Common::Rect(_digiSliderX - 1, sliderY - (num - 6) / 2 + 2, _digiSliderX + 1, sliderY - (num - 6) / 2 + num - 3), INFO_MIDDLE); drawDialogRect(Common::Rect(_digiSliderX - 3, sliderY - (num - 6) / 2, _digiSliderX + 4, sliderY - (num - 6) / 2 + num)); if (_digiSliderX - 4 > _surface.widestChar()) _surface.fillRect(Common::Rect(_digiSliderX - 4, sliderY, _digiSliderX - 4, sliderY + 4), INFO_BOTTOM); - if (_digiSliderX + 4 < _surface.w() - _surface.widestChar()) + if (_digiSliderX + 4 < _surface.width() - _surface.widestChar()) _surface.fillRect(Common::Rect(_digiSliderX + 4, sliderY, _digiSliderX + 4, sliderY + 4), INFO_BOTTOM); break; } @@ -375,7 +375,7 @@ void WidgetOptions::render(OptionRenderMode mode) { // Unless we're doing one of the Slider Controls, print the text for the line if (idx != 3 && idx != 6) { - int xp = (_surface.w() - _surface.stringWidth(str)) / 2; + int xp = (_surface.width() - _surface.stringWidth(str)) / 2; _surface.writeString(str, Common::Point(xp, yp), color); } } diff --git a/engines/sherlock/tattoo/widget_password.cpp b/engines/sherlock/tattoo/widget_password.cpp index 57a5e02653..2a2921026d 100644 --- a/engines/sherlock/tattoo/widget_password.cpp +++ b/engines/sherlock/tattoo/widget_password.cpp @@ -47,7 +47,7 @@ void WidgetPassword::show() { // Create the surface _surface.create(_bounds.width(), _bounds.height()); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); makeInfoArea(); // Draw the header area @@ -55,8 +55,8 @@ void WidgetPassword::show() { _surface.hLine(3, _surface.fontHeight() + 7, _bounds.width() - 4, INFO_TOP); _surface.hLine(3, _surface.fontHeight() + 8, _bounds.width() - 4, INFO_MIDDLE); _surface.hLine(3, _surface.fontHeight() + 9, _bounds.width() - 4, INFO_BOTTOM); - _surface.transBlitFrom(images[4], Common::Point(0, _surface.fontHeight() + 7 - 1)); - _surface.transBlitFrom(images[5], Common::Point(_bounds.width() - images[5]._width, _surface.fontHeight() + 7 - 1)); + _surface.SHtransBlitFrom(images[4], Common::Point(0, _surface.fontHeight() + 7 - 1)); + _surface.SHtransBlitFrom(images[5], Common::Point(_bounds.width() - images[5]._width, _surface.fontHeight() + 7 - 1)); // Set the password entry data _cursorPos = Common::Point(_surface.widestChar(), _surface.fontHeight() + 12); diff --git a/engines/sherlock/tattoo/widget_quit.cpp b/engines/sherlock/tattoo/widget_quit.cpp index f853e7f47f..ea8f2e080c 100644 --- a/engines/sherlock/tattoo/widget_quit.cpp +++ b/engines/sherlock/tattoo/widget_quit.cpp @@ -48,22 +48,22 @@ void WidgetQuit::show() { // Create the surface _surface.create(_bounds.width(), _bounds.height()); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); makeInfoArea(); // Draw the message text - _surface.writeString(FIXED(AreYouSureYou), Common::Point((_surface.w() - _surface.stringWidth(FIXED(AreYouSureYou))) / 2, 5), INFO_TOP); - _surface.writeString(FIXED(WishToQuit), Common::Point((_surface.w() - _surface.stringWidth(FIXED(WishToQuit))) / 2, + _surface.writeString(FIXED(AreYouSureYou), Common::Point((_surface.width() - _surface.stringWidth(FIXED(AreYouSureYou))) / 2, 5), INFO_TOP); + _surface.writeString(FIXED(WishToQuit), Common::Point((_surface.width() - _surface.stringWidth(FIXED(WishToQuit))) / 2, _surface.fontHeight() + 9), INFO_TOP); // Draw the horizontal bars seperating the commands and the message int yp = (_surface.fontHeight() + 4) * 2 + 3; for (int idx = 0; idx < 2; ++idx) { - _surface.transBlitFrom(images[4], Common::Point(0, yp - 1)); - _surface.transBlitFrom(images[5], Common::Point(_surface.w() - images[5]._width, yp - 1)); - _surface.hLine(3, yp, _surface.w() - 4, INFO_TOP); - _surface.hLine(3, yp + 1, _surface.w() - 4, INFO_MIDDLE); - _surface.hLine(3, yp + 2, _surface.w() - 4, INFO_BOTTOM); + _surface.SHtransBlitFrom(images[4], Common::Point(0, yp - 1)); + _surface.SHtransBlitFrom(images[5], Common::Point(_surface.width() - images[5]._width, yp - 1)); + _surface.hLine(3, yp, _surface.width() - 4, INFO_TOP); + _surface.hLine(3, yp + 1, _surface.width() - 4, INFO_MIDDLE); + _surface.hLine(3, yp + 2, _surface.width() - 4, INFO_BOTTOM); const char *btn = (idx == 0) ? YES : NO; _surface.writeString(btn, Common::Point((_bounds.width() - _surface.stringWidth(btn)) / 2, yp + 5), INFO_TOP); @@ -129,11 +129,11 @@ void WidgetQuit::handleEvents() { if (_select != _oldSelect) { byte color = (_select == 1) ? COMMAND_HIGHLIGHTED : INFO_TOP; int yp = (_surface.fontHeight() + 4) * 2 + 8; - _surface.writeString(FIXED(Yes), Common::Point((_surface.w() - _surface.stringWidth(FIXED(Yes))) / 2, yp), color); + _surface.writeString(FIXED(Yes), Common::Point((_surface.width() - _surface.stringWidth(FIXED(Yes))) / 2, yp), color); color = (_select == 0) ? COMMAND_HIGHLIGHTED : INFO_TOP; yp += (_surface.fontHeight() + 7); - _surface.writeString(FIXED(No), Common::Point((_surface.w() - _surface.stringWidth(FIXED(No))) / 2, yp), color); + _surface.writeString(FIXED(No), Common::Point((_surface.width() - _surface.stringWidth(FIXED(No))) / 2, yp), color); } _oldSelect = _select; diff --git a/engines/sherlock/tattoo/widget_talk.cpp b/engines/sherlock/tattoo/widget_talk.cpp index 6e7bde292f..b673f32d31 100644 --- a/engines/sherlock/tattoo/widget_talk.cpp +++ b/engines/sherlock/tattoo/widget_talk.cpp @@ -100,7 +100,7 @@ void WidgetTalk::load() { // Set up the surface _surface.create(_bounds.width(), _bounds.height()); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); // Form the background for the new window makeInfoArea(); @@ -389,7 +389,7 @@ void WidgetTalk::render(Highlight highlightMode) { if (highlightMode == HL_NO_HIGHLIGHTING || _statementLines[idx]._num == _selector || _statementLines[idx]._num == _oldSelector) { // Erase the line contents - _surface.fillRect(Common::Rect(3, yp, _surface.w() - BUTTON_SIZE - 3, yp + _surface.fontHeight()), TRANSPARENCY); + _surface.fillRect(Common::Rect(3, yp, _surface.width() - BUTTON_SIZE - 3, yp + _surface.fontHeight()), TRANSPARENCY); // Different coloring based on whether the option has been previously chosen or not byte color = (!talk._talkHistory[talk._converseNum][_statementLines[idx]._num]) ? diff --git a/engines/sherlock/tattoo/widget_text.cpp b/engines/sherlock/tattoo/widget_text.cpp index d8d229d277..a29cd2700f 100644 --- a/engines/sherlock/tattoo/widget_text.cpp +++ b/engines/sherlock/tattoo/widget_text.cpp @@ -166,7 +166,7 @@ void WidgetText::render(const Common::String &str) { // Allocate a surface for the window _surface.create(_bounds.width(), _bounds.height()); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); // Form the background for the new window makeInfoArea(); @@ -195,7 +195,7 @@ void WidgetMessage::load(const Common::String &str, int time) { // Allocate a surface for the window _surface.create(_bounds.width(), _bounds.height()); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); // Form the background for the new window and write the line of text makeInfoArea(); diff --git a/engines/sherlock/tattoo/widget_tooltip.cpp b/engines/sherlock/tattoo/widget_tooltip.cpp index b29f45f531..1560cb9a80 100644 --- a/engines/sherlock/tattoo/widget_tooltip.cpp +++ b/engines/sherlock/tattoo/widget_tooltip.cpp @@ -47,7 +47,7 @@ void WidgetTooltipBase::draw() { // Draw the widget directly onto the screen. Unlike other widgets, we don't draw to the back buffer, // since nothing should be drawing on top of tooltips, so there's no need to store in the back buffer - screen.transBlitFrom(_surface, Common::Point(_bounds.left - screen._currentScroll.x, + screen.SHtransBlitFrom(_surface, Common::Point(_bounds.left - screen._currentScroll.x, _bounds.top - screen._currentScroll.y)); // Store a copy of the drawn area for later erasing @@ -126,7 +126,7 @@ void WidgetTooltip::setText(const Common::String &str) { // Reallocate the text surface with the new size _surface.create(width, height); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); if (line2.empty()) { // Only a single line diff --git a/engines/sherlock/tattoo/widget_verbs.cpp b/engines/sherlock/tattoo/widget_verbs.cpp index 499afb2e79..5041888ffb 100644 --- a/engines/sherlock/tattoo/widget_verbs.cpp +++ b/engines/sherlock/tattoo/widget_verbs.cpp @@ -127,7 +127,7 @@ void WidgetVerbs::render() { // Create the drawing surface _surface.create(_bounds.width(), _bounds.height()); - _surface.fill(TRANSPARENCY); + _surface.clear(TRANSPARENCY); // Draw basic background makeInfoArea(); @@ -142,8 +142,8 @@ void WidgetVerbs::render() { _surface.hLine(3, (_surface.fontHeight() + 7) * (idx + 1) + 1, _bounds.width() - 4, INFO_MIDDLE); _surface.hLine(3, (_surface.fontHeight() + 7) * (idx + 1) + 2, _bounds.width() - 4, INFO_BOTTOM); - _surface.transBlitFrom(images[4], Common::Point(0, (_surface.fontHeight() + 7) * (idx + 1) - 1)); - _surface.transBlitFrom(images[5], Common::Point(_bounds.width() - images[5]._width, + _surface.SHtransBlitFrom(images[4], Common::Point(0, (_surface.fontHeight() + 7) * (idx + 1) - 1)); + _surface.SHtransBlitFrom(images[5], Common::Point(_bounds.width() - images[5]._width, (_surface.fontHeight() + 7) * (idx + 1) - 1)); } } diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp index dfdd765120..9f4b6c21c6 100644 --- a/engines/sky/control.cpp +++ b/engines/sky/control.cpp @@ -167,7 +167,7 @@ ControlStatus::~ControlStatus() { void ControlStatus::setToText(const char *newText) { char tmpLine[256]; - strcpy(tmpLine, newText); + Common::strlcpy(tmpLine, newText, 256); if (_textData) { _statusText->flushForRedraw(); free(_textData); @@ -324,7 +324,11 @@ void Control::initPanel() { } void Control::buttonControl(ConResource *pButton) { - char autoSave[] = "Restore Autosave"; + char autoSave[50] = "Restore Autosave"; + + if (Common::parseLanguage(ConfMan.get("language")) == Common::RU_RUS) + strncpy(autoSave, "Zarpyzit/ abtocoxpahehie", 50); + if (pButton == NULL) { free(_textSprite); _textSprite = NULL; @@ -398,7 +402,8 @@ void Control::animClick(ConResource *pButton) { void Control::drawMainPanel() { memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); _system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); - _controlPanel->drawToScreen(NO_MASK); + if (_controlPanel) + _controlPanel->drawToScreen(NO_MASK); _exitButton->drawToScreen(NO_MASK); _savePanButton->drawToScreen(NO_MASK); _restorePanButton->drawToScreen(NO_MASK); @@ -525,8 +530,13 @@ void Control::doControlPanel() { } uint16 Control::handleClick(ConResource *pButton) { - char quitDos[] = "Quit to DOS?"; - char restart[] = "Restart?"; + char quitDos[50] = "Quit to DOS?"; + char restart[50] = "Restart?"; + + if (Common::parseLanguage(ConfMan.get("language")) == Common::RU_RUS) { + strncpy(quitDos, "B[uti b DOC?", 50); + strncpy(restart, "Hobaq irpa?", 50); + } switch (pButton->_onClick) { case DO_NOTHING: @@ -1562,8 +1572,13 @@ void Control::showGameQuitMsg() { screenData = _skyScreen->giveCurrent(); - _skyText->displayText(_quitTexts[SkyEngine::_systemVars.language * 2 + 0], textBuf1, true, 320, 255); - _skyText->displayText(_quitTexts[SkyEngine::_systemVars.language * 2 + 1], textBuf2, true, 320, 255); + if (Common::parseLanguage(ConfMan.get("language")) == Common::RU_RUS) { + _skyText->displayText(_quitTexts[8 * 2 + 0], textBuf1, true, 320, 255); + _skyText->displayText(_quitTexts[8 * 2 + 1], textBuf2, true, 320, 255); + } else { + _skyText->displayText(_quitTexts[SkyEngine::_systemVars.language * 2 + 0], textBuf1, true, 320, 255); + _skyText->displayText(_quitTexts[SkyEngine::_systemVars.language * 2 + 1], textBuf2, true, 320, 255); + } uint8 *curLine1 = textBuf1 + sizeof(DataFileHeader); uint8 *curLine2 = textBuf2 + sizeof(DataFileHeader); uint8 *targetLine = screenData + GAME_SCREEN_WIDTH * 80; @@ -1584,7 +1599,7 @@ void Control::showGameQuitMsg() { free(textBuf2); } -char Control::_quitTexts[16][35] = { +char Control::_quitTexts[18][35] = { "Game over player one", "BE VIGILANT", "Das Spiel ist aus.", @@ -1600,7 +1615,9 @@ char Control::_quitTexts[16][35] = { "Fim de jogo para o jogador um", "BE VIGILANT", "Game over player one", - "BE VIGILANT" + "BE VIGILANT", + "Irpa okohseha, irpok 1", + "JYD\x96 JDITELEH" }; uint8 Control::_crossImg[594] = { diff --git a/engines/sky/control.h b/engines/sky/control.h index 44591f299d..2089c74363 100644 --- a/engines/sky/control.h +++ b/engines/sky/control.h @@ -292,7 +292,7 @@ private: ControlStatus *_statusBar; - static char _quitTexts[16][35]; + static char _quitTexts[18][35]; static uint8 _crossImg[594]; }; diff --git a/engines/sky/music/adlibchannel.cpp b/engines/sky/music/adlibchannel.cpp index c7acb9b6c1..2f44add466 100644 --- a/engines/sky/music/adlibchannel.cpp +++ b/engines/sky/music/adlibchannel.cpp @@ -23,7 +23,7 @@ #include "common/endian.h" #include "common/textconsole.h" -#include "common/util.h" +#include "audio/fmopl.h" #include "sky/music/adlibchannel.h" #include "sky/sky.h" diff --git a/engines/sky/music/adlibchannel.h b/engines/sky/music/adlibchannel.h index 4504e3b570..b190ba27dc 100644 --- a/engines/sky/music/adlibchannel.h +++ b/engines/sky/music/adlibchannel.h @@ -24,7 +24,10 @@ #define SKY_MUSIC_ADLIBCHANNEL_H #include "sky/music/musicbase.h" -#include "audio/fmopl.h" + +namespace OPL { +class OPL; +} namespace Sky { diff --git a/engines/sky/music/adlibmusic.cpp b/engines/sky/music/adlibmusic.cpp index be5e7b2353..1a2a91c82a 100644 --- a/engines/sky/music/adlibmusic.cpp +++ b/engines/sky/music/adlibmusic.cpp @@ -26,9 +26,13 @@ #include "sky/music/adlibmusic.h" #include "sky/music/adlibchannel.h" -#include "audio/mixer.h" +#include "audio/fmopl.h" #include "sky/sky.h" +namespace Audio { +class Mixer; +} + namespace Sky { AdLibMusic::AdLibMusic(Audio::Mixer *pMixer, Disk *pDisk) : MusicBase(pMixer, pDisk) { diff --git a/engines/sky/music/adlibmusic.h b/engines/sky/music/adlibmusic.h index 7b51f2d3a0..ebfa038848 100644 --- a/engines/sky/music/adlibmusic.h +++ b/engines/sky/music/adlibmusic.h @@ -24,7 +24,10 @@ #define SKY_MUSIC_ADLIBMUSIC_H #include "sky/music/musicbase.h" -#include "audio/audiostream.h" + +namespace Audio { +class Mixer; +} namespace OPL { class OPL; diff --git a/engines/sky/skydefs.h b/engines/sky/skydefs.h index 167b7dade2..ed07a5e2cd 100644 --- a/engines/sky/skydefs.h +++ b/engines/sky/skydefs.h @@ -45,6 +45,7 @@ namespace Sky { #define SKY_ITALIAN 5 #define SKY_PORTUGUESE 6 #define SKY_SPANISH 7 +#define SKY_RUSSIAN 8 #define ST_COLLISION_BIT 5 diff --git a/engines/sword1/logic.h b/engines/sword1/logic.h index 94da2b3a77..005846df16 100644 --- a/engines/sword1/logic.h +++ b/engines/sword1/logic.h @@ -28,10 +28,13 @@ #include "sword1/objectman.h" #include "common/util.h" #include "common/random.h" -#include "audio/mixer.h" class OSystem; +namespace Audio { +class Mixer; +} + namespace Sword1 { #define NON_ZERO_SCRIPT_VARS 95 diff --git a/engines/sword1/resman.cpp b/engines/sword1/resman.cpp index 0a0324a67c..2f8b37d21c 100644 --- a/engines/sword1/resman.cpp +++ b/engines/sword1/resman.cpp @@ -327,13 +327,12 @@ Common::File *ResMan::resFile(uint32 id) { Clu *closeClu = _openCluStart; _openCluStart = _openCluStart->nextOpen; - if (closeClu) { - if (closeClu->file) - closeClu->file->close(); - delete closeClu->file; - closeClu->file = NULL; - closeClu->nextOpen = NULL; - } + if (closeClu->file) + closeClu->file->close(); + delete closeClu->file; + closeClu->file = NULL; + closeClu->nextOpen = NULL; + _openClus--; } } diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp index 4deaf06edc..a37f7d250d 100644 --- a/engines/sword1/sound.cpp +++ b/engines/sword1/sound.cpp @@ -37,7 +37,6 @@ #include "audio/decoders/mp3.h" #include "audio/decoders/raw.h" #include "audio/decoders/vorbis.h" -#include "audio/decoders/wave.h" #include "audio/decoders/xa.h" namespace Sword1 { diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 1e9b7f70f4..1556f080e9 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -39,7 +39,6 @@ #include "engines/util.h" #include "gui/message.h" -#include "gui/gui-manager.h" namespace Sword1 { diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp index 62fb3d244d..462a49055d 100644 --- a/engines/sword2/music.cpp +++ b/engines/sword2/music.cpp @@ -35,10 +35,11 @@ #include "common/system.h" #include "common/textconsole.h" +#include "audio/audiostream.h" +#include "audio/mixer.h" #include "audio/decoders/mp3.h" #include "audio/decoders/vorbis.h" #include "audio/decoders/flac.h" -#include "audio/decoders/wave.h" #include "audio/decoders/xa.h" #include "audio/rate.h" diff --git a/engines/sword2/screen.cpp b/engines/sword2/screen.cpp index 0cb951fdfc..40baf67e46 100644 --- a/engines/sword2/screen.cpp +++ b/engines/sword2/screen.cpp @@ -1296,7 +1296,7 @@ void Screen::setPsxScrCache(byte *psxScrCache, uint8 level) { } byte *Screen::getPsxScrCache(uint8 level) { - if (level > 3) { + if (level > 2) { level = 0; } @@ -1307,7 +1307,7 @@ byte *Screen::getPsxScrCache(uint8 level) { } bool Screen::getPsxScrCacheStatus(uint8 level) { - if (level > 3) { + if (level > 2) { level = 0; } diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp index a678fdccad..5d35a4f47e 100644 --- a/engines/sword25/gfx/image/vectorimage.cpp +++ b/engines/sword25/gfx/image/vectorimage.cpp @@ -217,6 +217,7 @@ Common::Rect CalculateBoundingBox(const VectorImageElement &vectorImageElement) VectorImage::VectorImage(const byte *pFileData, uint fileSize, bool &success, const Common::String &fname) : _pixelData(0), _fname(fname) { success = false; + _bgColor = 0; // Create bitstream object // In the following the file data will be readout of the bitstream object. diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp index c109e49aa8..92d39c252d 100644 --- a/engines/sword25/gfx/renderobject.cpp +++ b/engines/sword25/gfx/renderobject.cpp @@ -71,19 +71,18 @@ RenderObject::RenderObject(RenderObjectPtr<RenderObject> parentPtr, TYPES type, _version(++_nextGlobalVersion), _isSolid(false) { - // Renderobject registrieren, abhängig vom Handle-Parameter entweder mit beliebigem oder vorgegebenen Handle. if (handle == 0) _handle = RenderObjectRegistry::instance().registerObject(this); else _handle = RenderObjectRegistry::instance().registerObject(this, handle); if (_handle == 0) - return; + error("Failed to initialize RenderObject()"); updateAbsolutePos(); - // Dieses Objekt zu den Kindern der Elternobjektes hinzufügen, falls nicht Wurzel (ParentPtr ungültig) und dem - // selben RenderObjektManager zuweisen. + // Add this item to the children of the parent object, if not root (ParentPtr is invalid), + // assign to the same RenderObjectManager. if (_parentPtr.isValid()) { _managerPtr = _parentPtr->getManager(); _parentPtr->addObject(this->getHandle()); @@ -100,24 +99,22 @@ RenderObject::RenderObject(RenderObjectPtr<RenderObject> parentPtr, TYPES type, } RenderObject::~RenderObject() { - // Objekt aus dem Elternobjekt entfernen. + // Remove object from its parent. if (_parentPtr.isValid()) _parentPtr->detatchChildren(this->getHandle()); deleteAllChildren(); - // Objekt deregistrieren. RenderObjectRegistry::instance().deregisterObject(this); } void RenderObject::preRender(RenderObjectQueue *renderQueue) { - // Objektänderungen validieren validateObject(); if (!_visible) return; - // Falls notwendig, wird die Renderreihenfolge der Kinderobjekte aktualisiert. + // If necessary, update the children rendering order of the updated objects. if (_childChanged) { sortRenderObjects(); _childChanged = false; @@ -149,7 +146,7 @@ bool RenderObject::render(RectangleList *updateRects, const Common::Array<int> & if (needRender) doRender(updateRects); - // Dann müssen die Kinder gezeichnet werden + // Draw all children RENDEROBJECT_ITER it = _children.begin(); for (; it != _children.end(); ++it) if (!(*it)->render(updateRects, updateRectsMinZ)) @@ -159,7 +156,6 @@ bool RenderObject::render(RectangleList *updateRects, const Common::Array<int> & } void RenderObject::validateObject() { - // Die Veränderungen in den Objektvariablen aufheben _oldBbox = _bbox; _oldVisible = _visible; _oldX = _x; @@ -169,15 +165,14 @@ void RenderObject::validateObject() { } bool RenderObject::updateObjectState() { - // Falls sich das Objekt verändert hat, muss der interne Zustand neu berechnet werden und evtl. Update-Regions für den nächsten Frame - // registriert werden. + // If the object has changed, the internal state must be recalculated and possibly + // update Regions be registered for the next frame. if ((calcBoundingBox() != _oldBbox) || (_visible != _oldVisible) || (_x != _oldX) || (_y != _oldY) || (_z != _oldZ) || _refreshForced) { - // Renderrang des Objektes neu bestimmen, da sich dieser verändert haben könnte if (_parentPtr.isValid()) _parentPtr->signalChildChange(); @@ -200,12 +195,10 @@ bool RenderObject::updateObjectState() { } void RenderObject::updateBoxes() { - // Bounding-Box aktualisieren _bbox = calcBoundingBox(); } Common::Rect RenderObject::calcBoundingBox() const { - // Die Bounding-Box mit der Objektgröße initialisieren. Common::Rect bbox(0, 0, _width, _height); // Die absolute Position der Bounding-Box berechnen. @@ -247,8 +240,6 @@ int32 RenderObject::calcAbsoluteZ() const { } void RenderObject::deleteAllChildren() { - // Es ist nicht notwendig die Liste zu iterieren, da jedes Kind für sich DetatchChildren an diesem Objekt aufruft und sich somit - // selber entfernt. Daher muss immer nur ein beliebiges Element (hier das letzte) gelöscht werden, bis die Liste leer ist. while (!_children.empty()) { RenderObjectPtr<RenderObject> curPtr = _children.back(); curPtr.erase(); @@ -261,10 +252,10 @@ bool RenderObject::addObject(RenderObjectPtr<RenderObject> pObject) { return false; } - // Objekt in die Kinderliste einfügen. + // Insert Object in the children list. _children.push_back(pObject); - // Sicherstellen, dass vor dem nächsten Rendern die Renderreihenfolge aktualisiert wird. + // Make sure that before the next render the channel order is updated. if (_parentPtr.isValid()) _parentPtr->signalChildChange(); diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp index dcb29cb380..46f27b06f0 100644 --- a/engines/sword25/sfx/soundengine.cpp +++ b/engines/sword25/sfx/soundengine.cpp @@ -36,6 +36,7 @@ #include "sword25/kernel/inputpersistenceblock.h" #include "sword25/kernel/outputpersistenceblock.h" +#include "audio/audiostream.h" #include "audio/decoders/vorbis.h" #include "common/system.h" diff --git a/engines/sword25/sfx/soundengine.h b/engines/sword25/sfx/soundengine.h index 1dd7ba0925..9bf251be15 100644 --- a/engines/sword25/sfx/soundengine.h +++ b/engines/sword25/sfx/soundengine.h @@ -49,7 +49,6 @@ #include "sword25/kernel/resservice.h" #include "sword25/kernel/persistable.h" -#include "audio/audiostream.h" #include "audio/mixer.h" namespace Sword25 { diff --git a/engines/teenagent/font.cpp b/engines/teenagent/font.cpp index ab75a45ba7..f691ace32d 100644 --- a/engines/teenagent/font.cpp +++ b/engines/teenagent/font.cpp @@ -25,6 +25,7 @@ #include "teenagent/pack.h" #include "teenagent/teenagent.h" +#include "common/debug.h" #include "common/endian.h" #include "common/stream.h" #include "common/textconsole.h" diff --git a/engines/teenagent/music.cpp b/engines/teenagent/music.cpp index 5d66c3c90c..795b8f7312 100644 --- a/engines/teenagent/music.cpp +++ b/engines/teenagent/music.cpp @@ -36,7 +36,7 @@ static const uint32 noteToPeriod[3][12] = { {214, 201, 189, 179, 170, 160, 151, 143, 135, 127, 120, 113} }; -MusicPlayer::MusicPlayer(TeenAgentEngine *vm) : Paula(false, 44100, 5000), _vm(vm), _id(0) { +MusicPlayer::MusicPlayer(TeenAgentEngine *vm) : Paula(false, 44100, 5000), _vm(vm), _id(0), _currRow(0) { } MusicPlayer::~MusicPlayer() { @@ -55,7 +55,7 @@ bool MusicPlayer::load(int id) { Common::StackLock lock(_mutex); // Load the samples - sampleCount = stream->readByte(); + byte sampleCount = stream->readByte(); debugC(0, kDebugMusic, "sampleCount = %d", sampleCount); diff --git a/engines/teenagent/music.h b/engines/teenagent/music.h index e1630cc845..4b1b683a30 100644 --- a/engines/teenagent/music.h +++ b/engines/teenagent/music.h @@ -74,7 +74,6 @@ private: size = 0; } } _samples[256]; - byte sampleCount; Common::Array<Row> _rows; uint _currRow; diff --git a/engines/teenagent/objects.h b/engines/teenagent/objects.h index f923ae52ab..1f8a82a66e 100644 --- a/engines/teenagent/objects.h +++ b/engines/teenagent/objects.h @@ -165,7 +165,7 @@ struct Object { //19 Common::String name, description; - Object(): _base(NULL) {} + Object(): _base(NULL) { id = 0; actorOrientation = 0; enabled = 0; } void dump(int level = 0) const; void setName(const Common::String &newName); void load(byte *addr); @@ -205,7 +205,7 @@ struct Walkbox { Rect rect; byte sideHint[4]; - Walkbox() : _base(NULL) {} + Walkbox() : _base(NULL) { memset(this, 0, sizeof(Walkbox)); } void dump(int level = 0) const; void load(byte *src); void save() const; diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp index 8d8f705a24..3cf566a0e5 100644 --- a/engines/teenagent/resources.cpp +++ b/engines/teenagent/resources.cpp @@ -22,6 +22,7 @@ #include "teenagent/resources.h" #include "teenagent/teenagent.h" +#include "common/debug.h" #include "common/textconsole.h" #include "common/translation.h" #include "common/zlib.h" diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index 6e1cef31bc..c250269844 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -71,6 +71,9 @@ Scene::Scene(TeenAgentEngine *vm) : _vm(vm), intro(false), _id(0), ons(0), varia.close(); loadObjectData(); + + _onsCount = 0; + _messageColor = 0; } Scene::~Scene() { @@ -314,7 +317,7 @@ void Scene::loadOns() { uint16 addr = _vm->res->dseg.get_word(dsAddr_onsAnimationTablePtr + (_id - 1) * 2); debugC(0, kDebugScene, "ons index: %04x", addr); - onsCount = 0; + _onsCount = 0; byte b; byte onId[16]; while ((b = _vm->res->dseg.get_byte(addr)) != 0xff) { @@ -323,15 +326,15 @@ void Scene::loadOns() { if (b == 0) continue; - onId[onsCount++] = b; + onId[_onsCount++] = b; } delete[] ons; ons = NULL; - if (onsCount > 0) { - ons = new Surface[onsCount]; - for (uint32 i = 0; i < onsCount; ++i) { + if (_onsCount > 0) { + ons = new Surface[_onsCount]; + for (uint32 i = 0; i < _onsCount; ++i) { Common::ScopedPtr<Common::SeekableReadStream> s(_vm->res->ons.getStream(onId[i])); if (s) { ons[i].load(*s, Surface::kTypeOns); @@ -498,7 +501,7 @@ bool Scene::processEvent(const Common::Event &event) { events.clear(); sounds.clear(); currentEvent.clear(); - messageColor = textColorMark; + _messageColor = textColorMark; for (int i = 0; i < 4; ++i) customAnimation[i].free(); _vm->playMusic(4); @@ -651,7 +654,7 @@ bool Scene::render(bool tickGame, bool tickMark, uint32 messageDelta) { bool gotAnyAnimation = false; if (ons != NULL && debugFeatures.feature[DebugFeatures::kShowOns]) { - for (uint32 i = 0; i < onsCount; ++i) { + for (uint32 i = 0; i < _onsCount; ++i) { Surface *s = ons + i; if (s != NULL) s->render(surface); @@ -821,7 +824,7 @@ bool Scene::render(bool tickGame, bool tickMark, uint32 messageDelta) { } if (visible) { - _vm->res->font7.render(surface, messagePos.x, messagePos.y, message, messageColor); + _vm->res->font7.render(surface, messagePos.x, messagePos.y, message, _messageColor); busy = true; } } @@ -1005,7 +1008,7 @@ bool Scene::processEventQueue() { warning("no animation in slot %u", messageSlot); } messagePos = messagePosition(message, p); - messageColor = currentEvent.color; + _messageColor = currentEvent.color; if (messageFirstFrame) currentEvent.clear(); // async message, clearing event @@ -1153,7 +1156,7 @@ bool Scene::processEventQueue() { } if (events.empty()) { - messageColor = textColorMark; + _messageColor = textColorMark; hideActor = false; } @@ -1232,7 +1235,7 @@ void Scene::displayMessage(const Common::String &str, byte color, const Common:: debugC(0, kDebugScene, "displayMessage: %s", str.c_str()); message = str; messagePos = (pos.x | pos.y) ? pos : messagePosition(str, position); - messageColor = color; + _messageColor = color; messageTimer = messageDuration(message); } @@ -1251,7 +1254,7 @@ void Scene::clear() { void Scene::clearMessage() { message.clear(); messageTimer = 0; - messageColor = textColorMark; + _messageColor = textColorMark; messageFirstFrame = 0; messageLastFrame = 0; messageAnimation = NULL; diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h index 07b304ed97..40f910a3aa 100644 --- a/engines/teenagent/scene.h +++ b/engines/teenagent/scene.h @@ -194,7 +194,7 @@ private: SurfaceList on; bool onEnabled; Surface *ons; - uint32 onsCount; + uint32 _onsCount; Animation actorAnimation, animation[4], customAnimation[4]; Common::Rect actorAnimationPosition, animationPosition[4]; @@ -214,7 +214,7 @@ private: Common::String message; Common::Point messagePos; - byte messageColor; + byte _messageColor; uint messageTimer; byte messageFirstFrame; byte messageLastFrame; diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index d5a8b8e2dc..2d10b82f51 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -71,6 +71,13 @@ TeenAgentEngine::TeenAgentEngine(OSystem *system, const ADGameDescription *gd) res = new Resources(); console = 0; + scene = 0; + inventory = 0; + _sceneBusy = false; + _dstObject = 0; + _musicStream = 0; + _markDelay = 0; + _gameDelay = 0; } TeenAgentEngine::~TeenAgentEngine() { @@ -545,6 +552,10 @@ Common::Error TeenAgentEngine::run() { syncSoundSettings(); + // Initialize CD audio + if (_gameDescription->flags & ADGF_CD) + g_system->getAudioCDManager()->open(); + setMusic(1); _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); diff --git a/engines/teenagent/teenagent.h b/engines/teenagent/teenagent.h index a06f8dbf9b..234bfb1c57 100644 --- a/engines/teenagent/teenagent.h +++ b/engines/teenagent/teenagent.h @@ -25,11 +25,9 @@ #include "engines/engine.h" -#include "audio/audiostream.h" #include "audio/mixer.h" #include "common/random.h" -#include "common/rect.h" #include "common/array.h" #include "gui/debugger.h" @@ -39,6 +37,14 @@ struct ADGameDescription; +namespace Audio { +class AudioStream; +} + +namespace Common { +struct Point; +} + /** * This is the namespace of the TeenAgent engine. * @@ -53,7 +59,6 @@ struct Object; struct UseHotspot; class Scene; class MusicPlayer; -class Dialog; class Resources; class Inventory; diff --git a/engines/testbed/config.h b/engines/testbed/config.h index db687de261..738f07ab87 100644 --- a/engines/testbed/config.h +++ b/engines/testbed/config.h @@ -30,7 +30,7 @@ #include "common/tokenizer.h" #include "gui/widgets/list.h" -#include "gui/options.h" +#include "gui/dialog.h" #include "gui/ThemeEngine.h" #include "testbed/testsuite.h" diff --git a/engines/testbed/midi.cpp b/engines/testbed/midi.cpp index daa5f1cf3c..5ede21f4ab 100644 --- a/engines/testbed/midi.cpp +++ b/engines/testbed/midi.cpp @@ -27,6 +27,7 @@ #include "graphics/cursorman.h" #include "audio/mididrv.h" +#include "audio/midiparser.h" #include "testbed/midi.h" #include "testbed/testbed.h" diff --git a/engines/testbed/midi.h b/engines/testbed/midi.h index b9f3e82abd..5ed0a73913 100644 --- a/engines/testbed/midi.h +++ b/engines/testbed/midi.h @@ -23,12 +23,16 @@ #ifndef TESTBED_MIDI_H #define TESTBED_MIDI_H -#include "common/stream.h" -#include "audio/midiparser.h" #include "testbed/testsuite.h" // This file can be used as template for header files of other newer testsuites. +class MidiParser; + +namespace Common { +class WriteStream; +} + namespace Testbed { namespace MidiTests { diff --git a/engines/testbed/sound.h b/engines/testbed/sound.h index 893a89b175..5de8877284 100644 --- a/engines/testbed/sound.h +++ b/engines/testbed/sound.h @@ -23,7 +23,6 @@ #ifndef TESTBED_SOUND_H #define TESTBED_SOUND_H -#include "gui/dialog.h" #include "audio/mixer.h" #include "testbed/config.h" #include "testbed/testsuite.h" diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp index f28cd684f9..cfe97e6ec1 100644 --- a/engines/tinsel/bmv.cpp +++ b/engines/tinsel/bmv.cpp @@ -39,6 +39,7 @@ #include "tinsel/tinlib.h" #include "tinsel/tinsel.h" +#include "audio/audiostream.h" #include "audio/decoders/raw.h" #include "common/textconsole.h" @@ -566,8 +567,8 @@ void BMVPlayer::PlayBMV(CORO_PARAM, SCNHANDLE hFileStem, int myEscape) { assert(!bMovieOn); - strcpy(szMovieFile, (char *)LockMem(hFileStem)); - strcat(szMovieFile, BMOVIE_EXTENSION); + Common::strlcpy(szMovieFile, (char *)LockMem(hFileStem), 14); + Common::strlcat(szMovieFile, BMOVIE_EXTENSION, 14); assert(strlen(szMovieFile) <= 12); diff --git a/engines/tinsel/bmv.h b/engines/tinsel/bmv.h index e52297f9de..888f910627 100644 --- a/engines/tinsel/bmv.h +++ b/engines/tinsel/bmv.h @@ -27,12 +27,15 @@ #include "common/coroutines.h" #include "common/file.h" -#include "audio/audiostream.h" #include "audio/mixer.h" #include "tinsel/object.h" #include "tinsel/palette.h" +namespace Audio { +class QueuingAudioStream; +} + namespace Tinsel { diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index 2fde6e788a..c44f1f4ef3 100644 --- a/engines/tinsel/detection.cpp +++ b/engines/tinsel/detection.cpp @@ -235,7 +235,7 @@ const ADGameDescription *TinselMetaEngine::fallbackDetect(const FileMap &allFile for (fileDesc = g->desc.filesDescriptions; fileDesc->fileName; fileDesc++) { // Get the next filename, stripping off any '1' suffix character char tempFilename[50]; - strcpy(tempFilename, fileDesc->fileName); + Common::strlcpy(tempFilename, fileDesc->fileName, 50); char *pOne = strchr(tempFilename, '1'); if (pOne) { do { @@ -275,7 +275,7 @@ const ADGameDescription *TinselMetaEngine::fallbackDetect(const FileMap &allFile for (fileDesc = g->desc.filesDescriptions; fileDesc->fileName; fileDesc++) { // Get the next filename, stripping off any '1' suffix character char tempFilename[50]; - strcpy(tempFilename, fileDesc->fileName); + Common::strlcpy(tempFilename, fileDesc->fileName, 50); char *pOne = strchr(tempFilename, '1'); if (pOne) { do { diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index a84dad942c..ad20253b9c 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -1671,10 +1671,10 @@ static void Select(int i, bool force) { #else // Current description with cursor appended if (cd.box[i].boxText != NULL) { - strcpy(g_sedit, cd.box[i].boxText); - strcat(g_sedit, sCursor); + Common::strlcpy(g_sedit, cd.box[i].boxText, SG_DESC_LEN+2); + Common::strlcat(g_sedit, sCursor, SG_DESC_LEN+2); } else { - strcpy(g_sedit, sCursor); + Common::strlcpy(g_sedit, sCursor, SG_DESC_LEN+2); } #endif @@ -3676,13 +3676,13 @@ extern void HideConversation(bool bHide) { ConstructInventory(FULL); else { // Move it all back on-screen - for (i = 0; g_objArray[i] && i < MAX_WCOMP; i++) { + for (i = 0; i < MAX_WCOMP && g_objArray[i]; i++) { MultiAdjustXY(g_objArray[i], -2 * SCREEN_WIDTH, 0); } // Don't flash if items changed. If they have, will be redrawn anyway. if (TinselV2 || !g_ItemsChanged) { - for (i = 0; g_iconArray[i] && i < MAX_ICONS; i++) { + for (i = 0; i < MAX_ICONS && g_iconArray[i]; i++) { MultiAdjustXY(g_iconArray[i], -2*SCREEN_WIDTH, 0); } } @@ -3739,10 +3739,10 @@ extern void HideConversation(bool bHide) { deltay = g_InvD[INV_CONV].inventoryY - deltay; // Move it all - for (i = 0; g_objArray[i] && i < MAX_WCOMP; i++) { + for (i = 0; i < MAX_WCOMP && g_objArray[i]; i++) { MultiMoveRelXY(g_objArray[i], x - center, deltay); } - for (i = 0; g_iconArray[i] && i < MAX_ICONS; i++) { + for (i = 0; i < MAX_ICONS && g_iconArray[i]; i++) { MultiMoveRelXY(g_iconArray[i], x - center, deltay); } g_InvD[INV_CONV].inventoryX += x - center; @@ -3771,10 +3771,10 @@ extern void HideConversation(bool bHide) { y = 0; if (x || y) { - for (i = 0; g_objArray[i] && i < MAX_WCOMP; i++) { + for (i = 0; i < MAX_WCOMP && g_objArray[i]; i++) { MultiMoveRelXY(g_objArray[i], x, y); } - for (i = 0; g_iconArray[i] && i < MAX_ICONS; i++) { + for (i = 0; i < MAX_ICONS && g_iconArray[i]; i++) { MultiMoveRelXY(g_iconArray[i], x, y); } g_InvD[INV_CONV].inventoryX += x; @@ -3786,10 +3786,10 @@ extern void HideConversation(bool bHide) { */ if (MultiLowest(g_RectObject) > SCREEN_BOX_HEIGHT2 - SysVar(SV_CONV_MINY)) { y = (SCREEN_BOX_HEIGHT2 - SysVar(SV_CONV_MINY)) - MultiLowest(g_RectObject); - for (i = 0; g_objArray[i] && i < MAX_WCOMP; i++) { + for (i = 0; i < MAX_WCOMP && g_objArray[i]; i++) { MultiMoveRelXY(g_objArray[i], 0, y); } - for (i = 0; g_iconArray[i] && i < MAX_ICONS; i++) { + for (i = 0; i < MAX_ICONS && g_iconArray[i]; i++) { MultiMoveRelXY(g_iconArray[i], 0, y); } g_InvD[INV_CONV].inventoryY += y; diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp index 62d244e449..9ffd477c4a 100644 --- a/engines/tinsel/handle.cpp +++ b/engines/tinsel/handle.cpp @@ -258,7 +258,7 @@ void LoadExtraGraphData(SCNHANDLE start, SCNHANDLE next) { } void SetCdPlaySceneDetails(int fileNum, const char *fileName) { - strcpy(g_szCdPlayFile, fileName); + Common::strlcpy(g_szCdPlayFile, fileName, 100); } void SetCdPlayHandle(int fileNum) { diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index e0c1f8d1f9..32d5abb865 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -29,7 +29,6 @@ #include "audio/midiparser.h" // Miles Audio for Discworld 1 #include "audio/miles.h" -#include "audio/decoders/adpcm.h" #include "backends/audiocd/audiocd.h" diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp index 88cd80b78a..226cbb51c0 100644 --- a/engines/tinsel/saveload.cpp +++ b/engines/tinsel/saveload.cpp @@ -563,7 +563,7 @@ static void DoSave() { while (1) { Common::String fname = _vm->getSavegameFilename(ano); - strcpy(tmpName, fname.c_str()); + Common::strlcpy(tmpName, fname.c_str(), FNAMELEN); for (i = 0; i < g_numSfiles; i++) if (!strcmp(g_savedFiles[i].name, tmpName)) diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp index 3d87a17331..a13e91fb3c 100644 --- a/engines/tinsel/sound.cpp +++ b/engines/tinsel/sound.cpp @@ -27,7 +27,6 @@ #include "tinsel/dw.h" #include "tinsel/config.h" #include "tinsel/music.h" -#include "tinsel/strres.h" #include "tinsel/tinsel.h" #include "tinsel/sysvar.h" #include "tinsel/background.h" @@ -37,7 +36,6 @@ #include "common/system.h" #include "audio/mixer.h" -#include "audio/decoders/adpcm.h" #include "audio/decoders/flac.h" #include "audio/decoders/mp3.h" #include "audio/decoders/raw.h" diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 2adddca4fd..1b733a08ba 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -841,9 +841,7 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) if (!scumm_stricmp(g->gameid, gameid)) _gameId = g->id; - int cd_num = ConfMan.getInt("cdrom"); - if (cd_num >= 0) - _system->getAudioCDManager()->openCD(cd_num); + _system->getAudioCDManager()->open(); _mousePos.x = 0; _mousePos.y = 0; @@ -975,7 +973,7 @@ Common::Error TinselEngine::run() { // Check for time to do next game cycle if ((g_system->getMillis() > timerVal + GAME_FRAME_DELAY)) { timerVal = g_system->getMillis(); - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); NextGameCycle(); } diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp index 0aa0a99a36..b26408fadc 100644 --- a/engines/toltecs/movie.cpp +++ b/engines/toltecs/movie.cpp @@ -20,6 +20,7 @@ * */ +#include "audio/audiostream.h" #include "audio/mixer.h" #include "audio/decoders/raw.h" @@ -44,7 +45,7 @@ enum ChunkTypes { kChunkStopSubtitles = 8 }; -MoviePlayer::MoviePlayer(ToltecsEngine *vm) : _vm(vm), _isPlaying(false), _lastPrefetchOfs(0), _framesPerSoundChunk(0), _endPos(0) { +MoviePlayer::MoviePlayer(ToltecsEngine *vm) : _vm(vm), _isPlaying(false), _lastPrefetchOfs(0), _framesPerSoundChunk(0), _endPos(0), _audioStream(0) { } MoviePlayer::~MoviePlayer() { diff --git a/engines/toltecs/movie.h b/engines/toltecs/movie.h index 9404e5f639..8c6348d700 100644 --- a/engines/toltecs/movie.h +++ b/engines/toltecs/movie.h @@ -23,9 +23,12 @@ #ifndef TOLTECS_MOVIE_H #define TOLTECS_MOVIE_H -#include "audio/audiostream.h" #include "audio/mixer.h" // for Audio::SoundHandle +namespace Audio { +class QueuingAudioStream; +} + namespace Toltecs { class MoviePlayer { diff --git a/engines/toltecs/resource.cpp b/engines/toltecs/resource.cpp index 468ae0272f..6dbb9c2843 100644 --- a/engines/toltecs/resource.cpp +++ b/engines/toltecs/resource.cpp @@ -31,6 +31,7 @@ namespace Toltecs { /* ArchiveReader */ ArchiveReader::ArchiveReader() { + _offsets = 0; } ArchiveReader::~ArchiveReader() { diff --git a/engines/toltecs/sprite.cpp b/engines/toltecs/sprite.cpp index f29f64dcfe..be4be5d9e3 100644 --- a/engines/toltecs/sprite.cpp +++ b/engines/toltecs/sprite.cpp @@ -84,6 +84,7 @@ public: _yerror = _sprite->yerror; _origHeight = _sprite->origHeight; _scalerStatus = 0; + _xerror = 0; } SpriteReaderStatus readPacket(PixelPacket &packet) { SpriteReaderStatus status = kSrsPixelsLeft; @@ -135,6 +136,8 @@ public: _yerror = _sprite->yerror; _origHeight = _sprite->origHeight; _scalerStatus = 0; + _sourcep = 0; + _xerror = 0; } SpriteReaderStatus readPacket(PixelPacket &packet) { SpriteReaderStatus status; diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp index 2a32926c53..27145d7c4b 100644 --- a/engines/tony/gfxcore.cpp +++ b/engines/tony/gfxcore.cpp @@ -1733,13 +1733,6 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri g /= 5; b /= 5; - if (r > 0x1f) - r = 0x1f; - if (g > 0x3f) - g = 0x3f; - if (b > 0x1f) - b = 0x1f; - mybuf[0] = (r << 11) | (g << 5) | b; } } @@ -1774,13 +1767,6 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri g /= 6; b /= 6; - if (r > 0x1f) - r = 0x1f; - if (g > 0x3f) - g = 0x3f; - if (b > 0x1f) - b = 0x1f; - mybuf[0] = (r << 11) | (g << 5) | b; } } diff --git a/engines/tony/mpal/loadmpc.cpp b/engines/tony/mpal/loadmpc.cpp index 8d030f1e52..01892a40e6 100644 --- a/engines/tony/mpal/loadmpc.cpp +++ b/engines/tony/mpal/loadmpc.cpp @@ -331,7 +331,7 @@ static const byte *parseItem(const byte *lpBuf, LpMpalItem lpmiItem) { byte len = *lpBuf; lpBuf++; - memcpy(lpmiItem->_lpszDescribe, lpBuf, MIN((byte)127, len)); + memcpy(lpmiItem->_lpszDescribe, lpBuf, MIN((byte)MAX_DESCRIBE_SIZE, len)); lpBuf += len; if (len >= MAX_DESCRIBE_SIZE) diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 89cc28130d..9172843781 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -367,12 +367,18 @@ MpalHandle resLoad(uint32 dwId) { temp = (byte *)globalAlloc(GMEM_FIXED | GMEM_ZEROINIT, nSizeComp); nBytesRead = GLOBALS._hMpr.read(temp, nSizeComp); - if (nBytesRead != nSizeComp) + if (nBytesRead != nSizeComp) { + globalDestroy(temp); + globalDestroy(h); return NULL; + } lzo1x_decompress(temp, nSizeComp, buf, &nBytesRead); - if (nBytesRead != nSizeDecomp) + if (nBytesRead != nSizeDecomp) { + globalDestroy(temp); + globalDestroy(h); return NULL; + } globalDestroy(temp); globalUnlock(h); @@ -526,8 +532,10 @@ static LpItem getItemData(uint32 nOrdItem) { globalFree(hDat); // Check if we've got to the end of the file - if (i != 0xABCD) + if (i != 0xABCD) { + globalDestroy(ret); return NULL; + } return ret; } @@ -1413,36 +1421,51 @@ bool mpalInit(const char *lpszMpcFileName, const char *lpszMprFileName, if (bCompress) { // Get the compressed size and read the data in uint32 dwSizeComp = hMpc.readUint32LE(); - if (hMpc.err()) + if (hMpc.err()) { + globalDestroy(lpMpcImage); return false; + } cmpbuf = (byte *)globalAlloc(GMEM_FIXED, dwSizeComp); - if (cmpbuf == NULL) + if (cmpbuf == NULL) { + globalDestroy(lpMpcImage); return false; + } nBytesRead = hMpc.read(cmpbuf, dwSizeComp); - if (nBytesRead != dwSizeComp) + if (nBytesRead != dwSizeComp) { + globalDestroy(cmpbuf); + globalDestroy(lpMpcImage); return false; + } // Decompress the data lzo1x_decompress(cmpbuf, dwSizeComp, lpMpcImage, &nBytesRead); - if (nBytesRead != dwSizeDecomp) + if (nBytesRead != dwSizeDecomp) { + globalDestroy(cmpbuf); + globalDestroy(lpMpcImage); return false; + } globalDestroy(cmpbuf); } else { // If the file is not compressed, we directly read in the data nBytesRead = hMpc.read(lpMpcImage, dwSizeDecomp); - if (nBytesRead != dwSizeDecomp) + if (nBytesRead != dwSizeDecomp) { + globalDestroy(lpMpcImage); return false; + } } // Close the file hMpc.close(); // Process the data - if (parseMpc(lpMpcImage) == false) + if (parseMpc(lpMpcImage) == false) { + globalDestroy(lpMpcImage); + return false; + } globalDestroy(lpMpcImage); diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 3ab23a1e51..169e2eff7b 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -35,7 +35,6 @@ #include "graphics/surface.h" #include "graphics/thumbnail.h" #include "gui/saveload.h" -#include "gui/about.h" #include "gui/message.h" #include "toon/resource.h" #include "toon/toon.h" diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index ff4f41f44d..bb21f399c6 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -32,6 +32,7 @@ #include "common/keyboard.h" #include "common/textconsole.h" +#include "audio/audiostream.h" #include "audio/mixer.h" #include "engines/util.h" diff --git a/engines/touche/touche.h b/engines/touche/touche.h index 3de5b8caf2..33c415d9dc 100644 --- a/engines/touche/touche.h +++ b/engines/touche/touche.h @@ -31,7 +31,6 @@ #include "common/util.h" #include "audio/mixer.h" -#include "audio/audiostream.h" #include "engines/engine.h" diff --git a/engines/tsage/blue_force/blueforce_dialogs.cpp b/engines/tsage/blue_force/blueforce_dialogs.cpp index 5be27c9ae7..99db61b64d 100644 --- a/engines/tsage/blue_force/blueforce_dialogs.cpp +++ b/engines/tsage/blue_force/blueforce_dialogs.cpp @@ -20,9 +20,6 @@ * */ -#include "gui/dialog.h" -#include "gui/widget.h" - #include "tsage/tsage.h" #include "tsage/core.h" #include "tsage/dialogs.h" @@ -161,7 +158,7 @@ void RightClickDialog::execute() { } g_system->delayMillis(10); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } // Deactivate the graphics manager used for the dialog @@ -242,7 +239,7 @@ void AmmoBeltDialog::execute() { } g_system->delayMillis(10); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } _gfxManager.deactivate(); diff --git a/engines/tsage/blue_force/blueforce_dialogs.h b/engines/tsage/blue_force/blueforce_dialogs.h index 77017db9d0..38ec7a7828 100644 --- a/engines/tsage/blue_force/blueforce_dialogs.h +++ b/engines/tsage/blue_force/blueforce_dialogs.h @@ -23,13 +23,10 @@ #ifndef TSAGE_BLUEFORCE_DIALOGS_H #define TSAGE_BLUEFORCE_DIALOGS_H -#include "gui/options.h" +#include "tsage/core.h" #include "tsage/dialogs.h" #include "tsage/events.h" #include "tsage/graphics.h" -#include "common/list.h" -#include "common/rect.h" -#include "common/system.h" namespace TsAGE { diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index e6e71399dc..2c5f9bd738 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -859,7 +859,7 @@ void SceneExt::endStrip() { } void SceneExt::clearScreen() { - BF_GLOBALS._screenSurface.fillRect(BF_GLOBALS._screenSurface.getBounds(), 0); + BF_GLOBALS._screen.clear(); } /*--------------------------------------------------------------------------*/ @@ -1411,7 +1411,7 @@ void SceneMessage::process(Event &event) { void SceneMessage::draw() { - GfxSurface &surface = BF_GLOBALS._screenSurface; + GfxSurface &surface = BF_GLOBALS._screen; // Clear the game area surface.fillRect(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 0); diff --git a/engines/tsage/blue_force/blueforce_scenes1.cpp b/engines/tsage/blue_force/blueforce_scenes1.cpp index 1cbebd140e..6c37d18cc7 100644 --- a/engines/tsage/blue_force/blueforce_scenes1.cpp +++ b/engines/tsage/blue_force/blueforce_scenes1.cpp @@ -22,6 +22,7 @@ #include "common/config-manager.h" #include "tsage/blue_force/blueforce_scenes1.h" +#include "tsage/dialogs.h" #include "tsage/scenes.h" #include "tsage/tsage.h" #include "tsage/staticres.h" diff --git a/engines/tsage/blue_force/blueforce_scenes4.cpp b/engines/tsage/blue_force/blueforce_scenes4.cpp index 50f8499b3b..7c5b41092c 100644 --- a/engines/tsage/blue_force/blueforce_scenes4.cpp +++ b/engines/tsage/blue_force/blueforce_scenes4.cpp @@ -21,7 +21,6 @@ */ #include "tsage/blue_force/blueforce_scenes4.h" -#include "tsage/blue_force/blueforce_dialogs.h" #include "tsage/scenes.h" #include "tsage/tsage.h" #include "tsage/staticres.h" diff --git a/engines/tsage/blue_force/blueforce_scenes5.cpp b/engines/tsage/blue_force/blueforce_scenes5.cpp index 562facd000..b757860dda 100644 --- a/engines/tsage/blue_force/blueforce_scenes5.cpp +++ b/engines/tsage/blue_force/blueforce_scenes5.cpp @@ -21,7 +21,6 @@ */ #include "tsage/blue_force/blueforce_scenes5.h" -#include "tsage/blue_force/blueforce_dialogs.h" #include "tsage/scenes.h" #include "tsage/tsage.h" #include "tsage/staticres.h" diff --git a/engines/tsage/blue_force/blueforce_scenes6.cpp b/engines/tsage/blue_force/blueforce_scenes6.cpp index 92534d3095..921b2c89d0 100644 --- a/engines/tsage/blue_force/blueforce_scenes6.cpp +++ b/engines/tsage/blue_force/blueforce_scenes6.cpp @@ -21,7 +21,6 @@ */ #include "tsage/blue_force/blueforce_scenes6.h" -#include "tsage/blue_force/blueforce_dialogs.h" #include "tsage/scenes.h" #include "tsage/tsage.h" #include "tsage/staticres.h" @@ -78,7 +77,7 @@ void Scene600::Action1::signal() { pObj->animate(ANIM_MODE_NONE, NULL); } - BF_GLOBALS._screenSurface.fillRect(BF_GLOBALS._screenSurface.getBounds(), 0); + BF_GLOBALS._screen.fillRect(BF_GLOBALS._screen.getBounds(), 0); scene->loadScene(999); setDelay(5); break; @@ -275,7 +274,7 @@ void Scene666::postInit(SceneObjectList *OwnerList) { SceneExt::postInit(); BF_GLOBALS._interfaceY = SCREEN_HEIGHT; loadScene(999); - BF_GLOBALS._screenSurface.fillRect(BF_GLOBALS._screenSurface.getBounds(), 0); + BF_GLOBALS._screen.fillRect(BF_GLOBALS._screen.getBounds(), 0); if (BF_GLOBALS._dayNumber == 0) { BF_GLOBALS._dayNumber = 1; diff --git a/engines/tsage/blue_force/blueforce_scenes8.cpp b/engines/tsage/blue_force/blueforce_scenes8.cpp index 337e73dad0..15767215c5 100644 --- a/engines/tsage/blue_force/blueforce_scenes8.cpp +++ b/engines/tsage/blue_force/blueforce_scenes8.cpp @@ -21,7 +21,6 @@ */ #include "tsage/blue_force/blueforce_scenes8.h" -#include "tsage/blue_force/blueforce_dialogs.h" #include "tsage/scenes.h" #include "tsage/tsage.h" #include "tsage/staticres.h" diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp index d1faca5dac..7240c91720 100644 --- a/engines/tsage/converse.cpp +++ b/engines/tsage/converse.cpp @@ -469,7 +469,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) { while (!g_globals->_events.getEvent(event, EVENT_KEYPRESS | EVENT_BUTTON_DOWN | EVENT_MOUSE_MOVE) && !g_vm->shouldQuit()) { g_system->delayMillis(10); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } if (g_vm->shouldQuit()) break; diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index d4068c25c9..985d16b031 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1467,7 +1467,7 @@ void ScenePalette::fade(const byte *adjustData, bool fullAdjust, int percent) { // Set the altered palette g_system->getPaletteManager()->setPalette((const byte *)&tempPalette[0], 0, 256); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } PaletteRotation *ScenePalette::addRotation(int start, int end, int rotationMode, int duration, Action *action) { @@ -1524,11 +1524,11 @@ void ScenePalette::changeBackground(const Rect &bounds, FadeMode fadeMode) { if (g_vm->getGameID() != GType_Ringworld && g_vm->getGameID() != GType_Sherlock1) tempRect.setHeight(T2_GLOBALS._interfaceY); - g_globals->_screenSurface.copyFrom(g_globals->_sceneManager._scene->_backSurface, + g_globals->_screen.copyFrom(g_globals->_sceneManager._scene->_backSurface, tempRect, Rect(0, 0, tempRect.width(), tempRect.height()), NULL); if (g_vm->getGameID() == GType_Ringworld2 && !GLOBALS._player._uiEnabled && T2_GLOBALS._interfaceY == UI_INTERFACE_Y) { - g_globals->_screenSurface.fillRect(Rect(0, UI_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT - 1), 0); + g_globals->_screen.fillRect(Rect(0, UI_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT - 1), 0); } for (SynchronizedList<PaletteModifier *>::iterator i = tempPalette._listeners.begin(); i != tempPalette._listeners.end(); ++i) @@ -1796,7 +1796,7 @@ void SceneItem::display(int resNum, int lineNum, ...) { // Keep event on-screen until a mouse or keypress while (!g_vm->shouldQuit() && !g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS)) { - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); g_system->delayMillis(10); if ((g_vm->getGameID() == GType_Ringworld2) && (R2_GLOBALS._speechSubtitles & SPEECH_VOICE)) { @@ -2816,7 +2816,7 @@ void SceneObject::updateScreen() { destRect.translate(-sceneBounds.left, -sceneBounds.top); srcRect.translate(-g_globals->_sceneOffset.x, -g_globals->_sceneOffset.y); - g_globals->_screenSurface.copyFrom(g_globals->_sceneManager._scene->_backSurface, srcRect, destRect); + g_globals->_screen.copyFrom(g_globals->_sceneManager._scene->_backSurface, srcRect, destRect); } } diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp index dd4bc6aa86..3704ce1f04 100644 --- a/engines/tsage/dialogs.cpp +++ b/engines/tsage/dialogs.cpp @@ -23,6 +23,7 @@ #include "common/translation.h" #include "gui/dialog.h" +#include "gui/options.h" #include "gui/widget.h" #include "tsage/tsage.h" @@ -91,6 +92,11 @@ int MessageDialog::show2(const Common::String &message, const Common::String &bt /*--------------------------------------------------------------------------*/ +class ConfigDialog : public GUI::OptionsDialog { +public: + ConfigDialog(); +}; + ConfigDialog::ConfigDialog() : GUI::OptionsDialog("", "GlobalConfig") { // // Sound controllers diff --git a/engines/tsage/dialogs.h b/engines/tsage/dialogs.h index 8ab37f6c93..33a5fa47a4 100644 --- a/engines/tsage/dialogs.h +++ b/engines/tsage/dialogs.h @@ -23,7 +23,6 @@ #ifndef TSAGE_DIALOGS_H #define TSAGE_DIALOGS_H -#include "gui/options.h" #include "tsage/events.h" #include "tsage/graphics.h" #include "common/list.h" @@ -44,11 +43,6 @@ public: static int show2(const Common::String &message, const Common::String &btn1Message, const Common::String &btn2Message = Common::String()); }; -class ConfigDialog : public GUI::OptionsDialog { -public: - ConfigDialog(); -}; - /*--------------------------------------------------------------------------*/ class ModalDialog : public GfxDialog { diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp index 0491c043a4..1fa17022de 100644 --- a/engines/tsage/events.cpp +++ b/engines/tsage/events.cpp @@ -50,7 +50,7 @@ bool EventsClass::pollEvent() { ++_frameNumber; // Update screen - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } if (!g_system->getEventManager()->pollEvent(_event)) return false; @@ -400,7 +400,7 @@ void EventsClass::delay(int numFrames) { _priorFrameTime = g_system->getMillis(); } - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); _prevDelayFrame = _frameNumber; _priorFrameTime = g_system->getMillis(); } diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index b880f35007..b95bea3b23 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -59,7 +59,7 @@ static SavedObject *classFactoryProc(const Common::String &className) { /*--------------------------------------------------------------------------*/ -Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface), +Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screen), _randomSource("tsage"), _color1(0), _color2(255), _color3(255) { reset(); _stripNum = 0; @@ -119,7 +119,7 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface _color3 = 4; _dialogCenter.y = 100; } - _screenSurface.setScreenSurface(); + _gfxManagers.push_back(&_gfxManagerInstance); _sceneObjects = &_sceneObjectsInstance; diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 1194fe8b9c..8a441db922 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -25,11 +25,11 @@ #include "common/random.h" #include "tsage/core.h" -#include "tsage/dialogs.h" #include "tsage/scenes.h" #include "tsage/events.h" #include "tsage/sound.h" #include "tsage/saveload.h" +#include "tsage/screen.h" #include "tsage/user_interface.h" namespace TsAGE { @@ -38,7 +38,7 @@ class Globals : public SavedObject { private: static void dispatchSound(ASound *obj); public: - GfxSurface _screenSurface; + Screen _screen; GfxManager _gfxManagerInstance; Common::List<GfxManager *> _gfxManagers; SceneHandler *_sceneHandler; diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index 156503fb51..58fa5b8094 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -229,123 +229,43 @@ void Rect::synchronize(Serializer &s) { /*--------------------------------------------------------------------------*/ -GfxSurface::GfxSurface() : _bounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) { +GfxSurface::GfxSurface() : Graphics::ManagedSurface(), _bounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) { _disableUpdates = false; _lockSurfaceCtr = 0; - _customSurface = NULL; _transColor = -1; - _trackDirtyRects = false; _flags = 0; } -GfxSurface::GfxSurface(const GfxSurface &s) { +GfxSurface::GfxSurface(const GfxSurface &s): Graphics::ManagedSurface() { _lockSurfaceCtr = 0; - _customSurface = NULL; - _trackDirtyRects = false; - *this = s; + + operator=(s); } GfxSurface::~GfxSurface() { - clear(); + // Sanity check.. GfxSurface should always be just referencing _rawSurface, + // and not directly managing it's own surface + assert(disposeAfterUse() == DisposeAfterUse::NO); } -void GfxSurface::clear() { - if (_customSurface) { - _customSurface->free(); - delete _customSurface; - _customSurface = NULL; - } -} - -/** - * Specifies that the surface will encapsulate the ScummVM screen surface - */ -void GfxSurface::setScreenSurface() { - _trackDirtyRects = true; - create(SCREEN_WIDTH, SCREEN_HEIGHT); -} - -/** - * Updates the physical screen with the screen surface buffer - */ -void GfxSurface::updateScreen() { - assert(_trackDirtyRects); - - // Merge any overlapping dirty rects - mergeDirtyRects(); - - // Loop through the dirty rect list to copy the affected areas to the sc - for (Common::List<Rect>::iterator i = _dirtyRects.begin(); i != _dirtyRects.end(); ++i) { - Rect r = *i; - - // Make sure that there is something to update. If not, skip this - // rectangle. An example case is the speedbike closeup at the beginning - // of Ringworld (third screen). - if (r.isEmpty()) - continue; - - const byte *srcP = (const byte *)_customSurface->getBasePtr(r.left, r.top); - g_system->copyRectToScreen(srcP, _customSurface->pitch, r.left, r.top, - r.width(), r.height()); - } - - // Update the physical screen - g_system->updateScreen(); - - // Now that the dirty rects have been copied, clear the dirty rect list - _dirtyRects.clear(); -} +void GfxSurface::create(uint16 width, uint16 height) { + free(); -/** - * Adds a rect to the dirty rect list - */ -void GfxSurface::addDirtyRect(const Rect &r) { - if (_trackDirtyRects) { - // Get the bounds and adjust to allow for sub-screen areas - Rect r2 = r; - r2.translate(_bounds.left, _bounds.top); - - // Add to the dirty rect list - r2.right = MIN(r2.right + 1, SCREEN_WIDTH); - r2.bottom = MIN(r2.bottom + 1, SCREEN_HEIGHT); - - if (r2.isValidRect()) - _dirtyRects.push_back(r2); - } + _rawSurface.create(width, height); + setBounds(Rect(0, 0, width, height)); } - - -/** - * Specifies that the surface should maintain it's own internal surface - */ -void GfxSurface::create(int width, int height) { - assert((width >= 0) && (height >= 0)); - - if (_customSurface) { - _customSurface->free(); - delete _customSurface; - } - _customSurface = new Graphics::Surface(); - _customSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); - Common::fill((byte *)_customSurface->getPixels(), (byte *)_customSurface->getBasePtr(0, height), 0); - _bounds = Rect(0, 0, width, height); +void GfxSurface::setBounds(const Rect &bounds) { + _bounds = bounds; + Graphics::ManagedSurface::create(_rawSurface, bounds); } /** * Locks the surface for access, and returns a raw ScummVM surface to manipulate it */ -Graphics::Surface GfxSurface::lockSurface() { +Graphics::ManagedSurface &GfxSurface::lockSurface() { ++_lockSurfaceCtr; - - Graphics::Surface *src = _customSurface; - assert(src); - - // Setup the returned surface either as one pointing to the same pixels as the source, or - // as a subset of the source one based on the currently set bounds - Graphics::Surface result; - result.init(_bounds.width(), _bounds.height(), src->pitch, src->getBasePtr(_bounds.left, _bounds.top), src->format); - return result; + return *this; } /** @@ -367,69 +287,43 @@ void GfxSurface::synchronize(Serializer &s) { if (s.isSaving()) { // Save contents of the surface - if (_customSurface) { - s.syncAsSint16LE(_customSurface->w); - s.syncAsSint16LE(_customSurface->h); - s.syncBytes((byte *)_customSurface->getPixels(), _customSurface->w * _customSurface->h); + if (disposeAfterUse() == DisposeAfterUse::YES) { + s.syncAsSint16LE(this->w); + s.syncAsSint16LE(this->h); + s.syncBytes((byte *)getPixels(), this->w * this->h); } else { int zero = 0; s.syncAsSint16LE(zero); s.syncAsSint16LE(zero); } } else { - int w = 0, h = 0; - s.syncAsSint16LE(w); - s.syncAsSint16LE(h); - - if ((w == 0) || (h == 0)) { - if (_customSurface) - delete _customSurface; - _customSurface = NULL; + int xSize = 0, ySize = 0; + s.syncAsSint16LE(xSize); + s.syncAsSint16LE(ySize); + + if (xSize == 0 || ySize == 0) { + free(); } else { - create(w, h); - s.syncBytes((byte *)_customSurface->getPixels(), w * h); + create(xSize, ySize); + s.syncBytes((byte *)getPixels(), xSize * ySize); } } } -/** - * Fills a specified rectangle on the surface with the specified color - * - * @bounds Area to fill - * @color Color to use - */ -void GfxSurface::fillRect(const Rect &bounds, int color) { - Graphics::Surface surface = lockSurface(); - surface.fillRect(bounds, color); - unlockSurface(); - addDirtyRect(bounds); -} - GfxSurface &GfxSurface::operator=(const GfxSurface &s) { assert(_lockSurfaceCtr == 0); assert(s._lockSurfaceCtr == 0); - if (_customSurface) { - _customSurface->free(); - delete _customSurface; - } - - _customSurface = s._customSurface; _disableUpdates = s._disableUpdates; _bounds = s._bounds; _centroid = s._centroid; _transColor = s._transColor; _flags = s._flags; - if (_customSurface) { - // Surface owns the internal data, so replicate it so new surface owns it's own - _customSurface = new Graphics::Surface(); - _customSurface->create(s._customSurface->w, s._customSurface->h, Graphics::PixelFormat::createFormatCLUT8()); - const byte *srcP = (const byte *)s._customSurface->getPixels(); - byte *destP = (byte *)_customSurface->getPixels(); - - Common::copy(srcP, srcP + (_bounds.width() * _bounds.height()), destP); - } + // Copy the source's surface + create(s.w, s.h); + blitFrom(s); + setBounds(s.getBounds()); return *this; } @@ -474,7 +368,7 @@ bool GfxSurface::displayText(const Common::String &msg, const Common::Point &pt) /** * Loads a quarter of a screen from a resource */ -void GfxSurface::loadScreenSection(Graphics::Surface &dest, int xHalf, int yHalf, int xSection, int ySection) { +void GfxSurface::loadScreenSection(Graphics::ManagedSurface &dest, int xHalf, int yHalf, int xSection, int ySection) { int screenNum = g_globals->_sceneManager._scene->_activeScreenNumber; Rect updateRect(0, 0, 160, 100); updateRect.translate(xHalf * 160, yHalf * 100); @@ -682,50 +576,6 @@ void GfxSurface::draw(const Common::Point &pt, Rect *rect) { } } -/** - * Merges any clipping rectangles that overlap to try and reduce - * the total number of clip rectangles. - */ -void GfxSurface::mergeDirtyRects() { - if (_dirtyRects.size() <= 1) - return; - - Common::List<Rect>::iterator rOuter, rInner; - - for (rOuter = _dirtyRects.begin(); rOuter != _dirtyRects.end(); ++rOuter) { - rInner = rOuter; - while (++rInner != _dirtyRects.end()) { - - if ((*rOuter).intersects(*rInner)) { - // these two rectangles overlap or - // are next to each other - merge them - - unionRectangle(*rOuter, *rOuter, *rInner); - - // remove the inner rect from the list - _dirtyRects.erase(rInner); - - // move back to beginning of list - rInner = rOuter; - } - } - } -} - -/** - * Creates the union of two rectangles. - * Returns True if there is a union. - * @param pDest destination rectangle that is to receive the new union - * @param pSrc1 a source rectangle - * @param pSrc2 a source rectangle - */ -bool GfxSurface::unionRectangle(Common::Rect &destRect, const Rect &src1, const Rect &src2) { - destRect = src1; - destRect.extend(src2); - - return !destRect.isEmpty(); -} - /*--------------------------------------------------------------------------*/ GfxElement::GfxElement() { @@ -762,17 +612,16 @@ void GfxElement::highlight() { Rect tempRect(_bounds); tempRect.collapse(g_globals->_gfxEdgeAdjust - 1, g_globals->_gfxEdgeAdjust - 1); - for (int yp = tempRect.top; yp < tempRect.bottom; ++yp) { - byte *lineP = (byte *)surface.getBasePtr(tempRect.left, yp); - for (int xp = tempRect.left; xp < tempRect.right; ++xp, ++lineP) { + Graphics::Surface dest = surface.getSubArea(tempRect); + + for (int yp = 0; yp < dest.h; ++yp) { + byte *lineP = (byte *)dest.getBasePtr(0, yp); + for (int xp = 0; xp < tempRect.right; ++xp, ++lineP) { if (*lineP == _colors.background) *lineP = _colors.foreground; else if (*lineP == _colors.foreground) *lineP = _colors.background; } } - // Mark the affected area as dirty - gfxManager.getSurface().addDirtyRect(tempRect); - // Release the surface gfxManager.unlockSurface(); } @@ -816,10 +665,11 @@ void GfxElement::drawFrame() { // Loop through the surface area to replace each pixel // with its proper shaded replacement - Graphics::Surface surface = gfxManager.lockSurface(); - for (int y = tempRect.top; y < tempRect.bottom; ++y) { - byte *lineP = (byte *)surface.getBasePtr(tempRect.left, y); - for (int x = 0; x < tempRect.width(); ++x) { + Graphics::Surface dest = gfxManager.getSurface().getSubArea(tempRect); + + for (int y = 0; y < dest.h; ++y) { + byte *lineP = (byte *)dest.getBasePtr(0, y); + for (int x = 0; x < dest.w; ++x) { *lineP = transList[*lineP]; lineP++; } @@ -827,27 +677,24 @@ void GfxElement::drawFrame() { // Draw the edge frame // Outer frame border - surface.hLine(tempRect.left + 2, tempRect.top, tempRect.right - 2, 0); - surface.hLine(tempRect.left + 2, tempRect.bottom, tempRect.right - 2, 0); - surface.vLine(tempRect.left, tempRect.top + 2, tempRect.bottom - 2, 0); - surface.vLine(tempRect.right, tempRect.top + 2, tempRect.bottom - 2, 0); - *((byte *)surface.getBasePtr(tempRect.left + 1, tempRect.top + 1)) = 0; - *((byte *)surface.getBasePtr(tempRect.right - 1, tempRect.top + 1)) = 0; - *((byte *)surface.getBasePtr(tempRect.left + 1, tempRect.bottom - 1)) = 0; - *((byte *)surface.getBasePtr(tempRect.right - 1, tempRect.bottom - 1)) = 0; + dest.hLine(2, 0, dest.w - 2, 0); + dest.hLine(2, dest.h - 1, dest.w - 2, 0); + dest.vLine(0, 2, dest.h - 2, 0); + dest.vLine(tempRect.right, 2, dest.h - 2, 0); + *((byte *)dest.getBasePtr(1, 1)) = 0; + *((byte *)dest.getBasePtr(dest.w - 1, 1)) = 0; + *((byte *)dest.getBasePtr(1, dest.h - 1)) = 0; + *((byte *)dest.getBasePtr(dest.w - 1, dest.h - 1)) = 0; // Inner frame border - surface.hLine(tempRect.left + 2, tempRect.top + 1, tempRect.right - 2, R2_GLOBALS._frameEdgeColor); - surface.hLine(tempRect.left + 2, tempRect.bottom - 1, tempRect.right - 2, R2_GLOBALS._frameEdgeColor); - surface.vLine(tempRect.left + 1, tempRect.top + 2, tempRect.bottom - 2, R2_GLOBALS._frameEdgeColor); - surface.vLine(tempRect.right - 1, tempRect.top + 2, tempRect.bottom - 2, R2_GLOBALS._frameEdgeColor); - *((byte *)surface.getBasePtr(tempRect.left + 2, tempRect.top + 2)) = R2_GLOBALS._frameEdgeColor; - *((byte *)surface.getBasePtr(tempRect.right - 2, tempRect.top + 2)) = R2_GLOBALS._frameEdgeColor; - *((byte *)surface.getBasePtr(tempRect.left + 2, tempRect.bottom - 2)) = R2_GLOBALS._frameEdgeColor; - *((byte *)surface.getBasePtr(tempRect.right - 2, tempRect.bottom - 2)) = R2_GLOBALS._frameEdgeColor; - - gfxManager.unlockSurface(); - gfxManager.getSurface().addDirtyRect(tempRect); + dest.hLine(2, 1, dest.w - 2, R2_GLOBALS._frameEdgeColor); + dest.hLine(2, dest.h - 1, dest.w - 2, R2_GLOBALS._frameEdgeColor); + dest.vLine(1, 2, dest.h - 2, R2_GLOBALS._frameEdgeColor); + dest.vLine(dest.w - 1, 2, dest.h - 2, R2_GLOBALS._frameEdgeColor); + *((byte *)dest.getBasePtr(2, 2)) = R2_GLOBALS._frameEdgeColor; + *((byte *)dest.getBasePtr(dest.w - 2, 2)) = R2_GLOBALS._frameEdgeColor; + *((byte *)dest.getBasePtr(2, dest.h - 2)) = R2_GLOBALS._frameEdgeColor; + *((byte *)dest.getBasePtr(dest.w - 2, dest.h - 2)) = R2_GLOBALS._frameEdgeColor; } else { // Fill dialog content with specified background color @@ -1236,7 +1083,7 @@ GfxButton *GfxDialog::execute(GfxButton *defaultButton) { } g_system->delayMillis(10); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } _gfxManager.deactivate(); @@ -1269,7 +1116,7 @@ void GfxDialog::setPalette() { /*--------------------------------------------------------------------------*/ -GfxManager::GfxManager() : _surface(g_globals->_screenSurface), _oldManager(NULL) { +GfxManager::GfxManager() : _surface(g_globals->_screen), _oldManager(NULL) { _font.setOwner(this); _font._fillFlag = false; _bounds = Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); @@ -1563,23 +1410,24 @@ int GfxFont::writeChar(const char ch) { int yOffset = (_fontData[charOffset + 1] >> 3) & 0x1f; const uint8 *dataP = &_fontData[charOffset + 2]; - // Lock the surface for access - Graphics::Surface surfacePtr = _gfxManager->lockSurface(); - Rect charRect; charRect.set(0, 0, charWidth, _fontSize.y); charRect.translate(_topLeft.x + _position.x, _topLeft.y + _position.y + yOffset); + // Get the sub-section of the screen to update + Graphics::Surface dest = _gfxManager->getSurface().getSubArea(charRect); + if (_fillFlag) - surfacePtr.fillRect(charRect, _colors.background); + dest.fillRect(charRect, _colors.background); charRect.bottom = charRect.top + charHeight; + assert(charRect.height() <= dest.h); // Display the character int bitCtr = 0; uint8 v = 0; - for (int yp = charRect.top; yp < charRect.bottom; ++yp) { - byte *destP = (byte *)surfacePtr.getBasePtr(charRect.left, yp); + for (int yp = 0; yp < charHeight; ++yp) { + byte *destP = (byte *)dest.getBasePtr(0, yp); for (int xs = 0; xs < charRect.width(); ++xs, ++destP) { // Get the next color index to use @@ -1599,13 +1447,9 @@ int GfxFont::writeChar(const char ch) { } } - // Mark the affected area as dirty - _gfxManager->getSurface().addDirtyRect(charRect); - // Move the text writing position _position.x += charWidth; - _gfxManager->unlockSurface(); return charWidth; } diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h index 25f7aea8cd..3b395b7625 100644 --- a/engines/tsage/graphics.h +++ b/engines/tsage/graphics.h @@ -28,7 +28,7 @@ #include "common/list.h" #include "common/rect.h" #include "common/system.h" -#include "graphics/surface.h" +#include "graphics/managed_surface.h" namespace TsAGE { @@ -73,20 +73,13 @@ public: enum FrameFlag { FRAME_FLIP_CENTROID_X = 4, FRAME_FLIP_CENTROID_Y = 8 }; -class GfxSurface { +class GfxSurface: virtual public Graphics::ManagedSurface { private: - Graphics::Surface *_customSurface; int _lockSurfaceCtr; + Graphics::ManagedSurface _rawSurface; bool _disableUpdates; Rect _bounds; - - bool _trackDirtyRects; - Common::List<Rect> _dirtyRects; - - void mergeDirtyRects(); - bool unionRectangle(Common::Rect &destRect, const Rect &src1, const Rect &src2); - public: Common::Point _centroid; int _transColor; @@ -95,17 +88,13 @@ public: public: GfxSurface(); GfxSurface(const GfxSurface &s); - ~GfxSurface(); + virtual ~GfxSurface(); - void setScreenSurface(); - void updateScreen(); - void addDirtyRect(const Rect &r); - Graphics::Surface lockSurface(); + Graphics::ManagedSurface &lockSurface(); void unlockSurface(); void synchronize(Serializer &s); - void create(int width, int height); - void clear(); - void setBounds(const Rect &bounds) { _bounds = bounds; } + virtual void create(uint16 width, uint16 height); + void setBounds(const Rect &bounds); const Rect &getBounds() const { return _bounds; } void copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, @@ -119,10 +108,9 @@ public: copyFrom(src, tempRect, priorityRegion); } void draw(const Common::Point &pt, Rect *rect = NULL); - void fillRect(const Rect &bounds, int color); GfxSurface &operator=(const GfxSurface &s); - static void loadScreenSection(Graphics::Surface &dest, int xHalf, int yHalf, int xSection, int ySection); + static void loadScreenSection(Graphics::ManagedSurface &dest, int xHalf, int yHalf, int xSection, int ySection); static bool displayText(const Common::String &msg, const Common::Point &pt = Common::Point(160, 100)); }; @@ -281,7 +269,7 @@ public: void getStringBounds(const char *s, Rect &bounds, int maxWidth); void setDialogPalette(); - Graphics::Surface lockSurface() { + Graphics::ManagedSurface lockSurface() { _surface.setBounds(_bounds); return _surface.lockSurface(); } diff --git a/engines/tsage/module.mk b/engines/tsage/module.mk index e23b157a95..b58c748567 100644 --- a/engines/tsage/module.mk +++ b/engines/tsage/module.mk @@ -47,6 +47,7 @@ MODULE_OBJS := \ ringworld2/ringworld2_vampire.o \ saveload.o \ scenes.o \ + screen.o \ sherlock/sherlock_logo.o \ sound.o \ staticres.o \ diff --git a/engines/tsage/ringworld/ringworld_demo.cpp b/engines/tsage/ringworld/ringworld_demo.cpp index cd2ab07a50..9aab0c4d21 100644 --- a/engines/tsage/ringworld/ringworld_demo.cpp +++ b/engines/tsage/ringworld/ringworld_demo.cpp @@ -21,6 +21,7 @@ */ #include "tsage/ringworld/ringworld_demo.h" +#include "tsage/dialogs.h" #include "tsage/scenes.h" #include "tsage/tsage.h" #include "tsage/staticres.h" @@ -79,11 +80,7 @@ void RingworldDemoGame::processEvent(Event &event) { case Common::KEYCODE_F2: { // F2 - Sound Options - ConfigDialog *dlg = new ConfigDialog(); - dlg->runModal(); - delete dlg; - g_globals->_soundManager.syncSounds(); - g_globals->_events.setCursorFromFlag(); + SoundDialog::execute(); break; } diff --git a/engines/tsage/ringworld/ringworld_dialogs.cpp b/engines/tsage/ringworld/ringworld_dialogs.cpp index 1dd3bc158b..bc357cac25 100644 --- a/engines/tsage/ringworld/ringworld_dialogs.cpp +++ b/engines/tsage/ringworld/ringworld_dialogs.cpp @@ -20,9 +20,6 @@ * */ -#include "gui/dialog.h" -#include "gui/widget.h" - #include "tsage/tsage.h" #include "tsage/core.h" #include "tsage/dialogs.h" @@ -181,7 +178,7 @@ void RightClickDialog::execute() { } g_system->delayMillis(10); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } _gfxManager.deactivate(); @@ -391,7 +388,7 @@ void InventoryDialog::execute() { Event event; while (!g_globals->_events.getEvent(event) && !g_vm->shouldQuit()) { g_system->delayMillis(10); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } if (g_vm->shouldQuit()) break; @@ -439,7 +436,7 @@ void InventoryDialog::execute() { // Inventory item selected InvObject *invObject = static_cast<GfxInvImage *>(hiliteObj)->_invObject; if (lookFlag) { - g_globals->_screenSurface.displayText(invObject->_description); + g_globals->_screen.displayText(invObject->_description); } else { RING_INVENTORY._selectedItem = invObject; invObject->setCursor(); diff --git a/engines/tsage/ringworld/ringworld_dialogs.h b/engines/tsage/ringworld/ringworld_dialogs.h index 68ac0a05f9..4753968bf3 100644 --- a/engines/tsage/ringworld/ringworld_dialogs.h +++ b/engines/tsage/ringworld/ringworld_dialogs.h @@ -23,7 +23,7 @@ #ifndef TSAGE_RINGWORLD_DIALOGS_H #define TSAGE_RINGWORLD_DIALOGS_H -#include "gui/options.h" +#include "tsage/dialogs.h" #include "tsage/events.h" #include "tsage/graphics.h" #include "common/list.h" diff --git a/engines/tsage/ringworld/ringworld_logic.cpp b/engines/tsage/ringworld/ringworld_logic.cpp index 1d8293cffd..354c86abfc 100644 --- a/engines/tsage/ringworld/ringworld_logic.cpp +++ b/engines/tsage/ringworld/ringworld_logic.cpp @@ -320,7 +320,7 @@ void SceneArea::wait() { // Wait until a mouse or keypress Event event; while (!g_vm->shouldQuit() && !g_globals->_events.getEvent(event)) { - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); g_system->delayMillis(10); } diff --git a/engines/tsage/ringworld/ringworld_scenes2.cpp b/engines/tsage/ringworld/ringworld_scenes2.cpp index 1140f6f3d1..6811d3c3e8 100644 --- a/engines/tsage/ringworld/ringworld_scenes2.cpp +++ b/engines/tsage/ringworld/ringworld_scenes2.cpp @@ -22,6 +22,7 @@ #include "common/config-manager.h" #include "tsage/ringworld/ringworld_scenes2.h" +#include "tsage/dialogs.h" #include "tsage/scenes.h" #include "tsage/tsage.h" #include "tsage/staticres.h" diff --git a/engines/tsage/ringworld/ringworld_scenes3.cpp b/engines/tsage/ringworld/ringworld_scenes3.cpp index a515224964..a9ed7af870 100644 --- a/engines/tsage/ringworld/ringworld_scenes3.cpp +++ b/engines/tsage/ringworld/ringworld_scenes3.cpp @@ -532,7 +532,7 @@ void Scene2100::Action1::signal() { // Wait for an event Event event; if (!g_globals->_events.getEvent(event)) { - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); g_system->delayMillis(10); continue; } @@ -2265,7 +2265,7 @@ void Scene2150::Action1::signal() { // Wait for an event Event event; if (!g_globals->_events.getEvent(event)) { - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); g_system->delayMillis(10); continue; } @@ -5119,7 +5119,7 @@ void Scene2320::Action3::signal() { // Wait for an event Event event; if (!g_globals->_events.getEvent(event)) { - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); g_system->delayMillis(10); continue; } diff --git a/engines/tsage/ringworld/ringworld_scenes5.cpp b/engines/tsage/ringworld/ringworld_scenes5.cpp index cb8a89de80..98859f32ee 100644 --- a/engines/tsage/ringworld/ringworld_scenes5.cpp +++ b/engines/tsage/ringworld/ringworld_scenes5.cpp @@ -2813,7 +2813,7 @@ void Scene4150::Action1::signal() { case 4: { for (int idx = 100; idx >= 0; idx -= 5) { g_globals->_scenePalette.fade(adjustData, false, idx); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); g_system->delayMillis(10); } @@ -2841,7 +2841,7 @@ void Scene4150::Action1::signal() { case 7: for (int idx = 100; idx >= 0; idx -= 5) { g_globals->_scenePalette.fade(adjustData, false, idx); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); g_system->delayMillis(10); } diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp index 99f88a1687..5cd124f91d 100644 --- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp +++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp @@ -22,9 +22,6 @@ #include "common/translation.h" -#include "gui/dialog.h" -#include "gui/widget.h" - #include "tsage/tsage.h" #include "tsage/core.h" #include "tsage/dialogs.h" @@ -154,7 +151,7 @@ int RightClickDialog::execute() { } g_system->delayMillis(10); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } // Execute the specified action diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.h b/engines/tsage/ringworld2/ringworld2_dialogs.h index 3d1e1ad48c..71e0c23f35 100644 --- a/engines/tsage/ringworld2/ringworld2_dialogs.h +++ b/engines/tsage/ringworld2/ringworld2_dialogs.h @@ -23,7 +23,7 @@ #ifndef TSAGE_RINGWORLD2_DIALOGS_H #define TSAGE_RINGWORLD2_DIALOGS_H -#include "gui/options.h" +#include "tsage/core.h" #include "tsage/dialogs.h" #include "tsage/events.h" #include "tsage/graphics.h" diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index d24541932f..ecaa671bd7 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -351,7 +351,7 @@ SceneExt::SceneExt(): Scene() { _preventSaving = false; // Reset screen clipping area - R2_GLOBALS._screenSurface._clipRect = Rect(); + R2_GLOBALS._screen._clipRect = Rect(); // WORKAROUND: In the original, playing animations don't reset the global _animationCtr // counter as scene changes unless the playing animation explicitly finishes. For now, @@ -513,7 +513,7 @@ void SceneExt::endStrip() { } void SceneExt::clearScreen() { - R2_GLOBALS._screenSurface.fillRect(R2_GLOBALS._screenSurface.getBounds(), 0); + R2_GLOBALS._screen.fillRect(R2_GLOBALS._screen.getBounds(), 0); } void SceneExt::refreshBackground(int xAmount, int yAmount) { @@ -543,15 +543,12 @@ void SceneExt::refreshBackground(int xAmount, int yAmount) { int screenSize = g_vm->_memoryManager.getSize(dataP); // Lock the background for update - Graphics::Surface s = _backSurface.lockSurface(); - assert(screenSize == (s.w * s.h)); + assert(screenSize == (_backSurface.w * _backSurface.h)); + Graphics::Surface s = _backSurface.getSubArea(Common::Rect(0, 0, _backSurface.w, _backSurface.h)); - // Copy the data + // Copy the data into the surface byte *destP = (byte *)s.getPixels(); Common::copy(dataP, dataP + (s.w * s.h), destP); - _backSurface.unlockSurface(); - - R2_GLOBALS._screenSurface.addDirtyRect(_backSurface.getBounds()); // Free the resource data DEALLOCATE(dataP); @@ -601,7 +598,7 @@ void SceneExt::loadBlankScene() { _backSurface.create(SCREEN_WIDTH, SCREEN_HEIGHT * 3 / 2); _backSurface.fillRect(_backSurface.getBounds(), 0); - R2_GLOBALS._screenSurface.fillRect(R2_GLOBALS._screenSurface.getBounds(), 0); + R2_GLOBALS._screen.fillRect(R2_GLOBALS._screen.getBounds(), 0); } /*--------------------------------------------------------------------------*/ @@ -1966,10 +1963,9 @@ void AnimationPlayer::drawFrame(int sliceIndex) { byte *sliceData1 = sliceDataStart; Rect playerBounds = _screenBounds; - int y = _screenBounds.top; - R2_GLOBALS._screenSurface.addDirtyRect(playerBounds); - Graphics::Surface surface = R2_GLOBALS._screenSurface.lockSurface(); + Graphics::Surface dest = R2_GLOBALS._screen.getSubArea(playerBounds); + int y = 0; // Handle different drawing modes switch (slice._drawMode) { @@ -1980,7 +1976,7 @@ void AnimationPlayer::drawFrame(int sliceIndex) { // TODO: Check of _subData._drawType was done for two different kinds of // line slice drawing in original const byte *pSrc = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2); - byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, y++); + byte *pDest = (byte *)dest.getBasePtr(0, y++); Common::copy(pSrc, pSrc + _subData._sliceSize, pDest); } @@ -1997,7 +1993,7 @@ void AnimationPlayer::drawFrame(int sliceIndex) { if (offset) { const byte *pSrc = (const byte *)sliceDataStart + offset; - byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, playerBounds.top); + byte *pDest = (byte *)dest.getBasePtr(0, 0); //Common::copy(pSrc, pSrc + playerBounds.width(), pDest); rleDecode(pSrc, pDest, playerBounds.width()); @@ -2012,7 +2008,7 @@ void AnimationPlayer::drawFrame(int sliceIndex) { // TODO: Check of _subData._drawType was done for two different kinds of // line slice drawing in original const byte *pSrc = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2); - byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, playerBounds.top); + byte *pDest = (byte *)dest.getBasePtr(0, 0); rleDecode(pSrc, pDest, _subData._sliceSize); } @@ -2027,7 +2023,7 @@ void AnimationPlayer::drawFrame(int sliceIndex) { for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex) { const byte *pSrc1 = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData2 + sliceNum * 2); const byte *pSrc2 = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2); - byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, y++); + byte *pDest = (byte *)dest.getBasePtr(0, y++); if (slice2._drawMode == 0) { // Uncompressed background, foreground compressed @@ -2047,17 +2043,14 @@ void AnimationPlayer::drawFrame(int sliceIndex) { break; } - // Unlock the screen surface - R2_GLOBALS._screenSurface.unlockSurface(); - if (_objectMode == ANIMOBJMODE_42) { _screenBounds.expandPanes(); // Copy the drawn frame to the back surface - Rect srcRect = R2_GLOBALS._screenSurface.getBounds(); + Rect srcRect = R2_GLOBALS._screen.getBounds(); Rect destRect = srcRect; destRect.translate(-g_globals->_sceneOffset.x, -g_globals->_sceneOffset.y); - R2_GLOBALS._sceneManager._scene->_backSurface.copyFrom(R2_GLOBALS._screenSurface, + R2_GLOBALS._sceneManager._scene->_backSurface.copyFrom(R2_GLOBALS._screen, srcRect, destRect); // Draw any objects into the scene diff --git a/engines/tsage/ringworld2/ringworld2_outpost.cpp b/engines/tsage/ringworld2/ringworld2_outpost.cpp index cad21b4623..d0d67031ec 100644 --- a/engines/tsage/ringworld2/ringworld2_outpost.cpp +++ b/engines/tsage/ringworld2/ringworld2_outpost.cpp @@ -21,6 +21,7 @@ */ #include "graphics/cursorman.h" +#include "tsage/dialogs.h" #include "tsage/tsage.h" #include "tsage/staticres.h" #include "tsage/ringworld2/ringworld2_outpost.h" @@ -4689,7 +4690,7 @@ GfxButton *Scene1337::OptionsDialog::execute(GfxButton *defaultButton) { } g_system->delayMillis(10); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); } _gfxManager.deactivate(); diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index 573cbbb29a..63879b0366 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -1613,7 +1613,7 @@ void Scene180::signal() { case 43: case 47: _helpEnabled = false; - R2_GLOBALS._screenSurface.fillRect(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); + R2_GLOBALS._screen.fillRect(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); _palette.loadPalette(0); _palette.loadPalette(9998); R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 8, this); @@ -1815,7 +1815,7 @@ void Scene180::signal() { _shipDisplay.remove(); _backSurface.fillRect(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); - R2_GLOBALS._screenSurface.fillRect(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); + R2_GLOBALS._screen.fillRect(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); R2_GLOBALS._sound2.fadeOut2(NULL); R2_GLOBALS._sound1.fadeOut2(this); break; @@ -1880,7 +1880,7 @@ void Scene180::signal() { R2_GLOBALS._paneRefreshFlag[0] = 3; _backSurface.fillRect(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); - R2_GLOBALS._screenSurface.fillRect(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); + R2_GLOBALS._screen.fillRect(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); setSceneDelay(1); break; diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index 81dc05e2a4..70937fcbc4 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -23,6 +23,7 @@ #include "graphics/cursorman.h" #include "tsage/scenes.h" +#include "tsage/dialogs.h" #include "tsage/tsage.h" #include "tsage/staticres.h" #include "tsage/ringworld2/ringworld2_scenes1.h" diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp index bd8a0cdd0d..6b44ecc514 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp @@ -1440,7 +1440,7 @@ void Scene2425::postInit(SceneObjectList *OwnerList) { case 2425: _sceneMode = 10; R2_GLOBALS._player.setPosition(Common::Point(280, 150)); - _action->signal(); + signal(); break; case 2455: _sceneMode = 2428; diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp index 9954b929b2..3cb8e52692 100644 --- a/engines/tsage/saveload.cpp +++ b/engines/tsage/saveload.cpp @@ -289,10 +289,10 @@ void Saver::writeSavegameHeader(Common::OutSaveFile *out, tSageSavegameHeader &h // Create a thumbnail and save it Graphics::Surface *thumb = new Graphics::Surface(); - Graphics::Surface s = g_globals->_screenSurface.lockSurface(); + Graphics::Surface s = g_globals->_screen.lockSurface(); ::createThumbnail(thumb, (const byte *)s.getPixels(), SCREEN_WIDTH, SCREEN_HEIGHT, thumbPalette); Graphics::saveThumbnail(*out, *thumb); - g_globals->_screenSurface.unlockSurface(); + g_globals->_screen.unlockSurface(); thumb->free(); delete thumb; diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp index 80ce1e3ecc..6f2f953aee 100644 --- a/engines/tsage/scenes.cpp +++ b/engines/tsage/scenes.cpp @@ -23,6 +23,7 @@ #include "common/config-manager.h" #include "common/translation.h" #include "gui/saveload.h" +#include "tsage/dialogs.h" #include "tsage/scenes.h" #include "tsage/globals.h" #include "tsage/ringworld/ringworld_logic.h" @@ -139,7 +140,7 @@ void SceneManager::fadeInIfNecessary() { percent = 100; g_globals->_scenePalette.fade((const byte *)&adjustData, false, percent); - GLOBALS._screenSurface.updateScreen(); + GLOBALS._screen.update(); g_system->delayMillis(10); } @@ -175,7 +176,7 @@ void SceneManager::changeScene(int newSceneNumber) { } // Blank out the screen - g_globals->_screenSurface.fillRect(g_globals->_screenSurface.getBounds(), 0); + g_globals->_screen.fillRect(g_globals->_screen.getBounds(), 0); // If there are any fading sounds, wait until fading is complete while (g_globals->_soundManager.isFading()) { @@ -463,7 +464,7 @@ void Scene::refreshBackground(int xAmount, int yAmount) { // Check if the section is already loaded if ((_enabledSections[xp * 16 + yp] == 0xffff) || ((xAmount == 0) && (yAmount == 0))) { // Chunk isn't loaded, so load it in - Graphics::Surface s = _backSurface.lockSurface(); + Graphics::ManagedSurface s = _backSurface.lockSurface(); GfxSurface::loadScreenSection(s, xp - xHalfOffset, yp - yHalfOffset, xp, yp); _backSurface.unlockSurface(); changedFlag = true; diff --git a/engines/tsage/screen.cpp b/engines/tsage/screen.cpp new file mode 100644 index 0000000000..f11c384797 --- /dev/null +++ b/engines/tsage/screen.cpp @@ -0,0 +1,46 @@ +/* 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/scummsys.h" +#include "tsage/screen.h" + +namespace TsAGE { + +Screen::Screen(): GfxSurface(), Graphics::Screen() { + create(SCREEN_WIDTH, SCREEN_HEIGHT); +} + +void Screen::update() { + // When dialogs are active, the screen surface may be remapped to + // sub-sections of the screen. But for drawing we'll need to temporarily + // remove any such remappings and use the entirety of the screen + Rect clipBounds = getBounds(); + setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); + + // Update the screen + Graphics::Screen::update(); + + // Reset the clipping + setBounds(clipBounds); +} + +} // End of namespace TsAGE diff --git a/engines/tsage/screen.h b/engines/tsage/screen.h new file mode 100644 index 0000000000..bf5057e4d6 --- /dev/null +++ b/engines/tsage/screen.h @@ -0,0 +1,59 @@ +/* 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 TSAGE_SCREEN_H +#define TSAGE_SCREEN_H + +#include "common/scummsys.h" +#include "common/array.h" +#include "graphics/screen.h" +#include "tsage/graphics.h" + +namespace TsAGE { + +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 200 +#define SCREEN_CENTER_X 160 +#define SCREEN_CENTER_Y 100 +#define UI_INTERFACE_Y 168 + +class Screen : virtual public Graphics::Screen, virtual public GfxSurface { +public: + /** + * Constructor + */ + Screen(); + + /** + * Destructor + */ + virtual ~Screen() {} + + /** + * Update the screen + */ + virtual void update(); +}; + +} // End of namespace TsAGE + +#endif /* MADS_SCREEN_H */ diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h index 68755a48c8..da56c8bfa5 100644 --- a/engines/tsage/sound.h +++ b/engines/tsage/sound.h @@ -26,12 +26,15 @@ #include "common/scummsys.h" #include "common/mutex.h" #include "common/queue.h" -#include "audio/audiostream.h" #include "audio/mixer.h" #include "common/list.h" #include "tsage/saveload.h" #include "tsage/core.h" +namespace Audio { +class QueuingAudioStream; +} + namespace OPL { class OPL; } diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h index 667a8daa59..dd077e526f 100644 --- a/engines/tsage/tsage.h +++ b/engines/tsage/tsage.h @@ -24,9 +24,6 @@ #define TSAGE_H #include "engines/engine.h" -#include "common/rect.h" -#include "audio/mixer.h" -#include "common/file.h" #include "gui/debugger.h" #include "tsage/core.h" @@ -62,12 +59,6 @@ enum { struct tSageGameDescription; -#define SCREEN_WIDTH 320 -#define SCREEN_HEIGHT 200 -#define SCREEN_CENTER_X 160 -#define SCREEN_CENTER_Y 100 -#define UI_INTERFACE_Y 168 - class TSageEngine : public Engine { private: const tSageGameDescription *_gameDescription; diff --git a/engines/tsage/user_interface.cpp b/engines/tsage/user_interface.cpp index 3ee585d5ef..fffc0dc16c 100644 --- a/engines/tsage/user_interface.cpp +++ b/engines/tsage/user_interface.cpp @@ -253,7 +253,7 @@ void UICollection::show() { void UICollection::erase() { if (_clearScreen) { Rect tempRect(0, UI_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT); - GLOBALS._screenSurface.fillRect(tempRect, 0); + GLOBALS._screen.fillRect(tempRect, 0); GLOBALS._sceneManager._scene->_backSurface.fillRect(tempRect, 0); _clearScreen = false; } @@ -274,7 +274,7 @@ void UICollection::draw() { _objList[idx]->draw(); // Draw the resulting UI onto the screen - GLOBALS._screenSurface.copyFrom(GLOBALS._sceneManager._scene->_backSurface, + GLOBALS._screen.copyFrom(GLOBALS._sceneManager._scene->_backSurface, Rect(0, UI_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT), Rect(0, UI_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT)); @@ -293,12 +293,12 @@ void UICollection::r2rDrawFrame() { GfxSurface vertLineRight = visage.getFrame(3); GfxSurface horizLine = visage.getFrame(2); - GLOBALS._screenSurface.copyFrom(horizLine, 0, 0); - GLOBALS._screenSurface.copyFrom(vertLineLeft, 0, 3); - GLOBALS._screenSurface.copyFrom(vertLineRight, SCREEN_WIDTH - 4, 3); + GLOBALS._screen.copyFrom(horizLine, 0, 0); + GLOBALS._screen.copyFrom(vertLineLeft, 0, 3); + GLOBALS._screen.copyFrom(vertLineRight, SCREEN_WIDTH - 4, 3); // Restrict drawing area to exclude the borders at the edge of the screen - R2_GLOBALS._screenSurface._clipRect = Rect(4, 3, SCREEN_WIDTH - 4, + R2_GLOBALS._screen._clipRect = Rect(4, 3, SCREEN_WIDTH - 4, SCREEN_HEIGHT - 3); } diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp index 62b37346da..d5d58a2fd3 100644 --- a/engines/voyeur/animation.cpp +++ b/engines/voyeur/animation.cpp @@ -470,7 +470,7 @@ void RL2Decoder::play(VoyeurEngine *vm, int resourceOffset, if (hasDirtyPalette()) { const byte *palette = getPalette(); - vm->_graphicsManager->setPalette128(palette, paletteStart, paletteCount); + vm->_screen->setPalette128(palette, paletteStart, paletteCount); } if (needsUpdate()) { @@ -482,15 +482,14 @@ void RL2Decoder::play(VoyeurEngine *vm, int resourceOffset, Common::Point pt(READ_LE_UINT16(imgPos + 4 * picCtr) - 32, READ_LE_UINT16(imgPos + 4 * picCtr + 2) - 20); - vm->_graphicsManager->sDrawPic(newPic, &videoFrame, pt); + vm->_screen->sDrawPic(newPic, &videoFrame, pt); ++picCtr; } } // Decode the next frame and display const Graphics::Surface *frame = decodeNextFrame(); - Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200, - (byte *)vm->_graphicsManager->_screenSurface.getPixels()); + vm->_screen->blitFrom(*frame); } vm->_eventsManager->getMouseInfo(); diff --git a/engines/voyeur/animation.h b/engines/voyeur/animation.h index bc6d8a361a..c20ccf7284 100644 --- a/engines/voyeur/animation.h +++ b/engines/voyeur/animation.h @@ -26,13 +26,16 @@ #include "video/video_decoder.h" #include "audio/audiostream.h" #include "audio/mixer.h" -#include "audio/timestamp.h" #include "common/array.h" #include "common/list.h" #include "common/rect.h" #include "common/stream.h" #include "voyeur/files.h" +namespace Audio { +class Timestamp; +} + namespace Voyeur { class VoyeurEngine; diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp index b8c987f18b..4d6e32436d 100644 --- a/engines/voyeur/data.cpp +++ b/engines/voyeur/data.cpp @@ -240,10 +240,10 @@ void SVoy::reviewAnEvidEvent(int eventIndex) { int frameOff = e._computerOff; if (_vm->_bVoy->getBoltGroup(_vm->_playStampGroupId)) { - _vm->_graphicsManager->_backColors = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._cMapResource; - _vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(_vm->_playStampGroupId)._picResource; - _vm->_graphicsManager->_vPort->setupViewPort(_vm->_graphicsManager->_backgroundPage); - _vm->_graphicsManager->_backColors->startFade(); + _vm->_screen->_backColors = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._cMapResource; + _vm->_screen->_backgroundPage = _vm->_bVoy->boltEntry(_vm->_playStampGroupId)._picResource; + _vm->_screen->_vPort->setupViewPort(_vm->_screen->_backgroundPage); + _vm->_screen->_backColors->startFade(); _vm->doEvidDisplay(frameOff, e._dead); _vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId); @@ -262,10 +262,10 @@ void SVoy::reviewComputerEvent(int eventIndex) { _computerTextId = e._computerOn; if (_vm->_bVoy->getBoltGroup(_vm->_playStampGroupId)) { - _vm->_graphicsManager->_backColors = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._cMapResource; - _vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry(_vm->_playStampGroupId)._picResource; - _vm->_graphicsManager->_vPort->setupViewPort(_vm->_graphicsManager->_backgroundPage); - _vm->_graphicsManager->_backColors->startFade(); + _vm->_screen->_backColors = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._cMapResource; + _vm->_screen->_backgroundPage = _vm->_bVoy->boltEntry(_vm->_playStampGroupId)._picResource; + _vm->_screen->_vPort->setupViewPort(_vm->_screen->_backgroundPage); + _vm->_screen->_backColors->startFade(); _vm->flipPageAndWaitForFade(); _vm->getComputerBrush(); diff --git a/engines/voyeur/debugger.cpp b/engines/voyeur/debugger.cpp index e9a12180da..ebfa123eb6 100644 --- a/engines/voyeur/debugger.cpp +++ b/engines/voyeur/debugger.cpp @@ -21,7 +21,7 @@ */ #include "voyeur/debugger.h" -#include "voyeur/graphics.h" +#include "voyeur/screen.h" #include "voyeur/voyeur.h" #include "voyeur/staticres.h" diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp index 34ef507ad3..020fe4b692 100644 --- a/engines/voyeur/events.cpp +++ b/engines/voyeur/events.cpp @@ -111,18 +111,18 @@ void EventsManager::mainVoyeurIntFunc() { } void EventsManager::sWaitFlip() { - Common::Array<ViewPortResource *> &viewPorts = _vm->_graphicsManager->_viewPortListPtr->_entries; + Common::Array<ViewPortResource *> &viewPorts = _vm->_screen->_viewPortListPtr->_entries; for (uint idx = 0; idx < viewPorts.size(); ++idx) { ViewPortResource &viewPort = *viewPorts[idx]; - if (_vm->_graphicsManager->_saveBack && (viewPort._flags & DISPFLAG_40)) { - Common::Rect *clipPtr = _vm->_graphicsManager->_clipPtr; - _vm->_graphicsManager->_clipPtr = &viewPort._clipRect; + if (_vm->_screen->_saveBack && (viewPort._flags & DISPFLAG_40)) { + Common::Rect *clipPtr = _vm->_screen->_clipPtr; + _vm->_screen->_clipPtr = &viewPort._clipRect; if (viewPort._restoreFn) - (_vm->_graphicsManager->*viewPort._restoreFn)(&viewPort); + (_vm->_screen->*viewPort._restoreFn)(&viewPort); - _vm->_graphicsManager->_clipPtr = clipPtr; + _vm->_screen->_clipPtr = clipPtr; viewPort._rectListCount[viewPort._pageIndex] = 0; viewPort._rectListPtr[viewPort._pageIndex]->clear(); viewPort._flags &= ~DISPFLAG_40; @@ -158,9 +158,7 @@ void EventsManager::checkForNextFrameCounter() { showMousePosition(); // Display the frame - g_system->copyRectToScreen((byte *)_vm->_graphicsManager->_screenSurface.getPixels(), - SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - g_system->updateScreen(); + _vm->_screen->update(); // Signal the ScummVM debugger _vm->_debugger->onFrame(); @@ -178,10 +176,8 @@ void EventsManager::showMousePosition() { mousePos += Common::String::format(" - (%d,%d)", pt.x, pt.y); } - _vm->_graphicsManager->_screenSurface.fillRect( - Common::Rect(0, 0, 110, font.getFontHeight()), 0); - font.drawString(&_vm->_graphicsManager->_screenSurface, mousePos, - 0, 0, 110, 63); + _vm->_screen->fillRect(Common::Rect(0, 0, 110, font.getFontHeight()), 0); + font.drawString(_vm->_screen, mousePos, 0, 0, 110, 63); } void EventsManager::voyeurTimer() { @@ -299,11 +295,11 @@ void EventsManager::startFade(CMapResource *cMap) { if (cMap->_steps > 0) { _fadeStatus = cMap->_fadeStatus | 1; - byte *vgaP = &_vm->_graphicsManager->_VGAColors[_fadeFirstCol * 3]; + byte *vgaP = &_vm->_screen->_VGAColors[_fadeFirstCol * 3]; int mapIndex = 0; for (int idx = _fadeFirstCol; idx <= _fadeLastCol; ++idx, vgaP += 3) { - ViewPortPalEntry &palEntry = _vm->_graphicsManager->_viewPortListPtr->_palette[idx]; + ViewPortPalEntry &palEntry = _vm->_screen->_viewPortListPtr->_palette[idx]; palEntry._rEntry = vgaP[0] << 8; int rDiff = (cMap->_entries[mapIndex * 3] << 8) - palEntry._rEntry; palEntry._rChange = rDiff / cMap->_steps; @@ -325,7 +321,7 @@ void EventsManager::startFade(CMapResource *cMap) { _intPtr._skipFading = true; _fadeIntNode._flags &= ~1; } else { - byte *vgaP = &_vm->_graphicsManager->_VGAColors[_fadeFirstCol * 3]; + byte *vgaP = &_vm->_screen->_VGAColors[_fadeFirstCol * 3]; int mapIndex = 0; for (int idx = _fadeFirstCol; idx <= _fadeLastCol; ++idx, vgaP += 3) { @@ -371,8 +367,8 @@ void EventsManager::vDoFadeInt() { } for (int i = _fadeFirstCol; i <= _fadeLastCol; ++i) { - ViewPortPalEntry &palEntry = _vm->_graphicsManager->_viewPortListPtr->_palette[i]; - byte *vgaP = &_vm->_graphicsManager->_VGAColors[palEntry._palIndex * 3]; + ViewPortPalEntry &palEntry = _vm->_screen->_viewPortListPtr->_palette[i]; + byte *vgaP = &_vm->_screen->_VGAColors[palEntry._palIndex * 3]; palEntry._rEntry += palEntry._rChange; palEntry._gEntry += palEntry._gChange; @@ -395,7 +391,7 @@ void EventsManager::vDoCycleInt() { for (int idx = 3; idx >= 0; --idx) { if (_cyclePtr->_type[idx] && --_cycleTime[idx] <= 0) { byte *pSrc = _cycleNext[idx]; - byte *pPal = _vm->_graphicsManager->_VGAColors; + byte *pPal = _vm->_screen->_VGAColors; if (_cyclePtr->_type[idx] != 1) { // New palette data being specified - loop to set entries @@ -521,7 +517,7 @@ void EventsManager::setCursor(PictureResource *pic) { cursor._bounds = pic->_bounds; cursor._flags = DISPFLAG_CURSOR; - _vm->_graphicsManager->sDrawPic(pic, &cursor, Common::Point()); + _vm->_screen->sDrawPic(pic, &cursor, Common::Point()); } void EventsManager::setCursor(byte *cursorData, int width, int height, int keyColor) { @@ -531,16 +527,16 @@ void EventsManager::setCursor(byte *cursorData, int width, int height, int keyCo void EventsManager::setCursorColor(int idx, int mode) { switch (mode) { case 0: - _vm->_graphicsManager->setColor(idx, 90, 90, 232); + _vm->_screen->setColor(idx, 90, 90, 232); break; case 1: - _vm->_graphicsManager->setColor(idx, 232, 90, 90); + _vm->_screen->setColor(idx, 232, 90, 90); break; case 2: - _vm->_graphicsManager->setColor(idx, 90, 232, 90); + _vm->_screen->setColor(idx, 90, 232, 90); break; case 3: - _vm->_graphicsManager->setColor(idx, 90, 232, 232); + _vm->_screen->setColor(idx, 90, 232, 232); break; default: break; @@ -564,12 +560,12 @@ void EventsManager::getMouseInfo() { if (_cursorBlinked) { _cursorBlinked = false; - _vm->_graphicsManager->setOneColor(128, 220, 20, 20); - _vm->_graphicsManager->setColor(128, 220, 20, 20); + _vm->_screen->setOneColor(128, 220, 20, 20); + _vm->_screen->setColor(128, 220, 20, 20); } else { _cursorBlinked = true; - _vm->_graphicsManager->setOneColor(128, 220, 220, 220); - _vm->_graphicsManager->setColor(128, 220, 220, 220); + _vm->_screen->setOneColor(128, 220, 220, 220); + _vm->_screen->setColor(128, 220, 220, 220); } } } @@ -585,11 +581,11 @@ void EventsManager::getMouseInfo() { void EventsManager::startCursorBlink() { if (_vm->_voy->_eventFlags & EVTFLAG_RECORDING) { - _vm->_graphicsManager->setOneColor(128, 55, 5, 5); - _vm->_graphicsManager->setColor(128, 220, 20, 20); + _vm->_screen->setOneColor(128, 55, 5, 5); + _vm->_screen->setColor(128, 220, 20, 20); _intPtr._hasPalette = true; - _vm->_graphicsManager->drawDot(); + _vm->_screen->drawDot(); //copySection(); } } diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index 300e086f75..46b195ecaf 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -21,7 +21,7 @@ */ #include "voyeur/files.h" -#include "voyeur/graphics.h" +#include "voyeur/screen.h" #include "voyeur/voyeur.h" #include "voyeur/staticres.h" @@ -359,7 +359,7 @@ void BoltFile::resolveIt(uint32 id, byte **p) { } } -void BoltFile::resolveFunction(uint32 id, GraphicMethodPtr *fn) { +void BoltFile::resolveFunction(uint32 id, ScreenMethodPtr *fn) { if ((int32)id == -1) *fn = NULL; else @@ -485,8 +485,8 @@ void BVoyBoltFile::initViewPortList() { _state._curMemberPtr->_viewPortListResource = res = new ViewPortListResource( _state, _state._curMemberPtr->_data); - _state._vm->_graphicsManager->_viewPortListPtr = res; - _state._vm->_graphicsManager->_vPort = res->_entries[0]; + _state._vm->_screen->_viewPortListPtr = res; + _state._vm->_screen->_vPort = res->_entries[0]; } void BVoyBoltFile::initFontInfo() { @@ -752,24 +752,24 @@ DisplayResource::DisplayResource(VoyeurEngine *vm) { void DisplayResource::sFillBox(int width, int height) { assert(_vm); - bool saveBack = _vm->_graphicsManager->_saveBack; - _vm->_graphicsManager->_saveBack = false; + bool saveBack = _vm->_screen->_saveBack; + _vm->_screen->_saveBack = false; PictureResource pr; pr._flags = DISPFLAG_1; pr._select = 0xff; pr._pick = 0; - pr._onOff = _vm->_graphicsManager->_drawPtr->_penColor; + pr._onOff = _vm->_screen->_drawPtr->_penColor; pr._bounds = Common::Rect(0, 0, width, height); - _vm->_graphicsManager->sDrawPic(&pr, this, _vm->_graphicsManager->_drawPtr->_pos); - _vm->_graphicsManager->_saveBack = saveBack; + _vm->_screen->sDrawPic(&pr, this, _vm->_screen->_drawPtr->_pos); + _vm->_screen->_saveBack = saveBack; } bool DisplayResource::clipRect(Common::Rect &rect) { Common::Rect clippingRect; - if (_vm->_graphicsManager->_clipPtr) { - clippingRect = *_vm->_graphicsManager->_clipPtr; + if (_vm->_screen->_clipPtr) { + clippingRect = *_vm->_screen->_clipPtr; } else if (_flags & DISPFLAG_VIEWPORT) { clippingRect = ((ViewPortResource *)this)->_clipRect; } else { @@ -804,18 +804,18 @@ bool DisplayResource::clipRect(Common::Rect &rect) { } int DisplayResource::drawText(const Common::String &msg) { - GraphicsManager &gfxManager = *_vm->_graphicsManager; - assert(gfxManager._fontPtr); - assert(gfxManager._fontPtr->_curFont); - FontInfoResource &fontInfo = *gfxManager._fontPtr; - PictureResource &fontChar = *_vm->_graphicsManager->_fontChar; + Screen &screen = *_vm->_screen; + assert(screen._fontPtr); + assert(screen._fontPtr->_curFont); + FontInfoResource &fontInfo = *screen._fontPtr; + PictureResource &fontChar = *_vm->_screen->_fontChar; FontResource &fontData = *fontInfo._curFont; int xShadows[9] = { 0, 1, 1, 1, 0, -1, -1, -1, 0 }; int yShadows[9] = { 0, 1, 0, -1, -1, -1, 0, 1, 1 }; - Common::Rect *clipPtr = gfxManager._clipPtr; + Common::Rect *clipPtr = screen._clipPtr; if (!(fontInfo._picFlags & DISPFLAG_1)) - gfxManager._clipPtr = NULL; + screen._clipPtr = NULL; int minChar = fontData._minChar; int padding = fontData._padding; @@ -834,7 +834,7 @@ int DisplayResource::drawText(const Common::String &msg) { (ViewPortResource *)this; if ((fontInfo._fontFlags & DISPFLAG_1) || fontInfo._justify || - (gfxManager._saveBack && fontInfo._fontSaveBack && (_flags & DISPFLAG_VIEWPORT))) { + (screen._saveBack && fontInfo._fontSaveBack && (_flags & DISPFLAG_VIEWPORT))) { msgWidth = viewPort->textWidth(msg); yp = pos.y; xp = pos.x; @@ -898,18 +898,18 @@ int DisplayResource::drawText(const Common::String &msg) { } } - if (gfxManager._saveBack && fontInfo._fontSaveBack && (_flags & DISPFLAG_VIEWPORT)) { + if (screen._saveBack && fontInfo._fontSaveBack && (_flags & DISPFLAG_VIEWPORT)) { viewPort->addSaveRect(viewPort->_pageIndex, viewPort->_fontRect); } if (fontInfo._fontFlags & DISPFLAG_1) { - gfxManager._drawPtr->_pos = Common::Point(viewPort->_fontRect.left, viewPort->_fontRect.top); - gfxManager._drawPtr->_penColor = fontInfo._backColor; + screen._drawPtr->_pos = Common::Point(viewPort->_fontRect.left, viewPort->_fontRect.top); + screen._drawPtr->_penColor = fontInfo._backColor; sFillBox(viewPort->_fontRect.width(), viewPort->_fontRect.height()); } - bool saveBack = gfxManager._saveBack; - gfxManager._saveBack = false; + bool saveBack = screen._saveBack; + screen._saveBack = false; int count = 0; if (fontInfo._fontFlags & DISPFLAG_4) @@ -970,7 +970,7 @@ int DisplayResource::drawText(const Common::String &msg) { uint16 offset = READ_LE_UINT16(fontData._charOffsets + charValue * 2); fontChar._imgData = fontData._charImages + offset * 2; - gfxManager.sDrawPic(&fontChar, this, Common::Point(xp, yp)); + screen.sDrawPic(&fontChar, this, Common::Point(xp, yp)); fontChar._imgData = NULL; xp += charWidth + padding; @@ -982,8 +982,8 @@ int DisplayResource::drawText(const Common::String &msg) { if (fontInfo._justify == ALIGN_LEFT) fontInfo._pos.x = xp; - gfxManager._saveBack = saveBack; - gfxManager._clipPtr = clipPtr; + screen._saveBack = saveBack; + screen._clipPtr = clipPtr; return msgWidth; } @@ -993,7 +993,7 @@ int DisplayResource::textWidth(const Common::String &msg) { return 0; const char *msgP = msg.c_str(); - FontResource &fontData = *_vm->_graphicsManager->_fontPtr->_curFont; + FontResource &fontData = *_vm->_screen->_fontPtr->_curFont; int minChar = fontData._minChar; int maxChar = fontData._maxChar; int padding = fontData._padding; @@ -1085,9 +1085,9 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src): mode = 226; } - if (mode != state._vm->_graphicsManager->_SVGAMode) { - state._vm->_graphicsManager->_SVGAMode = mode; - state._vm->_graphicsManager->clearPalette(); + if (mode != state._vm->_screen->_SVGAMode) { + state._vm->_screen->_SVGAMode = mode; + state._vm->_screen->clearPalette(); } int screenOffset = READ_LE_UINT32(&src[18]) & 0xffff; @@ -1096,13 +1096,14 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src): if (_flags & PICFLAG_CLEAR_SCREEN) { // Clear screen picture. That's right. This game actually has a picture // resource flag to clear the screen! Bizarre. - Graphics::Surface &s = state._vm->_graphicsManager->_screenSurface; - s.fillRect(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); + state._vm->_screen->clear(); } else { // Direct screen loading picture. In this case, the raw data of the resource // is directly decompressed into the screen surface. Again, bizarre. - byte *pDest = (byte *)state._vm->_graphicsManager->_screenSurface.getPixels(); + Screen &screen = *state._vm->_screen; + byte *pDest = (byte *)screen.getPixels(); state.decompress(pDest, SCREEN_WIDTH * SCREEN_HEIGHT, state._curMemberPtr->_mode); + screen.markAllDirty(); } } else { if (_flags & PICFLAG_CLEAR_SCREEN00) { @@ -1249,13 +1250,13 @@ ViewPortResource::ViewPortResource(BoltFilesState &state, const byte *src): ys + READ_LE_UINT16(src + 0x4C)); state._curLibPtr->resolveIt(READ_LE_UINT32(src + 0x7A), &dummy); - state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x7E), (GraphicMethodPtr *)&_fn1); - state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x82), (GraphicMethodPtr *)&_setupFn); - state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x86), (GraphicMethodPtr *)&_addFn); - state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x8A), (GraphicMethodPtr *)&_restoreFn); + state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x7E), (ScreenMethodPtr *)&_fn1); + state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x82), (ScreenMethodPtr *)&_setupFn); + state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x86), (ScreenMethodPtr *)&_addFn); + state._curLibPtr->resolveFunction(READ_LE_UINT32(src + 0x8A), (ScreenMethodPtr *)&_restoreFn); if (!_restoreFn && _addFn) - _addFn = &GraphicsManager::addRectNoSaveBack; + _addFn = &Screen::addRectNoSaveBack; } ViewPortResource::~ViewPortResource() { @@ -1327,19 +1328,19 @@ void ViewPortResource::setupViewPort(PictureResource *page, Common::Rect *clippi _restoreFn = restoreFn; if (setupFn) - (_state._vm->_graphicsManager->*setupFn)(this); + (_state._vm->_screen->*setupFn)(this); } void ViewPortResource::setupViewPort() { - setupViewPort(_state._vm->_graphicsManager->_backgroundPage, NULL, - &GraphicsManager::setupMCGASaveRect, &GraphicsManager::addRectOptSaveRect, - &GraphicsManager::restoreMCGASaveRect); + setupViewPort(_state._vm->_screen->_backgroundPage, NULL, + &Screen::setupMCGASaveRect, &Screen::addRectOptSaveRect, + &Screen::restoreMCGASaveRect); } void ViewPortResource::setupViewPort(PictureResource *pic, Common::Rect *clippingRect) { setupViewPort(pic, clippingRect, - &GraphicsManager::setupMCGASaveRect, &GraphicsManager::addRectOptSaveRect, - &GraphicsManager::restoreMCGASaveRect); + &Screen::setupMCGASaveRect, &Screen::addRectOptSaveRect, + &Screen::restoreMCGASaveRect); } void ViewPortResource::addSaveRect(int pageIndex, const Common::Rect &r) { @@ -1347,7 +1348,7 @@ void ViewPortResource::addSaveRect(int pageIndex, const Common::Rect &r) { if (clipRect(rect)) { if (_addFn) { - (_state._vm->_graphicsManager->*_addFn)(this, pageIndex, rect); + (_state._vm->_screen->*_addFn)(this, pageIndex, rect); } else if (_rectListCount[pageIndex] != -1) { _rectListPtr[pageIndex]->push_back(rect); } @@ -1355,26 +1356,26 @@ void ViewPortResource::addSaveRect(int pageIndex, const Common::Rect &r) { } void ViewPortResource::fillPic(byte onOff) { - _state._vm->_graphicsManager->fillPic(this, onOff); + _state._vm->_screen->fillPic(this, onOff); } void ViewPortResource::drawIfaceTime() { // Hour display - _state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort, + _state._vm->_screen->drawANumber(_state._vm->_screen->_vPort, (_state._vm->_gameHour / 10) == 0 ? 10 : _state._vm->_gameHour / 10, Common::Point(161, 25)); - _state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort, + _state._vm->_screen->drawANumber(_state._vm->_screen->_vPort, _state._vm->_gameHour % 10, Common::Point(172, 25)); // Minute display - _state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort, + _state._vm->_screen->drawANumber(_state._vm->_screen->_vPort, _state._vm->_gameMinute / 10, Common::Point(190, 25)); - _state._vm->_graphicsManager->drawANumber(_state._vm->_graphicsManager->_vPort, + _state._vm->_screen->drawANumber(_state._vm->_screen->_vPort, _state._vm->_gameMinute % 10, Common::Point(201, 25)); // AM/PM indicator PictureResource *pic = _state._vm->_bVoy->boltEntry(_state._vm->_voy->_isAM ? 272 : 273)._picResource; - _state._vm->_graphicsManager->sDrawPic(pic, _state._vm->_graphicsManager->_vPort, + _state._vm->_screen->sDrawPic(pic, _state._vm->_screen->_vPort, Common::Point(215, 27)); } @@ -1382,9 +1383,9 @@ void ViewPortResource::drawPicPerm(PictureResource *pic, const Common::Point &pt Common::Rect bounds = pic->_bounds; bounds.translate(pt.x, pt.y); - bool saveBack = _state._vm->_graphicsManager->_saveBack; - _state._vm->_graphicsManager->_saveBack = false; - _state._vm->_graphicsManager->sDrawPic(pic, this, pt); + bool saveBack = _state._vm->_screen->_saveBack; + _state._vm->_screen->_saveBack = false; + _state._vm->_screen->sDrawPic(pic, this, pt); clipRect(bounds); for (int pageIndex = 0; pageIndex < _pageCount; ++pageIndex) { @@ -1393,7 +1394,7 @@ void ViewPortResource::drawPicPerm(PictureResource *pic, const Common::Point &pt } } - _state._vm->_graphicsManager->_saveBack = saveBack; + _state._vm->_screen->_saveBack = saveBack; } /*------------------------------------------------------------------------*/ @@ -1526,7 +1527,7 @@ CMapResource::CMapResource(BoltFilesState &state, const byte *src): _vm(state._v _entries = new byte[count * 3]; Common::copy(src + 6, src + 6 + 3 * count, _entries); - int palIndex = state._vm->_graphicsManager->_viewPortListPtr->_palIndex; + int palIndex = state._vm->_screen->_viewPortListPtr->_palIndex; if (_end > palIndex) _end = palIndex; if (_start > palIndex) diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h index eef5df497c..8726b38ddf 100644 --- a/engines/voyeur/files.h +++ b/engines/voyeur/files.h @@ -27,7 +27,7 @@ #include "common/file.h" #include "common/rect.h" #include "common/str.h" -#include "voyeur/graphics.h" +#include "voyeur/screen.h" namespace Voyeur { @@ -112,7 +112,7 @@ public: byte *memberAddr(uint32 id); byte *memberAddrOffset(uint32 id); void resolveIt(uint32 id, byte **p); - void resolveFunction(uint32 id, GraphicMethodPtr *fn); + void resolveFunction(uint32 id, ScreenMethodPtr *fn); BoltEntry &boltEntry(uint16 id); BoltEntry &getBoltEntryFromLong(uint32 id); @@ -340,7 +340,7 @@ public: int _rectListCount[3]; Common::Rect _clipRect; - GraphicMethodPtr _fn1; + ScreenMethodPtr _fn1; ViewPortSetupPtr _setupFn; ViewPortAddPtr _addFn; ViewPortRestorePtr _restoreFn; diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index 9908324043..bbd3dfe4e9 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -21,7 +21,7 @@ */ #include "voyeur/files.h" -#include "voyeur/graphics.h" +#include "voyeur/screen.h" #include "voyeur/voyeur.h" #include "voyeur/staticres.h" @@ -461,7 +461,7 @@ void ThreadResource::parsePlayCommands() { pic = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + i * 2)._picResource; pal = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + i * 2 + 1)._cMapResource; - _vm->_graphicsManager->_vPort->setupViewPort(pic); + _vm->_screen->_vPort->setupViewPort(pic); pal->startFade(); _vm->flipPageAndWaitForFade(); @@ -980,10 +980,10 @@ int ThreadResource::doApt() { _vm->_soundManager->startVOCPlay(_vm->_soundManager->getVOCFileName(_vm->_currentVocId)); _vm->_currentVocId = 151; - _vm->_graphicsManager->setColor(129, 82, 82, 82); - _vm->_graphicsManager->setColor(130, 112, 112, 112); - _vm->_graphicsManager->setColor(131, 215, 215, 215); - _vm->_graphicsManager->setColor(132, 235, 235, 235); + _vm->_screen->setColor(129, 82, 82, 82); + _vm->_screen->setColor(130, 112, 112, 112); + _vm->_screen->setColor(131, 215, 215, 215); + _vm->_screen->setColor(132, 235, 235, 235); _vm->_eventsManager->_intPtr._hasPalette = true; @@ -1044,7 +1044,7 @@ int ThreadResource::doApt() { // Draw the text description for the highlighted hotspot pic = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + hotspotId + 6)._picResource; - _vm->_graphicsManager->sDrawPic(pic, _vm->_graphicsManager->_vPort, + _vm->_screen->sDrawPic(pic, _vm->_screen->_vPort, Common::Point(106, 200)); } @@ -1112,10 +1112,10 @@ void ThreadResource::doRoom() { if (!vm._bVoy->getBoltGroup(vm._playStampGroupId)) return; - vm._graphicsManager->_backColors = vm._bVoy->boltEntry(vm._playStampGroupId + 1)._cMapResource; - vm._graphicsManager->_backgroundPage = vm._bVoy->boltEntry(vm._playStampGroupId)._picResource; - vm._graphicsManager->_vPort->setupViewPort(vm._graphicsManager->_backgroundPage); - vm._graphicsManager->_backColors->startFade(); + vm._screen->_backColors = vm._bVoy->boltEntry(vm._playStampGroupId + 1)._cMapResource; + vm._screen->_backgroundPage = vm._bVoy->boltEntry(vm._playStampGroupId)._picResource; + vm._screen->_vPort->setupViewPort(vm._screen->_backgroundPage); + vm._screen->_backColors->startFade(); voy._fadingStep1 = 2; voy._fadingStep2 = 0; @@ -1144,7 +1144,7 @@ void ThreadResource::doRoom() { bool breakFlag = false; while (!vm.shouldQuit() && !breakFlag) { _vm->_voyeurArea = AREA_ROOM; - vm._graphicsManager->setColor(128, 0, 255, 0); + vm._screen->setColor(128, 0, 255, 0); vm._eventsManager->_intPtr._hasPalette = true; do { @@ -1186,7 +1186,7 @@ void ThreadResource::doRoom() { } vm._eventsManager->_intPtr._hasPalette = true; - vm._graphicsManager->flipPage(); + vm._screen->flipPage(); vm._eventsManager->sWaitFlip(); } while (!vm.shouldQuit() && !vm._eventsManager->_mouseClicked); @@ -1234,13 +1234,13 @@ void ThreadResource::doRoom() { // WORKAROUND: Skipped code from the original, that freed the group, // reloaded it, and reloaded the cursors - vm._graphicsManager->_backColors = vm._bVoy->boltEntry( + vm._screen->_backColors = vm._bVoy->boltEntry( vm._playStampGroupId + 1)._cMapResource; - vm._graphicsManager->_backgroundPage = vm._bVoy->boltEntry( + vm._screen->_backgroundPage = vm._bVoy->boltEntry( vm._playStampGroupId)._picResource; - vm._graphicsManager->_vPort->setupViewPort(); - vm._graphicsManager->_backColors->startFade(); + vm._screen->_vPort->setupViewPort(); + vm._screen->_backColors->startFade(); _vm->flipPageAndWait(); while (!vm.shouldQuit() && (vm._eventsManager->_fadeStatus & 1)) @@ -1265,7 +1265,7 @@ void ThreadResource::doRoom() { _vm->flipPageAndWait(); - vm._graphicsManager->fadeUpICF1(); + vm._screen->fadeUpICF1(); voy._eventFlags &= EVTFLAG_RECORDING; vm._eventsManager->showCursor(); } @@ -1350,7 +1350,7 @@ int ThreadResource::doInterface() { _vm->_soundManager->startVOCPlay(fname); _vm->_eventsManager->getMouseInfo(); - _vm->_graphicsManager->setColor(240, 220, 220, 220); + _vm->_screen->setColor(240, 220, 220, 220); _vm->_eventsManager->_intPtr._hasPalette = true; _vm->_voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED; @@ -1424,20 +1424,20 @@ int ThreadResource::doInterface() { // Regularly update the time display if (_vm->_voy->_RTANum & 2) { - _vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort, + _vm->_screen->drawANumber(_vm->_screen->_vPort, _vm->_gameMinute / 10, Common::Point(190, 25)); - _vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort, + _vm->_screen->drawANumber(_vm->_screen->_vPort, _vm->_gameMinute % 10, Common::Point(201, 25)); if (_vm->_voy->_RTANum & 4) { int v = _vm->_gameHour / 10; - _vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort, + _vm->_screen->drawANumber(_vm->_screen->_vPort, v == 0 ? 10 : v, Common::Point(161, 25)); - _vm->_graphicsManager->drawANumber(_vm->_graphicsManager->_vPort, + _vm->_screen->drawANumber(_vm->_screen->_vPort, _vm->_gameHour % 10, Common::Point(172, 25)); pic = _vm->_bVoy->boltEntry(_vm->_voy->_isAM ? 272 : 273)._picResource; - _vm->_graphicsManager->sDrawPic(pic, _vm->_graphicsManager->_vPort, + _vm->_screen->sDrawPic(pic, _vm->_screen->_vPort, Common::Point(215, 27)); } } @@ -1605,16 +1605,16 @@ void ThreadResource::loadTheApt() { _vm->_bVoy->getBoltGroup(_vm->_playStampGroupId); _vm->_voy->_aptLoadMode = -1; - _vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry( + _vm->_screen->_backgroundPage = _vm->_bVoy->boltEntry( _vm->_playStampGroupId + 5)._picResource; - _vm->_graphicsManager->_vPort->setupViewPort( - _vm->_graphicsManager->_backgroundPage); + _vm->_screen->_vPort->setupViewPort( + _vm->_screen->_backgroundPage); } else { _vm->_bVoy->getBoltGroup(_vm->_playStampGroupId); - _vm->_graphicsManager->_backgroundPage = _vm->_bVoy->boltEntry( + _vm->_screen->_backgroundPage = _vm->_bVoy->boltEntry( _vm->_playStampGroupId + 5)._picResource; - _vm->_graphicsManager->_vPort->setupViewPort( - _vm->_graphicsManager->_backgroundPage); + _vm->_screen->_vPort->setupViewPort( + _vm->_screen->_backgroundPage); } CMapResource *pal = _vm->_bVoy->boltEntry(_vm->_playStampGroupId + 4)._cMapResource; @@ -1624,10 +1624,10 @@ void ThreadResource::loadTheApt() { } void ThreadResource::freeTheApt() { - _vm->_graphicsManager->fadeDownICF1(5); + _vm->_screen->fadeDownICF1(5); _vm->flipPageAndWaitForFade(); - _vm->_graphicsManager->fadeUpICF1(); + _vm->_screen->fadeUpICF1(); if (_vm->_currentVocId != -1) { _vm->_soundManager->stopVOCPlay(); @@ -1635,17 +1635,17 @@ void ThreadResource::freeTheApt() { } if (_vm->_voy->_aptLoadMode == -1) { - _vm->_graphicsManager->fadeDownICF(6); + _vm->_screen->fadeDownICF(6); } else { doAptAnim(2); } if (_vm->_voy->_aptLoadMode == 140) { - _vm->_graphicsManager->screenReset(); - _vm->_graphicsManager->resetPalette(); + _vm->_screen->screenReset(); + _vm->_screen->resetPalette(); } - _vm->_graphicsManager->_vPort->setupViewPort(nullptr); + _vm->_screen->_vPort->setupViewPort(nullptr); _vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId); _vm->_playStampGroupId = -1; _vm->_voy->_viewBounds = nullptr; @@ -1705,7 +1705,7 @@ void ThreadResource::doAptAnim(int mode) { for (int idx = 0; (idx < 6) && !_vm->shouldQuit(); ++idx) { PictureResource *pic = _vm->_bVoy->boltEntry(id + idx + 1)._picResource; - _vm->_graphicsManager->_vPort->setupViewPort(pic); + _vm->_screen->_vPort->setupViewPort(pic); pal->startFade(); _vm->flipPageAndWait(); diff --git a/engines/voyeur/module.mk b/engines/voyeur/module.mk index aab254cf36..a38bdd9ab2 100644 --- a/engines/voyeur/module.mk +++ b/engines/voyeur/module.mk @@ -8,7 +8,7 @@ MODULE_OBJS := \ events.o \ files.o \ files_threads.o \ - graphics.o \ + screen.o \ sound.o \ staticres.o \ voyeur.o \ diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/screen.cpp index a20e9f6006..62f609c5c7 100644 --- a/engines/voyeur/graphics.cpp +++ b/engines/voyeur/screen.cpp @@ -20,7 +20,7 @@ * */ -#include "voyeur/graphics.h" +#include "voyeur/screen.h" #include "voyeur/voyeur.h" #include "voyeur/staticres.h" #include "engines/util.h" @@ -38,7 +38,8 @@ DrawInfo::DrawInfo(int penColor, const Common::Point &pos) { /*------------------------------------------------------------------------*/ -GraphicsManager::GraphicsManager(VoyeurEngine *vm) : _defaultDrawInfo(1, Common::Point()), _drawPtr(&_defaultDrawInfo), _vm(vm) { +Screen::Screen(VoyeurEngine *vm) : Graphics::Screen(), _vm(vm), _drawPtr(&_defaultDrawInfo), + _defaultDrawInfo(1, Common::Point()) { _SVGAMode = 0; _planeSelect = 0; _saveBack = true; @@ -52,18 +53,17 @@ GraphicsManager::GraphicsManager(VoyeurEngine *vm) : _defaultDrawInfo(1, Common: _backColors = nullptr; } -void GraphicsManager::sInitGraphics() { +void Screen::sInitGraphics() { initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT, false); - _screenSurface.create(SCREEN_WIDTH, SCREEN_HEIGHT, Graphics::PixelFormat::createFormatCLUT8()); + create(SCREEN_WIDTH, SCREEN_HEIGHT); clearPalette(); } -GraphicsManager::~GraphicsManager() { - _screenSurface.free(); +Screen::~Screen() { delete _fontChar; } -void GraphicsManager::setupMCGASaveRect(ViewPortResource *viewPort) { +void Screen::setupMCGASaveRect(ViewPortResource *viewPort) { if (viewPort->_activePage) { viewPort->_activePage->_flags |= DISPFLAG_1; Common::Rect *clipRect = _clipPtr; @@ -77,7 +77,7 @@ void GraphicsManager::setupMCGASaveRect(ViewPortResource *viewPort) { viewPort->_rectListCount[1] = -1; } -void GraphicsManager::addRectOptSaveRect(ViewPortResource *viewPort, int idx, const Common::Rect &bounds) { +void Screen::addRectOptSaveRect(ViewPortResource *viewPort, int idx, const Common::Rect &bounds) { if (viewPort->_rectListCount[idx] == -1) return; @@ -86,7 +86,7 @@ void GraphicsManager::addRectOptSaveRect(ViewPortResource *viewPort, int idx, co ++viewPort->_rectListCount[idx]; } -void GraphicsManager::restoreMCGASaveRect(ViewPortResource *viewPort) { +void Screen::restoreMCGASaveRect(ViewPortResource *viewPort) { if (viewPort->_rectListCount[0] != -1) { for (int i = 0; i < viewPort->_rectListCount[0]; ++i) { addRectOptSaveRect(viewPort, 1, (*viewPort->_rectListPtr[0])[i]); @@ -106,11 +106,11 @@ void GraphicsManager::restoreMCGASaveRect(ViewPortResource *viewPort) { viewPort->_rectListCount[1] = count; } -void GraphicsManager::addRectNoSaveBack(ViewPortResource *viewPort, int idx, const Common::Rect &bounds) { +void Screen::addRectNoSaveBack(ViewPortResource *viewPort, int idx, const Common::Rect &bounds) { // Stubbed/dummy method in the original. } -void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, +void Screen::sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, const Common::Point &initialOffset) { int width1, width2; int widthDiff, widthDiff2; @@ -128,7 +128,8 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des int runLength; byte *srcImgData, *destImgData; - byte *srcP, *destP; + const byte *srcP; + byte *destP; byte byteVal, byteVal2; PictureResource *srcPic; @@ -292,7 +293,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des // loc_2566F if (srcFlags & DISPFLAG_2) { // loc_256FA - srcP = (byte *)_screenSurface.getPixels() + srcOffset; + srcP = (const byte *)getPixels() + srcOffset; for (int yp = 0; yp < height1; ++yp) { for (int xp = 0; xp < width2; ++xp, ++srcP, ++destP) { @@ -325,13 +326,16 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des } } else { // loc_25829 - destP = (byte *)_screenSurface.getPixels() + screenOffset; + destP = (byte *)getPixels() + screenOffset; for (int yp = 0; yp < height1; ++yp) { Common::copy(srcP, srcP + width2, destP); srcP += width2 + widthDiff; destP += width2 + widthDiff2; } + + addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, + offset.y + height1)); } } } else { @@ -341,13 +345,16 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des error("TODO: sDrawPic variation"); } else { // loc_2606D - destP = (byte *)_screenSurface.getPixels() + screenOffset; + destP = (byte *)getPixels() + screenOffset; for (int yp = 0; yp < height1; ++yp) { Common::copy(srcP, srcP + width2, destP); destP += width2 + widthDiff2; srcP += width2 + widthDiff; } + + addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, + offset.y + height1)); } } } else { @@ -530,11 +537,14 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des // loc_27477 if (destFlags & DISPFLAG_8) { // loc_27481 - destP = (byte *)_screenSurface.getPixels() + screenOffset; + destP = (byte *)getPixels() + screenOffset; for (int yp = 0; yp < height1; ++yp) { Common::fill(destP, destP + width2, onOff); destP += width2 + widthDiff2; } + + addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, + offset.y + height1)); } else { // loc_2753C destP = destImgData + screenOffset; @@ -561,7 +571,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des if (srcFlags & PICFLAG_100) { if (isClipped) { // loc_266E3 - destP = (byte *)_screenSurface.getPixels() + screenOffset; + destP = (byte *)getPixels() + screenOffset; tmpWidth = (tmpWidth < 0) ? -tmpWidth : 0; int xMax = tmpWidth + width2; tmpHeight = (tmpHeight < 0) ? -tmpHeight : 0; @@ -592,9 +602,12 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des if (yp >= tmpHeight) destP += widthDiff2; } + + addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, + offset.y + height1)); } else { // loc_26815 - destP = (byte *)_screenSurface.getPixels() + screenOffset; + destP = (byte *)getPixels() + screenOffset; for (int yp = 0; yp < height1; ++yp) { for (int xi = 0; xi < width2; ++xi, ++destP) { @@ -618,10 +631,13 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des destP += widthDiff2; } + + addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, + offset.y + height1)); } } else { // Direct screen write - destP = (byte *)_screenSurface.getPixels() + screenOffset; + destP = (byte *)getPixels() + screenOffset; for (int yp = 0; yp < height1; ++yp) { for (int xp = 0; xp < width2; ++xp, ++srcP, ++destP) { @@ -631,6 +647,9 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des destP += widthDiff2; srcP += widthDiff; } + + addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, + offset.y + height1)); } } else if (srcFlags & PICFLAG_100) { srcP = srcImgData; @@ -663,7 +682,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des } } else { // loc_26BD5 - destP = (byte *)_screenSurface.getPixels() + screenOffset; + destP = (byte *)getPixels() + screenOffset; for (int yp = 0; yp < height1; ++yp) { byteVal2 = 0; @@ -684,10 +703,13 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des destP += widthDiff2; } + + addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, + offset.y + height1)); } } else { // loc_26C9A - destP = (byte *)_screenSurface.getPixels() + screenOffset; + destP = (byte *)getPixels() + screenOffset; for (int yp = 0; yp < height1; ++yp) { for (int xp = 0; xp < width2; ++xp, ++srcP, ++destP) { @@ -696,6 +718,9 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des destP += widthDiff2; srcP += widthDiff; } + + addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, + offset.y + height1)); } } else { // loc_26D2F @@ -850,12 +875,12 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des } } -void GraphicsManager::drawANumber(DisplayResource *display, int num, const Common::Point &pt) { +void Screen::drawANumber(DisplayResource *display, int num, const Common::Point &pt) { PictureResource *pic = _vm->_bVoy->boltEntry(num + 261)._picResource; sDrawPic(pic, display, pt); } -void GraphicsManager::fillPic(DisplayResource *display, byte onOff) { +void Screen::fillPic(DisplayResource *display, byte onOff) { PictureResource *pic; if (display->_flags & DISPFLAG_VIEWPORT) { pic = ((ViewPortResource *)display)->_currentPic; @@ -876,11 +901,11 @@ void GraphicsManager::fillPic(DisplayResource *display, byte onOff) { /** * Queues the given picture for display */ -void GraphicsManager::sDisplayPic(PictureResource *pic) { +void Screen::sDisplayPic(PictureResource *pic) { _vm->_eventsManager->_intPtr._flipWait = true; } -void GraphicsManager::flipPage() { +void Screen::flipPage() { Common::Array<ViewPortResource *> &viewPorts = _viewPortListPtr->_entries; bool flipFlag = false; @@ -907,7 +932,7 @@ void GraphicsManager::flipPage() { } } -void GraphicsManager::restoreBack(Common::Array<Common::Rect> &rectList, int rectListCount, +void Screen::restoreBack(Common::Array<Common::Rect> &rectList, int rectListCount, PictureResource *srcPic, PictureResource *destPic) { // WORKAROUND: Since _backgroundPage can point to a resource freed at the end of display methods, // I'm now explicitly resetting it to null in screenReset(), so at this point it can be null @@ -929,33 +954,26 @@ void GraphicsManager::restoreBack(Common::Array<Common::Rect> &rectList, int rec _saveBack = saveBack; } -void GraphicsManager::clearPalette() { - byte palette[768]; - Common::fill(&palette[0], &palette[768], 0); - g_system->getPaletteManager()->setPalette(&palette[0], 0, 256); -} - -void GraphicsManager::setPalette(const byte *palette, int start, int count) { - g_system->getPaletteManager()->setPalette(palette, start, count); +void Screen::setPalette(const byte *palette, int start, int count) { + Graphics::Screen::setPalette(palette, start, count); _vm->_eventsManager->_gameData._hasPalette = false; } -void GraphicsManager::setPalette128(const byte *palette, int start, int count) { +void Screen::setPalette128(const byte *palette, int start, int count) { byte rgb[3]; - g_system->getPaletteManager()->grabPalette(&rgb[0], 128, 1); - g_system->getPaletteManager()->setPalette(palette, start, count); - g_system->getPaletteManager()->setPalette(&rgb[0], 128, 1); + getPalette(&rgb[0], 128, 1); + Graphics::Screen::setPalette(palette, start, count); + Graphics::Screen::setPalette(&rgb[0], 128, 1); } - -void GraphicsManager::resetPalette() { +void Screen::resetPalette() { for (int i = 0; i < 256; ++i) setColor(i, 0, 0, 0); _vm->_eventsManager->_intPtr._hasPalette = true; } -void GraphicsManager::setColor(int idx, byte r, byte g, byte b) { +void Screen::setColor(int idx, byte r, byte g, byte b) { byte *vgaP = &_VGAColors[idx * 3]; vgaP[0] = r; vgaP[1] = g; @@ -965,7 +983,7 @@ void GraphicsManager::setColor(int idx, byte r, byte g, byte b) { _vm->_eventsManager->_intPtr._palEndIndex = MAX(_vm->_eventsManager->_intPtr._palEndIndex, idx); } -void GraphicsManager::setOneColor(int idx, byte r, byte g, byte b) { +void Screen::setOneColor(int idx, byte r, byte g, byte b) { byte palEntry[3]; palEntry[0] = r; palEntry[1] = g; @@ -973,7 +991,7 @@ void GraphicsManager::setOneColor(int idx, byte r, byte g, byte b) { g_system->getPaletteManager()->setPalette(&palEntry[0], idx, 1); } -void GraphicsManager::setColors(int start, int count, const byte *pal) { +void Screen::setColors(int start, int count, const byte *pal) { for (int i = 0; i < count; ++i) { if ((i + start) != 128) { const byte *rgb = pal + i * 3; @@ -984,7 +1002,7 @@ void GraphicsManager::setColors(int start, int count, const byte *pal) { _vm->_eventsManager->_intPtr._hasPalette = true; } -void GraphicsManager::screenReset() { +void Screen::screenReset() { resetPalette(); _backgroundPage = NULL; @@ -994,7 +1012,7 @@ void GraphicsManager::screenReset() { _vm->flipPageAndWait(); } -void GraphicsManager::fadeDownICF1(int steps) { +void Screen::fadeDownICF1(int steps) { if (steps > 0) { int stepAmount = _vm->_voy->_fadingAmount2 / steps; @@ -1007,7 +1025,7 @@ void GraphicsManager::fadeDownICF1(int steps) { _vm->_voy->_fadingAmount2 = 0; } -void GraphicsManager::fadeUpICF1(int steps) { +void Screen::fadeUpICF1(int steps) { if (steps > 0) { int stepAmount = (63 - _vm->_voy->_fadingAmount2) / steps; @@ -1020,7 +1038,7 @@ void GraphicsManager::fadeUpICF1(int steps) { _vm->_voy->_fadingAmount2 = 63; } -void GraphicsManager::fadeDownICF(int steps) { +void Screen::fadeDownICF(int steps) { if (steps > 0) { _vm->_eventsManager->hideCursor(); int stepAmount1 = _vm->_voy->_fadingAmount1 / steps; @@ -1037,14 +1055,19 @@ void GraphicsManager::fadeDownICF(int steps) { _vm->_voy->_fadingAmount2 = 0; } -void GraphicsManager::drawDot() { - for (int y = 0; y < 9; ++y) { - byte *pDest = (byte *)_screenSurface.getPixels() + DOT_LINE_START[y] + DOT_LINE_OFFSET[y]; - Common::fill(pDest, pDest + DOT_LINE_LENGTH[y], 0x80); +void Screen::drawDot() { + for (int idx = 0; idx < 9; ++idx) { + uint offset = DOT_LINE_START[idx] + DOT_LINE_OFFSET[idx]; + int xp = offset % SCREEN_WIDTH; + int yp = offset / SCREEN_WIDTH; + + byte *pDest = (byte *)getPixels() + offset; + Common::fill(pDest, pDest + DOT_LINE_LENGTH[idx], 0x80); + addDirtyRect(Common::Rect(xp, yp, xp + DOT_LINE_LENGTH[idx], yp + 1)); } } -void GraphicsManager::synchronize(Common::Serializer &s) { +void Screen::synchronize(Common::Serializer &s) { s.syncBytes(&_VGAColors[0], PALETTE_SIZE); } diff --git a/engines/voyeur/graphics.h b/engines/voyeur/screen.h index e4d0b38650..aaf61747a4 100644 --- a/engines/voyeur/graphics.h +++ b/engines/voyeur/screen.h @@ -27,17 +27,15 @@ #include "common/array.h" #include "common/rect.h" #include "common/serializer.h" -#include "graphics/surface.h" +#include "graphics/screen.h" namespace Voyeur { #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 200 -#define PALETTE_COUNT 256 -#define PALETTE_SIZE (256 * 3) class VoyeurEngine; -class GraphicsManager; +class Screen; class DisplayResource; class PictureResource; class ViewPortResource; @@ -54,12 +52,12 @@ public: DrawInfo(int penColor, const Common::Point &pos); }; -typedef void (GraphicsManager::*GraphicMethodPtr)(); -typedef void (GraphicsManager::*ViewPortSetupPtr)(ViewPortResource *); -typedef void (GraphicsManager::*ViewPortAddPtr)(ViewPortResource *, int idx, const Common::Rect &bounds); -typedef void (GraphicsManager::*ViewPortRestorePtr)(ViewPortResource *); +typedef void (Screen::*ScreenMethodPtr)(); +typedef void (Screen::*ViewPortSetupPtr)(ViewPortResource *); +typedef void (Screen::*ViewPortAddPtr)(ViewPortResource *, int idx, const Common::Rect &bounds); +typedef void (Screen::*ViewPortRestorePtr)(ViewPortResource *); -class GraphicsManager { +class Screen: public Graphics::Screen { public: byte _VGAColors[PALETTE_SIZE]; PictureResource *_backgroundPage; @@ -69,7 +67,6 @@ public: bool _saveBack; Common::Rect *_clipPtr; uint _planeSelect; - Graphics::Surface _screenSurface; CMapResource *_backColors; FontInfoResource *_fontPtr; PictureResource *_fontChar; @@ -81,8 +78,8 @@ private: void restoreBack(Common::Array<Common::Rect> &rectList, int rectListCount, PictureResource *srcPic, PictureResource *destPic); public: - GraphicsManager(VoyeurEngine *vm); - ~GraphicsManager(); + Screen(VoyeurEngine *vm); + virtual ~Screen(); void sInitGraphics(); @@ -96,7 +93,6 @@ public: void sDisplayPic(PictureResource *pic); void drawANumber(DisplayResource *display, int num, const Common::Point &pt); void flipPage(); - void clearPalette(); void setPalette(const byte *palette, int start, int count); void setPalette128(const byte *palette, int start, int count); void resetPalette(); diff --git a/engines/voyeur/sound.cpp b/engines/voyeur/sound.cpp index f47fdde3e1..483dfc7cbc 100644 --- a/engines/voyeur/sound.cpp +++ b/engines/voyeur/sound.cpp @@ -22,6 +22,8 @@ #include "audio/audiostream.h" #include "audio/decoders/raw.h" +#include "audio/decoders/voc.h" +#include "common/file.h" #include "common/memstream.h" #include "voyeur/sound.h" #include "voyeur/staticres.h" diff --git a/engines/voyeur/sound.h b/engines/voyeur/sound.h index af1d0b1b46..fd1d126ef0 100644 --- a/engines/voyeur/sound.h +++ b/engines/voyeur/sound.h @@ -26,8 +26,6 @@ #include "common/scummsys.h" #include "common/str.h" #include "audio/mixer.h" -#include "audio/decoders/voc.h" -#include "voyeur/files.h" namespace Voyeur { diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index cbb6846340..01b76a72d1 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -22,7 +22,7 @@ #include "voyeur/voyeur.h" #include "voyeur/animation.h" -#include "voyeur/graphics.h" +#include "voyeur/screen.h" #include "voyeur/staticres.h" #include "common/scummsys.h" #include "common/config-manager.h" @@ -40,7 +40,7 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc) _debugger = nullptr; _eventsManager = nullptr; _filesManager = nullptr; - _graphicsManager = nullptr; + _screen = nullptr; _soundManager = nullptr; _voy = nullptr; _bVoy = NULL; @@ -65,13 +65,6 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc) DebugMan.addDebugChannel(kDebugScripts, "scripts", "Game scripts"); - _debugger = new Debugger(this); - _eventsManager = new EventsManager(this); - _filesManager = new FilesManager(this); - _graphicsManager = new GraphicsManager(this); - _soundManager = new SoundManager(_mixer); - _voy = new SVoy(this); - _stampLibPtr = nullptr; _controlGroupPtr = nullptr; _stampData = nullptr; @@ -88,7 +81,7 @@ VoyeurEngine::~VoyeurEngine() { delete _bVoy; delete _voy; delete _soundManager; - delete _graphicsManager; + delete _screen; delete _filesManager; delete _eventsManager; delete _debugger; @@ -126,15 +119,22 @@ void VoyeurEngine::ESP_Init() { } void VoyeurEngine::globalInitBolt() { + _debugger = new Debugger(this); + _eventsManager = new EventsManager(this); + _filesManager = new FilesManager(this); + _screen = new Screen(this); + _soundManager = new SoundManager(_mixer); + _voy = new SVoy(this); + initBolt(); _filesManager->openBoltLib("bvoy.blt", _bVoy); _bVoy->getBoltGroup(0x000); _bVoy->getBoltGroup(0x100); - _graphicsManager->_fontPtr = &_defaultFontInfo; - _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource; - assert(_graphicsManager->_fontPtr->_curFont); + _screen->_fontPtr = &_defaultFontInfo; + _screen->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource; + assert(_screen->_fontPtr->_curFont); // Setup default flags _voy->_viewBounds = nullptr; @@ -144,13 +144,13 @@ void VoyeurEngine::globalInitBolt() { void VoyeurEngine::initBolt() { vInitInterrupts(); - _graphicsManager->sInitGraphics(); + _screen->sInitGraphics(); _eventsManager->vInitColor(); initInput(); } void VoyeurEngine::vInitInterrupts() { - _eventsManager->_intPtr._palette = &_graphicsManager->_VGAColors[0]; + _eventsManager->_intPtr._palette = &_screen->_VGAColors[0]; } void VoyeurEngine::initInput() { @@ -213,8 +213,8 @@ bool VoyeurEngine::doHeadTitle() { } void VoyeurEngine::showConversionScreen() { - _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x502)._picResource; - _graphicsManager->_vPort->setupViewPort(); + _screen->_backgroundPage = _bVoy->boltEntry(0x502)._picResource; + _screen->_vPort->setupViewPort(); flipPageAndWait(); // Immediate palette load to show the initial screen @@ -237,7 +237,7 @@ void VoyeurEngine::showConversionScreen() { flipPageAndWaitForFade(); - _graphicsManager->screenReset(); + _screen->screenReset(); } bool VoyeurEngine::doLock() { @@ -249,28 +249,28 @@ bool VoyeurEngine::doLock() { if (_bVoy->getBoltGroup(0x700)) { Common::String password = "3333"; - _graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x700); - _graphicsManager->_backColors = _bVoy->getCMapResource(0x701); + _screen->_backgroundPage = _bVoy->getPictureResource(0x700); + _screen->_backColors = _bVoy->getCMapResource(0x701); PictureResource *cursorPic = _bVoy->getPictureResource(0x702); _voy->_viewBounds = _bVoy->boltEntry(0x704)._rectResource; Common::Array<RectEntry> &hotspots = _bVoy->boltEntry(0x705)._rectResource->_entries; assert(cursorPic); - _graphicsManager->_vPort->setupViewPort(); + _screen->_vPort->setupViewPort(); - _graphicsManager->_backColors->startFade(); - _graphicsManager->_vPort->_parent->_flags |= DISPFLAG_8; - _graphicsManager->flipPage(); + _screen->_backColors->startFade(); + _screen->_vPort->_parent->_flags |= DISPFLAG_8; + _screen->flipPage(); _eventsManager->sWaitFlip(); while (!shouldQuit() && (_eventsManager->_fadeStatus & 1)) _eventsManager->delay(1); _eventsManager->setCursorColor(127, 0); - _graphicsManager->setColor(1, 64, 64, 64); - _graphicsManager->setColor(2, 96, 96, 96); - _graphicsManager->setColor(3, 160, 160, 160); - _graphicsManager->setColor(4, 224, 224, 224); + _screen->setColor(1, 64, 64, 64); + _screen->setColor(2, 96, 96, 96); + _screen->setColor(3, 160, 160, 160); + _screen->setColor(4, 224, 224, 224); // Set up the cursor _eventsManager->setCursor(cursorPic); @@ -278,9 +278,9 @@ bool VoyeurEngine::doLock() { _eventsManager->_intPtr._hasPalette = true; - _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x708)._fontResource; - _graphicsManager->_fontPtr->_fontSaveBack = 0; - _graphicsManager->_fontPtr->_fontFlags = DISPFLAG_NONE; + _screen->_fontPtr->_curFont = _bVoy->boltEntry(0x708)._fontResource; + _screen->_fontPtr->_fontSaveBack = 0; + _screen->_fontPtr->_fontFlags = DISPFLAG_NONE; Common::String dateString = "ScummVM"; Common::String displayString = Common::String::format("Last Play %s", dateString.c_str()); @@ -288,16 +288,16 @@ bool VoyeurEngine::doLock() { bool firstLoop = true; bool breakFlag = false; while (!breakFlag && !shouldQuit()) { - _graphicsManager->_vPort->setupViewPort(); + _screen->_vPort->setupViewPort(); flipPageAndWait(); // Display the last play time - _graphicsManager->_fontPtr->_pos = Common::Point(0, 97); - _graphicsManager->_fontPtr->_justify = ALIGN_CENTER; - _graphicsManager->_fontPtr->_justifyWidth = 384; - _graphicsManager->_fontPtr->_justifyHeight = 97; + _screen->_fontPtr->_pos = Common::Point(0, 97); + _screen->_fontPtr->_justify = ALIGN_CENTER; + _screen->_fontPtr->_justifyWidth = 384; + _screen->_fontPtr->_justifyHeight = 97; - _graphicsManager->_vPort->drawText(displayString); + _screen->_vPort->drawText(displayString); flipPageAndWait(); if (firstLoop) { @@ -356,7 +356,7 @@ bool VoyeurEngine::doLock() { } else if (key == 11) { // New code if ((password.empty() && displayString.empty()) || (password != displayString)) { - _graphicsManager->_vPort->setupViewPort(); + _screen->_vPort->setupViewPort(); password = displayString; displayString = ""; continue; @@ -373,9 +373,9 @@ bool VoyeurEngine::doLock() { _soundManager->playVOCMap(wrongVoc, wrongVocSize); } - _graphicsManager->fillPic(_graphicsManager->_vPort, 0); + _screen->fillPic(_screen->_vPort, 0); flipPageAndWait(); - _graphicsManager->resetPalette(); + _screen->resetPalette(); _voy->_viewBounds = nullptr; _bVoy->freeBoltGroup(0x700); @@ -393,9 +393,9 @@ void VoyeurEngine::showTitleScreen() { if (!_bVoy->getBoltGroup(0x500)) return; - _graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x500); + _screen->_backgroundPage = _bVoy->getPictureResource(0x500); - _graphicsManager->_vPort->setupViewPort(); + _screen->_vPort->setupViewPort(); flipPageAndWait(); // Immediate palette load to show the initial screen @@ -422,18 +422,18 @@ void VoyeurEngine::showTitleScreen() { return; } - _graphicsManager->screenReset(); + _screen->screenReset(); _eventsManager->delayClick(200); // Voyeur title playRL2Video("a1100100.rl2"); - _graphicsManager->screenReset(); + _screen->screenReset(); _bVoy->freeBoltGroup(0x500); } void VoyeurEngine::doOpening() { - _graphicsManager->screenReset(); + _screen->screenReset(); if (!_bVoy->getBoltGroup(0x200)) return; @@ -459,10 +459,10 @@ void VoyeurEngine::doOpening() { _voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED; for (int i = 0; i < 256; ++i) - _graphicsManager->setColor(i, 8, 8, 8); + _screen->setColor(i, 8, 8, 8); _eventsManager->_intPtr._hasPalette = true; - _graphicsManager->_vPort->setupViewPort(); + _screen->_vPort->setupViewPort(); flipPageAndWait(); RL2Decoder decoder; @@ -472,14 +472,12 @@ void VoyeurEngine::doOpening() { while (!shouldQuit() && !decoder.endOfVideo() && !_eventsManager->_mouseClicked) { if (decoder.hasDirtyPalette()) { const byte *palette = decoder.getPalette(); - _graphicsManager->setPalette(palette, 0, 256); + _screen->setPalette(palette, 0, 256); } if (decoder.needsUpdate()) { const Graphics::Surface *frame = decoder.decodeNextFrame(); - - Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200, - (byte *)_graphicsManager->_screenSurface.getPixels()); + _screen->blitFrom(*frame); if (decoder.getCurFrame() >= (int32)READ_LE_UINT32(frameTable + frameIndex * 4)) { if (creditShow) { @@ -499,7 +497,7 @@ void VoyeurEngine::doOpening() { } if (textPic) { - _graphicsManager->sDrawPic(textPic, _graphicsManager->_vPort, textPos); + _screen->sDrawPic(textPic, _screen->_vPort, textPos); } flipPageAndWait(); @@ -527,14 +525,12 @@ void VoyeurEngine::playRL2Video(const Common::String &filename) { while (!shouldQuit() && !decoder.endOfVideo() && !_eventsManager->_mouseClicked) { if (decoder.hasDirtyPalette()) { const byte *palette = decoder.getPalette(); - _graphicsManager->setPalette(palette, 0, 256); + _screen->setPalette(palette, 0, 256); } if (decoder.needsUpdate()) { const Graphics::Surface *frame = decoder.decodeNextFrame(); - - Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200, - (byte *)_graphicsManager->_screenSurface.getPixels()); + _screen->blitFrom(*frame); } _eventsManager->getMouseInfo(); @@ -573,17 +569,16 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) { (decoder.getCurFrame() < endFrame)) { if (decoder.needsUpdate()) { const Graphics::Surface *frame = decoder.decodeNextFrame(); + _screen->blitFrom(*frame); - Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200, - (byte *)_graphicsManager->_screenSurface.getPixels()); if (_voy->_eventFlags & EVTFLAG_RECORDING) - _graphicsManager->drawDot(); + _screen->drawDot(); } if (decoder.hasDirtyPalette()) { const byte *palette = decoder.getPalette(); - _graphicsManager->setPalette(palette, 0, decoder.getPaletteCount()); - _graphicsManager->setOneColor(128, 220, 20, 20); + _screen->setPalette(palette, 0, decoder.getPaletteCount()); + _screen->setOneColor(128, 220, 20, 20); } _eventsManager->getMouseInfo(); @@ -591,13 +586,13 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) { } // RL2 finished - _graphicsManager->screenReset(); + _screen->screenReset(); _voy->_eventFlags &= ~EVTFLAG_RECORDING; if (_voy->_eventFlags & EVTFLAG_8) { assert(pic); - byte *imgData = _graphicsManager->_vPort->_currentPic->_imgData; - _graphicsManager->_vPort->_currentPic->_imgData = pic->_imgData; + byte *imgData = _screen->_vPort->_currentPic->_imgData; + _screen->_vPort->_currentPic->_imgData = pic->_imgData; pic->_imgData = imgData; _voy->_eventFlags &= ~EVTFLAG_8; } @@ -608,13 +603,13 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) { void VoyeurEngine::playAudio(int audioId) { _bVoy->getBoltGroup(0x7F00); - _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x7F00 + + _screen->_backgroundPage = _bVoy->boltEntry(0x7F00 + BLIND_TABLE[audioId] * 2)._picResource; - _graphicsManager->_backColors = _bVoy->boltEntry(0x7F01 + + _screen->_backColors = _bVoy->boltEntry(0x7F01 + BLIND_TABLE[audioId] * 2)._cMapResource; - _graphicsManager->_vPort->setupViewPort(); - _graphicsManager->_backColors->startFade(); + _screen->_vPort->setupViewPort(); + _screen->_backColors->startFade(); flipPageAndWaitForFade(); _voy->_eventFlags &= ~EVTFLAG_TIME_DISABLED; @@ -633,26 +628,26 @@ void VoyeurEngine::playAudio(int audioId) { _soundManager->stopVOCPlay(); _bVoy->freeBoltGroup(0x7F00); - _graphicsManager->_vPort->setupViewPort(NULL); + _screen->_vPort->setupViewPort(NULL); _voy->_eventFlags &= ~EVTFLAG_RECORDING; _voy->_playStampMode = 129; } void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::String &location) { - _graphicsManager->setColor(128, 16, 16, 16); - _graphicsManager->setColor(224, 220, 220, 220); + _screen->setColor(128, 16, 16, 16); + _screen->setColor(224, 220, 220, 220); _eventsManager->_intPtr._hasPalette = true; - _graphicsManager->_vPort->setupViewPort(NULL); - _graphicsManager->_vPort->fillPic(0x80); - _graphicsManager->flipPage(); + _screen->_vPort->setupViewPort(NULL); + _screen->_vPort->fillPic(0x80); + _screen->flipPage(); _eventsManager->sWaitFlip(); flipPageAndWait(); - _graphicsManager->_vPort->fillPic(0x80); + _screen->_vPort->fillPic(0x80); - FontInfoResource &fi = *_graphicsManager->_fontPtr; + FontInfoResource &fi = *_screen->_fontPtr; fi._curFont = _bVoy->boltEntry(257)._fontResource; fi._foreColor = 224; fi._fontSaveBack = 0; @@ -661,7 +656,7 @@ void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::St fi._justifyWidth = 384; fi._justifyHeight = 120; - _graphicsManager->_vPort->drawText(time); + _screen->_vPort->drawText(time); if (!location.empty()) { fi._pos = Common::Point(0, 138); @@ -669,7 +664,7 @@ void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::St fi._justifyWidth = 384; fi._justifyHeight = 140; - _graphicsManager->_vPort->drawText(location); + _screen->_vPort->drawText(location); } flipPageAndWait(); @@ -680,8 +675,8 @@ void VoyeurEngine::saveLastInplay() { } void VoyeurEngine::flipPageAndWait() { - _graphicsManager->_vPort->_flags |= DISPFLAG_8; - _graphicsManager->flipPage(); + _screen->_vPort->_flags |= DISPFLAG_8; + _screen->flipPage(); _eventsManager->sWaitFlip(); } @@ -702,7 +697,7 @@ void VoyeurEngine::showEndingNews() { PictureResource *pic = _bVoy->boltEntry(_playStampGroupId)._picResource; CMapResource *pal = _bVoy->boltEntry(_playStampGroupId + 1)._cMapResource; - _graphicsManager->_vPort->setupViewPort(pic); + _screen->_vPort->setupViewPort(pic); pal->startFade(); flipPageAndWaitForFade(); @@ -717,7 +712,7 @@ void VoyeurEngine::showEndingNews() { pal = _bVoy->boltEntry(_playStampGroupId + idx * 2 + 1)._cMapResource; } - _graphicsManager->_vPort->setupViewPort(pic); + _screen->_vPort->setupViewPort(pic); pal->startFade(); flipPageAndWaitForFade(); @@ -852,7 +847,7 @@ void VoyeurEngine::synchronize(Common::Serializer &s) { // Sub-systems _voy->synchronize(s); - _graphicsManager->synchronize(s); + _screen->synchronize(s); _mainThread->synchronize(s); _controlPtr->_state->synchronize(s); } @@ -906,8 +901,8 @@ void VoyeurSavegameHeader::write(Common::OutSaveFile *f, VoyeurEngine *vm, const // Create a thumbnail and save it Graphics::Surface *thumb = new Graphics::Surface(); - ::createThumbnail(thumb, (byte *)vm->_graphicsManager->_screenSurface.getPixels(), - SCREEN_WIDTH, SCREEN_HEIGHT, vm->_graphicsManager->_VGAColors); + ::createThumbnail(thumb, (const byte *)vm->_screen->getPixels(), + SCREEN_WIDTH, SCREEN_HEIGHT, vm->_screen->_VGAColors); Graphics::saveThumbnail(*f, *thumb); thumb->free(); delete thumb; diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index e0bb734fa8..9cda85fd51 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -27,7 +27,7 @@ #include "voyeur/data.h" #include "voyeur/events.h" #include "voyeur/files.h" -#include "voyeur/graphics.h" +#include "voyeur/screen.h" #include "voyeur/sound.h" #include "common/scummsys.h" #include "common/system.h" @@ -164,7 +164,7 @@ public: Debugger *_debugger; EventsManager *_eventsManager; FilesManager *_filesManager; - GraphicsManager *_graphicsManager; + Screen *_screen; SoundManager *_soundManager; SVoy *_voy; diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp index 13ef31839a..e9591955fc 100644 --- a/engines/voyeur/voyeur_game.cpp +++ b/engines/voyeur/voyeur_game.cpp @@ -149,8 +149,8 @@ void VoyeurEngine::playStamp() { case 130: { // user selected to send the tape if (_bVoy->getBoltGroup(_playStampGroupId)) { - _graphicsManager->_backgroundPage = _bVoy->boltEntry(_playStampGroupId)._picResource; - _graphicsManager->_backColors = _bVoy->boltEntry(_playStampGroupId + 1)._cMapResource; + _screen->_backgroundPage = _bVoy->boltEntry(_playStampGroupId)._picResource; + _screen->_backColors = _bVoy->boltEntry(_playStampGroupId + 1)._cMapResource; buttonId = getChooseButton(); if (_eventsManager->_rightClick) @@ -158,7 +158,7 @@ void VoyeurEngine::playStamp() { buttonId = 4; _bVoy->freeBoltGroup(_playStampGroupId); - _graphicsManager->screenReset(); + _screen->screenReset(); _playStampGroupId = -1; flag = true; @@ -232,8 +232,8 @@ void VoyeurEngine::closeStamp() { } void VoyeurEngine::doTailTitle() { - _graphicsManager->_vPort->setupViewPort(NULL); - _graphicsManager->screenReset(); + _screen->_vPort->setupViewPort(NULL); + _screen->screenReset(); if (_bVoy->getBoltGroup(0x600)) { RL2Decoder decoder; @@ -245,12 +245,12 @@ void VoyeurEngine::doTailTitle() { doClosingCredits(); if (!shouldQuit() && !_eventsManager->_mouseClicked) { - _graphicsManager->screenReset(); + _screen->screenReset(); PictureResource *pic = _bVoy->boltEntry(0x602)._picResource; CMapResource *pal = _bVoy->boltEntry(0x603)._cMapResource; - _graphicsManager->_vPort->setupViewPort(pic); + _screen->_vPort->setupViewPort(pic); pal->startFade(); flipPageAndWaitForFade(); _eventsManager->delayClick(300); @@ -258,7 +258,7 @@ void VoyeurEngine::doTailTitle() { pic = _bVoy->boltEntry(0x604)._picResource; pal = _bVoy->boltEntry(0x605)._cMapResource; - _graphicsManager->_vPort->setupViewPort(pic); + _screen->_vPort->setupViewPort(pic); pal->startFade(); flipPageAndWaitForFade(); _eventsManager->delayClick(120); @@ -283,26 +283,26 @@ void VoyeurEngine::doClosingCredits() { const char *msg = (const char *)_bVoy->memberAddr(0x404); const byte *creditList = (const byte *)_bVoy->memberAddr(0x405); - _graphicsManager->_vPort->setupViewPort(NULL); - _graphicsManager->setColor(1, 180, 180, 180); - _graphicsManager->setColor(2, 200, 200, 200); + _screen->_vPort->setupViewPort(NULL); + _screen->setColor(1, 180, 180, 180); + _screen->setColor(2, 200, 200, 200); _eventsManager->_intPtr._hasPalette = true; - _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x402)._fontResource; - _graphicsManager->_fontPtr->_foreColor = 2; - _graphicsManager->_fontPtr->_backColor = 2; - _graphicsManager->_fontPtr->_fontSaveBack = false; - _graphicsManager->_fontPtr->_fontFlags = DISPFLAG_NONE; + _screen->_fontPtr->_curFont = _bVoy->boltEntry(0x402)._fontResource; + _screen->_fontPtr->_foreColor = 2; + _screen->_fontPtr->_backColor = 2; + _screen->_fontPtr->_fontSaveBack = false; + _screen->_fontPtr->_fontFlags = DISPFLAG_NONE; _soundManager->startVOCPlay(152); - FontInfoResource &fi = *_graphicsManager->_fontPtr; + FontInfoResource &fi = *_screen->_fontPtr; for (int idx = 0; idx < 78; ++idx) { const byte *entry = creditList + idx * 6; int flags = READ_LE_UINT16(entry + 4); if (flags & 0x10) - _graphicsManager->_vPort->fillPic(0); + _screen->_vPort->fillPic(0); if (flags & 1) { fi._foreColor = 1; @@ -312,7 +312,7 @@ void VoyeurEngine::doClosingCredits() { fi._justifyHeight = 240; fi._pos = Common::Point(0, READ_LE_UINT16(entry)); - _graphicsManager->_vPort->drawText(msg); + _screen->_vPort->drawText(msg); msg += strlen(msg) + 1; } @@ -324,7 +324,7 @@ void VoyeurEngine::doClosingCredits() { fi._justifyHeight = 240; fi._pos = Common::Point(0, READ_LE_UINT16(entry)); - _graphicsManager->_vPort->drawText(msg); + _screen->_vPort->drawText(msg); msg += strlen(msg) + 1; } @@ -336,7 +336,7 @@ void VoyeurEngine::doClosingCredits() { fi._justifyHeight = 240; fi._pos = Common::Point(38, READ_LE_UINT16(entry)); - _graphicsManager->_vPort->drawText(msg); + _screen->_vPort->drawText(msg); msg += strlen(msg) + 1; fi._foreColor = 2; @@ -345,7 +345,7 @@ void VoyeurEngine::doClosingCredits() { fi._justifyHeight = 240; fi._pos = Common::Point(198, READ_LE_UINT16(entry)); - _graphicsManager->_vPort->drawText(msg); + _screen->_vPort->drawText(msg); msg += strlen(msg) + 1; } @@ -357,7 +357,7 @@ void VoyeurEngine::doClosingCredits() { fi._justifyHeight = 240; fi._pos = Common::Point(0, READ_LE_UINT16(entry)); - _graphicsManager->_vPort->drawText(msg); + _screen->_vPort->drawText(msg); msg += strlen(msg) + 1; fi._foreColor = 2; @@ -367,7 +367,7 @@ void VoyeurEngine::doClosingCredits() { fi._justifyHeight = 240; fi._pos = Common::Point(0, READ_LE_UINT16(entry) + 13); - _graphicsManager->_vPort->drawText(msg); + _screen->_vPort->drawText(msg); msg += strlen(msg) + 1; } @@ -381,19 +381,19 @@ void VoyeurEngine::doClosingCredits() { } _soundManager->stopVOCPlay(); - _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource; + _screen->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource; _bVoy->freeBoltGroup(0x400); } void VoyeurEngine::doPiracy() { - _graphicsManager->screenReset(); - _graphicsManager->setColor(1, 0, 0, 0); - _graphicsManager->setColor(2, 255, 255, 255); + _screen->screenReset(); + _screen->setColor(1, 0, 0, 0); + _screen->setColor(2, 255, 255, 255); _eventsManager->_intPtr._hasPalette = true; - _graphicsManager->_vPort->setupViewPort(NULL); - _graphicsManager->_vPort->fillPic(1); + _screen->_vPort->setupViewPort(NULL); + _screen->_vPort->fillPic(1); - FontInfoResource &fi = *_graphicsManager->_fontPtr; + FontInfoResource &fi = *_screen->_fontPtr; fi._curFont = _bVoy->boltEntry(0x101)._fontResource; fi._foreColor = 2; fi._backColor = 2; @@ -406,7 +406,7 @@ void VoyeurEngine::doPiracy() { // Loop through the piracy message array to draw each line for (int idx = 0, yp = 33; idx < 10; ++idx) { fi._pos = Common::Point(0, yp); - _graphicsManager->_vPort->drawText(PIRACY_MESSAGE[idx]); + _screen->_vPort->drawText(PIRACY_MESSAGE[idx]); yp += fi._curFont->_fontHeight + 4; } @@ -439,27 +439,27 @@ void VoyeurEngine::reviewTape() { _voy->_viewBounds = _bVoy->boltEntry(0x907)._rectResource; Common::Array<RectEntry> &hotspots = _bVoy->boltEntry(0x906)._rectResource->_entries; - _graphicsManager->_backColors = _bVoy->boltEntry(0x902)._cMapResource; - _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x901)._picResource; - _graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage); - _graphicsManager->_backColors->startFade(); + _screen->_backColors = _bVoy->boltEntry(0x902)._cMapResource; + _screen->_backgroundPage = _bVoy->boltEntry(0x901)._picResource; + _screen->_vPort->setupViewPort(_screen->_backgroundPage); + _screen->_backColors->startFade(); flipPageAndWaitForFade(); - _graphicsManager->setColor(1, 32, 32, 32); - _graphicsManager->setColor(2, 96, 96, 96); - _graphicsManager->setColor(3, 160, 160, 160); - _graphicsManager->setColor(4, 224, 224, 224); - _graphicsManager->setColor(9, 24, 64, 24); - _graphicsManager->setColor(10, 64, 132, 64); - _graphicsManager->setColor(11, 100, 192, 100); - _graphicsManager->setColor(12, 120, 248, 120); + _screen->setColor(1, 32, 32, 32); + _screen->setColor(2, 96, 96, 96); + _screen->setColor(3, 160, 160, 160); + _screen->setColor(4, 224, 224, 224); + _screen->setColor(9, 24, 64, 24); + _screen->setColor(10, 64, 132, 64); + _screen->setColor(11, 100, 192, 100); + _screen->setColor(12, 120, 248, 120); _eventsManager->setCursorColor(128, 1); _eventsManager->_intPtr._hasPalette = true; - _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x909)._fontResource; - _graphicsManager->_fontPtr->_fontSaveBack = false; - _graphicsManager->_fontPtr->_fontFlags = DISPFLAG_NONE; + _screen->_fontPtr->_curFont = _bVoy->boltEntry(0x909)._fontResource; + _screen->_fontPtr->_fontSaveBack = false; + _screen->_fontPtr->_fontFlags = DISPFLAG_NONE; _eventsManager->getMouseInfo(); if (newX == -1) { @@ -481,37 +481,37 @@ void VoyeurEngine::reviewTape() { needRedraw = false; flipPageAndWait(); - _graphicsManager->_drawPtr->_penColor = 0; - _graphicsManager->_drawPtr->_pos = Common::Point(tempRect.left, tempRect.top); - _graphicsManager->_backgroundPage->sFillBox(tempRect.width(), tempRect.height()); + _screen->_drawPtr->_penColor = 0; + _screen->_drawPtr->_pos = Common::Point(tempRect.left, tempRect.top); + _screen->_backgroundPage->sFillBox(tempRect.width(), tempRect.height()); int yp = 45; int eventNum = eventStart; for (int lineNum = 0; lineNum < 8 && eventNum < _voy->_eventCount; ++lineNum, ++eventNum) { - _graphicsManager->_fontPtr->_picFlags = DISPFLAG_NONE; - _graphicsManager->_fontPtr->_picSelect = 0xff; - _graphicsManager->_fontPtr->_picPick = 7; - _graphicsManager->_fontPtr->_picOnOff = (lineNum == eventLine) ? 8 : 0; - _graphicsManager->_fontPtr->_pos = Common::Point(68, yp); - _graphicsManager->_fontPtr->_justify = ALIGN_LEFT; - _graphicsManager->_fontPtr->_justifyWidth = 0; - _graphicsManager->_fontPtr->_justifyHeight = 0; + _screen->_fontPtr->_picFlags = DISPFLAG_NONE; + _screen->_fontPtr->_picSelect = 0xff; + _screen->_fontPtr->_picPick = 7; + _screen->_fontPtr->_picOnOff = (lineNum == eventLine) ? 8 : 0; + _screen->_fontPtr->_pos = Common::Point(68, yp); + _screen->_fontPtr->_justify = ALIGN_LEFT; + _screen->_fontPtr->_justifyWidth = 0; + _screen->_fontPtr->_justifyHeight = 0; Common::String msg = _eventsManager->getEvidString(eventNum); - _graphicsManager->_backgroundPage->drawText(msg); + _screen->_backgroundPage->drawText(msg); yp += 15; } - _graphicsManager->_vPort->addSaveRect( - _graphicsManager->_vPort->_lastPage, tempRect); + _screen->_vPort->addSaveRect( + _screen->_vPort->_lastPage, tempRect); flipPageAndWait(); - _graphicsManager->_vPort->addSaveRect( - _graphicsManager->_vPort->_lastPage, tempRect); + _screen->_vPort->addSaveRect( + _screen->_vPort->_lastPage, tempRect); } - _graphicsManager->sDrawPic(cursor, _graphicsManager->_vPort, + _screen->sDrawPic(cursor, _screen->_vPort, _eventsManager->getMousePos()); flipPageAndWait(); @@ -543,34 +543,34 @@ void VoyeurEngine::reviewTape() { flipPageAndWait(); - _graphicsManager->_drawPtr->_penColor = 0; - _graphicsManager->_drawPtr->_pos = Common::Point(tempRect.left, tempRect.top); - _graphicsManager->_backgroundPage->sFillBox(tempRect.width(), tempRect.height()); + _screen->_drawPtr->_penColor = 0; + _screen->_drawPtr->_pos = Common::Point(tempRect.left, tempRect.top); + _screen->_backgroundPage->sFillBox(tempRect.width(), tempRect.height()); int yp = 45; int eventNum = eventStart; for (int idx = 0; idx < 8 && eventNum < _voy->_eventCount; ++idx, ++eventNum) { - _graphicsManager->_fontPtr->_picFlags = DISPFLAG_NONE; - _graphicsManager->_fontPtr->_picSelect = 0xff; - _graphicsManager->_fontPtr->_picPick = 7; - _graphicsManager->_fontPtr->_picOnOff = (idx == eventLine) ? 8 : 0; - _graphicsManager->_fontPtr->_pos = Common::Point(68, yp); - _graphicsManager->_fontPtr->_justify = ALIGN_LEFT; - _graphicsManager->_fontPtr->_justifyWidth = 0; - _graphicsManager->_fontPtr->_justifyHeight = 0; + _screen->_fontPtr->_picFlags = DISPFLAG_NONE; + _screen->_fontPtr->_picSelect = 0xff; + _screen->_fontPtr->_picPick = 7; + _screen->_fontPtr->_picOnOff = (idx == eventLine) ? 8 : 0; + _screen->_fontPtr->_pos = Common::Point(68, yp); + _screen->_fontPtr->_justify = ALIGN_LEFT; + _screen->_fontPtr->_justifyWidth = 0; + _screen->_fontPtr->_justifyHeight = 0; Common::String msg = _eventsManager->getEvidString(eventNum); - _graphicsManager->_backgroundPage->drawText(msg); + _screen->_backgroundPage->drawText(msg); yp += 15; } - _graphicsManager->_vPort->addSaveRect( - _graphicsManager->_vPort->_lastPage, tempRect); + _screen->_vPort->addSaveRect( + _screen->_vPort->_lastPage, tempRect); flipPageAndWait(); - _graphicsManager->_vPort->addSaveRect( - _graphicsManager->_vPort->_lastPage, tempRect); + _screen->_vPort->addSaveRect( + _screen->_vPort->_lastPage, tempRect); flipPageAndWait(); _eventsManager->getMouseInfo(); @@ -650,7 +650,7 @@ void VoyeurEngine::reviewTape() { newY = _eventsManager->getMousePos().y; _voy->_fadingType = 0; _voy->_viewBounds = nullptr; - _graphicsManager->_vPort->setupViewPort(NULL); + _screen->_vPort->setupViewPort(NULL); if (_currentVocId != -1) { _voy->_vocSecondsOffset = _voy->_RTVNum - _voy->_musicStartTime; @@ -673,13 +673,13 @@ void VoyeurEngine::reviewTape() { _voy->_vocSecondsOffset = e._computerOn; _bVoy->getBoltGroup(0x7F00); - _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x7F00 + + _screen->_backgroundPage = _bVoy->boltEntry(0x7F00 + BLIND_TABLE[_audioVideoId])._picResource; - _graphicsManager->_backColors = _bVoy->boltEntry(0x7F01 + + _screen->_backColors = _bVoy->boltEntry(0x7F01 + BLIND_TABLE[_audioVideoId])._cMapResource; - _graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage); - _graphicsManager->_backColors->startFade(); + _screen->_vPort->setupViewPort(_screen->_backgroundPage); + _screen->_backColors->startFade(); flipPageAndWaitForFade(); _eventsManager->_intPtr._flashStep = 1; @@ -725,16 +725,16 @@ void VoyeurEngine::reviewTape() { } } - _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource; + _screen->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource; - _graphicsManager->_vPort->fillPic(0); + _screen->_vPort->fillPic(0); flipPageAndWait(); _bVoy->freeBoltGroup(0x900); } void VoyeurEngine::doGossip() { - _graphicsManager->resetPalette(); - _graphicsManager->screenReset(); + _screen->resetPalette(); + _screen->screenReset(); if (!_bVoy->getBoltGroup(0x300)) return; @@ -752,7 +752,7 @@ void VoyeurEngine::doGossip() { // Transfer initial background to video decoder PictureResource videoFrame(decoder.getRL2VideoTrack()->getBackSurface()); bgPic->_bounds.moveTo(0, 0); - _graphicsManager->sDrawPic(bgPic, &videoFrame, Common::Point(0, 0)); + _screen->sDrawPic(bgPic, &videoFrame, Common::Point(0, 0)); byte *frameNumsP = _bVoy->memberAddr(0x309); byte *posP = _bVoy->boltEntry(0x30A)._data; @@ -762,8 +762,8 @@ void VoyeurEngine::doGossip() { decoder.close(); // Reset the palette and clear the screen - _graphicsManager->resetPalette(); - _graphicsManager->screenReset(); + _screen->resetPalette(); + _screen->screenReset(); // Play interview video RL2Decoder decoder2; @@ -775,7 +775,7 @@ void VoyeurEngine::doGossip() { decoder2.close(); _bVoy->freeBoltGroup(0x300); - _graphicsManager->screenReset(); + _screen->screenReset(); } void VoyeurEngine::doTapePlaying() { @@ -783,14 +783,14 @@ void VoyeurEngine::doTapePlaying() { return; _eventsManager->getMouseInfo(); - _graphicsManager->_backColors = _bVoy->boltEntry(0xA01)._cMapResource; - _graphicsManager->_backgroundPage = _bVoy->boltEntry(0xA00)._picResource; + _screen->_backColors = _bVoy->boltEntry(0xA01)._cMapResource; + _screen->_backgroundPage = _bVoy->boltEntry(0xA00)._picResource; PictureResource *pic = _bVoy->boltEntry(0xA02)._picResource; VInitCycleResource *cycle = _bVoy->boltEntry(0xA05)._vInitCycleResource; - _graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage); - _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(57, 30)); - _graphicsManager->_backColors->startFade(); + _screen->_vPort->setupViewPort(_screen->_backgroundPage); + _screen->sDrawPic(pic, _screen->_vPort, Common::Point(57, 30)); + _screen->_backColors->startFade(); flipPageAndWaitForFade(); cycle->vStartCycle(); @@ -932,9 +932,9 @@ int VoyeurEngine::getChooseButton() { + 6)._rectResource->_entries; int selectedIndex = -1; - _graphicsManager->_vPort->setupViewPort(_graphicsManager->_backgroundPage); - _graphicsManager->_backColors->_steps = 0; - _graphicsManager->_backColors->startFade(); + _screen->_vPort->setupViewPort(_screen->_backgroundPage); + _screen->_backColors->_steps = 0; + _screen->_backColors->startFade(); flipPageAndWait(); _voy->_viewBounds = _bVoy->boltEntry(_playStampGroupId + 7)._rectResource; @@ -955,7 +955,7 @@ int VoyeurEngine::getChooseButton() { selectedIndex = idx; if (selectedIndex != prevIndex) { PictureResource *btnPic = _bVoy->boltEntry(_playStampGroupId + 8 + idx)._picResource; - _graphicsManager->sDrawPic(btnPic, _graphicsManager->_vPort, + _screen->sDrawPic(btnPic, _screen->_vPort, Common::Point(106, 200)); cursorPic = _bVoy->boltEntry(_playStampGroupId + 4)._picResource; @@ -967,11 +967,11 @@ int VoyeurEngine::getChooseButton() { if (selectedIndex == -1) { cursorPic = _bVoy->boltEntry(_playStampGroupId + 2)._picResource; PictureResource *btnPic = _bVoy->boltEntry(_playStampGroupId + 12)._picResource; - _graphicsManager->sDrawPic(btnPic, _graphicsManager->_vPort, + _screen->sDrawPic(btnPic, _screen->_vPort, Common::Point(106, 200)); } - _graphicsManager->sDrawPic(cursorPic, _graphicsManager->_vPort, + _screen->sDrawPic(cursorPic, _screen->_vPort, Common::Point(pt.x + 13, pt.y - 12)); flipPageAndWait(); @@ -982,9 +982,9 @@ int VoyeurEngine::getChooseButton() { } void VoyeurEngine::makeViewFinder() { - _graphicsManager->_backgroundPage = _bVoy->boltEntry(0x103)._picResource; - _graphicsManager->sDrawPic(_graphicsManager->_backgroundPage, - _graphicsManager->_vPort, Common::Point(0, 0)); + _screen->_backgroundPage = _bVoy->boltEntry(0x103)._picResource; + _screen->sDrawPic(_screen->_backgroundPage, + _screen->_vPort, Common::Point(0, 0)); CMapResource *pal = _bVoy->boltEntry(0x104)._cMapResource; int palOffset = 0; @@ -1016,22 +1016,22 @@ void VoyeurEngine::makeViewFinder() { break; } - _graphicsManager->_vPort->drawIfaceTime(); + _screen->_vPort->drawIfaceTime(); doTimeBar(); pal->startFade(); flipPageAndWaitForFade(); - _graphicsManager->setColor(241, 105, 105, 105); - _graphicsManager->setColor(242, 105, 105, 105); - _graphicsManager->setColor(243, 105, 105, 105); - _graphicsManager->setColor(palOffset + 241, 219, 235, 235); + _screen->setColor(241, 105, 105, 105); + _screen->setColor(242, 105, 105, 105); + _screen->setColor(243, 105, 105, 105); + _screen->setColor(palOffset + 241, 219, 235, 235); _eventsManager->_intPtr._hasPalette = true; } void VoyeurEngine::makeViewFinderP() { - _graphicsManager->screenReset(); + _screen->screenReset(); } void VoyeurEngine::initIFace() { @@ -1077,7 +1077,7 @@ void VoyeurEngine::initIFace() { void VoyeurEngine::doScroll(const Common::Point &pt) { Common::Rect clipRect(72, 47, 72 + 240, 47 + 148); - _graphicsManager->_vPort->setupViewPort(NULL, &clipRect); + _screen->_vPort->setupViewPort(NULL, &clipRect); int base = 0; switch (_voy->_transitionId) { @@ -1101,18 +1101,18 @@ void VoyeurEngine::doScroll(const Common::Point &pt) { if (base) { PictureResource *pic = _bVoy->boltEntry(base + 3)._picResource; - _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 104)); + _screen->sDrawPic(pic, _screen->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 104)); pic = _bVoy->boltEntry(base + 4)._picResource; - _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 44)); + _screen->sDrawPic(pic, _screen->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y - 44)); pic = _bVoy->boltEntry(base + 5)._picResource; - _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 16)); + _screen->sDrawPic(pic, _screen->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 16)); pic = _bVoy->boltEntry(base + 6)._picResource; - _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 76)); + _screen->sDrawPic(pic, _screen->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 76)); pic = _bVoy->boltEntry(base + 7)._picResource; - _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 136)); + _screen->sDrawPic(pic, _screen->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 136)); } - _graphicsManager->_vPort->setupViewPort(NULL); + _screen->_vPort->setupViewPort(NULL); } void VoyeurEngine::checkTransition() { @@ -1124,7 +1124,7 @@ void VoyeurEngine::checkTransition() { // Only proceed if a valid day string was returned if (!day.empty()) { - _graphicsManager->fadeDownICF(6); + _screen->fadeDownICF(6); // Get the time of day string time = getTimeOfDay(); @@ -1163,7 +1163,7 @@ Common::String VoyeurEngine::getTimeOfDay() { } int VoyeurEngine::doComputerText(int maxLen) { - FontInfoResource &font = *_graphicsManager->_fontPtr; + FontInfoResource &font = *_screen->_fontPtr; int totalChars = 0; font._curFont = _bVoy->boltEntry(0x4910)._fontResource; @@ -1180,7 +1180,7 @@ int VoyeurEngine::doComputerText(int maxLen) { font._justifyWidth = 384; font._justifyHeight = 100; font._pos = Common::Point(128, 100); - _graphicsManager->_vPort->drawText(END_OF_MESSAGE); + _screen->_vPort->drawText(END_OF_MESSAGE); } else if (_voy->_RTVNum < _voy->_computerTimeMin && maxLen == 9999) { if (_currentVocId != -1) _soundManager->startVOCPlay(_currentVocId); @@ -1188,7 +1188,7 @@ int VoyeurEngine::doComputerText(int maxLen) { font._justifyWidth = 384; font._justifyHeight = 100; font._pos = Common::Point(120, 100); - _graphicsManager->_vPort->drawText(START_OF_MESSAGE); + _screen->_vPort->drawText(START_OF_MESSAGE); } else { char *msg = (char *)_bVoy->memberAddr(0x4900 + _voy->_computerTextId); font._pos = Common::Point(96, 60); @@ -1206,14 +1206,14 @@ int VoyeurEngine::doComputerText(int maxLen) { if (c == '\0') { if (showEnd) { _eventsManager->delay(90); - _graphicsManager->_drawPtr->_pos = Common::Point(96, 54); - _graphicsManager->_drawPtr->_penColor = 254; - _graphicsManager->_vPort->sFillBox(196, 124); - _graphicsManager->_fontPtr->_justify = ALIGN_LEFT; - _graphicsManager->_fontPtr->_justifyWidth = 384; - _graphicsManager->_fontPtr->_justifyHeight = 100; - _graphicsManager->_fontPtr->_pos = Common::Point(128, 100); - _graphicsManager->_vPort->drawText(END_OF_MESSAGE); + _screen->_drawPtr->_pos = Common::Point(96, 54); + _screen->_drawPtr->_penColor = 254; + _screen->_vPort->sFillBox(196, 124); + _screen->_fontPtr->_justify = ALIGN_LEFT; + _screen->_fontPtr->_justifyWidth = 384; + _screen->_fontPtr->_justifyHeight = 100; + _screen->_fontPtr->_pos = Common::Point(128, 100); + _screen->_vPort->drawText(END_OF_MESSAGE); } break; } @@ -1223,20 +1223,20 @@ int VoyeurEngine::doComputerText(int maxLen) { yp += 10; } else { _eventsManager->delay(90); - _graphicsManager->_drawPtr->_pos = Common::Point(96, 54); - _graphicsManager->_drawPtr->_penColor = 255; - _graphicsManager->_vPort->sFillBox(196, 124); + _screen->_drawPtr->_pos = Common::Point(96, 54); + _screen->_drawPtr->_penColor = 255; + _screen->_vPort->sFillBox(196, 124); yp = 60; } - _graphicsManager->_fontPtr->_pos = Common::Point(96, yp); + _screen->_fontPtr->_pos = Common::Point(96, yp); } else if (c == '_') { showEnd = false; } else { - _graphicsManager->_fontPtr->_justify = ALIGN_LEFT; - _graphicsManager->_fontPtr->_justifyWidth = 0; - _graphicsManager->_fontPtr->_justifyHeight = 0; - _graphicsManager->_vPort->drawText(Common::String(c)); + _screen->_fontPtr->_justify = ALIGN_LEFT; + _screen->_fontPtr->_justifyWidth = 0; + _screen->_fontPtr->_justifyHeight = 0; + _screen->_vPort->drawText(Common::String(c)); _eventsManager->delay(4); } @@ -1251,7 +1251,7 @@ int VoyeurEngine::doComputerText(int maxLen) { flipPageAndWait(); - _graphicsManager->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource; + _screen->_fontPtr->_curFont = _bVoy->boltEntry(0x101)._fontResource; return totalChars; } @@ -1263,7 +1263,7 @@ void VoyeurEngine::getComputerBrush() { int xp = (384 - pic->_bounds.width()) / 2; int yp = (240 - pic->_bounds.height()) / 2 - 4; - _graphicsManager->_vPort->drawPicPerm(pic, Common::Point(xp, yp)); + _screen->_vPort->drawPicPerm(pic, Common::Point(xp, yp)); CMapResource *pal = _bVoy->boltEntry(0x490F)._cMapResource; pal->startFade(); @@ -1280,17 +1280,17 @@ void VoyeurEngine::doTimeBar() { int height = ((_voy->_RTVLimit - _voy->_RTVNum) * 59) / _voy->_RTVLimit; int fullHeight = MAX(151 - height, 93); - _graphicsManager->_drawPtr->_penColor = 134; - _graphicsManager->_drawPtr->_pos = Common::Point(39, 92); + _screen->_drawPtr->_penColor = 134; + _screen->_drawPtr->_pos = Common::Point(39, 92); - _graphicsManager->_vPort->sFillBox(6, fullHeight - 92); + _screen->_vPort->sFillBox(6, fullHeight - 92); if (height > 0) { - _graphicsManager->setColor(215, 238, 238, 238); + _screen->setColor(215, 238, 238, 238); _eventsManager->_intPtr._hasPalette = true; - _graphicsManager->_drawPtr->_penColor = 215; - _graphicsManager->_drawPtr->_pos = Common::Point(39, fullHeight); - _graphicsManager->_vPort->sFillBox(6, height); + _screen->_drawPtr->_penColor = 215; + _screen->_drawPtr->_pos = Common::Point(39, fullHeight); + _screen->_vPort->sFillBox(6, height); } } } @@ -1303,9 +1303,9 @@ void VoyeurEngine::flashTimeBar() { _flashTimeVal = _eventsManager->_intPtr._flashTimer; if (_flashTimeFlag) - _graphicsManager->setColor(240, 220, 20, 20); + _screen->setColor(240, 220, 20, 20); else - _graphicsManager->setColor(240, 220, 220, 220); + _screen->setColor(240, 220, 220, 220); _eventsManager->_intPtr._hasPalette = true; _flashTimeFlag = !_flashTimeFlag; @@ -1343,7 +1343,7 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) { _bVoy->getBoltGroup(_voy->_boltGroupId2); PictureResource *pic = _bVoy->boltEntry(_voy->_boltGroupId2 + evidId * 2)._picResource; - _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, Common::Point( + _screen->sDrawPic(pic, _screen->_vPort, Common::Point( (384 - pic->_bounds.width()) / 2, (240 - pic->_bounds.height()) / 2)); _bVoy->freeBoltMember(_voy->_boltGroupId2 + evidId * 2); @@ -1394,7 +1394,7 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) { continue; pic = _voy->_evPicPtrs[arrIndex]; - _graphicsManager->sDrawPic(pic, _graphicsManager->_vPort, + _screen->sDrawPic(pic, _screen->_vPort, Common::Point((384 - pic->_bounds.width()) / 2, (240 - pic->_bounds.height()) / 2)); _voy->_evCmPtrs[arrIndex]->startFade(); diff --git a/engines/wage/debugger.cpp b/engines/wage/debugger.cpp index 7d01b0b85e..d34aca7d49 100644 --- a/engines/wage/debugger.cpp +++ b/engines/wage/debugger.cpp @@ -56,7 +56,7 @@ static int strToInt(const char *s) { } bool Debugger::Cmd_ListScenes(int argc, const char **argv) { - int currentScene; + int currentScene = 0; for (uint i = 1; i < _engine->_world->_orderedScenes.size(); i++) { // #0 is STORAGE@ if (_engine->_world->_player->_currentScene == _engine->_world->_orderedScenes[i]) diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp index 907a1ec435..eda28df159 100644 --- a/engines/wage/design.cpp +++ b/engines/wage/design.cpp @@ -45,20 +45,22 @@ * */ +#include "graphics/managed_surface.h" #include "graphics/primitives.h" -#include "wage/wage.h" + +#include "wage/macwindowmanager.h" #include "wage/design.h" namespace Wage { struct PlotData { - Graphics::Surface *surface; + Graphics::ManagedSurface *surface; Patterns *patterns; uint fillType; int thickness; Design *design; - PlotData(Graphics::Surface *s, Patterns *p, int f, int t, Design *d) : + PlotData(Graphics::ManagedSurface *s, Patterns *p, int f, int t, Design *d) : surface(s), patterns(p), fillType(f), thickness(t), design(d) {} }; @@ -83,7 +85,7 @@ Design::~Design() { delete _surface; } -void Design::paint(Graphics::Surface *surface, Patterns &patterns, int x, int y) { +void Design::paint(Graphics::ManagedSurface *surface, Patterns &patterns, int x, int y) { bool needRender = false; if (_surface == NULL) { @@ -96,11 +98,10 @@ void Design::paint(Graphics::Surface *surface, Patterns &patterns, int x, int y) } _bounds->debugPrint(4, "Calculated bounds:"); - _surface = new Graphics::Surface; + _surface = new Graphics::ManagedSurface; _surface->create(_bounds->width(), _bounds->height(), Graphics::PixelFormat::createFormatCLUT8()); - Common::Rect r(0, 0, _bounds->width(), _bounds->height()); - _surface->fillRect(r, kColorGreen); + _surface->clear(kColorGreen); needRender = true; } @@ -133,16 +134,10 @@ void Design::paint(Graphics::Surface *surface, Patterns &patterns, int x, int y) if (_bounds->width() && _bounds->height()) { const int padding = 3; - for (int i = padding; i < _bounds->height() - 2 * padding; i++) { - const byte *src = (const byte *)_surface->getBasePtr(padding, i); - byte *dst = (byte *)surface->getBasePtr(x + padding, y+i); - for (int j = padding; j < _bounds->width() - 2 * padding; j++) { - if (*src != kColorGreen) - *dst = *src; - src++; - dst++; - } - } + Common::Rect from(padding, padding, _bounds->width() - 2 * padding, _bounds->height() - 2 * padding); + Common::Rect to(from); + to.moveTo(x, y); + surface->transBlitFrom(*_surface, from, to, kColorGreen); } } @@ -215,9 +210,9 @@ void drawPixel(int x, int y, int color, void *data) { if (p->thickness == 1) { p->design->adjustBounds(x, y); } else { - int x1 = x - p->thickness / 2; + int x1 = x; int x2 = x1 + p->thickness; - int y1 = y - p->thickness / 2; + int y1 = y; int y2 = y1 + p->thickness; for (y = y1; y < y2; y++) @@ -240,9 +235,9 @@ void drawPixel(int x, int y, int color, void *data) { color : kColorWhite; } } else { - int x1 = x - p->thickness / 2; + int x1 = x; int x2 = x1 + p->thickness; - int y1 = y - p->thickness / 2; + int y1 = y; int y2 = y1 + p->thickness; for (y = y1; y < y2; y++) @@ -269,7 +264,7 @@ void drawPixelPlain(int x, int y, int color, void *data) { *((byte *)p->surface->getBasePtr(x, y)) = (byte)color; } -void Design::drawRect(Graphics::Surface *surface, Common::ReadStream &in, +void Design::drawRect(Graphics::ManagedSurface *surface, Common::ReadStream &in, Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType) { int16 y1 = in.readSint16BE(); int16 x1 = in.readSint16BE(); @@ -298,7 +293,7 @@ void Design::drawRect(Graphics::Surface *surface, Common::ReadStream &in, } } -void Design::drawRoundRect(Graphics::Surface *surface, Common::ReadStream &in, +void Design::drawRoundRect(Graphics::ManagedSurface *surface, Common::ReadStream &in, Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType) { int16 y1 = in.readSint16BE(); int16 x1 = in.readSint16BE(); @@ -324,7 +319,7 @@ void Design::drawRoundRect(Graphics::Surface *surface, Common::ReadStream &in, Graphics::drawRoundRect(r, arc / 2, kColorBlack, false, drawPixel, &pd); } -void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, +void Design::drawPolygon(Graphics::ManagedSurface *surface, Common::ReadStream &in, Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType) { byte ignored = in.readSint16BE(); // ignored @@ -401,7 +396,7 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, free(ypoints); } -void Design::drawOval(Graphics::Surface *surface, Common::ReadStream &in, +void Design::drawOval(Graphics::ManagedSurface *surface, Common::ReadStream &in, Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType) { int16 y1 = in.readSint16BE(); int16 x1 = in.readSint16BE(); @@ -419,7 +414,7 @@ void Design::drawOval(Graphics::Surface *surface, Common::ReadStream &in, Graphics::drawEllipse(x1, y1, x2-1, y2-1, kColorBlack, false, drawPixel, &pd); } -void Design::drawBitmap(Graphics::Surface *surface, Common::SeekableReadStream &in) { +void Design::drawBitmap(Graphics::ManagedSurface *surface, Common::SeekableReadStream &in) { int numBytes = in.readSint16BE(); int y1 = in.readSint16BE(); int x1 = in.readSint16BE(); @@ -427,7 +422,7 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::SeekableReadStream & int x2 = in.readSint16BE(); int w = x2 - x1; int h = y2 - y1; - Graphics::Surface tmp; + Graphics::ManagedSurface tmp; tmp.create(w, h, Graphics::PixelFormat::createFormatCLUT8()); @@ -507,11 +502,11 @@ void Design::drawBitmap(Graphics::Surface *surface, Common::SeekableReadStream & tmp.free(); } -void Design::drawRect(Graphics::Surface *surface, Common::Rect &rect, int thickness, int color, Patterns &patterns, byte fillType) { +void Design::drawRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int thickness, int color, Patterns &patterns, byte fillType) { drawRect(surface, rect.left, rect.top, rect.right, rect.bottom, thickness, color, patterns, fillType); } -void Design::drawRect(Graphics::Surface *surface, int x1, int y1, int x2, int y2, int thickness, int color, Patterns &patterns, byte fillType) { +void Design::drawRect(Graphics::ManagedSurface *surface, int x1, int y1, int x2, int y2, int thickness, int color, Patterns &patterns, byte fillType) { PlotData pd(surface, &patterns, fillType, thickness, nullptr); Graphics::drawLine(x1, y1, x2, y1, kColorBlack, drawPixel, &pd); @@ -521,32 +516,32 @@ void Design::drawRect(Graphics::Surface *surface, int x1, int y1, int x2, int y2 } -void Design::drawFilledRect(Graphics::Surface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType) { +void Design::drawFilledRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType) { PlotData pd(surface, &patterns, fillType, 1, nullptr); for (int y = rect.top; y <= rect.bottom; y++) Graphics::drawHLine(rect.left, rect.right, y, color, drawPixel, &pd); } -void Design::drawFilledRoundRect(Graphics::Surface *surface, Common::Rect &rect, int arc, int color, Patterns &patterns, byte fillType) { +void Design::drawFilledRoundRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int arc, int color, Patterns &patterns, byte fillType) { PlotData pd(surface, &patterns, fillType, 1, nullptr); Graphics::drawRoundRect(rect, arc, color, true, drawPixel, &pd); } -void Design::drawHLine(Graphics::Surface *surface, int x1, int x2, int y, int thickness, int color, Patterns &patterns, byte fillType) { +void Design::drawHLine(Graphics::ManagedSurface *surface, int x1, int x2, int y, int thickness, int color, Patterns &patterns, byte fillType) { PlotData pd(surface, &patterns, fillType, thickness, nullptr); Graphics::drawHLine(x1, x2, y, color, drawPixel, &pd); } -void Design::drawVLine(Graphics::Surface *surface, int x, int y1, int y2, int thickness, int color, Patterns &patterns, byte fillType) { +void Design::drawVLine(Graphics::ManagedSurface *surface, int x, int y1, int y2, int thickness, int color, Patterns &patterns, byte fillType) { PlotData pd(surface, &patterns, fillType, thickness, nullptr); Graphics::drawVLine(x, y1, y2, color, drawPixel, &pd); } -FloodFill::FloodFill(Graphics::Surface *surface, byte color1, byte color2) { +FloodFill::FloodFill(Graphics::ManagedSurface *surface, byte color1, byte color2) { _surface = surface; _color1 = color1; _color2 = color2; diff --git a/engines/wage/design.h b/engines/wage/design.h index e8f42f4e04..9b0231ca96 100644 --- a/engines/wage/design.h +++ b/engines/wage/design.h @@ -48,10 +48,11 @@ #ifndef WAGE_DESIGN_H #define WAGE_DESIGN_H -#include "graphics/surface.h" #include "common/memstream.h" #include "common/rect.h" +#include "wage/macwindowmanager.h" + namespace Wage { class Design { @@ -67,14 +68,14 @@ public: return _bounds; } - void paint(Graphics::Surface *canvas, Patterns &patterns, int x, int y); + void paint(Graphics::ManagedSurface *canvas, Patterns &patterns, int x, int y); bool isPointOpaque(int x, int y); - static void drawRect(Graphics::Surface *surface, Common::Rect &rect, int thickness, int color, Patterns &patterns, byte fillType); - static void drawRect(Graphics::Surface *surface, int x1, int y1, int x2, int y2, int thickness, int color, Patterns &patterns, byte fillType); - static void drawFilledRect(Graphics::Surface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType); - static void drawFilledRoundRect(Graphics::Surface *surface, Common::Rect &rect, int arc, int color, Patterns &patterns, byte fillType); - static void drawHLine(Graphics::Surface *surface, int x1, int x2, int y, int thickness, int color, Patterns &patterns, byte fillType); - static void drawVLine(Graphics::Surface *surface, int x, int y1, int y2, int thickness, int color, Patterns &patterns, byte fillType); + static void drawRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int thickness, int color, Patterns &patterns, byte fillType); + static void drawRect(Graphics::ManagedSurface *surface, int x1, int y1, int x2, int y2, int thickness, int color, Patterns &patterns, byte fillType); + static void drawFilledRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType); + static void drawFilledRoundRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int arc, int color, Patterns &patterns, byte fillType); + static void drawHLine(Graphics::ManagedSurface *surface, int x1, int x2, int y, int thickness, int color, Patterns &patterns, byte fillType); + static void drawVLine(Graphics::ManagedSurface *surface, int x, int y1, int y2, int thickness, int color, Patterns &patterns, byte fillType); bool isBoundsCalculation() { return _boundsCalculationMode; } void adjustBounds(int16 x, int16 y); @@ -83,32 +84,32 @@ private: byte *_data; int _len; Common::Rect *_bounds; - Graphics::Surface *_surface; + Graphics::ManagedSurface *_surface; bool _boundsCalculationMode; private: void render(Patterns &patterns); - void drawRect(Graphics::Surface *surface, Common::ReadStream &in, + void drawRect(Graphics::ManagedSurface *surface, Common::ReadStream &in, Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); - void drawRoundRect(Graphics::Surface *surface, Common::ReadStream &in, + void drawRoundRect(Graphics::ManagedSurface *surface, Common::ReadStream &in, Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); - void drawPolygon(Graphics::Surface *surface, Common::ReadStream &in, + void drawPolygon(Graphics::ManagedSurface *surface, Common::ReadStream &in, Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); - void drawOval(Graphics::Surface *surface, Common::ReadStream &in, + void drawOval(Graphics::ManagedSurface *surface, Common::ReadStream &in, Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); - void drawBitmap(Graphics::Surface *surface, Common::SeekableReadStream &in); + void drawBitmap(Graphics::ManagedSurface *surface, Common::SeekableReadStream &in); }; class FloodFill { public: - FloodFill(Graphics::Surface *surface, byte color1, byte color2); + FloodFill(Graphics::ManagedSurface *surface, byte color1, byte color2); ~FloodFill(); void addSeed(int x, int y); void fill(); private: Common::List<Common::Point *> _queue; - Graphics::Surface *_surface; + Graphics::ManagedSurface *_surface; byte _color1, _color2; byte *_visited; int _w, _h; diff --git a/engines/wage/detection.cpp b/engines/wage/detection.cpp index 512d432e54..1b418b5aa8 100644 --- a/engines/wage/detection.cpp +++ b/engines/wage/detection.cpp @@ -54,6 +54,7 @@ static const PlainGameDescriptor wageGames[] = { class WageMetaEngine : public AdvancedMetaEngine { public: WageMetaEngine() : AdvancedMetaEngine(Wage::gameDescriptions, sizeof(ADGameDescription), wageGames) { + _md5Bytes = 50000; _singleId = "wage"; _guiOptions = GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI); } diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h index e164ea70cd..59d93cc12f 100644 --- a/engines/wage/detection_tables.h +++ b/engines/wage/detection_tables.h @@ -32,88 +32,147 @@ namespace Wage { #define BIGGAME(t,v,f,m,s) { t,v,AD_ENTRY1s(f,m,s),Common::EN_ANY,Common::kPlatformMacintosh,ADGF_DEFAULT,GUIO0()} static const ADGameDescription gameDescriptions[] = { - FANGAME("3rd Floor", "913812a1ac7a6b0e48dadd1afa1c7763", 281409), - BIGGAME("afm", "v1.8", "Another Fine Mess 1.8", "94a9c4f8b3dabd1846d76215a49bd221", 1420723), - BIGGAME("amot", "v1.8", "A Mess O' Trouble 1.8", "26207bdf0bb539464f136f0669af885f", 1843104), - FANGAME("Bug Hunt", "595117cbed33e8de1ab3714b33880205", 195699), - BIGGAME("cantitoe", "", "Camp Cantitoe", "913812a1ac7a6b0e48dadd1afa1c7763", 616985), - // Problems with letter rendering - FANGAME("Canal District", "a56aa3cd4a6e070e15ce1d5815c7be0a", 641470), - FANGAME("Carbon Copy", "913812a1ac7a6b0e48dadd1afa1c7763", 519445), + FANGAME("3rd Floor", "3ed49d2163e46d2c9b33fd80927d9e22", 281409), + FANGAME("3rd Floor", "3ed49d2163e46d2c9b33fd80927d9e22", 281423), // alt version + BIGGAME("afm", "v1.8", "Another Fine Mess 1.8", "abc7188469a9a7083fd4caec55a4f76e", 1420723), + BIGGAME("amot", "v1.8", "A Mess O' Trouble 1.8", "6b59e5bb9a4b74ecdd9f66d4e36a59cf", 1843104), + // Crash on third screen + FANGAME("Brownie's Dream", "6fdcce532bcd50b7e4f3f6bab50a0ee6", 440704), + FANGAMEN("Brownie's Time Travels", "Brownie's Time Travels v1.2", "55842a100b56e236c5ad69563e01fc24", 471589), + FANGAME("Bug Hunt", "738e2e8a1020be48c5ef42da571674ae", 195699), + FANGAME("Bug Hunt", "118a41121143488719d28daa9af8cd39", 195779), // alt version + BIGGAME("cantitoe", "", "Camp Cantitoe", "1780c41d14b876461a19dbeceebf2a37", 616985), + FANGAME("Canal District", "34e7a8e84b33ba8ea38b4ffd76ef074f", 641470), + FANGAME("Carbon Copy", "9e781acd63290ae390d515cffc742011", 519445), // Invalid rect in scene "FINALE" - FANGAME("Castle of Ert", "327610eb2298a9427a566288312df040", 198955), - FANGAME("Deep Angst", "b130b3c811cd89024dd5fdd2b71f70b8", 329550), - FANGAME("Deep Ennui", "913812a1ac7a6b0e48dadd1afa1c7763", 86075), + FANGAME("Castle of Ert", "a45b439bb3a9c8a4a14b996024222068", 198955), + FANGAMEN("Castle of Ert", "Castle of Ert.1", "a45b439bb3a9c8a4a14b996024222068", 198983), // alt version + FANGAMEND("Death Mall", "Death Mall Demo", "1c78fc15fb037b242a0bc6bac7d4d889", 254874), + FANGAME("Deep Angst", "7f8821f7b279269a91f9aadfed98eec0", 329550), // Original gile name "Deep Angstā¢" + FANGAME("Deep Ennui", "7fa4368834a22a9d4b7246a6297b455f", 86075), // Polygons with ignored byte 1 - FANGAME("Double Trouble", "1652e36857a04c01dc560234c4818619", 542371), - BIGGAME("drakmythcastle", "disk I", "Drakmyth Castle disk I of II", "94a9c4f8b3dabd1846d76215a49bd221", 793784), - BIGGAME("drakmythcastle", "disk II", "Drakmyth Castle II", "cc978cc9a5256724702463cb5aaaffa0", 1685659), + FANGAME("Double Trouble", "3f0c032377d87704267283380800633a", 542371), + BIGGAME("drakmythcastle", "disk I", "Drakmyth Castle disk I of II", "5b1fd760fbc081c608acebfe1d07a58a", 793784), + BIGGAME("drakmythcastle", "disk II", "Drakmyth Castle II", "1116f9c2c781f79e1f9c868b51ae7fa5", 1685659), // Crash at start in GUI rendering - FANGAME("Dune Eternity", "94a9c4f8b3dabd1846d76215a49bd221", 290201), // Original file name is "***DUNE ETERNITY*** " - FANGAMEN("Dungeon World II", "DungeonWorld2", "0154ea11d3cbb536c13b4ae9e6902d48", 230199), - FANGAME("Eidisi I", "595117cbed33e8de1ab3714b33880205", 172552), + FANGAME("Dune Eternity", "6b29f82e235815ffc4c9f30dc09968dd", 290201), // Original file name is "***DUNE ETERNITY*** " + FANGAMEN("Dungeon World II", "DungeonWorld2", "753df07166ca48e303d782cc72dd4053", 230199), + // Made for bigger resolution + FANGAME("Dynasty of Dar", "b2e9a5cca28acb85617b1477a5fca3e2", 275693), + FANGAME("Edg's World", "0a3a3aaa36088c514b668f1f62120006", 106769), + FANGAME("Eidisi I", "3d778c0fe7addf5f29e7593ba0fd3953", 172552), + FANGAME("Eidisi I", "8c2fb325a49344568c5536bba36a2556", 172566), // alt version // Problems(?) with text on the first screen - FANGAMEN("Enchanted Pencils", "Enchanted Pencils 0.99 (PG)", "595117cbed33e8de1ab3714b33880205", 408913), - FANGAME("Escape from School!", "913812a1ac7a6b0e48dadd1afa1c7763", 50105), - FANGAME("Exploration Zeta!", "c477921aeee6ed0f8997ba44447eb2d0", 366599), + FANGAMEN("Enchanted Pencils", "Enchanted Pencils 0.99 (PG)", "9a9777a83e58bebfa6f1662d5e236384", 408913), + FANGAME("Escape!", "3ada261c2d1d9ce6b9da068237472689", 65075), // Original file name "Escape!ā " + FANGAME("Escape from School!", "2055747bb874052333190eb993246a7f", 50105), + FANGAME("Escape from School!", "fcc581e52d1fc8ea4603d7c953fa935a", 50119), // Original file name "Escape from School!ā " + FANGAME("Everyman 1", "e20cebf0091a1b1bf023aac6f28c9011", 335705), + FANGAME("Exploration Zeta!", "6127d9c04ad68f0cbb5f6aa1d95b48a2", 366599), + // Cannot proceed past the first scene + FANGAMEND("Explorer", "Explorer DEMO", "a9ebdecf6c8de95a03e593d877dacc13", 461228), // Crash in console rendering on the first scene - FANGAME("Fantasy Quest", "4b0e1a1fbaaa4930accd0f9f0e1519c7", 762754), - FANGAME("Find the Heart", "595117cbed33e8de1ab3714b33880205", 106235), // From Joshua's Worlds 1.0 - // Problems with window overlay - FANGAMEN("Jumble", "LSJUMBLE", "e12ec4d76d48bdc86567c5e63750547e", 647339), // Original file name is "LSJUMBLEā " - FANGAME("Karth of the Jungle", "595117cbed33e8de1ab3714b33880205", 96711), - FANGAME("Karth of the Jungle", "595117cbed33e8de1ab3714b33880205", 96960), // Alternative version - FANGAME("Karth of the Jungle II", "c106835ab4436de054e03aec3ce904ce", 201053), - FANGAMEN("Little Pythagoras", "Little Pythagoras 1.1.1", "94a9c4f8b3dabd1846d76215a49bd221", 628821), - FANGAME("Lost Crystal", "8174c81ea1858d0079ae040dae2cefd3", 771072), - FANGAME("Magic Rings", "913812a1ac7a6b0e48dadd1afa1c7763", 109044), + FANGAME("Fantasy Quest", "b42b0e86e2c84464283640c74b25e015", 762754), + FANGAME("Find the Heart", "aa244c15f2ba8cef468714be34223acd", 106235), // From Joshua's Worlds 1.0 + FANGAME("Find the Heart", "a6834cb230cea1953f5bf1f8f7aacabd", 105885), // From Joshua's Worlds. Alt version + FANGAME("Find the Heart", "a6834cb230cea1953f5bf1f8f7aacabd", 105871), // Standalone + FANGAMEN("Fortune Teller", "Fortune Teller 1.1", "7d2628eeea67b33379e01c0aef8dd196", 73931), + FANGAMEN("Haunted House", "Haunted House 1.5", "5db2f95c7abaa9d060b94271a5bc57f8", 177500), + // Cropped graphics on first scene + FANGAME("Intro to Gothic", "6f732eaad6e3b85795f8ee6c6a40d837", 208067), + // No Next button in intro + FANGAME("Jamie the Demon Slayer", "fa0ca9618c18425b6d9bf913f762d91b", 232789), + FANGAMEN("Journey", "The Journey 1.6.2 US", "e66f37472e1414a088eb5d5acc4df794", 820572), + FANGAMEN("Jumble", "LSJUMBLE", "7c46851d2f90c7da9efe40b1688869c2", 647339), // Original file name is "LSJUMBLEā " + FANGAME("Karth of the Jungle", "5f2346834821dc3c4008e139cd37b3cb", 96711), + FANGAME("Karth of the Jungle", "444f9426f342135fbcc32180e5ba5b1c", 96960), // Alternative version + FANGAME("Karth of the Jungle II", "32161b27de894fd9e3f054afc4013f34", 201053), + FANGAMEN("Little Pythagoras", "Little Pythagoras 1.1.1", "75906fa955de695ac3e8164e7d88ac7b", 628821), + FANGAME("Lost Crystal", "d5e27a83f2884a24c6ec26c6cb776fe9", 771072), + // Crash in design drawing on startup + FANGAMEN("Lost In Kookyville", "Lost In Kookyville 1.2.4", "5ab6259706b33230dbfba05618c2c5c9", 721569), + FANGAME("Magic Rings", "450e986694b96f3b9e6cc64e57b753dc", 109044), // No way to click on the house - FANGAME("Messy House", "913812a1ac7a6b0e48dadd1afa1c7763", 177120), - FANGAME("Midnight Snack", "913812a1ac7a6b0e48dadd1afa1c7763", 67952), - FANGAME("Midnight Snack", "913812a1ac7a6b0e48dadd1afa1c7763", 67966), // Alt version - FANGAME("Minitorian", "913812a1ac7a6b0e48dadd1afa1c7763", 586464), + FANGAME("Messy House", "705df61da9e7d742b7ad678e59eb7bfb", 177120), + FANGAME("Midnight Snack", "76986389f9a08dd95450c8b9cf408653", 67952), + FANGAME("Midnight Snack", "76986389f9a08dd95450c8b9cf408653", 67966), // Alt version + FANGAME("Mike's House", "3d23c2b88cefd958bcbc4d4c711003d8", 87357), + FANGAME("Minitorian", "15fbb2bd75d83155ed21edbc5dc9558f", 586464), + FANGAME("M'Lord's Warrior", "0bebb2c62529c89590f6c5be6e1e9838", 465639), // Original file name is "M'Lord's Warrior ā " + // Unhandled comparison case + FANGAME("Mountain of Mayhem", "4088fc534042081b7ab7b49675ab4a6e", 750003), // Original file name "Mountain of Mayhem ā " // No way to pass through the first screen - FANGAME("Nightcrawler Ned", "94a9c4f8b3dabd1846d76215a49bd221", 366542), - FANGAME("Pavilion", "4d991d7d1534d48d90598d86ea6d5d97", 231687), + FANGAME("Nightcrawler Ned", "0cf27bf82de299c69405f7910146bf00", 366542), + // Crash on startup + FANGAMEN("Parrot Talk", "PARROT TALK V1", "b1570b0779891d5d50a3cf0146d28202", 118936), + // Crash on startup + FANGAMEN("Parrot Talk", "PARROT TALKV2", "0c1e920ed3ff74b8f22eaaf0d3496d5a", 118884), + FANGAME("Pavilion", "3a33149569325a44d98544452323c819", 231687), + FANGAMEN("Pencils", "Pencils.99", "9c200938488565080e12989e784586e2", 408551), // Polygons with byte 1 - FANGAME("Periapt", "913812a1ac7a6b0e48dadd1afa1c7763", 406006), - FANGAME("Puzzle Piece Search", "595117cbed33e8de1ab3714b33880205", 247693), // From Joshua's Worlds 1.0 + FANGAME("Periapt", "fb4052819126b88d7e03ebc00c669a9d", 406006), + FANGAME("Psychotic!", "6b4ae6261b405e2feac58c5a2ddb67c5", 247693), + FANGAME("Puzzle Piece Search", "6b4ae6261b405e2feac58c5a2ddb67c5", 247693), // From Joshua's Worlds 1.0 + FANGAME("The Puzzle Piece Search", "fb99797c429c18ec68418fdd12af17a1", 247338), // From Joshua's Worlds + FANGAME("The Puzzle Piece Search", "fb99797c429c18ec68418fdd12af17a1", 247324), // Stnadalone // Empty(?) first scene - FANGAME("Pyramid of No Return", "77a55a45f794b4d4a56703d3acce871e", 385145), - FANGAME("Queen Quest", "4b0e1a1fbaaa4930accd0f9f0e1519c7", 57026), - FANGAME("Quest for T-Rex", "913812a1ac7a6b0e48dadd1afa1c7763", 592584), + FANGAME("Pyramid of No Return", "38383ac85cc16703f13f8d82f1398123", 385145), + // Cropped graphics at the first scene + FANGAME("Psychotic!", "29b30e6aae9cc6db5eccb09f695ff25e", 367309), + FANGAME("P-W Adventure", "9bf86fb946683500d23887ef185726ab", 219216), + FANGAMEN("Pyramid of Ert", "Pyramid of Ert V1.2", "fb931cd35440a66864a434c773b496da", 315783), + FANGAME("Queen Quest", "8273e29afe64a984eb0ce7b43fdf3a59", 57039), // alt version + FANGAME("Quest for T-Rex", "f16f2cd525c9aeb4733295d8d842b902", 592584), // Crash in console rendering on the initial scene - FANGAME("Quest for the Dark Sword", "b35dd0c078da9f35fc25a455f56bb129", 572576), - FANGAME("Radical Castle", "677bfee4afeca2f7152eb8b76c85ca8d", 355601), - FANGAME("Radical Castle 1.0", "677bfee4afeca2f7152eb8b76c85ca8d", 347278), - BIGGAME("raysmaze", "v1.5", "Ray's Maze1.5", "064b16d8c20724f8debbbdc3aafde538", 1408516), - BIGGAME("raysmaze", "v1.5/alt", "Ray's Maze1.5", "92cca777800c3d31a77b5ed7f6ee49ad", 1408516), - BIGGAME("scepters", "", "Scepters", "3311deef8bf82f0b4b1cfa15a3b3289d", 346595), + FANGAME("Quest for the Dark Sword", "4815d9a770904b26c463b7e4fcd121c7", 572576), + FANGAME("Radical Castle", "09b70763c7a48a76240bd0e42737caaa", 355601), + FANGAME("Radical Castle 1.0", "8ae2e29ffeca52a5c7fae66dec4764a3", 347278), + BIGGAME("raysmaze", "v1.5", "Ray's Maze1.5", "521583e59bdc1d611f963cef1dc25869", 1408516), + BIGGAME("raysmaze", "v1.5/alt", "Ray's Maze1.5", "120e65bec953b981b2e0aed45ad45d70", 1408516), + // Next button is not visible + FANGAME("Ray's World Builder Demo", "d252ee8e38c9abc50455d071a367d031", 116056), + // Unhandled comparison case + FANGAME("Sands of Time", "b00ea866cb04cd87124e5720bc2c84c7", 122672), // Original file name "Sands of Timeā " + BIGGAME("scepters", "", "Scepters", "f8db17cd96be056cf8a8bb9cfe46cf3a", 346595), + BIGGAME("scepters", "", "Scepters", "1fd7ca93ef16f4752fb46ee9cfa0949a", 347540), // alt version + FANGAME("Schmoozer", "e0f416bae626e2c638055b7f495d8c78", 221500), // ??? problems with dog bitmap? - FANGAMEN("Space Adventure", "SpaceAdventure", "f9f3f1c419f56955f7966355b34ea5c8", 155356), - FANGAMEN("Spear of Destiny", "SpearOfDestiny", "913812a1ac7a6b0e48dadd1afa1c7763", 333665), // Original file name "SpearOfDestinyā " - FANGAME("Star Trek", "44aaef4806578700429de5aaf95c266e", 53320), - FANGAME("Strange Disappearance", "d81f2d03a1e863f04fb1e3a5495b720e", 772282), + FANGAMEN("Space Adventure", "SpaceAdventure", "7b6c883b3510e21cfabf4c8caaeb1f16", 155356), + FANGAMEN("Space Adventure", "SpaceAdventure", "3bd6fc9327f35db5390a9bf86afcd872", 155356), // alt version + FANGAMEN("Spear of Destiny", "SpearOfDestiny", "f1252ff34dd279f4ec1844bb403a578c", 333665), // Original file name "SpearOfDestinyā " + FANGAME("Star Trek", "fe20d06bc50c7fcebda0db533e141d4a", 53320), + FANGAME("Strange Disappearance", "782fae517f7374cd7f43f428331ce445", 772282), // Code 0x03 in text - FANGAME("Swamp Witch", "913812a1ac7a6b0e48dadd1afa1c7763", 739781), // Original file name "Swamp Witchā " - FANGAME("Sweetspace Now!", "e12ec4d76d48bdc86567c5e63750547e", 123813), // Comes with Jumble - FANGAME("Time Bomb", "4b0e1a1fbaaa4930accd0f9f0e1519c7", 64564), - FANGAME("Time Bomb", "4b0e1a1fbaaa4930accd0f9f0e1519c7", 64578), // Alt version - FANGAMEND("The Ashland Revolution", "The Ashland Revolution Demo", "913812a1ac7a6b0e48dadd1afa1c7763", 145023), // Original file name "The Ashland Revolution Demoā " - FANGAMEN("The Hotel Caper", "The Hotel Caper V1.0", "595117cbed33e8de1ab3714b33880205", 231969), + FANGAME("Swamp Witch", "4f146c0a5c59e7d4717a0423271fa89d", 739781), // Original file name "Swamp Witchā " + FANGAME("Sweetspace Now!", "1d419bc0b04c51468ddc40a90125bf00", 123813), // Comes with Jumble + // Wrong scrolling in the first console text + FANGAMEN("Sword of Siegfried", "Sword of Siegfried 1.0", "1ee92830690f89ea142ac0847176a0c3", 234763), + FANGAME("Terrorist", "68208fa5e426312fb12402894add5e4a", 524469), // Original file name "Terroristā " + FANGAME("Time Bomb", "b7a369d57d43ec8d9fd53832fd38d7db", 64564), + FANGAME("Time Bomb", "b7a369d57d43ec8d9fd53832fd38d7db", 64578), // Alt version + FANGAMEND("The Ashland Revolution", "The Ashland Revolution Demo", "3c7a1bdeab48a077a4f54fe69da61a9f", 145023), // Original file name "The Ashland Revolution Demoā " + FANGAME("The Axe-orcist", "bfdf6a4ce87e6b368977af3b683466db", 308764), + FANGAMEN("The Hotel Caper", "The Hotel Caper V1.0", "0d11a6ca1357e27ffff5231fe89cc429", 231969), + FANGAMEN("The Hotel Caper", "The Hotel Caper V1.0", "6c80fa6a36d16aa0edef86d8800c90db", 231969), // alt version // Invalid rect in scene "Access Tube 1" - FANGAMEN("The Phoenix v1.2", "The Phoenix", "4b0e1a1fbaaa4930accd0f9f0e1519c7", 431640), - FANGAME("The Sultan's Palace", "358799d446ee4fc12f793febd6c94b95", 456855), + FANGAMEN("The Phoenix v1.2", "The Phoenix", "0a4a01b83c993408ae824cc4f63957ea", 431640), + FANGAME("The Phoenix", "0a4a01b83c993408ae824cc4f63957ea", 431643), + FANGAME("The Sultan's Palace", "98c845323489344d7e2c9d1c3e53d1fc", 456855), // Admission for on 3rd screen is messed up - FANGAME("The Tower", "435f420b9dff895ae1ddf1338040c51d", 556539), + FANGAME("The Tower", "135fe861928d15b5acd8b355460c54bf", 556539), // Polygons with ignored byte 1 and 2 on second scene - FANGAME("The Village", "913812a1ac7a6b0e48dadd1afa1c7763", 314828), + FANGAME("The Village", "b9b5cfbfc7f482eae7587b55edc135ed", 314828), + FANGAME("The Wizard's Apprentice", "7eff3cb7d1a3f59639c62cf196039745", 782824), + // Messed up first scene + FANGAMEND("Tombworld", "Demo TombWorld", "f7c86166e29fb8b57f7a1400d4963a4e", 664252), // Original file name "Demo TombWorldĀ©" // Doesn't go past first scene - BIGGAME("twisted", "", "Twisted! 1.6", "26207bdf0bb539464f136f0669af885f", 960954), - FANGAME("Wishing Well", "913812a1ac7a6b0e48dadd1afa1c7763", 103688), - FANGAME("Wizard's Warehouse", "913812a1ac7a6b0e48dadd1afa1c7763", 159748), - FANGAME("ZikTuria", "418e74ca71029a1e9db80d0eb30c0843", 52972), - FANGAME("Zoony", "539a64151426edc92da5eedadf39f23c", 154990), // original filename "Zoonyā¢" + BIGGAME("twisted", "", "Twisted! 1.6", "97ab265eddf0cfed6d43d062c853cbc0", 960954), + FANGAME("Volcano II", "4dbb7ec6111c0f872da8ed8ba14763c9", 82991), // Original file name "Volcano IIā " + FANGAME("Wishing Well", "ece06c419cbb2d32941e6b5c7d9d7c1a", 103688), + FANGAME("Wizard's Warehouse", "ee1b86841583e2b58ac39bf97017dc7b", 159748), + FANGAMEN("Wizard's Warehouse 2", "WizWarehouse 2.0", "6502bd974fe149fe76d6d5ae9d1e6878", 230870), + FANGAME("ZikTuria", "1b934fca68d633d231dccd2047d2d274", 52972), + FANGAME("Zoony", "7bb293b81117cbd974ce54fafa06f258", 154990), // original filename "Zoonyā¢" AD_TABLE_END_MARKER }; diff --git a/engines/wage/dialog.cpp b/engines/wage/dialog.cpp index 263570bddc..d9bb3e6a61 100644 --- a/engines/wage/dialog.cpp +++ b/engines/wage/dialog.cpp @@ -49,6 +49,7 @@ #include "common/events.h" #include "wage/wage.h" +#include "wage/macwindowmanager.h" #include "wage/design.h" #include "wage/gui.h" #include "wage/dialog.h" @@ -88,11 +89,11 @@ Dialog::~Dialog() { } const Graphics::Font *Dialog::getDialogFont() { - return _gui->getFont("Chicago-12", Graphics::FontManager::kBigGUIFont); + return _gui->_wm.getFont("Chicago-12", Graphics::FontManager::kBigGUIFont); } void Dialog::paint() { - Design::drawFilledRect(&_gui->_screen, _bbox, kColorWhite, _gui->_patterns, kPatternSolid); + Design::drawFilledRect(&_gui->_screen, _bbox, kColorWhite, _gui->_wm.getPatterns(), kPatternSolid); _font->drawString(&_gui->_screen, _text, _bbox.left + 24, _bbox.top + 16, _bbox.width(), kColorBlack); static int boxOutline[] = { 1, 0, 0, 1, 1 }; @@ -114,7 +115,7 @@ void Dialog::paint() { Common::Rect bb(button->bounds.left + 5, button->bounds.top + 5, button->bounds.right - 5, button->bounds.bottom - 5); - Design::drawFilledRect(&_gui->_screen, bb, kColorBlack, _gui->_patterns, kPatternSolid); + Design::drawFilledRect(&_gui->_screen, bb, kColorBlack, _gui->_wm.getPatterns(), kPatternSolid); color = kColorWhite; } @@ -137,7 +138,7 @@ void Dialog::drawOutline(Common::Rect &bounds, int *spec, int speclen) { for (int i = 0; i < speclen; i++) if (spec[i] != 0) Design::drawRect(&_gui->_screen, bounds.left + i, bounds.top + i, bounds.right - i, bounds.bottom - i, - 1, kColorBlack, _gui->_patterns, kPatternSolid); + 1, kColorBlack, _gui->_wm.getPatterns(), kPatternSolid); } int Dialog::run() { @@ -145,7 +146,7 @@ int Dialog::run() { Common::Rect r(_bbox); _tempSurface.copyRectToSurface(_gui->_screen.getBasePtr(_bbox.left, _bbox.top), _gui->_screen.pitch, 0, 0, _bbox.width() + 1, _bbox.height() + 1); - _gui->pushArrowCursor(); + _gui->_wm.pushArrowCursor(); while (!shouldQuit) { Common::Event event; @@ -189,7 +190,7 @@ int Dialog::run() { _gui->_screen.copyRectToSurface(_tempSurface.getBasePtr(0, 0), _tempSurface.pitch, _bbox.left, _bbox.top, _bbox.width() + 1, _bbox.height() + 1); g_system->copyRectToScreen(_gui->_screen.getBasePtr(r.left, r.top), _gui->_screen.pitch, r.left, r.top, r.width() + 1, r.height() + 1); - _gui->popCursor(); + _gui->_wm.popCursor(); return _pressedButton; } diff --git a/engines/wage/dialog.h b/engines/wage/dialog.h index c5878acc95..ec99fc06b2 100644 --- a/engines/wage/dialog.h +++ b/engines/wage/dialog.h @@ -74,7 +74,7 @@ public: private: Gui *_gui; - Graphics::Surface _tempSurface; + Graphics::ManagedSurface _tempSurface; Common::Rect _bbox; Common::String _text; diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp index a2648c49fe..43ac6c8cc7 100644 --- a/engines/wage/entities.cpp +++ b/engines/wage/entities.cpp @@ -52,6 +52,7 @@ #include "wage/world.h" #include "common/memstream.h" +#include "graphics/managed_surface.h" namespace Wage { @@ -134,20 +135,20 @@ Scene::~Scene() { delete _textBounds; } -void Scene::paint(Graphics::Surface *surface, int x, int y) { +void Scene::paint(Graphics::ManagedSurface *surface, int x, int y) { Common::Rect r(x + 5, y + 5, _design->getBounds()->width() + x - 10, _design->getBounds()->height() + y - 10); surface->fillRect(r, kColorWhite); - _design->paint(surface, ((WageEngine *)g_engine)->_world->_patterns, x, y); + _design->paint(surface, *((WageEngine *)g_engine)->_world->_patterns, x, y); for (ObjList::const_iterator it = _objs.begin(); it != _objs.end(); ++it) { - debug(2, "paining Obj: %s", (*it)->_name.c_str()); - (*it)->_design->paint(surface, ((WageEngine *)g_engine)->_world->_patterns, x, y); + debug(2, "paining Obj: %s, index: %d, type: %d", (*it)->_name.c_str(), (*it)->_index, (*it)->_type); + (*it)->_design->paint(surface, *((WageEngine *)g_engine)->_world->_patterns, x, y); } for (ChrList::const_iterator it = _chrs.begin(); it != _chrs.end(); ++it) { debug(2, "paining Chr: %s", (*it)->_name.c_str()); - (*it)->_design->paint(surface, ((WageEngine *)g_engine)->_world->_patterns, x, y); + (*it)->_design->paint(surface, *((WageEngine *)g_engine)->_world->_patterns, x, y); } } @@ -202,6 +203,22 @@ const char *Scene::getFontName() { return "Unknown"; } +Designed *Scene::lookUpEntity(int x, int y) { + for (ObjList::const_iterator it = _objs.end(); it != _objs.begin(); ) { + it--; + if ((*it)->_design->isPointOpaque(x, y)) + return *it; + } + + for (ChrList::const_iterator it = _chrs.end(); it != _chrs.begin(); ) { + it--; + if ((*it)->_design->isPointOpaque(x, y)) + return *it; + } + + return nullptr; +} + Obj::Obj() : _currentOwner(NULL), _currentScene(NULL) { _index = 0; _namePlural = false; diff --git a/engines/wage/entities.h b/engines/wage/entities.h index 33cf087322..9e706f0d58 100644 --- a/engines/wage/entities.h +++ b/engines/wage/entities.h @@ -49,7 +49,7 @@ #define WAGE_ENTITIES_H namespace Graphics { - struct Surface; + class ManagedSurface; } namespace Wage { @@ -322,11 +322,13 @@ public: Scene(Common::String name, Common::SeekableReadStream *data); ~Scene(); + Designed *lookUpEntity(int x, int y); + Common::Rect *getTextBounds() { return _textBounds == NULL ? NULL : new Common::Rect(*_textBounds); } - void paint(Graphics::Surface *screen, int x, int y); + void paint(Graphics::ManagedSurface *screen, int x, int y); const char *getFontName(); }; diff --git a/engines/wage/gui-console.cpp b/engines/wage/gui-console.cpp index ab5df637ec..8b6fe43a17 100644 --- a/engines/wage/gui-console.cpp +++ b/engines/wage/gui-console.cpp @@ -45,6 +45,7 @@ * */ +#include "common/events.h" #include "common/timer.h" #include "common/unzip.h" #include "graphics/cursorman.h" @@ -54,7 +55,8 @@ #include "wage/wage.h" #include "wage/design.h" #include "wage/entities.h" -#include "wage/menu.h" +#include "wage/macwindow.h" +#include "wage/macmenu.h" #include "wage/gui.h" #include "wage/world.h" @@ -66,7 +68,7 @@ const Graphics::Font *Gui::getConsoleFont() { snprintf(fontName, 128, "%s-%d", scene->getFontName(), scene->_fontSize); - return getFont(fontName, Graphics::FontManager::kConsoleFont); + return _wm.getFont(fontName, Graphics::FontManager::kConsoleFont); } void Gui::clearOutput() { @@ -114,7 +116,7 @@ enum { void Gui::flowText(Common::String &str) { Common::StringArray wrappedLines; - int textW = _consoleTextArea.width() - kConWPadding * 2; + int textW = _consoleWindow->getInnerDimensions().width() - kConWPadding * 2; const Graphics::Font *font = getConsoleFont(); font->wordWrapText(str, textW, wrappedLines); @@ -142,7 +144,7 @@ void Gui::flowText(Common::String &str) { draw(); } -void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) { +void Gui::renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r) { bool fullRedraw = _consoleFullRedraw; bool textReflow = false; int surfW = r.width() + kConWOverlap * 2; @@ -150,7 +152,6 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) { Common::Rect boundsR(kConWOverlap - kConOverscan, kConHOverlap - kConOverscan, r.width() + kConWOverlap + kConOverscan, r.height() + kConHOverlap + kConOverscan); - Common::Rect fullR(0, 0, surfW, surfH); if (_console.w != surfW || _console.h != surfH) { if (_console.w != surfW) @@ -163,7 +164,7 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) { } if (fullRedraw) - _console.fillRect(fullR, kColorWhite); + _console.clear(kColorWhite); const Graphics::Font *font = getConsoleFont(); @@ -197,7 +198,7 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) { color = kColorWhite; Common::Rect trect(0, y1, _console.w, y1 + _consoleLineHeight); - Design::drawFilledRect(&_console, trect, kColorBlack, _patterns, kPatternSolid); + Design::drawFilledRect(&_console, trect, kColorBlack, _wm.getPatterns(), kPatternSolid); } if (line == _selectionStartY || line == _selectionEndY) { @@ -224,7 +225,7 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) { else trect.left = rectW; - Design::drawFilledRect(&_console, trect, kColorBlack, _patterns, kPatternSolid); + Design::drawFilledRect(&_console, trect, kColorBlack, _wm.getPatterns(), kPatternSolid); font->drawString(&_console, beg, x1, y1, textW, color1); font->drawString(&_console, end, x1 + rectW - kConWPadding - kConWOverlap, y1, textW, color2); @@ -243,7 +244,7 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) { int rectW2 = rectW1 + font->getStringWidth(mid); Common::Rect trect(rectW1, y1, rectW2, y1 + _consoleLineHeight); - Design::drawFilledRect(&_console, trect, kColorBlack, _patterns, kPatternSolid); + Design::drawFilledRect(&_console, trect, kColorBlack, _wm.getPatterns(), kPatternSolid); font->drawString(&_console, beg, x1, y1, textW, kColorBlack); font->drawString(&_console, mid, x1 + rectW1 - kConWPadding - kConWOverlap, y1, textW, kColorWhite); @@ -280,17 +281,13 @@ void Gui::renderConsole(Graphics::Surface *g, Common::Rect &r) { rr.bottom = _screen.h - 1; g->copyRectToSurface(_console, xcon, ycon, boundsR); - g_system->copyRectToScreen(g->getBasePtr(rr.left, rr.top), g->pitch, rr.left, rr.top, rr.width(), rr.height()); } void Gui::drawInput() { if (!_screen.getPixels()) return; - if (_sceneIsActive) { - _sceneIsActive = false; - _bordersDirty = true; - } + _wm.setActive(_consoleWindow->getId()); _out.pop_back(); _lines.pop_back(); @@ -302,17 +299,17 @@ void Gui::drawInput() { if (_engine->_inputText.contains('\n')) { _consoleDirty = true; } else { - int x = kConWPadding + _consoleTextArea.left; - int y = _cursorY + _consoleTextArea.top; + int x = kConWPadding + _consoleWindow->getInnerDimensions().left; + int y = _cursorY + _consoleWindow->getInnerDimensions().top; - Common::Rect r(x, y, x + _consoleTextArea.width() - kConWPadding, y + font->getFontHeight()); + Common::Rect r(x, y, x + _consoleWindow->getInnerDimensions().width() - kConWPadding, y + font->getFontHeight()); _screen.fillRect(r, kColorWhite); undrawCursor(); font->drawString(&_screen, _out[_inputTextLineNum], x, y, _screen.w, kColorBlack); - g_system->copyRectToScreen(_screen.getBasePtr(x, y), _screen.pitch, x, y, _consoleTextArea.width(), font->getFontHeight()); + g_system->copyRectToScreen(_screen.getBasePtr(x, y), _screen.pitch, x, y, _consoleWindow->getInnerDimensions().width(), font->getFontHeight()); } _cursorX = font->getStringWidth(_out[_inputTextLineNum]) + kConHPadding; @@ -427,4 +424,140 @@ void Gui::enableNewGameMenus() { _menu->enableCommand(kMenuFile, kMenuActionQuit, true); } +bool Gui::processConsoleEvents(WindowClick click, Common::Event &event) { + if (click == kBorderScrollUp || click == kBorderScrollDown) { + if (event.type == Common::EVENT_LBUTTONDOWN) { + int consoleHeight = _consoleWindow->getInnerDimensions().height(); + int textFullSize = _lines.size() * _consoleLineHeight + consoleHeight; + float scrollPos = (float)_scrollPos / textFullSize; + float scrollSize = (float)consoleHeight / textFullSize; + + _consoleWindow->setScroll(scrollPos, scrollSize); + + return true; + } else if (event.type == Common::EVENT_LBUTTONUP) { + int oldScrollPos = _scrollPos; + + switch (click) { + case kBorderScrollUp: + _scrollPos = MAX<int>(0, _scrollPos - _consoleLineHeight); + undrawCursor(); + _cursorY -= (_scrollPos - oldScrollPos); + _consoleDirty = true; + _consoleFullRedraw = true; + break; + case kBorderScrollDown: + _scrollPos = MIN<int>((_lines.size() - 2) * _consoleLineHeight, _scrollPos + _consoleLineHeight); + undrawCursor(); + _cursorY -= (_scrollPos - oldScrollPos); + _consoleDirty = true; + _consoleFullRedraw = true; + break; + default: + return false; + } + + return true; + } + + return false; + } + + if (click == kBorderResizeButton) { + _consoleDirty = true; + _consoleFullRedraw = true; + + return true; + } + + if (click == kBorderInner) { + if (event.type == Common::EVENT_LBUTTONDOWN) { + startMarking(event.mouse.x, event.mouse.y); + + return true; + } else if (event.type == Common::EVENT_LBUTTONUP) { + if (_inTextSelection) { + _inTextSelection = false; + + if (_selectionEndY == -1 || + (_selectionEndX == _selectionStartX && _selectionEndY == _selectionStartY)) { + _selectionStartY = _selectionEndY = -1; + _consoleFullRedraw = true; + _menu->enableCommand(kMenuEdit, kMenuActionCopy, false); + } else { + _menu->enableCommand(kMenuEdit, kMenuActionCopy, true); + + bool cutAllowed = false; + + if (_selectionStartY == _selectionEndY && _selectionStartY == (int)_lines.size() - 1) + cutAllowed = true; + + _menu->enableCommand(kMenuEdit, kMenuActionCut, cutAllowed); + _menu->enableCommand(kMenuEdit, kMenuActionClear, cutAllowed); + } + } + + return true; + } else if (event.type == Common::EVENT_MOUSEMOVE) { + if (_inTextSelection) { + updateTextSelection(event.mouse.x, event.mouse.y); + return true; + } + } + + return false; + } + + return false; +} + +int Gui::calcTextX(int x, int textLine) { + const Graphics::Font *font = getConsoleFont(); + + if ((uint)textLine >= _lines.size()) + return 0; + + Common::String str = _lines[textLine]; + + x -= _consoleWindow->getInnerDimensions().left; + + for (int i = str.size(); i >= 0; i--) { + if (font->getStringWidth(str) < x) { + return i; + } + + str.deleteLastChar(); + } + + return 0; +} + +int Gui::calcTextY(int y) { + y -= _consoleWindow->getInnerDimensions().top; + + if (y < 0) + y = 0; + + const int firstLine = _scrollPos / _consoleLineHeight; + int textLine = (y - _scrollPos % _consoleLineHeight) / _consoleLineHeight + firstLine; + + return textLine; +} + +void Gui::startMarking(int x, int y) { + _selectionStartY = calcTextY(y); + _selectionStartX = calcTextX(x, _selectionStartY); + + _selectionEndY = -1; + + _inTextSelection = true; +} + +void Gui::updateTextSelection(int x, int y) { + _selectionEndY = calcTextY(y); + _selectionEndX = calcTextX(x, _selectionEndY); + + _consoleFullRedraw = true; +} + } // End of namespace Wage diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 9dd1a24b3c..310e5734b7 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -46,69 +46,40 @@ */ #include "common/timer.h" -#include "common/unzip.h" +#include "common/system.h" #include "graphics/cursorman.h" -#include "graphics/fonts/bdf.h" -#include "graphics/palette.h" +#include "graphics/primitives.h" #include "wage/wage.h" #include "wage/design.h" #include "wage/entities.h" -#include "wage/menu.h" #include "wage/gui.h" +#include "wage/macwindow.h" +#include "wage/macwindowmanager.h" +#include "wage/macmenu.h" #include "wage/world.h" namespace Wage { -static const byte palette[] = { - 0, 0, 0, // Black - 0x80, 0x80, 0x80, // Gray - 0xff, 0xff, 0xff, // White - 0x00, 0xff, 0x00 // Green -}; - -static byte fillPatterns[][8] = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, // kPatternSolid - { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 }, // kPatternStripes - { 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55 }, // kPatternCheckers - { 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa } // kPatternCheckers2 -}; - -static const byte macCursorArrow[] = { - 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 0, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 0, 0, 2, 3, 3, 3, 3, 3, 3, 3, - 2, 0, 0, 0, 2, 3, 3, 3, 3, 3, 3, - 2, 0, 0, 0, 0, 2, 3, 3, 3, 3, 3, - 2, 0, 0, 0, 0, 0, 2, 3, 3, 3, 3, - 2, 0, 0, 0, 0, 0, 0, 2, 3, 3, 3, - 2, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, - 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, - 2, 0, 0, 2, 0, 0, 2, 3, 3, 3, 3, - 2, 0, 2, 3, 2, 0, 0, 2, 3, 3, 3, - 2, 2, 3, 3, 2, 0, 0, 2, 3, 3, 3, - 2, 3, 3, 3, 3, 2, 0, 0, 2, 3, 3, - 3, 3, 3, 3, 3, 2, 0, 0, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 2, 2, 2, 3, 3 -}; - -static const byte macCursorBeam[] = { - 0, 0, 3, 3, 3, 0, 0, 3, 3, 3, 3, - 3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 3, - 0, 0, 3, 3, 3, 0, 0, 3, 3, 3, 3, +static const MenuData menuSubItems[] = { + { kMenuHighLevel, "File", 0, 0, false }, + { kMenuHighLevel, "Edit", 0, 0, false }, + { kMenuFile, "New", kMenuActionNew, 0, false }, + { kMenuFile, "Open...", kMenuActionOpen, 0, false }, + { kMenuFile, "Close", kMenuActionClose, 0, true }, + { kMenuFile, "Save", kMenuActionSave, 0, false }, + { kMenuFile, "Save as...", kMenuActionSaveAs, 0, true }, + { kMenuFile, "Revert", kMenuActionRevert, 0, false }, + { kMenuFile, "Quit", kMenuActionQuit, 0, true }, + + { kMenuEdit, "Undo", kMenuActionUndo, 'Z', false }, + { kMenuEdit, NULL, 0, 0, false }, + { kMenuEdit, "Cut", kMenuActionCut, 'K', false }, + { kMenuEdit, "Copy", kMenuActionCopy, 'C', false }, + { kMenuEdit, "Paste", kMenuActionPaste, 'V', false }, + { kMenuEdit, "Clear", kMenuActionClear, 'B', false }, + + { 0, NULL, 0, 0, false } }; static void cursorTimerHandler(void *refCon) { @@ -123,8 +94,8 @@ static void cursorTimerHandler(void *refCon) { if (!gui->_screen.getPixels()) return; - x += gui->_consoleTextArea.left; - y += gui->_consoleTextArea.top; + x += gui->_consoleWindow->getInnerDimensions().left; + y += gui->_consoleWindow->getInnerDimensions().top; gui->_screen.vLine(x, y, y + kCursorHeight, gui->_cursorState ? kColorBlack : kColorWhite); @@ -139,22 +110,25 @@ static void cursorTimerHandler(void *refCon) { gui->_cursorDirty = true; } +static bool sceneWindowCallback(WindowClick click, Common::Event &event, void *gui); +static bool consoleWindowCallback(WindowClick click, Common::Event &event, void *gui); +static void menuCommandsCallback(int action, Common::String &text, void *data); + + Gui::Gui(WageEngine *engine) { _engine = engine; _scene = NULL; _sceneDirty = true; _consoleDirty = true; - _bordersDirty = true; - _menuDirty = true; _cursorDirty = false; _consoleFullRedraw = true; _screen.create(g_system->getWidth(), g_system->getHeight(), Graphics::PixelFormat::createFormatCLUT8()); + _wm.setScreen(&_screen); + _scrollPos = 0; _consoleLineHeight = 8; // Dummy value which makes sense _consoleNumLines = 24; // Dummy value - _builtInFonts = false; - _sceneIsActive = false; _cursorX = 0; _cursorY = 0; @@ -167,28 +141,39 @@ Gui::Gui(WageEngine *engine) { _inputTextLineNum = 0; - g_system->getPaletteManager()->setPalette(palette, 0, 4); + g_system->getTimerManager()->installTimerProc(&cursorTimerHandler, 200000, this, "wageCursor"); + + _menu = _wm.addMenu(); - CursorMan.replaceCursorPalette(palette, 0, 4); - CursorMan.replaceCursor(macCursorArrow, 11, 16, 1, 1, 3); - _cursorIsArrow = true; - CursorMan.showMouse(true); + _menu->setCommandsCallback(menuCommandsCallback, this); - for (int i = 0; i < ARRAYSIZE(fillPatterns); i++) - _patterns.push_back(fillPatterns[i]); + _menu->addStaticMenus(menuSubItems); + _menu->addMenuSubItem(kMenuAbout, _engine->_world->getAboutMenuItemName(), kMenuActionAbout); - loadFonts(); + _commandsMenuId = _menu->addMenuItem(_engine->_world->_commandsMenuName.c_str()); + regenCommandsMenu(); - g_system->getTimerManager()->installTimerProc(&cursorTimerHandler, 200000, this, "wageCursor"); + if (!_engine->_world->_weaponMenuDisabled) { + _weaponsMenuId = _menu->addMenuItem(_engine->_world->_weaponsMenuName.c_str()); + + regenWeaponsMenu(); + } else { + _weaponsMenuId = -1; + } + + _menu->calcDimensions(); + + _sceneWindow = _wm.addWindow(false, false, false); + _sceneWindow->setCallback(sceneWindowCallback, this); - _menu = new Menu(this); + _consoleWindow = _wm.addWindow(true, true, true); + _consoleWindow->setCallback(consoleWindowCallback, this); } Gui::~Gui() { _screen.free(); _console.free(); g_system->getTimerManager()->removeTimerProc(&cursorTimerHandler); - delete _menu; } void Gui::undrawCursor() { @@ -198,82 +183,34 @@ void Gui::undrawCursor() { _cursorOff = false; } -const Graphics::Font *Gui::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; -} - -const Graphics::Font *Gui::getTitleFont() { - return getFont("Chicago-12", Graphics::FontManager::kBigGUIFont); -} - -void Gui::drawDesktop() { - // Draw desktop - Common::Rect r(0, 0, _screen.w - 1, _screen.h - 1); - Design::drawFilledRoundRect(&_screen, r, kDesktopArc, kColorBlack, _patterns, kPatternCheckers); - g_system->copyRectToScreen(_screen.getPixels(), _screen.pitch, 0, 0, _screen.w, _screen.h); -} - void Gui::draw() { if (_engine->_isGameOver) { - if (_menuDirty) { - drawDesktop(); - _menu->render(); - } - - _menuDirty = false; + _wm.draw(); return; } - if (_scene != _engine->_world->_player->_currentScene || _sceneDirty) { - _scene = _engine->_world->_player->_currentScene; - - drawDesktop(); + if (!_engine->_world->_player->_currentScene) + return; + if (_scene != _engine->_world->_player->_currentScene) { _sceneDirty = true; - _consoleDirty = true; - _menuDirty = true; - _consoleFullRedraw = true; - _scene->paint(&_screen, _scene->_designBounds->left, _scene->_designBounds->top); + _scene = _engine->_world->_player->_currentScene; - _sceneArea.left = _scene->_designBounds->left + kBorderWidth - 2; - _sceneArea.top = _scene->_designBounds->top + kBorderWidth - 2; - _sceneArea.setWidth(_scene->_designBounds->width() - 2 * kBorderWidth); - _sceneArea.setHeight(_scene->_designBounds->height() - 2 * kBorderWidth); + _sceneWindow->setDimensions(*_scene->_designBounds); + _sceneWindow->setTitle(_scene->_name); + _consoleWindow->setDimensions(*_scene->_textBounds); - _consoleTextArea.left = _scene->_textBounds->left + kBorderWidth - 2; - _consoleTextArea.top = _scene->_textBounds->top + kBorderWidth - 2; - _consoleTextArea.setWidth(_scene->_textBounds->width() - 2 * kBorderWidth); - _consoleTextArea.setHeight(_scene->_textBounds->height() - 2 * kBorderWidth); + _wm.setFullRefresh(true); } - if (_scene && (_bordersDirty || _sceneDirty)) - paintBorder(&_screen, _sceneArea, kWindowScene); - - // Render console - if (_consoleDirty || _consoleFullRedraw) - renderConsole(&_screen, _consoleTextArea); + drawScene(); + drawConsole(); - if (_bordersDirty || _consoleDirty || _consoleFullRedraw) - paintBorder(&_screen, _consoleTextArea, kWindowConsole); + _wm.draw(); - if (_menuDirty) - _menu->render(); - - if (_cursorDirty) { + if (_cursorDirty && _cursorRect.left < _screen.w && _cursorRect.bottom < _screen.h) { g_system->copyRectToScreen(_screen.getBasePtr(_cursorRect.left, _cursorRect.top), _screen.pitch, _cursorRect.left, _cursorRect.top, _cursorRect.width(), _cursorRect.height()); @@ -282,394 +219,141 @@ void Gui::draw() { _sceneDirty = false; _consoleDirty = false; - _bordersDirty = false; - _menuDirty = false; _consoleFullRedraw = false; } -void Gui::drawBox(Graphics::Surface *g, int x, int y, int w, int h) { - Common::Rect r(x, y, x + w + 1, y + h + 1); +void Gui::drawScene() { + if (!_sceneDirty) + return; + + _scene->paint(_sceneWindow->getSurface(), 0, 0); + _sceneWindow->setDirty(true); - g->fillRect(r, kColorWhite); - g->frameRect(r, kColorBlack); + _sceneDirty = true; + _consoleDirty = true; + _menu->setDirty(true); + _consoleFullRedraw = true; } -void Gui::fillRect(Graphics::Surface *g, int x, int y, int w, int h, int color) { - Common::Rect r(x, y, x + w, y + h); +static bool sceneWindowCallback(WindowClick click, Common::Event &event, void *g) { + Gui *gui = (Gui *)g; - g->fillRect(r, color); + return gui->processSceneEvents(click, event); } -#define ARROW_W 12 -#define ARROW_H 6 -const int arrowPixels[ARROW_H][ARROW_W] = { - {0,0,0,0,0,1,1,0,0,0,0,0}, - {0,0,0,0,1,1,1,1,0,0,0,0}, - {0,0,0,1,1,1,1,1,1,0,0,0}, - {0,0,1,1,1,1,1,1,1,1,0,0}, - {0,1,1,1,1,1,1,1,1,1,1,0}, - {1,1,1,1,1,1,1,1,1,1,1,1}}; - -void Gui::paintBorder(Graphics::Surface *g, Common::Rect &r, WindowType windowType, int highlightedPart) { - bool active = false, scrollable = false, closeable = false, drawTitle = false; - const int size = kBorderWidth; - int x = r.left - size; - int y = r.top - size; - int width = r.width() + 2 * size; - int height = r.height() + 2 * size; - - switch (windowType) { - case kWindowScene: - active = _sceneIsActive; - scrollable = false; - closeable = _sceneIsActive; - drawTitle = true; - break; - case kWindowConsole: - active = !_sceneIsActive; - scrollable = true; - closeable = !_sceneIsActive; - drawTitle = false; - break; - } - - drawBox(g, x, y, size, size); - drawBox(g, x + width - size - 1, y, size, size); - drawBox(g, x + width - size - 1, y + height - size - 1, size, size); - drawBox(g, x, y + height - size - 1, size, size); - drawBox(g, x + size, y + 2, width - 2 * size - 1, size - 4); - drawBox(g, x + size, y + height - size + 1, width - 2 * size - 1, size - 4); - drawBox(g, x + 2, y + size, size - 4, height - 2 * size - 1); - drawBox(g, x + width - size + 1, y + size, size - 4, height - 2 * size - 1); - - if (active) { - fillRect(g, x + size, y + 5, width - 2 * size - 1, 8); - fillRect(g, x + size, y + height - 13, width - 2 * size - 1, 8); - fillRect(g, x + 5, y + size, 8, height - 2 * size - 1); - if (!scrollable) { - fillRect(g, x + width - 13, y + size, 8, height - 2 * size - 1); - } else { - int x1 = x + width - 15; - int y1 = y + size + 1; - int color1 = kColorBlack; - int color2 = kColorWhite; - if (highlightedPart == kBorderScrollUp) { - SWAP(color1, color2); - fillRect(g, x + width - kBorderWidth + 2, y + size, size - 4, r.height() / 2); - } - for (int yy = 0; yy < ARROW_H; yy++) { - for (int xx = 0; xx < ARROW_W; xx++) { - if (arrowPixels[yy][xx] != 0) { - g->hLine(x1 + xx, y1 + yy, x1 + xx, color1); - } else { - g->hLine(x1 + xx, y1 + yy, x1 + xx, color2); - } - } - } - fillRect(g, x + width - 13, y + size + ARROW_H, 8, r.height() / 2 - ARROW_H, color1); - - color1 = kColorBlack; - color2 = kColorWhite; - if (highlightedPart == kBorderScrollDown) { - SWAP(color1, color2); - fillRect(g, x + width - kBorderWidth + 2, y + size + r.height() / 2, size - 4, r.height() / 2); - } - fillRect(g, x + width - 13, y + size + r.height() / 2, 8, r.height() / 2 - ARROW_H, color1); - y1 += height - 2 * size - ARROW_H - 2; - for (int yy = 0; yy < ARROW_H; yy++) { - for (int xx = 0; xx < ARROW_W; xx++) { - if (arrowPixels[ARROW_H - yy - 1][xx] != 0) { - g->hLine(x1 + xx, y1 + yy, x1 + xx, color1); - } else { - g->hLine(x1 + xx, y1 + yy, x1 + xx, color2); - } - } - } - } - if (closeable) { - if (highlightedPart == kBorderCloseButton) { - fillRect(g, x + 6, y + 6, 6, 6); - } else { - drawBox(g, x + 5, y + 5, 7, 7); - } - } - } +bool Gui::processSceneEvents(WindowClick click, Common::Event &event) { + if (click == kBorderInner && event.type == Common::EVENT_LBUTTONUP) { + Designed *obj = _scene->lookUpEntity(event.mouse.x - _sceneWindow->getDimensions().left, + event.mouse.y - _sceneWindow->getDimensions().top); - if (drawTitle) { - const Graphics::Font *font = getTitleFont(); - int yOff = _builtInFonts ? 3 : 1; + if (obj != nullptr) + _engine->processTurn(NULL, obj); - int w = font->getStringWidth(_scene->_name) + 10; - int maxWidth = width - size * 2 - 7; - if (w > maxWidth) - w = maxWidth; - drawBox(g, x + (width - w) / 2, y, w, size); - font->drawString(g, _scene->_name, x + (width - w) / 2 + 5, y + yOff, w, kColorBlack); + return true; } - if (x < 0) { - width += x; - x = 0; - } - if (y < 0) { - height += y; - y = 0; - } - if (x + width > _screen.w) - width = _screen.w - x; - if (y + height > _screen.h) - height = _screen.h - y; - - g_system->copyRectToScreen(g->getBasePtr(x, y), g->pitch, x, y, width, height); + return false; } -void Gui::loadFonts() { - Common::Archive *dat; - - dat = Common::makeZipArchive("wage.dat"); - - if (!dat) { - warning("Could not find wage.dat. Falling back to built-in fonts"); - _builtInFonts = true; - +// Render console +void Gui::drawConsole() { + if (!_consoleDirty && !_consoleFullRedraw && !_sceneDirty) 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()); - } + renderConsole(_consoleWindow->getSurface(), Common::Rect(kBorderWidth - 2, kBorderWidth - 2, + _consoleWindow->getDimensions().width(), _consoleWindow->getDimensions().height())); + _consoleWindow->setDirty(true); +} - _builtInFonts = false; +static bool consoleWindowCallback(WindowClick click, Common::Event &event, void *g) { + Gui *gui = (Gui *)g; - delete dat; + return gui->processConsoleEvents(click, event); } +//////////////// +// Menu stuff +//////////////// void Gui::regenCommandsMenu() { - _menu->regenCommandsMenu(); + _menu->createSubMenuFromString(_commandsMenuId, _engine->_world->_commandsMenu.c_str()); } void Gui::regenWeaponsMenu() { - _menu->regenWeaponsMenu(); -} - -void Gui::processMenuShortCut(byte flags, uint16 ascii) { - _menu->processMenuShortCut(flags, ascii); -} - -void Gui::mouseMove(int x, int y) { - if (_menu->_menuActivated) { - if (_menu->mouseMove(x, y)) - _menuDirty = true; - - return; - } - - if (_inTextSelection) { - updateTextSelection(x, y); + if (_engine->_world->_weaponMenuDisabled) return; - } - - if (_consoleTextArea.contains(x, y)) { - if (_cursorIsArrow) { - CursorMan.replaceCursor(macCursorBeam, 11, 16, 3, 8, 3); - _cursorIsArrow = false; - } - } else if (_cursorIsArrow == false) { - CursorMan.replaceCursor(macCursorArrow, 11, 16, 1, 1, 3); - _cursorIsArrow = true; - } -} - -void Gui::pushArrowCursor() { - CursorMan.pushCursor(macCursorArrow, 11, 16, 1, 1, 3); -} -void Gui::popCursor() { - CursorMan.popCursor(); -} - -static int isInBorder(Common::Rect &rect, int x, int y) { - if (x >= rect.left - kBorderWidth && x < rect.left && y >= rect.top - kBorderWidth && y < rect.top) - return kBorderCloseButton; - - if (x >= rect.right && x < rect.right + kBorderWidth) { - if (y < rect.top - kBorderWidth) - return kBorderNone; - - if (y >= rect.bottom + kBorderWidth) - return kBorderNone; - - if (y >= rect.top + rect.height() / 2) - return kBorderScrollDown; - - return kBorderScrollUp; - } - - return kBorderNone; -} - -Designed *Gui::mouseUp(int x, int y) { - if (_menu->_menuActivated) { - if (_menu->mouseRelease(x, y)) { - _sceneDirty = true; - _consoleDirty = true; - _bordersDirty = true; - _menuDirty = true; - } - - return NULL; - } + _menu->clearSubMenu(_weaponsMenuId); - if (_inTextSelection) { - _inTextSelection = false; + Chr *player = _engine->_world->_player; + ObjArray *weapons = player->getWeapons(true); - if (_selectionEndY == -1 || - (_selectionEndX == _selectionStartX && _selectionEndY == _selectionStartY)) { - _selectionStartY = _selectionEndY = -1; - _consoleFullRedraw = true; - _menu->enableCommand(kMenuEdit, kMenuActionCopy, false); - } else { - _menu->enableCommand(kMenuEdit, kMenuActionCopy, true); + bool empty = true; - bool cutAllowed = false; + for (uint i = 0; i < weapons->size(); i++) { + Obj *obj = (*weapons)[i]; + if (obj->_type == Obj::REGULAR_WEAPON || + obj->_type == Obj::THROW_WEAPON || + obj->_type == Obj::MAGICAL_OBJECT) { + Common::String command(obj->_operativeVerb); + command += " "; + command += obj->_name; - if (_selectionStartY == _selectionEndY && _selectionStartY == (int)_lines.size() - 1) - cutAllowed = true; + _menu->addMenuSubItem(_weaponsMenuId, command.c_str(), kMenuActionCommand, 0, 0, true); - _menu->enableCommand(kMenuEdit, kMenuActionCut, cutAllowed); - _menu->enableCommand(kMenuEdit, kMenuActionClear, cutAllowed); + empty = false; } } + delete weapons; - int borderClick; - - if (_sceneArea.contains(x, y)) { - if (!_sceneIsActive) { - _sceneIsActive = true; - _bordersDirty = true; - } - - for (ObjList::const_iterator it = _scene->_objs.begin(); it != _scene->_objs.end(); ++it) { - if ((*it)->_design->isPointOpaque(x - _sceneArea.left + kBorderWidth, y - _sceneArea.top + kBorderWidth)) - return *it; - } - - for (ChrList::const_iterator it = _scene->_chrs.begin(); it != _scene->_chrs.end(); ++it) { - if ((*it)->_design->isPointOpaque(x - _sceneArea.left + kBorderWidth, y - _sceneArea.top + kBorderWidth)) - return *it; - } - } else if (_consoleTextArea.contains(x, y)) { - if (_sceneIsActive) { - _sceneIsActive = false; - _bordersDirty = true; - } - } else if ((borderClick = isInBorder(_consoleTextArea, x, y)) != kBorderNone) { - _bordersDirty = true; - int _oldScrollPos = _scrollPos; - - switch (borderClick) { - case kBorderScrollUp: - _scrollPos = MAX<int>(0, _scrollPos - _consoleLineHeight); - undrawCursor(); - _cursorY -= (_scrollPos - _oldScrollPos); - _consoleDirty = true; - _consoleFullRedraw = true; - break; - case kBorderScrollDown: - _scrollPos = MIN<int>((_lines.size() - 2) * _consoleLineHeight, _scrollPos + _consoleLineHeight); - undrawCursor(); - _cursorY -= (_scrollPos - _oldScrollPos); - _consoleDirty = true; - _consoleFullRedraw = true; - break; - } - } - - return NULL; + if (empty) + _menu->addMenuSubItem(_weaponsMenuId, "You have no weapons", 0, 0, 0, false); } -void Gui::mouseDown(int x, int y) { - int borderClick; - - if (_menu->mouseClick(x, y)) { - _menuDirty = true; - } else if (_consoleTextArea.contains(x, y)) { - startMarking(x, y); - } else if ((borderClick = isInBorder(_consoleTextArea, x, y)) != kBorderNone) { - paintBorder(&_screen, _consoleTextArea, kWindowConsole, borderClick); - } +bool Gui::processEvent(Common::Event &event) { + return _wm.processEvent(event); } -int Gui::calcTextX(int x, int textLine) { - const Graphics::Font *font = getConsoleFont(); - - if ((uint)textLine >= _lines.size()) - return 0; - - Common::String str = _lines[textLine]; - - x -= _consoleTextArea.left; - - for (int i = str.size(); i >= 0; i--) { - if (font->getStringWidth(str) < x) { - return i; - } - - str.deleteLastChar(); - } +void menuCommandsCallback(int action, Common::String &text, void *data) { + Gui *g = (Gui *)data; - return 0; + g->executeMenuCommand(action, text); } -int Gui::calcTextY(int y) { - y -= _consoleTextArea.top; - - if (y < 0) - y = 0; - - const int firstLine = _scrollPos / _consoleLineHeight; - int textLine = (y - _scrollPos % _consoleLineHeight) / _consoleLineHeight + firstLine; - - return textLine; -} - -void Gui::startMarking(int x, int y) { - _selectionStartY = calcTextY(y); - _selectionStartX = calcTextX(x, _selectionStartY); - - _selectionEndY = -1; +void Gui::executeMenuCommand(int action, Common::String &text) { + switch(action) { + case kMenuActionAbout: + case kMenuActionNew: + case kMenuActionOpen: + case kMenuActionClose: + case kMenuActionSave: + case kMenuActionSaveAs: + case kMenuActionRevert: + case kMenuActionQuit: + + case kMenuActionUndo: + actionUndo(); + break; + case kMenuActionCut: + actionCut(); + break; + case kMenuActionCopy: + actionCopy(); + break; + case kMenuActionPaste: + actionPaste(); + break; + case kMenuActionClear: + actionClear(); + break; - _inTextSelection = true; -} + case kMenuActionCommand: + _engine->processTurn(&text, NULL); + break; -void Gui::updateTextSelection(int x, int y) { - _selectionEndY = calcTextY(y); - _selectionEndX = calcTextX(x, _selectionEndY); + default: + warning("Unknown action: %d", action); - _consoleFullRedraw = true; + } } } // End of namespace Wage diff --git a/engines/wage/gui.h b/engines/wage/gui.h index 73814d39b4..ba1bb5ef3b 100644 --- a/engines/wage/gui.h +++ b/engines/wage/gui.h @@ -50,47 +50,23 @@ #include "common/str-array.h" #include "graphics/font.h" -#include "graphics/fontman.h" -#include "graphics/surface.h" +#include "graphics/managed_surface.h" +#include "common/events.h" #include "common/rect.h" +#include "wage/macwindow.h" +#include "wage/macwindowmanager.h" + namespace Wage { class Menu; - -enum WindowType { - kWindowScene, - kWindowConsole -}; +class Scene; +class WageEngine; enum { - kMenuHeight = 20, - kMenuLeftMargin = 7, - kMenuSpacing = 13, - kMenuPadding = 16, - kMenuDropdownPadding = 14, - kMenuDropdownItemHeight = 16, - kMenuItemHeight = 20, - kBorderWidth = 17, - kDesktopArc = 7, - kComponentsPadding = 10, kCursorHeight = 12 }; -enum { - kPatternSolid = 1, - kPatternStripes = 2, - kPatternCheckers = 3, - kPatternCheckers2 = 4 -}; - -enum { - kBorderNone = 0, - kBorderScrollUp, - kBorderScrollDown, - kBorderCloseButton -}; - class Gui { public: Gui(WageEngine *engine); @@ -99,17 +75,12 @@ public: void draw(); void appendText(const char *str); void clearOutput(); - void mouseMove(int x, int y); - void mouseDown(int x, int y); - Designed *mouseUp(int x, int y); + bool processEvent(Common::Event &event); + void drawInput(); void setSceneDirty() { _sceneDirty = true; } - const Graphics::Font *getFont(const char *name, Graphics::FontManager::FontUsage fallback); void regenCommandsMenu(); void regenWeaponsMenu(); - void processMenuShortCut(byte flags, uint16 ascii); - void pushArrowCursor(); - void popCursor(); void actionCopy(); void actionPaste(); @@ -120,14 +91,15 @@ public: void disableAllMenus(); void enableNewGameMenus(); + bool processSceneEvents(WindowClick click, Common::Event &event); + bool processConsoleEvents(WindowClick click, Common::Event &event); + void executeMenuCommand(int action, Common::String &text); + private: + void drawScene(); + void drawConsole(); void undrawCursor(); - void drawDesktop(); - void paintBorder(Graphics::Surface *g, Common::Rect &r, WindowType windowType, int highlightedPart = kBorderNone); - void renderConsole(Graphics::Surface *g, Common::Rect &r); - void drawBox(Graphics::Surface *g, int x, int y, int w, int h); - void fillRect(Graphics::Surface *g, int x, int y, int w, int h, int color = kColorBlack); - void loadFonts(); + void renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r); void flowText(Common::String &str); const Graphics::Font *getConsoleFont(); const Graphics::Font *getTitleFont(); @@ -137,29 +109,27 @@ private: void updateTextSelection(int x, int y); public: - Graphics::Surface _screen; + Graphics::ManagedSurface _screen; int _cursorX, _cursorY; bool _cursorState; - Common::Rect _consoleTextArea; - bool _builtInFonts; WageEngine *_engine; - Patterns _patterns; - bool _cursorDirty; Common::Rect _cursorRect; bool _cursorOff; - bool _menuDirty; + Scene *_scene; + + MacWindowManager _wm; + MacWindow *_sceneWindow; + MacWindow *_consoleWindow; private: - Graphics::Surface _console; + Graphics::ManagedSurface _console; Menu *_menu; - Scene *_scene; bool _sceneDirty; bool _consoleDirty; - bool _bordersDirty; Common::StringArray _out; Common::StringArray _lines; @@ -168,10 +138,6 @@ private: uint _consoleNumLines; bool _consoleFullRedraw; - Common::Rect _sceneArea; - bool _sceneIsActive; - bool _cursorIsArrow; - bool _inTextSelection; int _selectionStartX; int _selectionStartY; @@ -182,6 +148,9 @@ private: Common::String _undobuffer; int _inputTextLineNum; + + int _commandsMenuId; + int _weaponsMenuId; }; } // End of namespace Wage diff --git a/engines/wage/menu.cpp b/engines/wage/macmenu.cpp index 12ef8c2219..ed5f5070ff 100644 --- a/engines/wage/menu.cpp +++ b/engines/wage/macmenu.cpp @@ -48,15 +48,25 @@ #include "common/system.h" #include "common/keyboard.h" -#include "wage/wage.h" -#include "wage/entities.h" -#include "wage/design.h" -#include "wage/gui.h" -#include "wage/menu.h" -#include "wage/world.h" +#include "graphics/primitives.h" +#include "graphics/font.h" + +#include "wage/macwindowmanager.h" +#include "wage/macwindow.h" +#include "wage/macmenu.h" namespace Wage { +enum { + kMenuHeight = 20, + kMenuLeftMargin = 7, + kMenuSpacing = 13, + kMenuPadding = 16, + kMenuDropdownPadding = 14, + kMenuDropdownItemHeight = 16, + kMenuItemHeight = 20 +}; + struct MenuSubItem { Common::String text; int action; @@ -79,66 +89,65 @@ struct MenuItem { MenuItem(const char *n) : name(n) {} }; -struct MenuData { - int menunum; - const char *title; - int action; - byte shortcut; - bool enabled; -} static const menuSubItems[] = { - { kMenuFile, "New", kMenuActionNew, 0, false }, - { kMenuFile, "Open...", kMenuActionOpen, 0, false }, - { kMenuFile, "Close", kMenuActionClose, 0, true }, - { kMenuFile, "Save", kMenuActionSave, 0, false }, - { kMenuFile, "Save as...", kMenuActionSaveAs, 0, true }, - { kMenuFile, "Revert", kMenuActionRevert, 0, false }, - { kMenuFile, "Quit", kMenuActionQuit, 0, true }, - - { kMenuEdit, "Undo", kMenuActionUndo, 'Z', false }, - { kMenuEdit, NULL, 0, 0, false }, - { kMenuEdit, "Cut", kMenuActionCut, 'K', false }, - { kMenuEdit, "Copy", kMenuActionCopy, 'C', false }, - { kMenuEdit, "Paste", kMenuActionPaste, 'V', false }, - { kMenuEdit, "Clear", kMenuActionClear, 'B', false }, - - { 0, NULL, 0, 0, false } -}; +Menu::Menu(int id, const Common::Rect &bounds, MacWindowManager *wm) + : BaseMacWindow(id, false, wm) { + _font = getMenuFont(); -Menu::Menu(Gui *gui) : _gui(gui) { - assert(_gui->_engine); - assert(_gui->_engine->_world); + _screen.create(bounds.width(), bounds.height(), Graphics::PixelFormat::createFormatCLUT8()); - _font = getMenuFont(); + _bbox.left = 0; + _bbox.top = 0; + _bbox.right = _screen.w; + _bbox.bottom = kMenuHeight; + + _menuActivated = false; + _activeItem = -1; + _activeSubItem = -1; + + _ccallback = NULL; + _cdata = NULL; + + _tempSurface.create(_screen.w, _font->getFontHeight(), Graphics::PixelFormat::createFormatCLUT8()); +} + +Menu::~Menu() { + for (uint i = 0; i < _items.size(); i++) { + for (uint j = 0; j < _items[i]->subitems.size(); j++) + delete _items[i]->subitems[j]; + delete _items[i]; + } +} - MenuItem *about = new MenuItem(_gui->_builtInFonts ? "\xa9" : "\xf0"); // (c) Symbol as the most resembling apple +void Menu::addStaticMenus(const MenuData *data) { + MenuItem *about = new MenuItem(_wm->hasBuiltInFonts() ? "\xa9" : "\xf0"); // (c) Symbol as the most resembling apple _items.push_back(about); - _items[0]->subitems.push_back(new MenuSubItem(_gui->_engine->_world->getAboutMenuItemName(), kMenuActionAbout)); - MenuItem *file = new MenuItem("File"); - _items.push_back(file); + for (int i = 0; data[i].menunum; i++) { + const MenuData *m = &data[i]; - MenuItem *edit = new MenuItem("Edit"); - _items.push_back(edit); + if (m->menunum == kMenuHighLevel) { + MenuItem *item = new MenuItem(m->title); + _items.push_back(item); - for (int i = 0; menuSubItems[i].menunum; i++) { - const MenuData *m = &menuSubItems[i]; + continue; + } _items[m->menunum]->subitems.push_back(new MenuSubItem(m->title, m->action, 0, m->shortcut, m->enabled)); } +} - _commands = new MenuItem(_gui->_engine->_world->_commandsMenuName.c_str()); - _items.push_back(_commands); - regenCommandsMenu(); - - _weapons = NULL; +int Menu::addMenuItem(const char *name) { + MenuItem *i = new MenuItem(name); + _items.push_back(i); - if (!_gui->_engine->_world->_weaponMenuDisabled) { - _weapons = new MenuItem(_gui->_engine->_world->_weaponsMenuName.c_str()); - _items.push_back(_weapons); + return _items.size() - 1; +} - regenWeaponsMenu(); - } +void Menu::addMenuSubItem(int id, const char *text, int action, int style, char shortcut, bool enabled) { + _items[id]->subitems.push_back(new MenuSubItem(text, action, style, shortcut, enabled)); +} +void Menu::calcDimensions() { // Calculate menu dimensions int y = 1; int x = 18; @@ -150,47 +159,29 @@ Menu::Menu(Gui *gui) : _gui(gui) { _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() + (_gui->_builtInFonts ? 3 : 2); + _items[i]->bbox.bottom = y + _font->getFontHeight() + (_wm->hasBuiltInFonts() ? 3 : 2); } calcMenuBounds(_items[i]); x += w + kMenuSpacing; } - - _bbox.left = 0; - _bbox.top = 0; - _bbox.right = _gui->_screen.w - 1; - _bbox.bottom = kMenuHeight - 1; - - _menuActivated = false; - _activeItem = -1; - _activeSubItem = -1; - - _screenCopy.create(_gui->_screen.w, _gui->_screen.h, Graphics::PixelFormat::createFormatCLUT8()); - _tempSurface.create(_gui->_screen.w, _font->getFontHeight(), Graphics::PixelFormat::createFormatCLUT8()); -} - -Menu::~Menu() { - for (uint i = 0; i < _items.size(); i++) { - for (uint j = 0; j < _items[i]->subitems.size(); j++) - delete _items[i]->subitems[j]; - delete _items[i]; - } } -void Menu::regenCommandsMenu() { - for (uint j = 0; j < _commands->subitems.size(); j++) - delete _commands->subitems[j]; +void Menu::clearSubMenu(int id) { + MenuItem *menu = _items[id]; - _commands->subitems.clear(); + for (uint j = 0; j < menu->subitems.size(); j++) + delete menu->subitems[j]; - createCommandsMenu(_commands); - calcMenuBounds(_commands); + menu->subitems.clear(); } -void Menu::createCommandsMenu(MenuItem *menu) { - Common::String string(_gui->_engine->_world->_commandsMenu); +void Menu::createSubMenuFromString(int id, const char *str) { + clearSubMenu(id); + + MenuItem *menu = _items[id]; + Common::String string(str); Common::String item; @@ -253,45 +244,12 @@ void Menu::createCommandsMenu(MenuItem *menu) { item.clear(); } -} - -void Menu::regenWeaponsMenu() { - if (_gui->_engine->_world->_weaponMenuDisabled) - return; - - for (uint j = 0; j < _weapons->subitems.size(); j++) - delete _weapons->subitems[j]; - - _weapons->subitems.clear(); - - createWeaponsMenu(_weapons); - calcMenuBounds(_weapons); -} - -void Menu::createWeaponsMenu(MenuItem *menu) { - Chr *player = _gui->_engine->_world->_player; - ObjArray *weapons = player->getWeapons(true); - - for (uint i = 0; i < weapons->size(); i++) { - Obj *obj = (*weapons)[i]; - if (obj->_type == Obj::REGULAR_WEAPON || - obj->_type == Obj::THROW_WEAPON || - obj->_type == Obj::MAGICAL_OBJECT) { - Common::String command(obj->_operativeVerb); - command += " "; - command += obj->_name; - - menu->subitems.push_back(new MenuSubItem(command.c_str(), kMenuActionCommand, 0, 0, true)); - } - } - delete weapons; - if (menu->subitems.empty()) - menu->subitems.push_back(new MenuSubItem("You have no weapons", 0, 0, 0, false)); + calcMenuBounds(menu); } const Graphics::Font *Menu::getMenuFont() { - return _gui->getFont("Chicago-12", Graphics::FontManager::kBigGUIFont); + return _wm->getFont("Chicago-12", Graphics::FontManager::kBigGUIFont); } const char *Menu::getAcceleratorString(MenuSubItem *item, const char *prefix) { @@ -299,7 +257,7 @@ const char *Menu::getAcceleratorString(MenuSubItem *item, const char *prefix) { *res = 0; if (item->shortcut != 0) - sprintf(res, "%s%c%c", prefix, (_gui->_builtInFonts ? '^' : '\x11'), item->shortcut); + sprintf(res, "%s%c%c", prefix, (_wm->hasBuiltInFonts() ? '^' : '\x11'), item->shortcut); return res; } @@ -338,14 +296,35 @@ void Menu::calcMenuBounds(MenuItem *menu) { menu->subbbox.bottom = y2; } -void Menu::render() { +static void drawPixelPlain(int x, int y, int color, void *data) { + Graphics::ManagedSurface *surface = (Graphics::ManagedSurface *)data; + + if (x >= 0 && x < surface->w && y >= 0 && y < surface->h) + *((byte *)surface->getBasePtr(x, y)) = (byte)color; +} + +static void drawFilledRoundRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int arc, int color) { + Graphics::drawRoundRect(rect, arc, color, true, drawPixelPlain, surface); +} + +bool Menu::draw(Graphics::ManagedSurface *g, bool forceRedraw) { Common::Rect r(_bbox); - Design::drawFilledRoundRect(&_gui->_screen, r, kDesktopArc, kColorWhite, _gui->_patterns, kPatternSolid); + if (!_contentIsDirty && !forceRedraw) + return false; + + _contentIsDirty = false; + + _screen.clear(kColorGreen); + + drawFilledRoundRect(&_screen, r, kDesktopArc, kColorWhite); r.top = 7; - Design::drawFilledRect(&_gui->_screen, r, kColorWhite, _gui->_patterns, kPatternSolid); + _screen.fillRect(r, kColorWhite); r.top = kMenuHeight - 1; - Design::drawFilledRect(&_gui->_screen, r, kColorBlack, _gui->_patterns, kPatternSolid); + r.bottom++; + _screen.fillRect(r, kColorGreen); + r.bottom--; + _screen.fillRect(r, kColorBlack); for (uint i = 0; i < _items.size(); i++) { int color = kColorBlack; @@ -355,19 +334,24 @@ void Menu::render() { Common::Rect hbox = it->bbox; hbox.left -= 1; - hbox.right += 2; + hbox.right += 3; + hbox.bottom += 1; - Design::drawFilledRect(&_gui->_screen, hbox, kColorBlack, _gui->_patterns, kPatternSolid); + _screen.fillRect(hbox, kColorBlack); color = kColorWhite; if (!it->subitems.empty()) renderSubmenu(it); } - _font->drawString(&_gui->_screen, it->name, it->bbox.left + kMenuLeftMargin, it->bbox.top + (_gui->_builtInFonts ? 2 : 1), it->bbox.width(), color); + _font->drawString(&_screen, it->name, it->bbox.left + kMenuLeftMargin, it->bbox.top + (_wm->hasBuiltInFonts() ? 2 : 1), it->bbox.width(), color); } - g_system->copyRectToScreen(_gui->_screen.getPixels(), _gui->_screen.pitch, 0, 0, _gui->_screen.w, kMenuHeight); + g->transBlitFrom(_screen, kColorGreen); + + g_system->copyRectToScreen(g->getPixels(), g->pitch, 0, 0, g->w, g->h); + + return true; } void Menu::renderSubmenu(MenuItem *menu) { @@ -376,10 +360,12 @@ void Menu::renderSubmenu(MenuItem *menu) { if (r->width() == 0 || r->height() == 0) return; - Design::drawFilledRect(&_gui->_screen, *r, kColorWhite, _gui->_patterns, kPatternSolid); - Design::drawRect(&_gui->_screen, *r, 1, kColorBlack, _gui->_patterns, kPatternSolid); - Design::drawVLine(&_gui->_screen, r->right + 1, r->top + 3, r->bottom + 1, 1, kColorBlack, _gui->_patterns, kPatternSolid); - Design::drawHLine(&_gui->_screen, r->left + 3, r->right + 1, r->bottom + 1, 1, kColorBlack, _gui->_patterns, kPatternSolid); + _screen.fillRect(*r, kColorWhite); + _screen.frameRect(*r, kColorBlack); + _screen.vLine(r->right, r->top + 3, r->bottom + 1, kColorBlack); + _screen.vLine(r->right + 1, r->top + 3, r->bottom + 1, kColorBlack); + _screen.hLine(r->left + 3, r->bottom, r->right + 1, kColorBlack); + _screen.hLine(r->left + 3, r->bottom + 1, r->right + 1, kColorBlack); int x = r->left + kMenuDropdownPadding; int y = r->top + 1; @@ -391,13 +377,13 @@ 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 - (_gui->_builtInFonts ? 1 : 0), r->right, y + _font->getFontHeight()); + Common::Rect trect(r->left, y - (_wm->hasBuiltInFonts() ? 1 : 0), r->right, y + _font->getFontHeight()); - Design::drawFilledRect(&_gui->_screen, trect, kColorBlack, _gui->_patterns, kPatternSolid); + _screen.fillRect(trect, kColorBlack); } if (!text.empty()) { - Graphics::Surface *s = &_gui->_screen; + Graphics::ManagedSurface *s = &_screen; int tx = x, ty = y; if (!menu->subitems[i]->enabled) { @@ -406,7 +392,7 @@ void Menu::renderSubmenu(MenuItem *menu) { ty = 0; accelX -= x; - _tempSurface.fillRect(Common::Rect(0, 0, _tempSurface.w, _tempSurface.h), kColorGreen); + _tempSurface.clear(kColorGreen); } _font->drawString(s, text, tx, ty, r->width(), color); @@ -419,8 +405,8 @@ void Menu::renderSubmenu(MenuItem *menu) { // fake it here for (int ii = 0; ii < _tempSurface.h; ii++) { const byte *src = (const byte *)_tempSurface.getBasePtr(0, ii); - byte *dst = (byte *)_gui->_screen.getBasePtr(x, y+ii); - byte pat = _gui->_patterns[kPatternCheckers2 - 1][ii % 8]; + byte *dst = (byte *)_screen.getBasePtr(x, y+ii); + byte pat = _wm->getPatterns()[kPatternCheckers2 - 1][ii % 8]; for (int j = 0; j < r->width(); j++) { if (*src != kColorGreen && (pat & (1 << (7 - (x + j) % 8)))) *dst = *src; @@ -430,20 +416,51 @@ void Menu::renderSubmenu(MenuItem *menu) { } } } else { // Delimiter - Design::drawHLine(&_gui->_screen, r->left + 1, r->right - 1, y + kMenuDropdownItemHeight / 2, 1, kColorBlack, _gui->_patterns, kPatternStripes); + bool flip = r->left & 2; + byte *ptr = (byte *)_screen.getBasePtr(r->left + 1, y + kMenuDropdownItemHeight / 2); + for (int xx = r->left + 1; xx <= r->right - 1; xx++, ptr++) { + *ptr = flip ? kColorBlack : kColorWhite; + flip = !flip; + } } y += kMenuDropdownItemHeight; } - g_system->copyRectToScreen(_gui->_screen.getBasePtr(r->left, r->top), _gui->_screen.pitch, r->left, r->top, r->width() + 3, r->height() + 3); + _contentIsDirty = true; + //g_system->copyRectToScreen(_screen.getBasePtr(r->left, r->top), _screen.pitch, r->left, r->top, r->width() + 2, r->height() + 2); +} + +bool Menu::processEvent(Common::Event &event) { + switch (event.type) { + case Common::EVENT_KEYDOWN: + return keyEvent(event); + case Common::EVENT_LBUTTONDOWN: + return mouseClick(event.mouse.x, event.mouse.y); + case Common::EVENT_LBUTTONUP: + return mouseRelease(event.mouse.x, event.mouse.y); + case Common::EVENT_MOUSEMOVE: + return mouseMove(event.mouse.x, event.mouse.y); + default: + return false; + } +} + +bool Menu::keyEvent(Common::Event &event) { + if (event.type != Common::EVENT_KEYDOWN) + return false; + + if (event.kbd.flags & (Common::KBD_ALT | Common::KBD_CTRL | Common::KBD_META)) { + if (event.kbd.ascii >= 0x20 && event.kbd.ascii <= 0x7f) { + return processMenuShortCut(event.kbd.flags, event.kbd.ascii); + } + } + + return false; } bool Menu::mouseClick(int x, int y) { if (_bbox.contains(x, y)) { - if (!_menuActivated) - _screenCopy.copyFrom(_gui->_screen); - for (uint i = 0; i < _items.size(); i++) if (_items[i]->bbox.contains(x, y)) { if ((uint)_activeItem == i) @@ -454,14 +471,15 @@ bool Menu::mouseClick(int x, int y) { r.right += 3; r.bottom += 3; - _gui->_screen.copyRectToSurface(_screenCopy, r.left, r.top, r); - g_system->copyRectToScreen(_gui->_screen.getBasePtr(r.left, r.top), _gui->_screen.pitch, r.left, r.top, r.width() + 1, r.height() + 1); + _wm->setFullRefresh(true); } _activeItem = i; _activeSubItem = -1; _menuActivated = true; + _contentIsDirty = true; + return true; } } else if (_menuActivated && _items[_activeItem]->subbbox.contains(x, y)) { @@ -472,11 +490,13 @@ bool Menu::mouseClick(int x, int y) { _activeSubItem = numSubItem; renderSubmenu(_items[_activeItem]); + _contentIsDirty = true; } } else if (_menuActivated && _activeItem != -1) { _activeSubItem = -1; renderSubmenu(_items[_activeItem]); + _contentIsDirty = true; } return false; @@ -495,77 +515,49 @@ bool Menu::mouseRelease(int x, int y) { _menuActivated = false; if (_activeItem != -1 && _activeSubItem != -1 && _items[_activeItem]->subitems[_activeSubItem]->enabled) - executeCommand(_items[_activeItem]->subitems[_activeSubItem]); + (*_ccallback)(_items[_activeItem]->subitems[_activeSubItem]->action, + _items[_activeItem]->subitems[_activeSubItem]->text, _cdata); _activeItem = -1; _activeSubItem = -1; + _wm->setFullRefresh(true); + return true; } return false; } -void Menu::executeCommand(MenuSubItem *subitem) { - switch(subitem->action) { - case kMenuActionAbout: - case kMenuActionNew: - case kMenuActionOpen: - case kMenuActionClose: - case kMenuActionSave: - case kMenuActionSaveAs: - case kMenuActionRevert: - case kMenuActionQuit: - - case kMenuActionUndo: - _gui->actionUndo(); - break; - case kMenuActionCut: - _gui->actionCut(); - break; - case kMenuActionCopy: - _gui->actionCopy(); - break; - case kMenuActionPaste: - _gui->actionPaste(); - break; - case kMenuActionClear: - _gui->actionClear(); - break; - - case kMenuActionCommand: - _gui->_engine->processTurn(&subitem->text, NULL); - break; - - default: - warning("Unknown action: %d", subitem->action); - - } -} - -void Menu::processMenuShortCut(byte flags, uint16 ascii) { +bool Menu::processMenuShortCut(byte flags, uint16 ascii) { ascii = tolower(ascii); if (flags & (Common::KBD_CTRL | Common::KBD_META)) { for (uint i = 0; i < _items.size(); i++) for (uint j = 0; j < _items[i]->subitems.size(); j++) if (_items[i]->subitems[j]->enabled && tolower(_items[i]->subitems[j]->shortcut) == ascii) { - executeCommand(_items[i]->subitems[j]); - break; + (*_ccallback)(_items[i]->subitems[j]->action, _items[i]->subitems[j]->text, _cdata); + return true; } } + + return false; } void Menu::enableCommand(int menunum, int action, bool state) { for (uint i = 0; i < _items[menunum]->subitems.size(); i++) if (_items[menunum]->subitems[i]->action == action) _items[menunum]->subitems[i]->enabled = state; + + _contentIsDirty = true; } void Menu::disableAllMenus() { for (uint i = 1; i < _items.size(); i++) // Leave About menu on for (uint j = 0; j < _items[i]->subitems.size(); j++) _items[i]->subitems[j]->enabled = false; + + _contentIsDirty = true; } } // End of namespace Wage diff --git a/engines/wage/menu.h b/engines/wage/macmenu.h index 3550356bc6..e73e4c48a9 100644 --- a/engines/wage/menu.h +++ b/engines/wage/macmenu.h @@ -45,8 +45,8 @@ * */ -#ifndef WAGE_MENU_H -#define WAGE_MENU_H +#ifndef WAGE_MACMENU_H +#define WAGE_MACMENU_H namespace Wage { @@ -64,6 +64,7 @@ enum { }; enum { + kMenuHighLevel = -1, kMenuAbout = 0, kMenuFile = 1, kMenuEdit = 2, @@ -90,29 +91,43 @@ enum { kMenuActionCommand }; -class Menu { +struct MenuData { + int menunum; + const char *title; + int action; + byte shortcut; + bool enabled; +}; + +class Menu : public BaseMacWindow { public: - Menu(Gui *gui); + Menu(int id, const Common::Rect &bounds, MacWindowManager *wm); ~Menu(); - void render(); - bool mouseClick(int x, int y); - bool mouseRelease(int x, int y); - bool mouseMove(int x, int y); + void setCommandsCallback(void (*callback)(int, Common::String &, void *), void *data) { _ccallback = callback; _cdata = data; } + + void addStaticMenus(const MenuData *data); + void calcDimensions(); + + int addMenuItem(const char *name); + void addMenuSubItem(int id, const char *text, int action, int style = 0, char shortcut = 0, bool enabled = true); + void createSubMenuFromString(int id, const char *string); + void clearSubMenu(int id); + + bool draw(Graphics::ManagedSurface *g, bool forceRedraw = false); + bool processEvent(Common::Event &event); - void regenCommandsMenu(); - void regenWeaponsMenu(); - void processMenuShortCut(byte flags, uint16 ascii); void enableCommand(int menunum, int action, bool state); void disableAllMenus(); - bool _menuActivated; + void setActive(bool active) { _menuActivated = active; } + bool hasAllFocus() { return _menuActivated; } + Common::Rect _bbox; private: - Gui *_gui; - Graphics::Surface _screenCopy; - Graphics::Surface _tempSurface; + Graphics::ManagedSurface _screen; + Graphics::ManagedSurface _tempSurface; private: const Graphics::Font *getMenuFont(); @@ -120,18 +135,25 @@ private: int calculateMenuWidth(MenuItem *menu); void calcMenuBounds(MenuItem *menu); void renderSubmenu(MenuItem *menu); - void createCommandsMenu(MenuItem *menu); - void createWeaponsMenu(MenuItem *menu); - void executeCommand(MenuSubItem *subitem); + + bool keyEvent(Common::Event &event); + bool mouseClick(int x, int y); + bool mouseRelease(int x, int y); + bool mouseMove(int x, int y); + + bool processMenuShortCut(byte flags, uint16 ascii); Common::Array<MenuItem *> _items; - MenuItem *_weapons; - MenuItem *_commands; const Graphics::Font *_font; + bool _menuActivated; + int _activeItem; int _activeSubItem; + + void (*_ccallback)(int action, Common::String &text, void *data); + void *_cdata; }; } // End of namespace Wage diff --git a/engines/wage/macwindow.cpp b/engines/wage/macwindow.cpp new file mode 100644 index 0000000000..8903936061 --- /dev/null +++ b/engines/wage/macwindow.cpp @@ -0,0 +1,376 @@ +/* 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. + * + * MIT License: + * + * Copyright (c) 2009 Alexei Svitkine, Eugene Sandulenko + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#include "graphics/font.h" +#include "graphics/primitives.h" +#include "common/events.h" + +#include "wage/macwindow.h" +#include "wage/macwindowmanager.h" + +namespace Wage { + +BaseMacWindow::BaseMacWindow(int id, bool editable, MacWindowManager *wm) : + _id(id), _editable(editable), _wm(wm) { + _callback = 0; + _dataPtr = 0; + + _contentIsDirty = true; + + _type = kWindowUnknown; +} + +MacWindow::MacWindow(int id, bool scrollable, bool resizable, bool editable, MacWindowManager *wm) : + BaseMacWindow(id, editable, wm), _scrollable(scrollable), _resizable(resizable) { + _active = false; + _borderIsDirty = true; + + _highlightedPart = kBorderNone; + + _scrollPos = _scrollSize = 0.0; + + _beingDragged = false; + _beingResized = false; + + _draggedX = _draggedY = 0; + + _type = kWindowWindow; +} + +MacWindow::~MacWindow() { +} + +const Graphics::Font *MacWindow::getTitleFont() { + return _wm->getFont("Chicago-12", Graphics::FontManager::kBigGUIFont); +} + +void MacWindow::setActive(bool active) { + if (active == _active) + return; + + _active = active; + _borderIsDirty = true; +} + +void MacWindow::resize(int w, int h) { + if (_surface.w == w && _surface.h == h) + return; + + _surface.free(); + _surface.create(w, h, Graphics::PixelFormat::createFormatCLUT8()); + _borderSurface.free(); + _borderSurface.create(w, h, Graphics::PixelFormat::createFormatCLUT8()); + _composeSurface.free(); + _composeSurface.create(w, h, Graphics::PixelFormat::createFormatCLUT8()); + + _dims.setWidth(w); + _dims.setHeight(h); + + updateInnerDims(); + + _contentIsDirty = true; + _borderIsDirty = true; +} + +void MacWindow::move(int x, int y) { + if (_dims.left == x && _dims.top == y) + return; + + _dims.moveTo(x, y); + updateInnerDims(); + + _contentIsDirty = true; +} + +void MacWindow::setDimensions(const Common::Rect &r) { + resize(r.width(), r.height()); + _dims.moveTo(r.left, r.top); + updateInnerDims(); + + _contentIsDirty = true; +} + +bool MacWindow::draw(Graphics::ManagedSurface *g, bool forceRedraw) { + if (!_borderIsDirty && !_contentIsDirty && !forceRedraw) + return false; + + if (_borderIsDirty || forceRedraw) + drawBorder(); + + _contentIsDirty = false; + + // Compose + _composeSurface.blitFrom(_surface, Common::Rect(0, 0, _surface.w - 2, _surface.h - 2), Common::Point(2, 2)); + _composeSurface.transBlitFrom(_borderSurface, kColorGreen); + + g->transBlitFrom(_composeSurface, _composeSurface.getBounds(), Common::Point(_dims.left - 2, _dims.top - 2), kColorGreen2); + + return true; +} + +#define ARROW_W 12 +#define ARROW_H 6 +const int arrowPixels[ARROW_H][ARROW_W] = { + {0,0,0,0,0,1,1,0,0,0,0,0}, + {0,0,0,0,1,1,1,1,0,0,0,0}, + {0,0,0,1,1,1,1,1,1,0,0,0}, + {0,0,1,1,1,1,1,1,1,1,0,0}, + {0,1,1,1,1,1,1,1,1,1,1,0}, + {1,1,1,1,1,1,1,1,1,1,1,1}}; + +static void drawPixelInverted(int x, int y, int color, void *data) { + Graphics::ManagedSurface *surface = (Graphics::ManagedSurface *)data; + + if (x >= 0 && x < surface->w && y >= 0 && y < surface->h) { + byte *p = (byte *)surface->getBasePtr(x, y); + + *p = *p == kColorWhite ? kColorBlack : kColorWhite; + } +} + +void MacWindow::updateInnerDims() { + _innerDims = _dims; + _innerDims.grow(-kBorderWidth); +} + +void MacWindow::drawBorder() { + _borderIsDirty = false; + + bool active = _active, scrollable = _scrollable, closeable = _active, drawTitle = !_title.empty(); + const int size = kBorderWidth; + int x = 0; + int y = 0; + int width = _borderSurface.w; + int height = _borderSurface.h; + Graphics::ManagedSurface *g = &_borderSurface; + + // We draw rect with outer kColorGreen2 and inner kColorGreen, so on 2 passes we cut out + // scene by external shape of the border + int sz = kBorderWidth / 2; + g->clear(kColorGreen2); + g->fillRect(Common::Rect(sz, sz, width - sz, height - sz), kColorGreen); + + drawBox(g, x, y, size, size); + drawBox(g, x + width - size - 1, y, size, size); + drawBox(g, x + width - size - 1, y + height - size - 1, size, size); + drawBox(g, x, y + height - size - 1, size, size); + drawBox(g, x + size, y + 2, width - 2 * size - 1, size - 4); + drawBox(g, x + size, y + height - size + 1, width - 2 * size - 1, size - 4); + drawBox(g, x + 2, y + size, size - 4, height - 2 * size - 1); + drawBox(g, x + width - size + 1, y + size, size - 4, height - 2 * size - 1); + + if (active) { + fillRect(g, x + size, y + 5, width - 2 * size - 1, 8, kColorBlack); + fillRect(g, x + size, y + height - 13, width - 2 * size - 1, 8, kColorBlack); + fillRect(g, x + 5, y + size, 8, height - 2 * size - 1, kColorBlack); + if (!scrollable) { + fillRect(g, x + width - 13, y + size, 8, height - 2 * size - 1, kColorBlack); + } else { + int x1 = x + width - 15; + int y1 = y + size + 1; + + for (int yy = 0; yy < ARROW_H; yy++) { + for (int xx = 0; xx < ARROW_W; xx++) + g->hLine(x1 + xx, y1 + yy, x1 + xx, (arrowPixels[yy][xx] != 0 ? kColorBlack : kColorWhite)); + } + + fillRect(g, x + width - 13, y + size + ARROW_H, 8, height - 2 * size - 1 - ARROW_H * 2, kColorBlack); + + y1 += height - 2 * size - ARROW_H - 2; + for (int yy = 0; yy < ARROW_H; yy++) { + for (int xx = 0; xx < ARROW_W; xx++) + g->hLine(x1 + xx, y1 + yy, x1 + xx, (arrowPixels[ARROW_H - yy - 1][xx] != 0 ? kColorBlack : kColorWhite)); + } + + if (_highlightedPart == kBorderScrollUp || _highlightedPart == kBorderScrollDown) { + int rx1 = x + width - kBorderWidth + 2; + int ry1 = y + size + _dims.height() * _scrollPos; + int rx2 = rx1 + size - 4; + int ry2 = ry1 + _dims.height() * _scrollSize; + Common::Rect rr(rx1, ry1, rx2, ry2); + + Graphics::drawFilledRect(rr, kColorBlack, drawPixelInverted, g); + } + } + if (closeable) { + if (_highlightedPart == kBorderCloseButton) { + fillRect(g, x + 6, y + 6, 6, 6, kColorBlack); + } else { + drawBox(g, x + 5, y + 5, 7, 7); + } + } + } + + if (drawTitle) { + const Graphics::Font *font = getTitleFont(); + int yOff = _wm->hasBuiltInFonts() ? 3 : 1; + + int w = font->getStringWidth(_title) + 10; + int maxWidth = width - size * 2 - 7; + if (w > maxWidth) + w = maxWidth; + drawBox(g, x + (width - w) / 2, y, w, size); + font->drawString(g, _title, x + (width - w) / 2 + 5, y + yOff, w, kColorBlack); + } +} + +void MacWindow::setHighlight(WindowClick highlightedPart) { + if (_highlightedPart == highlightedPart) + return; + + _highlightedPart = highlightedPart; + _borderIsDirty = true; + } + + void MacWindow::setScroll(float scrollPos, float scrollSize) { + if (_scrollPos == scrollPos && _scrollSize == scrollSize) + return; + + _scrollPos = scrollPos; + _scrollSize = scrollSize; + _borderIsDirty = true; + } + + +void MacWindow::drawBox(Graphics::ManagedSurface *g, int x, int y, int w, int h) { + Common::Rect r(x, y, x + w + 1, y + h + 1); + + g->fillRect(r, kColorWhite); + g->frameRect(r, kColorBlack); +} + +void MacWindow::fillRect(Graphics::ManagedSurface *g, int x, int y, int w, int h, int color) { + Common::Rect r(x, y, x + w, y + h); + + g->fillRect(r, color); +} + +WindowClick MacWindow::isInBorder(int x, int y) { + if (_innerDims.contains(x, y)) + return kBorderInner; + + if (x >= _innerDims.left - kBorderWidth && x < _innerDims.left && y >= _innerDims.top - kBorderWidth && y < _innerDims.top) + return kBorderCloseButton; + + if (_resizable) + if (x >= _innerDims.right && x < _innerDims.right + kBorderWidth && y >= _innerDims.bottom && y < _innerDims.bottom + kBorderWidth) + return kBorderResizeButton; + + if (_scrollable && x >= _innerDims.right && x < _innerDims.right + kBorderWidth) { + if (y < _innerDims.top - kBorderWidth) + return kBorderBorder; + + if (y >= _innerDims.bottom + kBorderWidth) + return kBorderBorder; + + if (y >= _innerDims.top + _innerDims.height() / 2) + return kBorderScrollDown; + + return kBorderScrollUp; + } + + return kBorderBorder; +} + +bool MacWindow::processEvent(Common::Event &event) { + WindowClick click = isInBorder(event.mouse.x, event.mouse.y); + + switch (event.type) { + case Common::EVENT_MOUSEMOVE: + if (_beingDragged) { + _dims.translate(event.mouse.x - _draggedX, event.mouse.y - _draggedY); + updateInnerDims(); + + _draggedX = event.mouse.x; + _draggedY = event.mouse.y; + + _wm->setFullRefresh(true); + } + + if (_beingResized) { + resize(MAX(kBorderWidth * 4, _dims.width() + event.mouse.x - _draggedX), + MAX(kBorderWidth * 4, _dims.height() + event.mouse.y - _draggedY)); + + _draggedX = event.mouse.x; + _draggedY = event.mouse.y; + + _wm->setFullRefresh(true); + (*_callback)(click, event, _dataPtr); + } + break; + case Common::EVENT_LBUTTONDOWN: + setHighlight(click); + + if (click == kBorderBorder) { + _beingDragged = true; + + _draggedX = event.mouse.x; + _draggedY = event.mouse.y; + } + + if (click == kBorderResizeButton) { + _beingResized = true; + + _draggedX = event.mouse.x; + _draggedY = event.mouse.y; + } + + break; + case Common::EVENT_LBUTTONUP: + _beingDragged = false; + _beingResized = false; + + setHighlight(kBorderNone); + break; + default: + return false; + } + + return (*_callback)(click, event, _dataPtr); +} + +} // End of namespace Wage diff --git a/engines/wage/macwindow.h b/engines/wage/macwindow.h new file mode 100644 index 0000000000..4c6e9efeff --- /dev/null +++ b/engines/wage/macwindow.h @@ -0,0 +1,161 @@ +/* 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. + * + * MIT License: + * + * Copyright (c) 2009 Alexei Svitkine, Eugene Sandulenko + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef WAGE_MACWINDOW_H +#define WAGE_MACWINDOW_H + +#include "graphics/managed_surface.h" + +namespace Wage { + +class MacWindowManager; + +enum WindowType { + kWindowUnknown, + kWindowWindow, + kWindowMenu +}; + +enum { + kBorderWidth = 17 +}; + +enum WindowClick { + kBorderNone = 0, + kBorderScrollUp, + kBorderScrollDown, + kBorderCloseButton, + kBorderInner, + kBorderBorder, + kBorderResizeButton +}; + +class BaseMacWindow { +public: + BaseMacWindow(int id, bool editable, MacWindowManager *wm); + virtual ~BaseMacWindow() {} + + const Common::Rect &getDimensions() { return _dims; } + int getId() { return _id; } + WindowType getType() { return _type; } + bool isEditable() { return _editable; } + Graphics::ManagedSurface *getSurface() { return &_surface; } + virtual void setActive(bool active) = 0; + void setDirty(bool dirty) { _contentIsDirty = dirty; } + + virtual bool draw(Graphics::ManagedSurface *g, bool forceRedraw = false) = 0; + virtual bool processEvent(Common::Event &event) = 0; + + virtual bool hasAllFocus() = 0; + + void setCallback(bool (*callback)(WindowClick, Common::Event &, void *), void *data) { _callback = callback; _dataPtr = data; } + +protected: + int _id; + WindowType _type; + + bool _editable; + + Graphics::ManagedSurface _surface; + bool _contentIsDirty; + + Common::Rect _dims; + + bool (*_callback)(WindowClick, Common::Event &, void *); + void *_dataPtr; + + MacWindowManager *_wm; +}; + +class MacWindow : public BaseMacWindow { +public: + MacWindow(int id, bool scrollable, bool resizable, bool editable, MacWindowManager *wm); + virtual ~MacWindow(); + void move(int x, int y); + void resize(int w, int h); + void setDimensions(const Common::Rect &r); + const Common::Rect &getInnerDimensions() { return _innerDims; } + + bool draw(Graphics::ManagedSurface *g, bool forceRedraw = false); + + void setActive(bool active); + void setTitle(Common::String &title) { _title = title; } + void setHighlight(WindowClick highlightedPart); + void setScroll(float scrollPos, float scrollSize); + bool processEvent(Common::Event &event); + bool hasAllFocus() { return _beingDragged || _beingResized; } + +private: + void drawBorder(); + void drawBox(Graphics::ManagedSurface *g, int x, int y, int w, int h); + void fillRect(Graphics::ManagedSurface *g, int x, int y, int w, int h, int color); + const Graphics::Font *getTitleFont(); + void updateInnerDims(); + WindowClick isInBorder(int x, int y); + +private: + Graphics::ManagedSurface _borderSurface; + Graphics::ManagedSurface _composeSurface; + bool _scrollable; + bool _resizable; + bool _active; + bool _borderIsDirty; + + bool _beingDragged, _beingResized; + int _draggedX, _draggedY; + + WindowClick _highlightedPart; + float _scrollPos, _scrollSize; + + Common::Rect _innerDims; + + Common::String _title; +}; + +} // End of namespace Wage + +#endif diff --git a/engines/wage/macwindowmanager.cpp b/engines/wage/macwindowmanager.cpp new file mode 100644 index 0000000000..5cc54d648a --- /dev/null +++ b/engines/wage/macwindowmanager.cpp @@ -0,0 +1,380 @@ +/* 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. + * + * MIT License: + * + * Copyright (c) 2009 Alexei Svitkine, Eugene Sandulenko + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#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 "wage/macwindowmanager.h" +#include "wage/macwindow.h" +#include "wage/macmenu.h" + +namespace Wage { + +static const byte palette[] = { + 0, 0, 0, // Black + 0x80, 0x80, 0x80, // Gray + 0xff, 0xff, 0xff, // White + 0x00, 0xff, 0x00, // Green + 0x00, 0xcf, 0x00 // Green2 +}; + +static byte fillPatterns[][8] = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, // kPatternSolid + { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 }, // kPatternStripes + { 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55 }, // kPatternCheckers + { 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa } // kPatternCheckers2 +}; + +static const byte macCursorArrow[] = { + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 0, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 0, 0, 2, 3, 3, 3, 3, 3, 3, 3, + 2, 0, 0, 0, 2, 3, 3, 3, 3, 3, 3, + 2, 0, 0, 0, 0, 2, 3, 3, 3, 3, 3, + 2, 0, 0, 0, 0, 0, 2, 3, 3, 3, 3, + 2, 0, 0, 0, 0, 0, 0, 2, 3, 3, 3, + 2, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, + 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, + 2, 0, 0, 2, 0, 0, 2, 3, 3, 3, 3, + 2, 0, 2, 3, 2, 0, 0, 2, 3, 3, 3, + 2, 2, 3, 3, 2, 0, 0, 2, 3, 3, 3, + 2, 3, 3, 3, 3, 2, 0, 0, 2, 3, 3, + 3, 3, 3, 3, 3, 2, 0, 0, 2, 3, 3, + 3, 3, 3, 3, 3, 3, 2, 2, 2, 3, 3 +}; + +static const byte macCursorBeam[] = { + 0, 0, 3, 3, 3, 0, 0, 3, 3, 3, 3, + 3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 3, + 0, 0, 3, 3, 3, 0, 0, 3, 3, 3, 3, +}; + +MacWindowManager::MacWindowManager() { + _screen = 0; + _lastId = 0; + _activeWindow = -1; + + _menu = 0; + + _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); + + CursorMan.replaceCursorPalette(palette, 0, ARRAYSIZE(palette) / 3); + CursorMan.replaceCursor(macCursorArrow, 11, 16, 1, 1, 3); + _cursorIsArrow = true; + CursorMan.showMouse(true); +} + +MacWindowManager::~MacWindowManager() { + for (int i = 0; i < _lastId; i++) + delete _windows[i]; +} + +MacWindow *MacWindowManager::addWindow(bool scrollable, bool resizable, bool editable) { + MacWindow *w = new MacWindow(_lastId, scrollable, resizable, editable, this); + + _windows.push_back(w); + _windowStack.push_back(w); + + setActive(_lastId); + + _lastId++; + + return w; +} + +Menu *MacWindowManager::addMenu() { + _menu = new Menu(_lastId, _screen->getBounds(), this); + + _windows.push_back(_menu); + + _lastId++; + + return _menu; +} + +void MacWindowManager::setActive(int id) { + if (_activeWindow == id) + return; + + if (_activeWindow != -1) + _windows[_activeWindow]->setActive(false); + + _activeWindow = id; + + _windows[id]->setActive(true); + + _windowStack.remove(_windows[id]); + _windowStack.push_back(_windows[id]); + + _fullRefresh = true; +} + +struct PlotData { + Graphics::ManagedSurface *surface; + Patterns *patterns; + uint fillType; + int thickness; + + PlotData(Graphics::ManagedSurface *s, Patterns *p, int f, int t) : + surface(s), patterns(p), fillType(f), thickness(t) {} +}; + +static void drawPixel(int x, int y, int color, void *data) { + PlotData *p = (PlotData *)data; + + if (p->fillType > p->patterns->size()) + return; + + byte *pat = p->patterns->operator[](p->fillType - 1); + + if (p->thickness == 1) { + if (x >= 0 && x < p->surface->w && y >= 0 && y < p->surface->h) { + uint xu = (uint)x; // for letting compiler optimize it + uint yu = (uint)y; + + *((byte *)p->surface->getBasePtr(xu, yu)) = + (pat[yu % 8] & (1 << (7 - xu % 8))) ? + color : kColorWhite; + } + } else { + int x1 = x; + int x2 = x1 + p->thickness; + int y1 = y; + int y2 = y1 + p->thickness; + + for (y = y1; y < y2; y++) + for (x = x1; x < x2; x++) + if (x >= 0 && x < p->surface->w && y >= 0 && y < p->surface->h) { + uint xu = (uint)x; // for letting compiler optimize it + uint yu = (uint)y; + *((byte *)p->surface->getBasePtr(xu, yu)) = + (pat[yu % 8] & (1 << (7 - xu % 8))) ? + color : kColorWhite; + } + } +} + +void MacWindowManager::drawDesktop() { + Common::Rect r(_screen->getBounds()); + + PlotData pd(_screen, &_patterns, kPatternCheckers, 1); + + Graphics::drawRoundRect(r, kDesktopArc, kColorBlack, true, drawPixel, &pd); + + g_system->copyRectToScreen(_screen->getPixels(), _screen->pitch, 0, 0, _screen->w, _screen->h); +} + +void MacWindowManager::draw() { + assert(_screen); + + if (_fullRefresh) + drawDesktop(); + + for (Common::List<BaseMacWindow *>::const_iterator it = _windowStack.begin(); it != _windowStack.end(); it++) { + BaseMacWindow *w = *it; + if (w->draw(_screen, _fullRefresh)) { + w->setDirty(false); + + Common::Rect clip(w->getDimensions().left - 2, w->getDimensions().top - 2, w->getDimensions().right - 2, w->getDimensions().bottom - 2); + clip.clip(_screen->getBounds()); + + g_system->copyRectToScreen(_screen->getBasePtr(clip.left, clip.top), _screen->pitch, clip.left, clip.top, clip.width(), clip.height()); + } + } + + // Menu is drawn on top of everything and always + if (_menu) + _menu->draw(_screen, _fullRefresh); + + _fullRefresh = false; +} + +bool MacWindowManager::processEvent(Common::Event &event) { + // Menu gets events first fir shortcuts and menu bar + if (_menu && _menu->processEvent(event)) + return true; + + if (event.type != Common::EVENT_MOUSEMOVE && event.type != Common::EVENT_LBUTTONDOWN && + event.type != Common::EVENT_LBUTTONUP) + return false; + + if (_windows[_activeWindow]->isEditable() && _windows[_activeWindow]->getType() == kWindowWindow && + ((MacWindow *)_windows[_activeWindow])->getInnerDimensions().contains(event.mouse.x, event.mouse.y)) { + if (_cursorIsArrow) { + CursorMan.replaceCursor(macCursorBeam, 11, 16, 3, 8, 3); + _cursorIsArrow = false; + } + } else { + if (_cursorIsArrow == false) { + CursorMan.replaceCursor(macCursorArrow, 11, 16, 1, 1, 3); + _cursorIsArrow = true; + } + } + + for (Common::List<BaseMacWindow *>::const_iterator it = _windowStack.end(); it != _windowStack.begin();) { + it--; + BaseMacWindow *w = *it; + + if (w->hasAllFocus() || w->getDimensions().contains(event.mouse.x, event.mouse.y)) { + if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_LBUTTONUP) + setActive(w->getId()); + + return w->processEvent(event); + } + } + + return false; +} + +////////////////////// +// 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; +} + +///////////////// +// Cursor stuff +///////////////// +void MacWindowManager::pushArrowCursor() { + CursorMan.pushCursor(macCursorArrow, 11, 16, 1, 1, 3); +} + +void MacWindowManager::popCursor() { + CursorMan.popCursor(); +} + + +} // End of namespace Wage diff --git a/engines/wage/macwindowmanager.h b/engines/wage/macwindowmanager.h new file mode 100644 index 0000000000..13f85cddd4 --- /dev/null +++ b/engines/wage/macwindowmanager.h @@ -0,0 +1,141 @@ +/* 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. + * + * MIT License: + * + * Copyright (c) 2009 Alexei Svitkine, Eugene Sandulenko + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef WAGE_MACWINDOWMANAGER_H +#define WAGE_MACWINDOWMANAGER_H + +#include "common/array.h" +#include "common/list.h" +#include "common/events.h" +#include "common/archive.h" + +#include "graphics/fontman.h" + +namespace Graphics { +class ManagedSurface; +} + +namespace Wage { + +enum { + kDesktopArc = 7 +}; + +enum { + kColorBlack = 0, + kColorGray = 1, + kColorWhite = 2, + kColorGreen = 3, + kColorGreen2 = 4 +}; + +enum { + kPatternSolid = 1, + kPatternStripes = 2, + kPatternCheckers = 3, + kPatternCheckers2 = 4 +}; + +class BaseMacWindow; +class MacWindow; +class Menu; + +typedef Common::Array<byte *> Patterns; + +class MacWindowManager { +public: + MacWindowManager(); + ~MacWindowManager(); + + void setScreen(Graphics::ManagedSurface *screen) { _screen = screen; } + bool hasBuiltInFonts() { return _builtInFonts; } + const Graphics::Font *getFont(const char *name, Graphics::FontManager::FontUsage fallback); + + MacWindow *addWindow(bool scrollable, bool resizable, bool editable); + Menu *addMenu(); + void setActive(int id); + + void setFullRefresh(bool redraw) { _fullRefresh = true; } + + void draw(); + + bool processEvent(Common::Event &event); + + BaseMacWindow *getWindow(int id) { return _windows[id]; } + + Patterns &getPatterns() { return _patterns; } + void drawFilledRoundRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int arc, int color); + + void pushArrowCursor(); + void popCursor(); + +private: + void drawDesktop(); + void loadFonts(); + +private: + Graphics::ManagedSurface *_screen; + + Common::List<BaseMacWindow *> _windowStack; + Common::Array<BaseMacWindow *> _windows; + + int _lastId; + int _activeWindow; + + bool _fullRefresh; + + Patterns _patterns; + + Menu *_menu; + + bool _builtInFonts; + bool _cursorIsArrow; +}; + +} // End of namespace Wage + +#endif diff --git a/engines/wage/module.mk b/engines/wage/module.mk index 21316bbf83..e150d5f27e 100644 --- a/engines/wage/module.mk +++ b/engines/wage/module.mk @@ -9,7 +9,9 @@ MODULE_OBJS := \ entities.o \ gui.o \ gui-console.o \ - menu.o \ + macmenu.o \ + macwindow.o \ + macwindowmanager.o \ randomhat.o \ script.o \ sound.o \ diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index 294c08ed82..61336dce88 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -1099,7 +1099,7 @@ struct Mapping { { "\?\?\?(0xf5)", OPCODE }, { "\?\?\?(0xf6)", OPCODE }, { "\?\?\?(0xf7)", OPCODE }, - { "\?\?\?(0xf8)", OPCODE }, // 0xa8 + { "\?\?\?(0xf8)", OPCODE }, // 0xf8 { "\?\?\?(0xf9)", OPCODE }, { "\?\?\?(0xfa)", OPCODE }, { "\?\?\?(0xfb)", OPCODE }, diff --git a/engines/wage/util.cpp b/engines/wage/util.cpp index f31a83ca04..8c8af6652e 100644 --- a/engines/wage/util.cpp +++ b/engines/wage/util.cpp @@ -122,4 +122,17 @@ const char *getGenderSpecificPronoun(int gender, bool capitalize) { return capitalize ? "It" : "it"; } +bool isStorageScene(const Common::String &name) { + if (name.equalsIgnoreCase(STORAGESCENE)) + return true; + + if (name.equalsIgnoreCase("STROAGE@")) // Jumble + return true; + + if (name.equalsIgnoreCase("STORAGE@@")) // Jumble + return true; + + return false; +} + } // End of namespace Wage diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index e0299c8da2..567e2768d8 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -86,6 +86,7 @@ WageEngine::WageEngine(OSystem *syst, const ADGameDescription *desc) : Engine(sy _offer = NULL; _resManager = NULL; + _debugger = NULL; debug("WageEngine::WageEngine()"); } @@ -148,24 +149,14 @@ void WageEngine::processEvents() { Common::Event event; while (_eventMan->pollEvent(event)) { + if (_gui->processEvent(event)) + continue; + switch (event.type) { case Common::EVENT_QUIT: if (saveDialog()) _shouldQuit = true; break; - case Common::EVENT_MOUSEMOVE: - _gui->mouseMove(event.mouse.x, event.mouse.y); - break; - case Common::EVENT_LBUTTONDOWN: - _gui->mouseDown(event.mouse.x, event.mouse.y); - break; - case Common::EVENT_LBUTTONUP: - { - Designed *obj = _gui->mouseUp(event.mouse.x, event.mouse.y); - if (obj != NULL) - processTurn(NULL, obj); - } - break; case Common::EVENT_KEYDOWN: switch (event.kbd.keycode) { case Common::KEYCODE_BACKSPACE: @@ -189,13 +180,6 @@ void WageEngine::processEvents() { break; } - if (event.kbd.flags & (Common::KBD_ALT | Common::KBD_CTRL | Common::KBD_META)) { - if (event.kbd.ascii >= 0x20 && event.kbd.ascii <= 0x7f) { - _gui->processMenuShortCut(event.kbd.flags, event.kbd.ascii); - } - break; - } - if (event.kbd.ascii >= 0x20 && event.kbd.ascii <= 0x7f) { _inputText += (char)event.kbd.ascii; _gui->drawInput(); @@ -236,7 +220,6 @@ void WageEngine::gameOver() { _gui->disableAllMenus(); _gui->enableNewGameMenus(); - _gui->_menuDirty = true; } bool WageEngine::saveDialog() { @@ -281,15 +264,16 @@ void WageEngine::performInitialSetup() { debug(5, "Resetting Owners: %d", _world->_orderedObjs.size()); for (uint i = 0; i < _world->_orderedObjs.size(); i++) { Obj *obj = _world->_orderedObjs[i]; - if (!obj->_sceneOrOwner.equalsIgnoreCase(STORAGESCENE)) { + if (!isStorageScene(obj->_sceneOrOwner)) { Common::String location = obj->_sceneOrOwner; location.toLowercase(); - if (_world->_scenes.contains(location)) { - _world->move(obj, _world->_scenes[location]); + Scene *scene = getSceneByName(location); + if (scene != NULL) { + _world->move(obj, scene); } else { if (!_world->_chrs.contains(location)) { // Note: PLAYER@ is not a valid target here. - warning("Couldn't move %s to %s", obj->_name.c_str(), obj->_sceneOrOwner.c_str()); + warning("Couldn't move %s to \"%s\"", obj->_name.c_str(), obj->_sceneOrOwner.c_str()); } else { // TODO: Add check for max items. _world->move(obj, _world->_chrs[location]); @@ -301,7 +285,7 @@ void WageEngine::performInitialSetup() { bool playerPlaced = false; for (uint i = 0; i < _world->_orderedChrs.size(); i++) { Chr *chr = _world->_orderedChrs[i]; - if (!chr->_initialScene.equalsIgnoreCase(STORAGESCENE)) { + if (!isStorageScene(chr->_initialScene)) { Common::String key = chr->_initialScene; key.toLowercase(); if (_world->_scenes.contains(key) && _world->_scenes[key] != NULL) { @@ -328,13 +312,14 @@ void WageEngine::doClose() { } Scene *WageEngine::getSceneByName(Common::String &location) { - Scene *scene; if (location.equals("random@")) { - scene = _world->getRandomScene(); + return _world->getRandomScene(); } else { - scene = _world->_scenes[location]; + if (_world->_scenes.contains(location)) + return _world->_scenes[location]; + else + return NULL; } - return scene; } void WageEngine::onMove(Designed *what, Designed *from, Designed *to) { @@ -386,6 +371,7 @@ void WageEngine::onMove(Designed *what, Designed *from, Designed *to) { if (!_temporarilyHidden) { if (to == currentScene || from == currentScene) { redrawScene(); + g_system->updateScreen(); g_system->delayMillis(100); } } @@ -397,6 +383,7 @@ void WageEngine::redrawScene() { if (currentScene != NULL) { bool firstTime = (_lastScene != currentScene); + _gui->draw(); updateSoundTimerForScene(currentScene, firstTime); } } diff --git a/engines/wage/wage.h b/engines/wage/wage.h index 8ca306aea3..eb50a2e3dd 100644 --- a/engines/wage/wage.h +++ b/engines/wage/wage.h @@ -75,6 +75,8 @@ typedef Common::Array<Chr *> ChrArray; typedef Common::List<Obj *> ObjList; typedef Common::List<Chr *> ChrList; +#define STORAGESCENE "STORAGE@" + enum OperandType { OBJ = 0, CHR = 1, @@ -101,21 +103,12 @@ enum { // the current limitation is 32 debug levels (1 << 31 is the last one) }; -enum { - kColorBlack = 0, - kColorGray = 1, - kColorWhite = 2, - kColorGreen = 3 -}; - Common::String readPascalString(Common::SeekableReadStream *in); Common::Rect *readRect(Common::SeekableReadStream *in); const char *getIndefiniteArticle(const Common::String &word); const char *prependGenderSpecificPronoun(int gender); const char *getGenderSpecificPronoun(int gender, bool capitalize); - - -typedef Common::Array<byte *> Patterns; +bool isStorageScene(const Common::String &name); class WageEngine : public Engine { friend class Dialog; diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp index 40b1555e35..53fc1b4742 100644 --- a/engines/wage/world.cpp +++ b/engines/wage/world.cpp @@ -73,6 +73,8 @@ World::World(WageEngine *engine) { _weaponMenuDisabled = true; _engine = engine; + + _patterns = new Patterns; } World::~World() { @@ -88,8 +90,10 @@ World::~World() { for (uint i = 0; i < _orderedScenes.size(); i++) delete _orderedScenes[i]; - for (uint i = 0; i < _patterns.size(); i++) - free(_patterns[i]); + for (uint i = 0; i < _patterns->size(); i++) + free(_patterns->operator[](i)); + + delete _patterns; delete _globalScript; @@ -105,6 +109,18 @@ bool World::loadWorld(Common::MacResManager *resMan) { Common::SeekableReadStream *res; Common::MacResIDArray::const_iterator iter; + // Dumping interpreter code +#if 1 + res = resMan->getResource(MKTAG('C','O','D','E'), 1); + warning("code size: %d", res->size()); + byte *buf = (byte *)malloc(res->size()); + res->read(buf, res->size()); + Common::DumpFile out; + out.open("code.bin"); + out.write(buf, res->size()); + out.close(); +#endif + if ((resArray = resMan->getResIDArray(MKTAG('G','C','O','D'))).size() == 0) return false; @@ -249,7 +265,7 @@ bool World::loadWorld(Common::MacResManager *resMan) { byte *pattern = (byte *)malloc(8); res->read(pattern, 8); - _patterns.push_back(pattern); + _patterns->push_back(pattern); } delete res; @@ -262,7 +278,7 @@ bool World::loadWorld(Common::MacResManager *resMan) { byte *pattern = (byte *)malloc(8); res->read(pattern, 8); - _patterns.push_back(pattern); + _patterns->push_back(pattern); } } delete res; @@ -419,7 +435,7 @@ static bool objComparator(const Obj *o1, const Obj *o2) { bool o1Immobile = (o1->_type == Obj::IMMOBILE_OBJECT); bool o2Immobile = (o2->_type == Obj::IMMOBILE_OBJECT); if (o1Immobile == o2Immobile) { - return o1->_index - o2->_index; + return o1->_index < o2->_index; } return o1Immobile; } diff --git a/engines/wage/world.h b/engines/wage/world.h index e9041139df..468bedbc59 100644 --- a/engines/wage/world.h +++ b/engines/wage/world.h @@ -48,9 +48,9 @@ #ifndef WAGE_WORLD_H #define WAGE_WORLD_H -namespace Wage { +#include "wage/macwindowmanager.h" -#define STORAGESCENE "STORAGE@" +namespace Wage { class Sound; @@ -87,7 +87,7 @@ public: ObjArray _orderedObjs; ChrArray _orderedChrs; Common::Array<Sound *> _orderedSounds; - Patterns _patterns; + Patterns *_patterns; Scene *_storageScene; Chr *_player; //List<MoveListener> moveListeners; diff --git a/engines/wintermute/base/base_engine.cpp b/engines/wintermute/base/base_engine.cpp index 2166a3e070..4ce334aceb 100644 --- a/engines/wintermute/base/base_engine.cpp +++ b/engines/wintermute/base/base_engine.cpp @@ -84,7 +84,7 @@ void BaseEngine::LOG(bool res, const char *fmt, ...) { va_end(va); if (instance()._gameRef) { - instance()._gameRef->LOG("%s", buff); + instance()._gameRef->LOG(res, "%s", buff); } else { debugCN(kWintermuteDebugLog, "%02d:%02d:%02d: %s\n", hours, mins, secs, buff); } diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp index 39462f7a15..5a694e7ce2 100644 --- a/engines/wintermute/base/base_persistence_manager.cpp +++ b/engines/wintermute/base/base_persistence_manager.cpp @@ -183,7 +183,7 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des } } - desc.setSaveDate(_savedTimestamp.tm_year, _savedTimestamp.tm_mon, _savedTimestamp.tm_mday); + desc.setSaveDate(_savedTimestamp.tm_year + 1900, _savedTimestamp.tm_mon + 1, _savedTimestamp.tm_mday); desc.setSaveTime(_savedTimestamp.tm_hour, _savedTimestamp.tm_min); desc.setPlayTime(0); } diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp index f1e0c3b1f9..74c0086817 100644 --- a/engines/wintermute/base/sound/base_sound_manager.cpp +++ b/engines/wintermute/base/sound/base_sound_manager.cpp @@ -100,15 +100,14 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M BaseSoundBuffer *sound; Common::String useFilename = filename; + useFilename.toLowercase(); // try to switch WAV to OGG file (if available) - AnsiString ext = PathUtil::getExtension(filename); - if (StringUtil::compareNoCase(ext, "wav")) { - AnsiString path = PathUtil::getDirectoryName(filename); - AnsiString name = PathUtil::getFileNameWithoutExtension(filename); - - AnsiString newFile = PathUtil::combine(path, name + "ogg"); - if (BaseFileManager::getEngineInstance()->hasFile(newFile)) { - useFilename = newFile; + if (useFilename.hasSuffix(".wav")) { + Common::String oggFilename = useFilename; + oggFilename.erase(oggFilename.size() - 4); + oggFilename = oggFilename + ".ogg"; + if (BaseFileManager::getEngineInstance()->hasFile(oggFilename)) { + useFilename = oggFilename; } } diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp index 9f3cdeaaa3..34341d1db2 100644 --- a/engines/wintermute/ui/ui_window.cpp +++ b/engines/wintermute/ui/ui_window.cpp @@ -139,13 +139,12 @@ bool UIWindow::display(int offsetX, int offsetY) { _shieldButton->setListener(this, _shieldButton, 0); _shieldButton->_parent = this; } - if (_shieldButton) { - _shieldButton->_posX = _shieldButton->_posY = 0; - _shieldButton->setWidth(_gameRef->_renderer->getWidth()); - _shieldButton->setHeight(_gameRef->_renderer->getHeight()); - _shieldButton->display(); - } + _shieldButton->_posX = _shieldButton->_posY = 0; + _shieldButton->setWidth(_gameRef->_renderer->getWidth()); + _shieldButton->setHeight(_gameRef->_renderer->getHeight()); + + _shieldButton->display(); } if (!_visible) { diff --git a/engines/zvision/core/events.cpp b/engines/zvision/core/events.cpp index cc1c00b6d0..767101b952 100644 --- a/engines/zvision/core/events.cpp +++ b/engines/zvision/core/events.cpp @@ -35,6 +35,7 @@ #include "common/events.h" #include "common/system.h" #include "common/rational.h" +#include "audio/mixer.h" #include "engines/util.h" diff --git a/engines/zvision/scripting/actions.h b/engines/zvision/scripting/actions.h index bde1baa291..98d216a6d5 100644 --- a/engines/zvision/scripting/actions.h +++ b/engines/zvision/scripting/actions.h @@ -26,8 +26,6 @@ #include "common/str.h" #include "common/rect.h" -#include "audio/mixer.h" - namespace ZVision { // Forward declaration of ZVision. This file is included before ZVision is declared diff --git a/engines/zvision/sound/midi.cpp b/engines/zvision/sound/midi.cpp index 3dd66ff2d4..9366f9e1e4 100644 --- a/engines/zvision/sound/midi.cpp +++ b/engines/zvision/sound/midi.cpp @@ -22,6 +22,7 @@ #include "common/scummsys.h" #include "common/textconsole.h" +#include "audio/mididrv.h" #include "zvision/sound/midi.h" diff --git a/engines/zvision/sound/midi.h b/engines/zvision/sound/midi.h index a3bac19636..020c65c9f7 100644 --- a/engines/zvision/sound/midi.h +++ b/engines/zvision/sound/midi.h @@ -23,7 +23,7 @@ #ifndef ZVISION_MIDI_H #define ZVISION_MIDI_H -#include "audio/mididrv.h" +class MidiDriver; namespace ZVision { diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp index b0d69c5f94..05db284f62 100644 --- a/engines/zvision/zvision.cpp +++ b/engines/zvision/zvision.cpp @@ -34,13 +34,13 @@ #include "zvision/text/text.h" #include "zvision/text/truetype_font.h" #include "zvision/sound/midi.h" -#include "zvision/file/zfs_archive.h" #include "common/config-manager.h" #include "common/str.h" #include "common/debug.h" #include "common/debug-channels.h" #include "common/textconsole.h" +#include "common/timer.h" #include "common/error.h" #include "common/system.h" #include "common/file.h" diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 26f0ced625..258d935440 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -2256,6 +2256,9 @@ drawBorderRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, template<typename PixelType> void VectorRendererAA<PixelType>:: drawInteriorRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, VectorRenderer::FillMode fill_m) { + w -= 2*Base::_strokeWidth; + h -= 2*Base::_strokeWidth; + // Do not draw empty space rounded squares. if (w <= 0 || h <= 0) { return; @@ -2272,8 +2275,6 @@ drawInteriorRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType colo r -= Base::_strokeWidth; x1 += Base::_strokeWidth; y1 += Base::_strokeWidth; - w -= 2*Base::_strokeWidth; - h -= 2*Base::_strokeWidth; rsq = r*r; PixelType *ptr_tl = (PixelType *)Base::_activeSurface->getBasePtr(x1 + r, y1 + r); diff --git a/graphics/font.cpp b/graphics/font.cpp index dba48249bc..97662dc15d 100644 --- a/graphics/font.cpp +++ b/graphics/font.cpp @@ -21,6 +21,7 @@ */ #include "graphics/font.h" +#include "graphics/managed_surface.h" #include "common/array.h" #include "common/util.h" @@ -264,6 +265,14 @@ int Font::getStringWidth(const Common::U32String &str) const { return getStringWidthImpl(*this, str); } +void Font::drawChar(ManagedSurface *dst, uint32 chr, int x, int y, uint32 color) const { + drawChar(&dst->_innerSurface, chr, x, y, color); + + Common::Rect charBox = getBoundingBox(chr); + charBox.translate(x, y); + dst->addDirtyRect(charBox); +} + void Font::drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const { Common::String renderStr = useEllipsis ? handleEllipsis(str, w) : str; drawStringImpl(*this, dst, renderStr, x, y, w, color, align, deltax); @@ -273,6 +282,20 @@ void Font::drawString(Surface *dst, const Common::U32String &str, int x, int y, drawStringImpl(*this, dst, str, x, y, w, color, align, 0); } +void Font::drawString(ManagedSurface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const { + drawString(&dst->_innerSurface, str, x, y, w, color, align, deltax, useEllipsis); + if (w != 0) { + dst->addDirtyRect(getBoundingBox(str, x, y, w, align, deltax, useEllipsis)); + } +} + +void Font::drawString(ManagedSurface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align) const { + drawString(&dst->_innerSurface, str, x, y, w, color, align); + if (w != 0) { + dst->addDirtyRect(getBoundingBox(str, x, y, w, align)); + } +} + int Font::wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const { return wordWrapTextImpl(*this, str, maxWidth, lines); } diff --git a/graphics/font.h b/graphics/font.h index 35f6792d7f..0478608708 100644 --- a/graphics/font.h +++ b/graphics/font.h @@ -34,6 +34,7 @@ template<class T> class Array; namespace Graphics { struct Surface; +class ManagedSurface; /** Text alignment modes */ enum TextAlign { @@ -141,10 +142,13 @@ public: * @param color The color of the character. */ virtual void drawChar(Surface *dst, uint32 chr, int x, int y, uint32 color) const = 0; + void drawChar(ManagedSurface *dst, uint32 chr, int x, int y, uint32 color) const; // TODO: Add doxygen comments to this void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const; void drawString(Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft) const; + void drawString(ManagedSurface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const; + void drawString(ManagedSurface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft) const; /** * Compute and return the width the string str has when rendered using this font. diff --git a/graphics/managed_surface.cpp b/graphics/managed_surface.cpp new file mode 100644 index 0000000000..273b15de55 --- /dev/null +++ b/graphics/managed_surface.cpp @@ -0,0 +1,260 @@ +/* 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 "graphics/managed_surface.h" +#include "common/algorithm.h" +#include "common/textconsole.h" + +namespace Graphics { + +const int SCALE_THRESHOLD = 0x100; + +ManagedSurface::ManagedSurface() : + w(_innerSurface.w), h(_innerSurface.h), pitch(_innerSurface.pitch), format(_innerSurface.format), + _disposeAfterUse(DisposeAfterUse::NO), _owner(nullptr) { +} + +ManagedSurface::ManagedSurface(ManagedSurface &surf) : + w(_innerSurface.w), h(_innerSurface.h), pitch(_innerSurface.pitch), format(_innerSurface.format), + _disposeAfterUse(DisposeAfterUse::NO), _owner(nullptr) { + *this = surf; +} + +ManagedSurface::ManagedSurface(int width, int height) : + w(_innerSurface.w), h(_innerSurface.h), pitch(_innerSurface.pitch), format(_innerSurface.format), + _disposeAfterUse(DisposeAfterUse::NO), _owner(nullptr) { + create(width, height); +} + +ManagedSurface::ManagedSurface(int width, int height, const Graphics::PixelFormat &pixelFormat) : + w(_innerSurface.w), h(_innerSurface.h), pitch(_innerSurface.pitch), format(_innerSurface.format), + _disposeAfterUse(DisposeAfterUse::NO), _owner(nullptr) { + create(width, height, pixelFormat); +} + +ManagedSurface::ManagedSurface(ManagedSurface &surf, const Common::Rect &bounds) : + w(_innerSurface.w), h(_innerSurface.h), pitch(_innerSurface.pitch), format(_innerSurface.format), + _disposeAfterUse(DisposeAfterUse::NO), _owner(nullptr) { + create(surf, bounds); +} + +ManagedSurface::~ManagedSurface() { + free(); +} + +ManagedSurface &ManagedSurface::operator=(ManagedSurface &surf) { + // Free any current surface + free(); + + if (surf._disposeAfterUse == DisposeAfterUse::YES) { + // Create a new surface and copy the pixels from the source surface + create(surf.w, surf.h, surf.format); + Common::copy((const byte *)surf.getPixels(), (const byte *)surf.getPixels() + + surf.w * surf.h * surf.format.bytesPerPixel, (byte *)this->getPixels()); + } else { + // Source isn't managed, so simply copy its fields + _owner = surf._owner; + _offsetFromOwner = surf._offsetFromOwner; + void *srcPixels = surf._innerSurface.getPixels(); + _innerSurface.setPixels(srcPixels); + _innerSurface.w = surf.w; + _innerSurface.h = surf.h; + _innerSurface.pitch = surf.pitch; + this->format = surf.format; + } + + return *this; +} + +void ManagedSurface::setPixels(void *newPixels) { + free(); + _innerSurface.setPixels(newPixels); +} + +void ManagedSurface::create(uint16 width, uint16 height) { + create(width, height, PixelFormat::createFormatCLUT8()); +} + +void ManagedSurface::create(uint16 width, uint16 height, const PixelFormat &pixelFormat) { + free(); + _innerSurface.create(width, height, pixelFormat); + + _disposeAfterUse = DisposeAfterUse::YES; + markAllDirty(); +} + +void ManagedSurface::create(ManagedSurface &surf, const Common::Rect &bounds) { + free(); + + _offsetFromOwner = Common::Point(bounds.left, bounds.top); + _innerSurface.setPixels(surf.getBasePtr(bounds.left, bounds.top)); + _innerSurface.pitch = surf.pitch; + _innerSurface.format = surf.format; + _innerSurface.w = bounds.width(); + _innerSurface.h = bounds.height(); + _owner = &surf; + _disposeAfterUse = DisposeAfterUse::NO; +} + +void ManagedSurface::free() { + if (_disposeAfterUse == DisposeAfterUse::YES) + _innerSurface.free(); + + _disposeAfterUse = DisposeAfterUse::NO; + _owner = nullptr; + _offsetFromOwner = Common::Point(0, 0); +} + +bool ManagedSurface::clip(Common::Rect &srcBounds, Common::Rect &destBounds) { + if (destBounds.left >= this->w || destBounds.top >= this->h || + destBounds.right <= 0 || destBounds.bottom <= 0) + return false; + + // Clip the bounds if necessary to fit on-screen + if (destBounds.right > this->w) { + srcBounds.right -= destBounds.right - this->w; + destBounds.right = this->w; + } + + if (destBounds.bottom > this->h) { + srcBounds.bottom -= destBounds.bottom - this->h; + destBounds.bottom = this->h; + } + + if (destBounds.top < 0) { + srcBounds.top += -destBounds.top; + destBounds.top = 0; + } + + if (destBounds.left < 0) { + srcBounds.left += -destBounds.left; + destBounds.left = 0; + } + + return true; +} + +void ManagedSurface::blitFrom(const Surface &src) { + blitFrom(src, Common::Rect(0, 0, src.w, src.h), Common::Point(0, 0)); +} + +void ManagedSurface::blitFrom(const Surface &src, const Common::Point &destPos) { + blitFrom(src, Common::Rect(0, 0, src.w, src.h), destPos); +} + +void ManagedSurface::blitFrom(const Surface &src, const Common::Rect &srcRect, + const Common::Point &destPos) { + Common::Rect srcBounds = srcRect; + Common::Rect destBounds(destPos.x, destPos.y, destPos.x + srcRect.width(), + destPos.y + srcRect.height()); + assert(src.format.bytesPerPixel == format.bytesPerPixel); + + if (!srcRect.isValidRect() || !clip(srcBounds, destBounds)) + return; + + for (int y = 0; y < srcBounds.height(); ++y) { + const byte *srcP = (const byte *)src.getBasePtr(srcBounds.left, srcBounds.top + y); + byte *destP = (byte *)getBasePtr(destBounds.left, destBounds.top + y); + Common::copy(srcP, srcP + srcBounds.width() * format.bytesPerPixel, destP); + } + + addDirtyRect(Common::Rect(0, 0, this->w, this->h)); +} + +void ManagedSurface::transBlitFrom(const Surface &src, uint transColor, bool flipped, uint overrideColor) { + transBlitFrom(src, Common::Rect(0, 0, src.w, src.h), Common::Rect(0, 0, this->w, this->h), + transColor, false, overrideColor); +} + +void ManagedSurface::transBlitFrom(const Surface &src, const Common::Point &destPos, + uint transColor, bool flipped, uint overrideColor) { + transBlitFrom(src, Common::Rect(0, 0, src.w, src.h), Common::Rect(destPos.x, destPos.y, + destPos.x + src.w, destPos.y + src.h), transColor, false, overrideColor); +} + +void ManagedSurface::transBlitFrom(const Surface &src, const Common::Rect &srcRect, + const Common::Point &destPos, uint transColor, bool flipped, uint overrideColor) { + transBlitFrom(src, srcRect, Common::Rect(destPos.x, destPos.y, + destPos.x + src.w, destPos.y + src.h), transColor, false, overrideColor); +} + +template<typename T> +void transBlit(const Surface &src, const Common::Rect &srcRect, Surface *dest, const Common::Rect &destRect, uint transColor, bool flipped, uint overrideColor) { + int scaleX = SCALE_THRESHOLD * srcRect.width() / destRect.width(); + int scaleY = SCALE_THRESHOLD * srcRect.height() / destRect.height(); + + // Loop through drawing output lines + for (int destY = destRect.top, scaleYCtr = 0; destY < destRect.bottom; ++destY, scaleYCtr += scaleY) { + if (destY < 0 || destY >= dest->h) + continue; + const T *srcLine = (const T *)src.getBasePtr(0, scaleYCtr / SCALE_THRESHOLD); + T *destLine = (T *)dest->getBasePtr(destRect.left, destY); + + // Loop through drawing the pixels of the row + for (int destX = destRect.left, xCtr = 0, scaleXCtr = 0; destX < destRect.right; ++destX, ++xCtr, scaleXCtr += scaleX) { + if (destX < 0 || destX >= dest->w) + continue; + + T srcVal = srcLine[flipped ? src.w - scaleXCtr / SCALE_THRESHOLD - 1 : scaleXCtr / SCALE_THRESHOLD]; + if (srcVal != transColor) { + destLine[xCtr] = overrideColor ? overrideColor : srcVal; + } + } + } +} + +void ManagedSurface::transBlitFrom(const Surface &src, const Common::Rect &srcRect, + const Common::Rect &destRect, uint transColor, bool flipped, uint overrideColor) { + if (src.w == 0 || src.h == 0 || destRect.width() == 0 || destRect.height() == 0) + return; + + if (format.bytesPerPixel == 1) + transBlit<byte>(src, srcRect, &_innerSurface, destRect, transColor, flipped, overrideColor); + else if (format.bytesPerPixel == 2) + transBlit<uint16>(src, srcRect, &_innerSurface, destRect, transColor, flipped, overrideColor); + else if (format.bytesPerPixel == 4) + transBlit<uint32>(src, srcRect, &_innerSurface, destRect, transColor, flipped, overrideColor); + else + error("Surface::transBlitFrom: bytesPerPixel must be 1, 2, or 4"); + + // Mark the affected area + addDirtyRect(destRect); +} + +void ManagedSurface::markAllDirty() { + addDirtyRect(Common::Rect(0, 0, this->w, this->h)); +} + +void ManagedSurface::addDirtyRect(const Common::Rect &r) { + if (_owner) { + Common::Rect bounds = r; + bounds.clip(Common::Rect(0, 0, this->w, this->h)); + bounds.translate(_offsetFromOwner.x, _offsetFromOwner.y); + _owner->addDirtyRect(bounds); + } +} + +void ManagedSurface::clear(uint color) { + fillRect(getBounds(), color); +} + +} // End of namespace Graphics diff --git a/graphics/managed_surface.h b/graphics/managed_surface.h new file mode 100644 index 0000000000..8cbd463266 --- /dev/null +++ b/graphics/managed_surface.h @@ -0,0 +1,376 @@ +/* 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_MANAGED_SURFACE_H +#define GRAPHICS_MANAGED_SURFACE_H + +#include "graphics/pixelformat.h" +#include "graphics/surface.h" +#include "common/rect.h" +#include "common/types.h" + +namespace Graphics { + +class Font; + +/** + * A derived graphics surface, which handles automatically managing the allocated + * surface data block, as well as introducing several new blitting methods + */ +class ManagedSurface { + friend class Font; +private: + /** + * The Graphics::Surface that the managed surface encapsulates + */ + Surface _innerSurface; + + /** + * If set, the inner surface will be freed when the surface is recreated, + * as well as when the surface is destroyed + */ + DisposeAfterUse::Flag _disposeAfterUse; + + /** + * Stores the owning surface if this If this managed surface represents + * a sub-section of another + */ + ManagedSurface *_owner; + + /** + * For sub-section areas of an owning parent managed surface, this represents + * the offset from the parent's top-left corner this sub-surface starts at + */ + Common::Point _offsetFromOwner; +protected: + /** + * Clips the given source bounds so the passed destBounds will be entirely on-screen + */ + bool clip(Common::Rect &srcBounds, Common::Rect &destBounds); + + /** + * Base method that descendent classes can override for recording affected + * dirty areas of the surface + */ + virtual void addDirtyRect(const Common::Rect &r); +public: + uint16 &w; + uint16 &h; + uint16 &pitch; + PixelFormat &format; +public: + /** + * Create the managed surface + */ + ManagedSurface(); + + /** + * Create a managed surface from another one. + * If the source surface is maintaining it's own surface data, then + * this surface will create it's own surface of the same size and copy + * the contents from the source surface + */ + ManagedSurface(ManagedSurface &surf); + + /** + * Create the managed surface + */ + ManagedSurface(int width, int height); + + /** + * Create the managed surface + */ + ManagedSurface(int width, int height, const Graphics::PixelFormat &pixelFormat); + + /** + * Create the managed surface + */ + ManagedSurface(ManagedSurface &surf, const Common::Rect &bounds); + + /** + * Destroy the managed surface + */ + virtual ~ManagedSurface(); + + /** + * Implements automatic conversion to a Graphics::Surface by + * simply returning the inner surface. This must be const, + * because we don't want changes being done directly to it, + * since it would bypass dirty rect handling + */ + operator const Surface &() const { return _innerSurface; } + const Surface &rawSurface() const { return _innerSurface; } + + /** + * Reassign one managed surface to another one + * Note that if the source has a managed surface, it will be duplicated + */ + ManagedSurface &operator=(ManagedSurface &surf); + + /** + * Returns true if the surface has not yet been allocated + */ + bool empty() const { return w == 0 || h == 0 || _innerSurface.getPixels() == nullptr; } + + /** + * Returns true if the surface is managing its own pixels + */ + DisposeAfterUse::Flag disposeAfterUse() const { return _disposeAfterUse; } + + /** + * Return a pointer to the pixel at the specified point. + * + * @param x The x coordinate of the pixel. + * @param y The y coordinate of the pixel. + * @return Pointer to the pixel. + */ + inline const void *getBasePtr(int x, int y) const { + return _innerSurface.getBasePtr(x, y); + } + + /** + * Return a pointer to the pixel at the specified point. + * + * @param x The x coordinate of the pixel. + * @param y The y coordinate of the pixel. + * @return Pointer to the pixel. + */ + inline void *getBasePtr(int x, int y) { + return _innerSurface.getBasePtr(x, y); + } + + /** + * Get a reference to the pixel data + */ + inline void *getPixels() { return _innerSurface.getPixels(); } + inline const void *getPixels() const { return _innerSurface.getPixels(); } + + /** + * Sets the pixel data. + */ + virtual void setPixels(void *newPixels); + + /** + * Allocate memory for the pixel data of the surface. + */ + virtual void create(uint16 width, uint16 height); + + /** + * Allocate memory for the pixel data of the surface. + */ + virtual void create(uint16 width, uint16 height, const PixelFormat &pixelFormat); + + /** + * Sets up the surface as a sub-section of another passed parent surface. This surface + * will not own the pixels, and any dirty rect notifications will automatically be + * passed to the original parent surface. + * @remarks Note that this differs from Graphics::Surface::getSubArea, in that that + * method only adds a single initial dirty rect for the whole area, and then none further + */ + virtual void create(ManagedSurface &surf, const Common::Rect &bounds); + + /** + * Release the memory used by the pixels memory of this surface. This is the + * counterpart to create(). + */ + virtual void free(); + + /** + * Clears any pending dirty rects that have been generated for the surface + */ + virtual void clearDirtyRects() {} + + /** + * When the managed surface is a sub-section of a parent surface, returns the + * the offset in the parent surface that the surface starts at + */ + const Common::Point getOffsetFromOwner() const { return _offsetFromOwner; } + + /** + * Return a rect giving the bounds of the surface + */ + const Common::Rect getBounds() const { + return Common::Rect(0, 0, this->w, this->h); + } + + /** + * Copies another surface into this one + */ + void blitFrom(const Surface &src); + + /** + * Copies another surface into this one at a given destination position + */ + void blitFrom(const Surface &src, const Common::Point &destPos); + + /** + * Copies another surface into this one at a given destination position + */ + void blitFrom(const Surface &src, const Common::Rect &srcRect, + const Common::Point &destPos); + + /** + * Copies another surface into this one ignoring pixels of a designated transparent color + * @param src Source surface + * @param transColor Transparency color to ignore copying + * @param flipped Specifies whether to horizontally flip the image + * @param overrideColor Optional color to use instead of non-transparent pixels from + * the source surface + */ + void transBlitFrom(const Surface &src, uint transColor = 0, bool flipped = false, uint overrideColor = 0); + + /** + * Copies another surface into this one ignoring pixels of a designated transparent color + * @param src Source surface + * @param destPos Destination position to draw the surface + * @param transColor Transparency color to ignore copying + * @param flipped Specifies whether to horizontally flip the image + * @param overrideColor Optional color to use instead of non-transparent pixels from + * the source surface + */ + void transBlitFrom(const Surface &src, const Common::Point &destPos, + uint transColor = 0, bool flipped = false, uint overrideColor = 0); + + /** + * Copies another surface into this one ignoring pixels of a designated transparent color + * @param src Source surface + * @param srcRect Sub-section of source surface to draw + * @param destPos Destination position to draw the surface + * @param transColor Transparency color to ignore copying + * @param flipped Specifies whether to horizontally flip the image + * @param overrideColor Optional color to use instead of non-transparent pixels from + * the source surface + */ + void transBlitFrom(const Surface &src, const Common::Rect &srcRect, const Common::Point &destPos, + uint transColor = 0, bool flipped = false, uint overrideColor = 0); + + /** + * Copies another surface into this one ignoring pixels of a designated transparent color + * @param src Source surface + * @param srcRect Sub-section of source surface to draw + * @param destRect Destination area to draw the surface in. This can be sized differently + * then srcRect, allowing for arbitrary scaling of the image + * @param transColor Transparency color to ignore copying + * @param flipped Specifies whether to horizontally flip the image + * @param overrideColor Optional color to use instead of non-transparent pixels from + * the source surface + */ + void transBlitFrom(const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, + uint transColor = 0, bool flipped = false, uint overrideColor = 0); + + /** + * Clear the entire surface + */ + void clear(uint color = 0); + + /** + * Mark the entire surface as dirty + */ + void markAllDirty(); + + /** + * Copies a bitmap to the Surface internal buffer. The pixel format + * of buffer must match the pixel format of the Surface. + */ + void copyRectToSurface(const void *buffer, int srcPitch, int destX, int destY, int width, int height) { + _innerSurface.copyRectToSurface(buffer, srcPitch, destX, destY, width, height); + } + + /** + * Copies a bitmap to the Surface internal buffer. The pixel format + * of buffer must match the pixel format of the Surface. + */ + void copyRectToSurface(const Graphics::Surface &srcSurface, int destX, int destY, const Common::Rect subRect) { + _innerSurface.copyRectToSurface(srcSurface, destX, destY, subRect); + } + + /** + * Copy the data from another Surface, reinitializing the + * surface to match the dimensions of the passed surface + */ + void copyFrom(const ManagedSurface &surf) { + clearDirtyRects(); + _innerSurface.copyFrom(surf._innerSurface); + } + + /** + * Draw a line. + */ + void drawLine(int x0, int y0, int x1, int y1, uint32 color) { + _innerSurface.drawLine(x0, y0, x1, y1, color); + addDirtyRect(Common::Rect(x0, y0, x1, y1)); + } + + /** + * Draw a thick line. + */ + void drawThickLine(int x0, int y0, int x1, int y1, int penX, int penY, uint32 color) { + _innerSurface.drawThickLine(x0, y0, x1, y1, penX, penY, color); + addDirtyRect(Common::Rect(x0, y0, x1 + penX, y1 + penY)); + } + + /** + * Draw a horizontal line. + */ + void hLine(int x, int y, int x2, uint32 color) { + _innerSurface.hLine(x, y, x2, color); + addDirtyRect(Common::Rect(x, y, x2 + 1, y + 1)); + } + + /** + * Draw a vertical line. + */ + void vLine(int x, int y, int y2, uint32 color) { + _innerSurface.vLine(x, y, y2, color); + addDirtyRect(Common::Rect(x, y, x + 1, y2 + 1)); + } + + /** + * Fill a rect with a given color. + */ + void fillRect(Common::Rect r, uint32 color) { + _innerSurface.fillRect(r, color); + addDirtyRect(r); + } + + /** + * Draw a frame around a specified rect. + */ + void frameRect(const Common::Rect &r, uint32 color) { + _innerSurface.frameRect(r, color); + addDirtyRect(r); + } + + /** + * Returns a sub-area of the screen, but only adds a single initial dirty rect + * for the retrieved area. + */ + Surface getSubArea(const Common::Rect &area) { + addDirtyRect(area); + return _innerSurface.getSubArea(area); + } +}; + +} // End of namespace Graphics + + +#endif diff --git a/graphics/module.mk b/graphics/module.mk index b6919cf1ab..90f6a3199c 100644 --- a/graphics/module.mk +++ b/graphics/module.mk @@ -12,10 +12,12 @@ MODULE_OBJS := \ fonts/ttf.o \ fonts/winfont.o \ maccursor.o \ + managed_surface.o \ pixelformat.o \ primitives.o \ scaler.o \ scaler/thumbnail_intern.o \ + screen.o \ sjis.o \ surface.o \ transform_struct.o \ diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp index 65e327f9c2..78fb7828d7 100644 --- a/graphics/scaler/thumbnail_intern.cpp +++ b/graphics/scaler/thumbnail_intern.cpp @@ -171,7 +171,8 @@ static bool grabScreen565(Graphics::Surface *surf) { if (!screen) return false; - assert(screen->format.bytesPerPixel == 1 || screen->format.bytesPerPixel == 2); + assert(screen->format.bytesPerPixel == 1 || screen->format.bytesPerPixel == 2 + || screen->format.bytesPerPixel == 4); assert(screen->getPixels() != 0); Graphics::PixelFormat screenFormat = g_system->getScreenFormat(); @@ -197,6 +198,9 @@ static bool grabScreen565(Graphics::Surface *surf) { } else if (screenFormat.bytesPerPixel == 2) { uint16 col = READ_UINT16(screen->getBasePtr(x, y)); screenFormat.colorToRGB(col, r, g, b); + } else if (screenFormat.bytesPerPixel == 4) { + uint32 col = READ_UINT32(screen->getBasePtr(x, y)); + screenFormat.colorToRGB(col, r, g, b); } *((uint16 *)surf->getBasePtr(x, y)) = Graphics::RGBToColor<Graphics::ColorMasks<565> >(r, g, b); diff --git a/graphics/screen.cpp b/graphics/screen.cpp new file mode 100644 index 0000000000..ccf651f536 --- /dev/null +++ b/graphics/screen.cpp @@ -0,0 +1,129 @@ +/* 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/system.h" +#include "common/algorithm.h" +#include "graphics/screen.h" +#include "graphics/palette.h" + +namespace Graphics { + +Screen::Screen(): ManagedSurface() { + create(g_system->getWidth(), g_system->getHeight(), g_system->getScreenFormat()); +} + +Screen::Screen(int width, int height): ManagedSurface() { + create(width, height); +} + +Screen::Screen(int width, int height, PixelFormat pixelFormat): ManagedSurface() { + create(width, height, pixelFormat); +} + +void Screen::update() { + // Merge the dirty rects + mergeDirtyRects(); + + // Loop through copying dirty areas to the physical screen + Common::List<Common::Rect>::iterator i; + for (i = _dirtyRects.begin(); i != _dirtyRects.end(); ++i) { + const Common::Rect &r = *i; + const byte *srcP = (const byte *)getBasePtr(r.left, r.top); + g_system->copyRectToScreen(srcP, pitch, r.left, r.top, + r.width(), r.height()); + } + + // Signal the physical screen to update + g_system->updateScreen(); + _dirtyRects.clear(); +} + + +void Screen::addDirtyRect(const Common::Rect &r) { + Common::Rect bounds = r; + bounds.clip(getBounds()); + bounds.translate(getOffsetFromOwner().x, getOffsetFromOwner().y); + + if (bounds.width() > 0 && bounds.height() > 0) + _dirtyRects.push_back(bounds); +} + +void Screen::makeAllDirty() { + addDirtyRect(Common::Rect(0, 0, this->w, this->h)); +} + +void Screen::mergeDirtyRects() { + Common::List<Common::Rect>::iterator rOuter, rInner; + + // Process the dirty rect list to find any rects to merge + for (rOuter = _dirtyRects.begin(); rOuter != _dirtyRects.end(); ++rOuter) { + rInner = rOuter; + while (++rInner != _dirtyRects.end()) { + + if ((*rOuter).intersects(*rInner)) { + // These two rectangles overlap, so merge them + unionRectangle(*rOuter, *rOuter, *rInner); + + // remove the inner rect from the list + _dirtyRects.erase(rInner); + + // move back to beginning of list + rInner = rOuter; + } + } + } +} + +bool Screen::unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2) { + destRect = src1; + destRect.extend(src2); + + return !destRect.isEmpty(); +} + +void Screen::getPalette(byte palette[PALETTE_SIZE]) { + assert(format.bytesPerPixel == 1); + g_system->getPaletteManager()->grabPalette(palette, 0, PALETTE_COUNT); +} + +void Screen::getPalette(byte *palette, uint start, uint num) { + assert(format.bytesPerPixel == 1); + g_system->getPaletteManager()->grabPalette(palette, start, num); +} + +void Screen::setPalette(const byte palette[PALETTE_SIZE]) { + assert(format.bytesPerPixel == 1); + g_system->getPaletteManager()->setPalette(palette, 0, PALETTE_COUNT); +} + +void Screen::setPalette(const byte *palette, uint start, uint num) { + assert(format.bytesPerPixel == 1); + g_system->getPaletteManager()->setPalette(palette, start, num); +} + +void Screen::clearPalette() { + byte palette[PALETTE_SIZE]; + Common::fill(&palette[0], &palette[PALETTE_SIZE], 0); + setPalette(palette); +} + +} // End of namespace Graphics diff --git a/graphics/screen.h b/graphics/screen.h new file mode 100644 index 0000000000..29816120f1 --- /dev/null +++ b/graphics/screen.h @@ -0,0 +1,118 @@ +/* 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_SCREEN_H +#define GRAPHICS_SCREEN_H + +#include "graphics/managed_surface.h" +#include "graphics/pixelformat.h" +#include "common/list.h" +#include "common/rect.h" + +namespace Graphics { + +#define PALETTE_COUNT 256 +#define PALETTE_SIZE (256 * 3) + +/** + * Implements a specialised surface that represents the screen. + * It keeps track of any areas of itself that are updated by drawing + * calls, and provides an update that method that blits the affected + * areas to the physical screen + */ +class Screen : virtual public ManagedSurface { +private: + /** + * List of affected areas of the screen + */ + Common::List<Common::Rect> _dirtyRects; +private: + /** + * Merges together overlapping dirty areas of the screen + */ + void mergeDirtyRects(); + + /** + * Returns the union of two dirty area rectangles + */ + bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2); +protected: + /** + * Adds a rectangle to the list of modified areas of the screen during the + * current frame + */ + virtual void addDirtyRect(const Common::Rect &r); +public: + Screen(); + Screen(int width, int height); + Screen(int width, int height, PixelFormat pixelFormat); + + /** + * Returns true if there are any pending screen updates (dirty areas) + */ + bool isDirty() const { return !_dirtyRects.empty(); } + + /** + * Marks the whole screen as dirty. This forces the next call to update + * to copy the entire screen contents + */ + void makeAllDirty(); + + /** + * Clear the current dirty rects list + */ + virtual void clearDirtyRects() { _dirtyRects.clear(); } + + /** + * Updates the screen by copying any affected areas to the system + */ + virtual void update(); + + /** + * Return the currently active palette + */ + void getPalette(byte palette[PALETTE_SIZE]); + + /** + * Return a portion of the currently active palette + */ + void getPalette(byte *palette, uint start, uint num); + + /** + * Set the palette + */ + void setPalette(const byte palette[PALETTE_SIZE]); + + /** + * Set a subsection of the palette + */ + void setPalette(const byte *palette, uint start, uint num); + + /** + * Clears the current palette, setting all entries to black + */ + void clearPalette(); +}; + +} // End of namespace Graphics + +#endif diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp index d0371f5e78..3f91cfa259 100644 --- a/gui/EventRecorder.cpp +++ b/gui/EventRecorder.cpp @@ -330,7 +330,7 @@ bool EventRecorder::openRecordFile(const Common::String &fileName) { } bool EventRecorder::checkGameHash(const ADGameDescription *gameDesc) { - if (_playbackFile->getHeader().hashRecords.size() != 0) { + if (_playbackFile->getHeader().hashRecords.size() == 0) { warning("Engine doesn't contain description table"); return false; } @@ -676,4 +676,3 @@ void EventRecorder::deleteTemporarySave() { } // End of namespace GUI #endif // ENABLE_EVENTRECORDER - diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 1b95a11e03..c2deb8c61e 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -164,7 +164,7 @@ struct DrawDataInfo { DrawData id; ///< The actual ID of the DrawData item. const char *name; ///< The name of the DrawData item as it appears in the Theme Description files bool buffer; ///< Sets whether this item is buffered on the backbuffer or drawn directly to the screen. - DrawData parent; ///< Parent DrawData item, for items that overlay. E.g. kButtonIdle -> kButtonHover + DrawData parent; ///< Parent DrawData item, for items that overlay. E.g. kDDButtonIdle -> kDDButtonHover }; /** diff --git a/gui/Tooltip.h b/gui/Tooltip.h index 58b6d8a429..60688412e6 100644 --- a/gui/Tooltip.h +++ b/gui/Tooltip.h @@ -41,6 +41,8 @@ public: void setup(Dialog *parent, Widget *widget, int x, int y); void drawDialog(); + + virtual void receivedFocus(int x = -1, int y = -1) {} protected: virtual void handleMouseDown(int x, int y, int button, int clickCount) { close(); @@ -64,7 +66,6 @@ protected: } virtual void handleMouseMoved(int x, int y, int button) { close(); - _parent->handleMouseMoved(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button); } int _maxWidth; diff --git a/gui/credits.h b/gui/credits.h index a5602092ca..c5af88e64b 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -538,6 +538,7 @@ static const char *credits[] = { "C0""Max Horn", "C2""(retired)", "C0""Oystein Eftevaag", +"C0""Thierry Crozat", "", "C1""Mandriva", "C0""Dominik Scherer", diff --git a/gui/debugger.cpp b/gui/debugger.cpp index c9b435963d..72d05e2973 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -42,6 +42,7 @@ #elif defined(USE_READLINE) #include <readline/readline.h> #include <readline/history.h> + #include "common/events.h" #endif @@ -191,6 +192,15 @@ char *readline_completionFunction(const char *text, int state) { return g_readline_debugger->readlineComplete(text, state); } +void readline_eventFunction() { + Common::EventManager *eventMan = g_system->getEventManager(); + + Common::Event event; + while (eventMan->pollEvent(event)) { + // drop all events + } +} + #ifdef USE_READLINE_INT_COMPLETION typedef int RLCompFunc_t(const char *, int); #else @@ -228,6 +238,7 @@ void Debugger::enter() { g_readline_debugger = this; rl_completion_entry_function = (RLCompFunc_t *)&readline_completionFunction; + rl_event_hook = (rl_hook_func_t *)&readline_eventFunction; char *line_read = 0; do { diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 315c24e9bf..075a3bb533 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -119,6 +119,8 @@ void Dialog::reflowLayout() { } void Dialog::lostFocus() { + _dragWidget = NULL; + if (_tickleWidget) { _tickleWidget->lostFocus(); } diff --git a/gui/dialog.h b/gui/dialog.h index 593ee13458..0e06effabd 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -82,7 +82,7 @@ public: virtual void reflowLayout(); virtual void lostFocus(); - virtual void receivedFocus() {} + virtual void receivedFocus(int x = -1, int y = -1) { if (x >= 0 && y >= 0) handleMouseMoved(x, y, 0); } protected: virtual void open(); diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 20c6d3fa13..3ce8bee020 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -281,14 +281,9 @@ void GuiManager::runLoop() { redraw(); } - _lastMousePosition.x = _lastMousePosition.y = -1; - _lastMousePosition.time = 0; - Common::EventManager *eventMan = _system->getEventManager(); uint32 lastRedraw = 0; - const uint32 waitTime = 1000 / 45; - - bool tooltipCheck = false; + const uint32 waitTime = 1000 / 60; while (!_dialogStack.empty() && activeDialog == getTopDialog() && !eventMan->shouldQuit()) { redraw(); @@ -304,9 +299,9 @@ void GuiManager::runLoop() { // _system->updateScreen(); if (lastRedraw + waitTime < _system->getMillis(true)) { + lastRedraw = _system->getMillis(true); _theme->updateScreen(); _system->updateScreen(); - lastRedraw = _system->getMillis(true); } Common::Event event; @@ -336,19 +331,14 @@ void GuiManager::runLoop() { processEvent(event, activeDialog); - if (event.type == Common::EVENT_MOUSEMOVE) { - tooltipCheck = true; - } - - if (lastRedraw + waitTime < _system->getMillis(true)) { + lastRedraw = _system->getMillis(true); _theme->updateScreen(); _system->updateScreen(); - lastRedraw = _system->getMillis(true); } } - if (tooltipCheck && _lastMousePosition.time + kTooltipDelay < _system->getMillis(true)) { + if (_lastMousePosition.time + kTooltipDelay < _system->getMillis(true)) { Widget *wdg = activeDialog->findWidget(_lastMousePosition.x, _lastMousePosition.y); if (wdg && wdg->hasTooltip() && !(wdg->getFlags() & WIDGET_PRESSED)) { Tooltip *tooltip = new Tooltip(); @@ -415,7 +405,7 @@ void GuiManager::restoreState() { } void GuiManager::openDialog(Dialog *dialog) { - dialog->receivedFocus(); + giveFocusToDialog(dialog); if (!_dialogStack.empty()) getTopDialog()->lostFocus(); @@ -439,8 +429,10 @@ void GuiManager::closeTopDialog() { // Remove the dialog from the stack _dialogStack.pop()->lostFocus(); - if (!_dialogStack.empty()) - getTopDialog()->receivedFocus(); + if (!_dialogStack.empty()) { + Dialog *dialog = getTopDialog(); + giveFocusToDialog(dialog); + } if (_redrawStatus != kRedrawFull) _redrawStatus = kRedrawCloseDialog; @@ -515,6 +507,7 @@ void GuiManager::processEvent(const Common::Event &event, Dialog *const activeDi int button; uint32 time; Common::Point mouse(event.mouse.x - activeDialog->_x, event.mouse.y - activeDialog->_y); + switch (event.type) { case Common::EVENT_KEYDOWN: activeDialog->handleKeyDown(event.kbd); @@ -523,12 +516,12 @@ void GuiManager::processEvent(const Common::Event &event, Dialog *const activeDi activeDialog->handleKeyUp(event.kbd); break; case Common::EVENT_MOUSEMOVE: + _globalMousePosition.x = event.mouse.x; + _globalMousePosition.y = event.mouse.y; activeDialog->handleMouseMoved(mouse.x, mouse.y, 0); if (mouse.x != _lastMousePosition.x || mouse.y != _lastMousePosition.y) { - _lastMousePosition.x = mouse.x; - _lastMousePosition.y = mouse.y; - _lastMousePosition.time = _system->getMillis(true); + setLastMousePos(mouse.x, mouse.y); } break; @@ -571,4 +564,17 @@ void GuiManager::processEvent(const Common::Event &event, Dialog *const activeDi } } +void GuiManager::giveFocusToDialog(Dialog *dialog) { + int16 dialogX = _globalMousePosition.x - dialog->_x; + int16 dialogY = _globalMousePosition.y - dialog->_y; + dialog->receivedFocus(dialogX, dialogY); + setLastMousePos(dialogX, dialogY); +} + +void GuiManager::setLastMousePos(int16 x, int16 y) { + _lastMousePosition.x = x; + _lastMousePosition.y = y; + _lastMousePosition.time = _system->getMillis(true); +} + } // End of namespace GUI diff --git a/gui/gui-manager.h b/gui/gui-manager.h index 26c8d6def9..35779215b2 100644 --- a/gui/gui-manager.h +++ b/gui/gui-manager.h @@ -124,11 +124,12 @@ protected: bool _useStdCursor; // position and time of last mouse click (used to detect double clicks) - struct { + struct MousePos { + MousePos() : x(-1), y(-1), count(0) { time = 0; } int16 x, y; // Position of mouse when the click occurred uint32 time; // Time int count; // How often was it already pressed? - } _lastClick, _lastMousePosition; + } _lastClick, _lastMousePosition, _globalMousePosition; // mouse cursor state int _cursorAnimateCounter; @@ -155,6 +156,9 @@ protected: Dialog *getTopDialog() const; void screenChange(); + + void giveFocusToDialog(Dialog *dialog); + void setLastMousePos(int16 x, int16 y); }; } // End of namespace GUI diff --git a/gui/module.mk b/gui/module.mk index bbb3def96d..9e821e71a7 100644 --- a/gui/module.mk +++ b/gui/module.mk @@ -65,5 +65,10 @@ MODULE_OBJS += \ fluidsynth-dialog.o endif +ifdef USE_UPDATES +MODULE_OBJS += \ + updates-dialog.o +endif + # Include common rules include $(srcdir)/rules.mk diff --git a/gui/options.cpp b/gui/options.cpp index ba247e5f15..2bb17509eb 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -36,6 +36,7 @@ #include "common/system.h" #include "common/textconsole.h" #include "common/translation.h" +#include "common/updates.h" #include "audio/mididrv.h" #include "audio/musicplugin.h" @@ -61,7 +62,8 @@ enum { kChooseExtraDirCmd = 'chex', kExtraPathClearCmd = 'clex', kChoosePluginsDirCmd = 'chpl', - kChooseThemeCmd = 'chtf' + kChooseThemeCmd = 'chtf', + kUpdatesCheckCmd = 'updc' }; enum { @@ -70,7 +72,7 @@ enum { kSubtitlesBoth }; -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG enum { kChooseKeyMappingCmd = 'chma' }; @@ -204,12 +206,12 @@ void OptionsDialog::open() { _renderModePopUp->setSelectedTag(sel); } -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ONLY_FULLSCREEN _fullscreenCheckbox->setState(true); _fullscreenCheckbox->setEnabled(false); _aspectCheckbox->setState(false); _aspectCheckbox->setEnabled(false); -#else // !SMALL_SCREEN_DEVICE +#else // !GUI_ONLY_FULLSCREEN // Fullscreen setting _fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain)); @@ -221,7 +223,7 @@ void OptionsDialog::open() { _aspectCheckbox->setEnabled(true); _aspectCheckbox->setState(ConfMan.getBool("aspect_ratio", _domain)); } -#endif // SMALL_SCREEN_DEVICE +#endif // GUI_ONLY_FULLSCREEN } @@ -604,7 +606,7 @@ void OptionsDialog::setGraphicSettingsState(bool enabled) { _gfxPopUp->setEnabled(enabled); _renderModePopUpDesc->setEnabled(enabled); _renderModePopUp->setEnabled(enabled); -#ifndef SMALL_SCREEN_DEVICE +#ifndef GUI_ENABLE_KEYSDIALOG _fullscreenCheckbox->setEnabled(enabled); if (_guioptions.contains(GUIO_NOASPECT)) _aspectCheckbox->setEnabled(false); @@ -868,10 +870,6 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi _midiGainSlider->setMaxValue(1000); _midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", "1.00"); -#ifdef USE_FLUIDSYNTH - new ButtonWidget(boss, prefix + "mcFluidSynthSettings", _("FluidSynth Settings"), 0, kFluidSynthSettingsCmd); -#endif - _enableMIDISettings = true; } @@ -1109,6 +1107,10 @@ GlobalOptionsDialog::GlobalOptionsDialog() _midiTabId = tab->addTab(_("MIDI")); addMIDIControls(tab, "GlobalOptions_MIDI."); +#ifdef USE_FLUIDSYNTH + new ButtonWidget(tab, "GlobalOptions_MIDI.mcFluidSynthSettings", _("FluidSynth Settings"), 0, kFluidSynthSettingsCmd); +#endif + // // 4) The MT-32 tab // @@ -1194,7 +1196,7 @@ GlobalOptionsDialog::GlobalOptionsDialog() _autosavePeriodPopUp->appendEntry(_(savePeriodLabels[i]), savePeriodValues[i]); } -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG new ButtonWidget(tab, "GlobalOptions_Misc.KeysButton", _("Keys"), 0, kChooseKeyMappingCmd); #endif @@ -1229,6 +1231,22 @@ GlobalOptionsDialog::GlobalOptionsDialog() #endif // USE_TRANSLATION +#ifdef USE_UPDATES + _updatesPopUpDesc = new StaticTextWidget(tab, "GlobalOptions_Misc.UpdatesPopupDesc", _("Update check:"), _("How often to check ScummVM updates")); + _updatesPopUp = new PopUpWidget(tab, "GlobalOptions_Misc.UpdatesPopup"); + + const int *vals = Common::UpdateManager::getUpdateIntervals(); + + while (*vals != -1) { + _updatesPopUp->appendEntry(Common::UpdateManager::updateIntervalToString(*vals), *vals); + vals++; + } + + _updatesPopUp->setSelectedTag(Common::UpdateManager::normalizeInterval(ConfMan.getInt("updates_check"))); + + new ButtonWidget(tab, "GlobalOptions_Misc.UpdatesCheckManuallyButton", _("Check now"), 0, kUpdatesCheckCmd); +#endif + // Activate the first tab tab->setActiveTab(0); _tabWidget = tab; @@ -1237,7 +1255,7 @@ GlobalOptionsDialog::GlobalOptionsDialog() new ButtonWidget(this, "GlobalOptions.Cancel", _("Cancel"), 0, kCloseCmd); new ButtonWidget(this, "GlobalOptions.Ok", _("OK"), 0, kOKCmd); -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG _keysDialog = new KeysDialog(); #endif @@ -1247,7 +1265,7 @@ GlobalOptionsDialog::GlobalOptionsDialog() } GlobalOptionsDialog::~GlobalOptionsDialog() { -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG delete _keysDialog; #endif @@ -1367,6 +1385,19 @@ void GlobalOptionsDialog::close() { } #endif // USE_TRANSLATION +#ifdef USE_UPDATES + ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag()); + + if (g_system->getUpdateManager()) { + if (_updatesPopUp->getSelectedTag() == Common::UpdateManager::kUpdateIntervalNotSupported) { + g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled); + } else { + g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateEnabled); + g_system->getUpdateManager()->setUpdateCheckInterval(_updatesPopUp->getSelectedTag()); + } + } +#endif + } OptionsDialog::close(); } @@ -1478,7 +1509,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3 } break; } -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG case kChooseKeyMappingCmd: _keysDialog->runModal(); break; @@ -1488,6 +1519,12 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3 _fluidSynthSettingsDialog->runModal(); break; #endif +#ifdef USE_UPDATES + case kUpdatesCheckCmd: + if (g_system->getUpdateManager()) + g_system->getUpdateManager()->checkForUpdates(); + break; +#endif default: OptionsDialog::handleCommand(sender, cmd, data); } diff --git a/gui/options.h b/gui/options.h index 1e65bfd134..294b41794b 100644 --- a/gui/options.h +++ b/gui/options.h @@ -29,7 +29,7 @@ #include "common/str.h" #include "audio/mididrv.h" -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG #include "gui/KeysDialog.h" #endif @@ -210,7 +210,7 @@ public: virtual void reflowLayout(); protected: -#ifdef SMALL_SCREEN_DEVICE +#ifdef GUI_ENABLE_KEYSDIALOG KeysDialog *_keysDialog; #endif #ifdef USE_FLUIDSYNTH @@ -236,6 +236,11 @@ protected: PopUpWidget *_autosavePeriodPopUp; StaticTextWidget *_guiLanguagePopUpDesc; PopUpWidget *_guiLanguagePopUp; + +#ifdef USE_UPDATES + StaticTextWidget *_updatesPopUpDesc; + PopUpWidget *_updatesPopUp; +#endif }; } // End of namespace GUI diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp index 9557da1206..63b69a39ea 100644 --- a/gui/predictivedialog.cpp +++ b/gui/predictivedialog.cpp @@ -190,7 +190,7 @@ void PredictiveDialog::saveUserDictToFile() { void PredictiveDialog::handleKeyUp(Common::KeyState state) { if (_curPressedButton != kNoAct && !_needRefresh) { - _button[_curPressedButton]->startAnimatePressedState(); + _button[_curPressedButton]->setUnpressedState(); processButton(_curPressedButton); } } @@ -352,7 +352,7 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) { } if (_lastButton != _curPressedButton) - _button[_lastButton]->stopAnimatePressedState(); + _button[_lastButton]->setUnpressedState(); if (_curPressedButton != kNoAct && !_needRefresh) _button[_curPressedButton]->setPressedState(); @@ -604,18 +604,6 @@ void PredictiveDialog::processButton(ButtonId button) { } } -void PredictiveDialog::handleTickle() { - if (_lastTime) { - if ((_curTime - _lastTime) > kRepeatDelay) { - _lastTime = 0; - } - } - - if (getTickleWidget()) { - getTickleWidget()->handleTickle(); - } -} - void PredictiveDialog::mergeDicts() { _unitedDict.dictLineCount = _predictiveDict.dictLineCount + _userDict.dictLineCount; _unitedDict.dictLine = (char **)calloc(_unitedDict.dictLineCount, sizeof(char *)); diff --git a/gui/predictivedialog.h b/gui/predictivedialog.h index 4c167c3efa..1f6bdf84e0 100644 --- a/gui/predictivedialog.h +++ b/gui/predictivedialog.h @@ -43,7 +43,6 @@ public: virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); virtual void handleKeyUp(Common::KeyState state); virtual void handleKeyDown(Common::KeyState state); - virtual void handleTickle(); const char *getResult() const { return _predictiveResult; } diff --git a/gui/recorderdialog.cpp b/gui/recorderdialog.cpp index 2d74cebbb6..c08b3e149a 100644 --- a/gui/recorderdialog.cpp +++ b/gui/recorderdialog.cpp @@ -33,7 +33,6 @@ #include "gui/editrecorddialog.h" #include "gui/EventRecorder.h" #include "gui/message.h" -#include "gui/saveload.h" #include "common/system.h" #include "gui/ThemeEval.h" #include "gui/gui-manager.h" diff --git a/gui/saveload.cpp b/gui/saveload.cpp index c1c1d12ec5..b94d30289b 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -25,7 +25,6 @@ #include "gui/saveload.h" #include "gui/saveload-dialog.h" -#include "gui/gui-manager.h" #include "engines/metaengine.h" diff --git a/gui/saveload.h b/gui/saveload.h index 22c26d4c5e..01a78c4924 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -23,7 +23,7 @@ #ifndef GUI_SAVELOAD_H #define GUI_SAVELOAD_H -#include "gui/dialog.h" +#include "common/str.h" #include "engines/metaengine.h" namespace GUI { diff --git a/gui/themes/default.inc b/gui/themes/default.inc index e367bcb3c7..a23e2f4c30 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -1076,6 +1076,17 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "type='PopUp' " "/>" "</layout>" +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'>" +"<widget name='UpdatesPopupDesc' " +"type='OptionsLabel' " +"/>" +"<widget name='UpdatesPopup' " +"type='PopUp' " +"/>" +"<widget name='UpdatesCheckManuallyButton' " +"type='Button' " +"/>" +"</layout>" "<widget name='KeysButton' " "type='Button' " "/>" @@ -2365,6 +2376,19 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "type='PopUp' " "/>" "</layout>" +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'>" +"<widget name='UpdatesPopupDesc' " +"width='80' " +"height='Globals.Line.Height' " +"textalign='right' " +"/>" +"<widget name='UpdatesPopup' " +"type='PopUp' " +"/>" +"<widget name='UpdatesCheckManuallyButton' " +"type='Button' " +"/>" +"</layout>" "<widget name='KeysButton' " "type='Button' " "/>" diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip Binary files differindex 1d8b8dad05..43fcea12fd 100644 --- a/gui/themes/scummclassic.zip +++ b/gui/themes/scummclassic.zip diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index 18c2a1f889..65724d9faf 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -507,6 +507,17 @@ type = 'PopUp' /> </layout> + <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'> + <widget name = 'UpdatesPopupDesc' + type = 'OptionsLabel' + /> + <widget name = 'UpdatesPopup' + type = 'PopUp' + /> + <widget name = 'UpdatesCheckManuallyButton' + type = 'Button' + /> + </layout> <widget name='KeysButton' type='Button' /> diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx index 6cc9eed6b3..f73f6e864b 100644 --- a/gui/themes/scummclassic/classic_layout_lowres.stx +++ b/gui/themes/scummclassic/classic_layout_lowres.stx @@ -510,6 +510,19 @@ type = 'PopUp' /> </layout> + <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'> + <widget name = 'UpdatesPopupDesc' + width = '80' + height = 'Globals.Line.Height' + textalign = 'right' + /> + <widget name = 'UpdatesPopup' + type = 'PopUp' + /> + <widget name = 'UpdatesCheckManuallyButton' + type = 'Button' + /> + </layout> <widget name='KeysButton' type='Button' /> diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip Binary files differindex 43826abf5e..70f7672c57 100644 --- a/gui/themes/scummmodern.zip +++ b/gui/themes/scummmodern.zip diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index fd6a3c5cd2..c73ffa1f08 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -521,6 +521,17 @@ type = 'PopUp' /> </layout> + <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'> + <widget name = 'UpdatesPopupDesc' + type = 'OptionsLabel' + /> + <widget name = 'UpdatesPopup' + type = 'PopUp' + /> + <widget name = 'UpdatesCheckManuallyButton' + type = 'Button' + /> + </layout> <widget name='KeysButton' type='Button' /> diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx index 9d8f79795c..43ec0cdee1 100644 --- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx +++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx @@ -508,6 +508,19 @@ type = 'PopUp' /> </layout> + <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'> + <widget name = 'UpdatesPopupDesc' + width = '80' + height = 'Globals.Line.Height' + textalign = 'right' + /> + <widget name = 'UpdatesPopup' + type = 'PopUp' + /> + <widget name = 'UpdatesCheckManuallyButton' + type = 'Button' + /> + </layout> <widget name='KeysButton' type='Button' /> diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex b0da793cdf..917acdb13d 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp new file mode 100644 index 0000000000..960b3f397a --- /dev/null +++ b/gui/updates-dialog.cpp @@ -0,0 +1,148 @@ +/* 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/system.h" +#include "common/translation.h" +#include "common/updates.h" +#include "common/config-manager.h" + +#include "gui/updates-dialog.h" +#include "gui/gui-manager.h" +#include "gui/ThemeEval.h" +#include "gui/widgets/popup.h" + +namespace GUI { + +enum { + kYesCmd = 'YES ', + kNoCmd = 'NO ', + kCheckBoxCmd = 'CHK ' +}; + + +UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) { + + const int screenW = g_system->getOverlayWidth(); + const int screenH = g_system->getOverlayHeight(); + + int buttonWidth = g_gui.xmlEval()->getVar("Globals.Button.Width", 0); + int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0); + + const char *message = _( + "ScummVM now supports automatic check for updates\n" + "which requires access to the Internet.\n" + "\n" + "Would you like to enable this feature?"); + const char *message2 = _("(You can always enable it in the options dialog on the Misc tab)"); + + // First, determine the size the dialog needs. For this we have to break + // down the string into lines, and taking the maximum of their widths. + // Using this, and accounting for the space the button(s) need, we can set + // the real size of the dialog + Common::Array<Common::String> lines, lines2; + int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines); + int maxlineWidth2 = g_gui.getFont(ThemeEngine::kFontStyleTooltip).wordWrapText(message2, screenW - 2 * 20, lines2); + + _w = MAX(MAX(maxlineWidth, maxlineWidth2), (2 * buttonWidth) + 10) + 20; + + int lineCount = lines.size() + 1 + lines2.size(); + + _h = 16 + 3 * kLineHeight; + _h += buttonHeight + 8; + + _h += lineCount * kLineHeight; + + // Center the dialog + _x = (screenW - _w) / 2; + _y = (screenH - _h) / 2; + + // Each line is represented by one static text item. + int y = 10; + for (int i = 0; i < lines.size(); i++) { + new StaticTextWidget(this, 10, y, maxlineWidth, kLineHeight, + lines[i], Graphics::kTextAlignCenter); + y += kLineHeight; + } + for (int i = 0; i < lines2.size(); i++) { + new StaticTextWidget(this, 10, y, maxlineWidth2, kLineHeight, + lines2[i], Graphics::kTextAlignCenter, 0, ThemeEngine::kFontStyleTooltip); + y += kLineHeight; + } + + y += kLineHeight; + _updatesCheckbox = new CheckboxWidget(this, 10, y, _w, kLineHeight, _("Check for updates automatically"), 0, kCheckBoxCmd); + + y += kLineHeight + 3; + + _updatesPopUp = new PopUpWidget(this, 10, y, _w - 20, g_gui.xmlEval()->getVar("Globals.PopUp.Height", kLineHeight)); + + const int *vals = Common::UpdateManager::getUpdateIntervals(); + + while (*vals != -1) { + _updatesPopUp->appendEntry(Common::UpdateManager::updateIntervalToString(*vals), *vals); + vals++; + } + + _updatesPopUp->setSelectedTag(Common::UpdateManager::kUpdateIntervalOneWeek); + + int yesButtonPos = (_w - (buttonWidth * 2)) / 2; + int noButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10; + + _yesButton = new ButtonWidget(this, yesButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, + _("Proceed"), 0, kYesCmd, Common::ASCII_RETURN); + _noButton = new ButtonWidget(this, noButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, + _("Cancel"), 0, kNoCmd, Common::ASCII_ESCAPE); + + _updatesPopUp->setEnabled(false); + _yesButton->setEnabled(false); +} + +void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { + if (cmd == kYesCmd) { + ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag()); + + if (g_system->getUpdateManager()) { + if (_updatesCheckbox->getState() == false || + _updatesPopUp->getSelectedTag() == Common::UpdateManager::kUpdateIntervalNotSupported) { + g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled); + } else { + g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateEnabled); + g_system->getUpdateManager()->setUpdateCheckInterval(_updatesPopUp->getSelectedTag()); + } + } + close(); + } else if (cmd == kNoCmd) { + ConfMan.setInt("updates_check", Common::UpdateManager::kUpdateIntervalNotSupported); + g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled); + + close(); + } else if (cmd == kCheckBoxCmd) { + _updatesPopUp->setEnabled(_updatesCheckbox->getState()); + _yesButton->setEnabled(_updatesCheckbox->getState()); + + draw(); + } else { + Dialog::handleCommand(sender, cmd, data); + } +} + +} // End of namespace GUI diff --git a/engines/scumm/he/logic/moonbase.cpp b/gui/updates-dialog.h index 29a0dde7a2..9c429c960c 100644 --- a/engines/scumm/he/logic/moonbase.cpp +++ b/gui/updates-dialog.h @@ -20,33 +20,35 @@ * */ -#include "scumm/he/intern_he.h" -#include "scumm/he/logic_he.h" +#ifndef GUI_UPDATES_DIALOG_H +#define GUI_UPDATES_DIALOG_H -namespace Scumm { +#include "gui/dialog.h" + +namespace GUI { + +class CheckboxWidget; +class CommandSender; +class ButtonWidget; +class PopUpWidget; /** - * Logic code for: - * Moonbase Commander + * Wizard for updates opt-in */ -class LogicHEmoonbase : public LogicHE { +class UpdatesDialog : public Dialog { public: - LogicHEmoonbase(ScummEngine_v90he *vm) : LogicHE(vm) {} + UpdatesDialog(); + virtual ~UpdatesDialog() {} - int versionID(); -}; + void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); -int LogicHEmoonbase::versionID() { - if (_vm->_game.features & GF_DEMO) - return -100; - else if (strcmp(_vm->_game.variant, "1.1") == 0) - return 110; - else - return 100; -} +private: + PopUpWidget *_updatesPopUp; + ButtonWidget *_yesButton; + ButtonWidget *_noButton; + CheckboxWidget *_updatesCheckbox; +}; -LogicHE *makeLogicHEmoonbase(ScummEngine_v90he *vm) { - return new LogicHEmoonbase(vm); -} +} // End of namespace GUI -} // End of namespace Scumm +#endif diff --git a/gui/widget.cpp b/gui/widget.cpp index 851774fd70..03540f7b91 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -229,20 +229,22 @@ Common::String Widget::cleanupHotkey(const Common::String &label) { #pragma mark - -StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip) +StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip, ThemeEngine::FontStyle font) : Widget(boss, x, y, w, h, tooltip), _align(align) { setFlags(WIDGET_ENABLED); _type = kStaticTextWidget; _label = text; + _font = font; } -StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip) +StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip, ThemeEngine::FontStyle font) : Widget(boss, name, tooltip) { setFlags(WIDGET_ENABLED); _type = kStaticTextWidget; _label = text; _align = g_gui.xmlEval()->getWidgetTextHAlign(name); + _font = font; } void StaticTextWidget::setValue(int value) { @@ -270,14 +272,14 @@ void StaticTextWidget::setAlign(Graphics::TextAlign align) { void StaticTextWidget::drawWidget() { - g_gui.theme()->drawText(Common::Rect(_x, _y, _x+_w, _y+_h), _label, _state, _align); + g_gui.theme()->drawText(Common::Rect(_x, _y, _x+_w, _y+_h), _label, _state, _align, ThemeEngine::kTextInversionNone, 0, true, _font); } #pragma mark - ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey) : StaticTextWidget(boss, x, y, w, h, cleanupHotkey(label), Graphics::kTextAlignCenter, tooltip), CommandSender(boss), - _cmd(cmd), _hotkey(hotkey), _lastTime(0) { + _cmd(cmd), _hotkey(hotkey), _lastTime(0), _duringPress(false) { if (hotkey == 0) _hotkey = parseHotkey(label); @@ -288,7 +290,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Co ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey) : StaticTextWidget(boss, name, cleanupHotkey(label), tooltip), CommandSender(boss), - _cmd(cmd), _hotkey(hotkey), _lastTime(0) { + _cmd(cmd), _hotkey(hotkey), _lastTime(0), _duringPress(false) { if (hotkey == 0) _hotkey = parseHotkey(label); setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG); @@ -296,13 +298,15 @@ ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Co } void ButtonWidget::handleMouseUp(int x, int y, int button, int clickCount) { - if (isEnabled() && x >= 0 && x < _w && y >= 0 && y < _h) { - startAnimatePressedState(); + if (isEnabled() && _duringPress && x >= 0 && x < _w && y >= 0 && y < _h) { + setUnpressedState(); sendCommand(_cmd, 0); } + _duringPress = false; } void ButtonWidget::handleMouseDown(int x, int y, int button, int clickCount) { + _duringPress = true; setPressedState(); } @@ -340,39 +344,17 @@ void ButtonWidget::setHighLighted(bool enable) { draw(); } -void ButtonWidget::handleTickle() { - if (_lastTime) { - uint32 curTime = g_system->getMillis(); - if (curTime - _lastTime > kPressedButtonTime) { - stopAnimatePressedState(); - } - } -} - void ButtonWidget::setPressedState() { - wantTickle(true); setFlags(WIDGET_PRESSED); + clearFlags(WIDGET_HILITED); draw(); } -void ButtonWidget::stopAnimatePressedState() { - wantTickle(false); - _lastTime = 0; +void ButtonWidget::setUnpressedState() { clearFlags(WIDGET_PRESSED); draw(); } -void ButtonWidget::startAnimatePressedState() { - _lastTime = g_system->getMillis(); -} - -void ButtonWidget::wantTickle(bool tickled) { - if (tickled) - ((GUI::Dialog *)_boss)->setTickleWidget(this); - else - ((GUI::Dialog *)_boss)->unSetTickleWidget(); -} - #pragma mark - PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd, uint8 hotkey) @@ -460,9 +442,10 @@ CheckboxWidget::CheckboxWidget(GuiObject *boss, const Common::String &name, cons } void CheckboxWidget::handleMouseUp(int x, int y, int button, int clickCount) { - if (isEnabled() && x >= 0 && x < _w && y >= 0 && y < _h) { + if (isEnabled() && _duringPress && x >= 0 && x < _w && y >= 0 && y < _h) { toggleState(); } + _duringPress = false; } void CheckboxWidget::setState(bool state) { @@ -523,9 +506,10 @@ RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, const Common::String &name } void RadiobuttonWidget::handleMouseUp(int x, int y, int button, int clickCount) { - if (isEnabled() && x >= 0 && x < _w && y >= 0 && y < _h) { + if (isEnabled() && _duringPress && x >= 0 && x < _w && y >= 0 && y < _h) { toggleState(); } + _duringPress = false; } void RadiobuttonWidget::setState(bool state, bool setGroup) { diff --git a/gui/widget.h b/gui/widget.h index 9891f32b36..7f6f0c0533 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -168,9 +168,10 @@ class StaticTextWidget : public Widget { protected: Common::String _label; Graphics::TextAlign _align; + ThemeEngine::FontStyle _font; public: - StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip = 0); - StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = 0); + StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold); + StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold); void setValue(int value); void setLabel(const Common::String &label); const Common::String &getLabel() const { return _label; } @@ -198,19 +199,15 @@ public: void handleMouseUp(int x, int y, int button, int clickCount); void handleMouseDown(int x, int y, int button, int clickCount); - void handleMouseEntered(int button) { setFlags(WIDGET_HILITED); draw(); } + void handleMouseEntered(int button) { if (_duringPress) { setFlags(WIDGET_PRESSED); } else { setFlags(WIDGET_HILITED); } draw(); } void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED | WIDGET_PRESSED); draw(); } - void handleTickle(); void setHighLighted(bool enable); void setPressedState(); - void startAnimatePressedState(); - void stopAnimatePressedState(); - - void lostFocusWidget() { stopAnimatePressedState(); } + void setUnpressedState(); protected: void drawWidget(); - void wantTickle(bool tickled); + bool _duringPress; private: uint32 _lastTime; }; diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp index 6186492339..0b2ea9fd4e 100644 --- a/gui/widgets/popup.cpp +++ b/gui/widgets/popup.cpp @@ -382,6 +382,16 @@ PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, const char *toolti _selectedItem = -1; } +PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip) + : Widget(boss, x, y, w, h, tooltip), CommandSender(boss) { + setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_IGNORE_DRAG); + _type = kPopUpWidget; + + _selectedItem = -1; + + _leftPadding = _rightPadding = 0; +} + void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) { if (isEnabled()) { PopUpDialog popupDialog(this, x + getAbsX(), y + getAbsY()); diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h index 102c7fd258..37ddc276ad 100644 --- a/gui/widgets/popup.h +++ b/gui/widgets/popup.h @@ -58,6 +58,7 @@ protected: public: PopUpWidget(GuiObject *boss, const String &name, const char *tooltip = 0); + PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0); void handleMouseDown(int x, int y, int button, int clickCount); void handleMouseWheel(int x, int y, int direction); diff --git a/po/POTFILES b/po/POTFILES index 49f3b6c372..dc4a19da2e 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -19,12 +19,14 @@ gui/recorderdialog.cpp gui/saveload-dialog.cpp gui/themebrowser.cpp gui/ThemeEngine.cpp +gui/updates-dialog.cpp gui/widget.cpp base/main.cpp common/error.cpp common/rendermode.cpp +common/updates.cpp engines/advancedDetector.cpp engines/dialogs.cpp diff --git a/po/be_BY.po b/po/be_BY.po index 5b80dc19aa..20bc062b5e 100644 --- a/po/be_BY.po +++ b/po/be_BY.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.8.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-21 23:32+0300\n" "Last-Translator: Ivan Lukyanov <greencis@mail.ru>\n" "Language-Team: Ivan Lukyanov <greencis@mail.ru>\n" @@ -56,10 +56,11 @@ msgstr "ĆŅÕąå" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -173,7 +174,7 @@ msgstr "ĮöŻćįŽöŌŠ" msgid "Triangle" msgstr "ĀąŽåŚćāŻŠļ" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "ĄŽ×ŻŠÕ" @@ -207,12 +208,12 @@ msgstr "ĮŚöŻćęģ ŻŠŪŠŌė FluidSynth ߊ ×ÜŠžēŠŻŻö." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -240,15 +241,15 @@ msgstr "·ŠŚąėęģ" msgid "Mouse click" msgstr "ŗŪöŚ Üėččć" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "æŠŚŠ×Šęģ ŚŪŠŅöļāćąć" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "æÕąŠßąėׯŠēėęģ ŚŪŠŅöčė" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "æÕąŠŚŪīēķŻŻÕ ŻŠ žŅÕįģ ķŚąŠŻ" @@ -324,8 +325,8 @@ msgstr "" "¼ŽŅŠ ÓćŪģŻö. ·ÜÕŻŠ ÓķāŠŁ ŻŠŪŠŌė ŻÕ ßÕąŠāŅŽąėęģ ąćįŚćī ŅÕąįöī ÓćŪģŻö ž " "ŃÕŪŠąćįŚćī" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<ߊ ×ÜŠžēŠŻŻö>" @@ -347,11 +348,11 @@ msgstr "æŪŠā䎹܊:" msgid "Engine" msgstr "ĄćåŠŅöēŽŚ" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "³ąŠäöŚŠ" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "³ąä" @@ -364,7 +365,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "æÕąŠŚąėęģ ÓŪŠŃŠŪģŻėļ ŻŠŪŠŌė ÓąŠäöŚö" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "°žŌėń" @@ -377,11 +378,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "æÕąŠŚąėęģ ÓŪŠŃŠŪģŻėļ ŻŠŪŠŌė ŠžŌėń" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "³ćēŻŠįęģ" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "³ćēŻŠįęģ" @@ -395,7 +396,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "æÕąŠŚąėęģ ÓŪŠŃŠŪģŻėļ ŻŠŪŠŌė ÓćēŻŠįęö" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -408,7 +409,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "æÕąŠŚąėęģ ÓŪŠŃŠŪģŻėļ ŻŠŪŠŌė MIDI" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -421,11 +422,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "æÕąŠŚąėęģ ÓŪŠŃŠŪģŻėļ ŻŠŪŠŌė MT-32" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "ČŪļåö" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "ČŪļåö" @@ -439,7 +440,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "ČŪļå ŌŠ ÓćŪģŻö:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "“ŠŌ. čŪļå:" @@ -447,42 +448,42 @@ msgstr "“ŠŌ. čŪļå:" msgid "Specifies path to additional data used by the game" msgstr "æŠŚŠ×ŅŠÕ čŪļå ŌŠ ŌŠŌŠāŚŽŅėå 䊣ŪŠž, ŌŠŌ×ÕŻėå ŌŪļ ÓćŪģŻö" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "“ŠŌ. čŪļå:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "·ŠåŠŅŠŻŻö ÓćŪģŻļž:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "æŠŚŠ×ŅŠÕ čŪļå ŌŠ ׊åŠŅŠŻŻļž ÓćŪģŻö" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "·ŠåŠŅŠŻŻö ÓćŪģŻļž:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "½Õ ׊ŌŠŌ×ÕŻė" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "æŠ ×ÜŠžēŠŻŻö" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "°ŃļąėęÕ SoundFont" @@ -494,7 +495,7 @@ msgstr "°ŃļąėęÕ ŌėąķŚāŽąėī × äŠŁŪŠÜö ÓćŪģŻö" msgid "Select additional game directory" msgstr "°ŃļąėęÕ ŌŠŌŠāŚŽŅćī ŌėąķŚāŽąėī ÓćŪģŻö" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "°ŃļąėęÕ ŌėąķŚāŽąėī ŌŪļ ׊åŠŅŠŻŻļž" @@ -502,7 +503,7 @@ msgstr "°ŃļąėęÕ ŌėąķŚāŽąėī ŌŪļ ׊åŠŅŠŻŻļž" msgid "This game ID is already taken. Please choose another one." msgstr "³ķāė ID ÓćŪģŻö žÖŽ ŅėŚŠąėįāŽžŅŠÕęęŠ. ŗŠŪö ŪŠįŚŠ, ŠŃļąėęÕ öŻčė." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~²~ėåŠŌ" @@ -590,17 +591,18 @@ msgid "Search:" msgstr "æŽčćŚ:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "·ŠÓąć×öęģ ÓćŪģŻī:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "·ŠÓąć×öęģ" @@ -687,132 +689,132 @@ msgstr "æÕąŠŚŪīēėęęŠ ž ÓćŪģŻī" msgid "Fast replay" msgstr "ÅćāŚŠÕ ßąŠŁÓąŠŅŠŻŻÕ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "½öŚŽŪö" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "ŚŽÖŻėļ 5 åŅöŪöŻ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "ŚŽÖŻėļ 10 åŅöŪöŻ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "ŚŽÖŻėļ 15 åŅöŪöŻ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "ŚŽÖŻėļ 30 åŅöŪöŻ" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 Ś³ę" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "½Õ ׊ŌŠŌ×ÕŻė" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "½Õ ŠāąėÜŠŪŠįļ žÖėęģ ×ÜÕŻė ŻÕŚŠāŽąėå ÓąŠäöēŻėå ŻŠŪŠŌ:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "ŅöŌķŠąķÖėÜ ŻÕ ÜŽÖŠ Ńėęģ ×ÜÕŻÕŻė." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "ߎžŻŠķŚąŠŻŻė ąķÖėÜ ŻÕ ÜŽÖŠ Ńėęģ ×ÜÕŻÕŻė" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "ąķÖėÜ ŚŠąķŚāėąŽžŚö įćŠŌŻŽįöŻ ŃŠŚŽž ŻÕ ÜŽÖŠ Ńėęģ ×ÜÕŻÕŻė" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "³ąŠä. ąķÖėÜ:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "ĄķÖėÜ ąŠįāąć:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "ĮßÕęėļŪģŻėļ ąķÖėÜė ąķŻŌķąėŻÓć, ߊŌāąėÜŽžŅŠŻėļ ŻÕŚŠāŽąėÜö ÓćŪģŻļÜö" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "掞ŻŠķŚąŠŻŻė ąķÖėÜ" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "ŗŠąķŚęėļ įćŠŌŻŽįöŻ ŃŠŚŽž" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "ŗŠąķŚāŠŅŠęģ įćŠŌŻŽįöŻė ŃŠŚŽž ŌŪļ ÓćŪģŻļž × ŠŌąŽ×ŻÕŻŻÕÜ 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "ĆߊŌŠŃŠŻŠļ ßąėŪŠŌŠ:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "³ćŚŠŅŠļ ßąėŪŠŌŠ:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "·Š×ŻŠēŠÕ žßŠŌŠŃŠŻćī Ó挊Ņćī ßąėŪŠŌć ęö ķÜćŪļāŠą Ó挊ŅŽŁ ŚŠąāė" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "·Š×ŻŠēŠÕ ŅėåŽŌŻćī Ó挊Ņćī ßąėŪŠŌć ęö ķÜćŪļāŠą Ó挊ŅŽŁ ŚŠąāė" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "ĆߊŌŠŃŠŻŠļ:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "³ćŚŠŅŠļ ßąėŪŠŌŠ:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "ĶÜćŪļāŠą AdLib:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "³ćŚŠŅŠļ ŚŠąāŠ AdLib ŅėŚŠąėįāŽžŅŠÕęęŠ ÜŻŽÓöÜö ÓćŪģŻļÜö" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "ĒŠčēėŻļ ÓćŚć:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -820,68 +822,68 @@ msgstr "" "±ŽŪģčėļ ׯŠēķŻŻö ׊ŌŠīęģ ŪÕßčćī ļŚŠįęģ ÓćŚć, ŠŌŻŠŚ ļŻė ÜŽÓćęģ ŻÕ " "ߊŌāąėÜŪöŅŠęęŠ ŅŠčŠŁ Ó挊ŅŽŁ ŚŠąāŠŁ" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "æąėŪŠŌŠ GM:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "·Š×ŻŠēŠÕ ŅėåŽŌŻćī Ó挊Ņćī ßąėŪŠŌć ŌŪļ MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "½Õ ŅėŚŠąėįāŽžŅŠęģ Üć×ėŚć ŌŪļ General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "²ėŚŠąėįāŽžŅŠęģ ßÕąčćī ŌŠįāć߯ćī ßąėŪŠŌć" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "SoundFont'ė ߊŌāąėÜŪöŅŠīęęŠ ŻÕŚŠāŽąėÜö Ó挊ŅėÜö ŚŠąāŠÜö, FluidSynth Ōė " "Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "·ÜÕ芯ė ąķÖėÜ AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "²ėŚŠąėįāŽžŅŠęģ ö MIDI, ö AdLib ŌŪļ ÓÕŻÕąŠęėö ÓćŚć" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "Ć×ÜŠęŻÕŻŻÕ MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "½ŠŪŠŌė FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "½ŠŪ. MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "æŠŚŠ×ŅŠÕ Ó挊Ņćī ßąėŪŠŌć ߊ ×ÜŠžēŠŻŻö ŌŪļ ŅėŅŠŌć ŻŠ Roland MT-32/LAPC1/CM32l/" "CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "ĮŠßąŠžŌŻė Roland MT-32 (׊ъąŠŻöęģ ķÜćŪļęėī GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -889,16 +891,16 @@ msgstr "" "°ŌׯŠēęÕ, ŚŠŪö ž ŅŠį ߊŌŚŪīēŠŻŠ Roland-įćÜļčēŠŪģŻŠļ Ó挊ŅŠļ ßąėŪŠŌŠ ö Ņė " "ÖŠŌŠÕęÕ ļÕ ŅėŚŠąėįāŽžŅŠęģ" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "ĮŠßąŠžŌŻė Roland MT-32 (ŃÕ× ķÜćŪļęėö GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "ĄķÖėÜ Roland GS (ŌŠ×ŅŽŪöęģ ÜŠßöŻÓ MT-32)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -906,171 +908,183 @@ msgstr "" "°ŌׯŠēęÕ, ŚŠŪö ÖŠŌŠÕęÕ ŌŠ×ŅŽŪöęģ ÜŠßöŻÓ ŌŪļ ķÜćŪļęėö MT-32 ŻŠ ßąėŪŠŌ×Õ " "Rolans GS" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "½Õ ŅėŚŠąėįāŽžŅŠęģ Üć×ėŚć ŌŪļ MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "ĀķŚįā ö ŠÓćēŚŠ:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "°ÓćēŚŠ" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "ĮćŃāėāąė" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "°ŃŽÕ" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "ÅćāŚŠįęģ āėāąŠž:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "ĀķŚįā ö ŠÓćēŚŠ:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "°Óćē" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "ĮćŃ" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "°ŃŽÕ" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "æŠŚŠ×ŅŠęģ įćŃāėāąė ö ßąŠŁÓąŠŅŠęģ ÓŠŅŽąŚć" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "ÅćāŚŠįęģ āėāąŠž:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "³ćēŻ. Üć×ėŚö:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "³ćēŻ. Üć×ėŚö:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "²ėŚŪ. ćįń" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "³ćēŻŠįęģ SFX:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "³ćēŻŠįęģ įßÕęėļŪģŻėå Ó挊Ņėå ķäÕŚāŠž" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "³ćēŻŠįęģ SFX:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "³ćēŻ. ŠÓćēŚö:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "³ćēŻ. ŠÓćēŚö:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "ČŪļå ŌŠ āķÜ:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "ČŪļå ŌŠ āķÜ:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "æŠŚŠ×ŅŠÕ čŪļå ŌŠ ŌŠŌŠāŚŽŅėå 䊣ŪŠž ŌŠŌ×ÕŻėå, ŅėŚŠąėįāŽžŅŠŻėå ćįöÜö ÓćŪģŻļÜö " "ŠŃŽ ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "ČŪļå ŌŠ ßŪŠÓöŻŠž:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "ČŪļå ŌŠ ßŪŠÓöŻŠž:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "ĄŽ×ŻŠÕ" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "ĀķÜŠ" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "¼ŠŪļŅŠŪŚŠ GUI:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "°žāŠ×ŠåŠŅŠŻŻÕ:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "°žāŠ×ŠåŠŅŠŻŻÕ:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "ŗŪŠŅöčė" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "¼ŽŅŠ GUI:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "¼ŽŅŠ ÓąŠäöēŻŠÓŠ öŻāķąäÕŁįć ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "²ė ߊŅöŻŻė ßÕąŠ×Šßćįęöęģ ScummVM, ŚŠŃ ćÖėęģ ×ÜÕŻė." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "½Õ ÜŠÓć ßöįŠęģ ć ŠŃąŠŻćī ŌėąķŚāŽąėī. ŗŠŪö ŪŠįŚŠ, Š×ŻŠēęÕ öŻčćī." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "°ŃļąėęÕ ŌėąķŚāŽąėī ŌŪļ āķÜ GUI" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "°ŃļąėęÕ ŌėąķŚāŽąėī × ŌŠŌŠāŚŽŅėÜö 䊣ŪŠÜö" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "°ŃļąėęÕ ŌėąķŚāŽąėī × ßŪŠÓöŻŠÜö" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1243,39 +1257,60 @@ msgstr "ĄŠįāŠąė׊āŠą įŠ ×ÓŪŠŌÖŅŠŻŻÕÜ" msgid "Antialiased" msgstr "ĮŠ ×ÓŪŠŌÖŅŠŻŻÕÜ" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "æąŠŅļąŠī ŠŃŻŠžŪÕŻŻö..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "°ēėįęöęģ ׯŠēķŻŻÕ" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "ĄćåŠŅöēŽŚ ŻÕ ߊŌāąėÜŪöŅŠÕ ž×ąŽŅÕŻģ ŠŌŪŠŌŚö '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "¼ÕŻī" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "æąŠßćįęöęģ" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "択׊" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "æąŠßćįęöęģ ąŠŌŽŚ" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "æŠÜėŪŚŠ ׊ßćįŚć ÓćŪģŻö:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "½Õ ÜŠÓć ׯŠŁįęö ąćåŠŅöēŽŚ ŌŪļ ׊ßćįŚć ŠŃąŠŻŠŁ ÓćŪģŻö" @@ -1370,17 +1405,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules ±ćąčāėŻŠŅė" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "°ēėįęöęģ ׯŠēķŻŻÕ" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "·ŌŠÕęęŠ, čāŽ ÓćŪģŻļ '%s' ļčēķ ŻÕŅļŌŽÜŠ." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "ŗŠŪö ŪŠįŚŠ, ßÕąŠŌŠŁęÕ ŻŠįāć߯ėļ ŌŠŌ×ÕŻėļ ŚŠÜŠŻŌ×Õ ScummVM ąŠ×ŠÜ × ŻŠ×ŅŠŁ" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "ÓćŪģŻö, ļŚćī Ņė įßąŠŃćÕęÕ ŌŠŌŠęģ, ö Š×ŻŠēęÕ ļÕ ŅÕąįöī, ÜŽŅć ö Ó.Ō." @@ -1388,11 +1440,11 @@ msgstr "ÓćŪģŻö, ļŚćī Ņė įßąŠŃćÕęÕ ŌŠŌŠęģ, ö Š×ŻŠēęÕ ļÕ ŅÕąįöī, ÜŽŅć ö Ó.Ō." msgid "~R~esume" msgstr "æąŠęļÓ~Ż~ćęģ" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "·Š~Ó~ąć×öęģ" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "·Š~ß~öįŠęģ" @@ -1421,9 +1473,9 @@ msgstr "³~Š~ŪŽžŻŠÕ ÜÕŻī" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1438,9 +1490,10 @@ msgstr "·ŠåŠŅŠęģ ÓćŪģŻī:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1466,13 +1519,13 @@ msgstr "" "׊ ъ׊ŅŠŁ öŻäŠąÜŠęėļŁ, Š āŠŚįŠÜŠ öŻįāąćŚęėļÜö ßąŠ āŽÕ, ļŚ ŠāąėÜŠęģ ŌŠŪÕŁčćī " "ŌŠßŠÜŽÓć." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~¾~ŗ" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~°~ŌÜÕŻŠ" @@ -1630,11 +1683,11 @@ msgstr "°žŌėń FM-Towns" msgid "PC-98 Audio" msgstr "°žŌėń PC-98" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "½ŠŪŠŌÖŅŠī ķÜćŪļāŠą MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "ĶÜćŪļāŠą MT-32" @@ -1751,11 +1804,11 @@ msgstr "ĄķÖėÜ ŠžāŠŌąķÓć ׊ąŠ×" msgid "Swipe three fingers to the right to toggle." msgstr "æąŠŅļŌ×öęÕ āąėÜŠ ߊŪģęŠÜö ŻŠßąŠŅŠ ŌŪļ ßÕąŠŚŪīēķŻŻļ." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (ŃÕ× äöŪģāąŠž)" @@ -2307,20 +2360,20 @@ msgstr "" "½Õ ׊ŃćŌ×ģęÕįļ ßąėׯŠēėęģ ŚŪŠŅöčć ŌŪļ Ō×ÕļŻŻļ 'Hide Toolbar', ŚŠŃ ćŃŠēėęģ " "ćŅÕįģ öŻŅÕŻāŠą ć ÓćŪģŻö" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "æąŠŅļąŠī ŠŃŻŠžŪÕŻŻö..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "²ėŚŠąėįāŽžŅŠęģ ŠąėÓöŻŠŪģŻėļ ķŚąŠŻė ׊ßöįć/ēėāŠŻŻļ ÓćŪģŻö" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2350,11 +2403,30 @@ msgstr "" "ĆŚŪīēŠÕ ߊŌāąėÜŚć Üėčė. “Š×ŅŠŪļÕ ŅėŚŠąėįāŽžŅŠęģ Üėč ŌŪļ ßÕąŠÜļčēķŻŻļ ö ž " "ÜÕŻī ÓćŪģŻö." +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules ·ļŪńŻė" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2364,13 +2436,13 @@ msgstr "ĆׯŠŅöęģ ÓćŪģŻī:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "ĆׯŠŅöęģ" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2381,7 +2453,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2392,7 +2464,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2638,29 +2710,39 @@ msgstr "" "ŠŌŚąėęģ ŠŌŪŠŌŠēŻćī ŚŠŻįŽŪģ ScummVM ö žŅÕįęö ŚŠÜŠŻŌć 'import_savefile'.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Ą~ķÖėÜ åćāŚŠÓŠ ßÕąŠåŽŌć ŠŚāėŅŠŅŠŻė" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~æ~ÕąŠåŽŌė ŠŚāėŅŠŅŠŻė" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~²~ėŚöŻćęģ įāŠąŽŻŚć" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "æ~Š~ŚŠ×Šęģ ŚŠąāć" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~³~ŠŪŽžŻŠÕ ÜÕŻī" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~Ķ~äÕŚāė ŅŠŌė žŚŪīēŠŻė" @@ -2781,37 +2863,37 @@ msgstr "°ŪģāķąŻŠāėžŻė žįāćß" msgid "Use an alternative game intro (CD version only)" msgstr "²ėŚŠąėįāŽžŅŠęģ ŠŪģāķąŻŠāėžŻė žįāćß (āŽŪģŚö ŌŪļ CD-ŅÕąįöö ÓćŪģŻö)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "½Õ ąŠŃöęģ ŠßąŠŚįöÜŠęėī ŚŽŪÕąŠž EGA (ߎžŻŠŚŠŪļąŽŅėļ 䎯ė)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "æąŠßćįŚŠÕ ßąŠåŽŌ ŠßąŠŚįöÜŠęėö ŚŽŪÕąŠž EGA, ÓąŠäöŚŠ ŃćŌ×Õ ßŠŚŠ×ŠŻŠ × ćįöÜö " "ŚŽŪÕąŠÜö" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "ĆŚŪīēėęģ ŠŌŪīįāąŠŅŠŻŻÕ ÓąŠäöŚö ŅėįŽŚŠÓŠ ŠŌąŽ×ŻÕŻŻļ" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "ĆŚŪīēėęģ ÓąŠäöŚć ö ŚŠŻāķŻā ŅėįŽŚŠÓŠ ŠŌąŽ×ŻÕŻŻļ" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "°ŌŌŠŅŠęģ ßÕąŠŅŠÓć ŪöēŃŠŅėÜ Ó挊ŅėÜ ķäÕŚāŠÜ" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "°ŌŌŠŅŠęģ ßÕąŠŅŠÓć ŪöēŃŠŅėÜ Ó挊ŅėÜ ķäÕŚāŠÜ ׊ÜÕįā įöŻāķ׊ŅŠŻėå" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "²ėŚŠąėįāŽžŅŠęģ IMF/Yamaha FB-01 ŌŪļ ŅėŅŠŌć MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2819,37 +2901,46 @@ msgstr "" "²ėŚŠąėįāŽžŅŠęģ Ó挊Ņćī ŚŠąāć IBM Music Feature ęö ÜŽŌćŪģ įöŻāķ×ć Yamaha " "FB-01 FM ŌŪļ MIDI" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "²ėŚŠąėįāŽžŅŠęģ CD-ŠžŌėń" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "" "²ėŚŠąėįāŽžŅŠęģ Ó挊Ņėļ ŌŠąŽÖŚö × CD ׊ÜÕįā Üć×ėŚö × äŠŁŪŠž ÓćŪģŻö (ŚŠŪö " "ŌŠįāć߯Š)" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "²ėŚŠąėįāŽžŅŠęģ ŚćąįŽąė Windows" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "²ėŚŠąėįāŽžŅŠęģ ŚćąįŽąė Windows (ÜÕŻčėļ ߊ ߊÜÕąė ö ŠŌŻŠŚŠŪļąŽŅėļ) ׊ÜÕįā " "ŚćąįŽąŠž DOS" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "²ėŚŠąėįāŽžŅŠęģ įąķŃŻėļ ŚćąįŽąė" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "²ėŚŠąėįāŽžŅŠęģ ŠŪģāķąŻŠāėžŻė ŻŠŃŽą įąķŃŻėå ŚćąįŽąŠž ׊ÜÕįā ×ŅėēŠŁŻėå ׊ŪŠāėå" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "æŠŚŠ×ŅŠęģ ŻŠ×Ņė ŠŃ'ÕŚāŠž" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3515,7 +3606,7 @@ msgstr "³ćēŻ. Üć×ėŚö: " msgid "Subtitle speed: " msgstr "ÅćāŚŠįęģ āėāąŠž: " -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3524,7 +3615,7 @@ msgstr "" "ĄķÖėÜ \"ąŽŌŻŠÓŠ\" MIDI ߊāąŠŃćÕ ŠŃŻŠžŪÕŻŻÕ Roland Upgrade ŠŌ\n" "LucasArts, ŠŪÕ ŻÕ åŠßŠÕ %s. æÕąŠŚŪīēŠīįļ ŻŠ AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3707,6 +3798,15 @@ msgstr "æŠŚŠ×ŅŠęģ ŻŠ×Ņė ŠŃ'ÕŚāŠž" msgid "Show labels for objects on mouse hover" msgstr "æŠŚŠ×ŅŠÕ ŻŠ×Ņė ŠŃ'ÕŚāŠž ßąė ŻŠŅļŌ×ÕŻŻö ŚćąįŽąŠ Üėčė" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/ca_ES.po b/po/ca_ES.po index 857e7de99e..baffd40199 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.6.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2013-05-05 14:16+0100\n" "Last-Translator: Jordi Vilalta Prat <jvprat@jvprat.com>\n" "Language-Team: Catalan <scummvm-devel@lists.sf.net>\n" @@ -53,10 +53,11 @@ msgstr "Amunt" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -171,7 +172,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Triangle" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Misc" @@ -205,12 +206,12 @@ msgstr "Retorna tots els ajustos de FluidSynth als seus valors per defecte." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -240,15 +241,15 @@ msgstr "Tanca" msgid "Mouse click" msgstr "Clic del ratolķ" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Mostra el teclat" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Assigna les tecles" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Commuta la pantalla completa" @@ -324,8 +325,8 @@ msgstr "" "Idioma del joc. Aixņ no convertirą la vostra versió Espanyola del joc a " "Anglčs" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<per defecte>" @@ -347,11 +348,11 @@ msgstr "Platafor.:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grąfics" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -364,7 +365,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Canviar les opcions de grąfics" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Ąudio" @@ -377,11 +378,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Canviar les opcions d'ąudio" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volum" @@ -395,7 +396,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Canviar les opcions de volum" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -408,7 +409,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Canviar les opcions de MIDI" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -421,11 +422,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Canviar les opcions de MT-32" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Camins" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Camins" @@ -439,7 +440,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Camķ joc:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Camķ extra:" @@ -447,42 +448,42 @@ msgstr "Camķ extra:" msgid "Specifies path to additional data used by the game" msgstr "Especifica el camķ de dades addicionals utilitzades pel joc" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Camķ extra:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Camķ de partides:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Especifica on es desaran les partides" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Partides:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Cap" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Per defecte" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Seleccioneu el fitxer SoundFont" @@ -494,7 +495,7 @@ msgstr "Seleccioneu el directori amb les dades del joc" msgid "Select additional game directory" msgstr "Seleccioneu el directori addicional del joc" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Seleccioneu el directori de les partides desades" @@ -503,7 +504,7 @@ msgid "This game ID is already taken. Please choose another one." msgstr "" "Aquest identificador de joc ja estą en śs. Si us plau, trieu-ne un altre." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~T~anca" @@ -593,17 +594,18 @@ msgid "Search:" msgstr "Cerca:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Carrega partida:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Carrega" @@ -695,132 +697,132 @@ msgstr "Commuta" msgid "Fast replay" msgstr "Mode rąpid" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Mai" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "cada 5 minuts" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "cada 10 minuts" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "cada 15 minuts" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "cada 30 minuts" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Cap" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "No s'han pogut aplicar alguns canvis de les opcions grąfiques:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "no s'ha pogut canviar el mode de vķdeo" -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "no s'ha pogut canviar l'ajust de pantalla completa" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "no s'ha pogut canviar l'ajust de la correcció d'aspecte" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Mode grąfic:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Mode de pintat:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Modes de tramat especials suportats per alguns jocs" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Mode pantalla completa" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Correcció de la relació d'aspecte" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Corregeix la relació d'aspecte per jocs de 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Disp. preferit:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Disp. de mśsica:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Especifica el dispositiu de so o l'emulador de tarja de so preferit" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Especifica el dispositiu de so o l'emulador de tarja de so de sortida" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Disp. preferit:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Disp. de mśsica:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "Emulador AdLib:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib s'utilitza per la mśsica de molts jocs" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Freq. sortida:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -828,67 +830,67 @@ msgstr "" "Valors més alts especifiquen millor qualitat de so perņ pot ser que la " "vostra tarja de so no ho suporti" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "Dispositiu GM:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "" "Especifica el dispositiu de so per defecte per a la sortida General MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "No utilitzis mśsica General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Utilitza el primer dispositiu disponible" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "Fitxer SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "Algunes targes de so, FluidSynth i Timidity suporten SoundFont" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Mode combinat AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Utilitza MIDI i la generació de so AdLib alhora" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "Guany MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "Configuració de FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "Disposit. MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Especifica el dispositiu de so per defecte per a la sortida de Roland MT-32/" "LAPC1/CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 real (desactiva l'emulació GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -896,189 +898,201 @@ msgstr "" "Marqueu si voleu utilitzar el vostre dispositiu hardware real de so " "compatible amb Roland connectat al vostre ordinador" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 real (sense emulació GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 #, fuzzy msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Mode Roland GS (desactiva el mapeig GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" msgstr "" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "No utilitzis mśsica de Roland MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Text i Veus:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Veus" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Subtķtols" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Ambdós" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Velocitat de subt.:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Text i Veus:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Veus" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Subt" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Ambdós" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Mostra els subtķtols i reprodueix la veu" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Veloc. de subt.:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Volum de mśsica:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Volum de mśsica:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Silenciar tot" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Volum d'efectes:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Volum dels sons d'efectes especials" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Volum d'efectes:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Volum de veus:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Volum de veus:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Camķ dels temes:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Camķ temes:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Especifica el camķ de les dades addicionals utilitzades per tots els jocs o " "pel ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Camķ dels connectors:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Camķ de connectors:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Misc" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "Pintat GUI:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Desat automątic:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Auto-desat:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Tecles" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Idioma GUI:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Idioma de la interfķcie d'usuari de ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Heu de reiniciar ScummVM perquč tots els canvis tinguin efecte." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "No es pot escriure al directori seleccionat. Si us plau, escolliu-ne un " "altre." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Seleccioneu el directori dels temes" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Seleccioneu el directori dels fitxers extra" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Seleccioneu el directori dels connectors" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1258,39 +1272,60 @@ msgstr "Pintat amb antialias (16bpp)" msgid "Antialiased" msgstr "Amb antialias (16bpp)" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Comprova les actualitzacions..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Neteja el valor" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "El motor no suporta el nivell de depuració '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menś" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Salta" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pausa" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Salta la lķnia" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Error al executar el joc:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "No s'ha pogut trobar cap motor capaē d'executar el joc seleccionat" @@ -1385,17 +1420,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Neteja el valor" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "El joc a '%s' sembla ser desconegut." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Informeu de la següent informació a l'equip de ScummVM juntament amb el" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "nom del joc que heu provat d'afegir i la seva versió/llengua/etc.:" @@ -1403,11 +1455,11 @@ msgstr "nom del joc que heu provat d'afegir i la seva versió/llengua/etc.:" msgid "~R~esume" msgstr "~C~ontinua" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "C~a~rrega" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~D~esa" @@ -1436,9 +1488,9 @@ msgstr "~R~etorna al Llanēador" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1453,9 +1505,10 @@ msgstr "Desa la partida:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1479,13 +1532,13 @@ msgstr "" "No s'ha pogut desar la partida (%s)! Consulteu el fitxer README per a la " "informació bąsica i les instruccions sobre com obtenir més assistčncia." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~D~'acord" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~C~ancel·la" @@ -1642,11 +1695,11 @@ msgstr "" msgid "PC-98 Audio" msgstr "Ąudio" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Iniciant l'Emulador de MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "Emulador de MT-32" @@ -1764,12 +1817,12 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 #, fuzzy msgid "OpenGL" msgstr "Obre" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "" @@ -2322,20 +2375,20 @@ msgstr "" "No us oblideu d'assignar una tecla a l'acció 'Ocultar la barra d'eines' per " "veure l'inventari complet" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Comprova les actualitzacions..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Utilitza les pantalles originals de desat/cąrrega" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2362,11 +2415,29 @@ msgid "" "Enables mouse support. Allows to use mouse for movement and in game menus." msgstr "" +#: engines/agi/detection.cpp:177 +msgid "Use Hercules hires font" +msgstr "" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2376,13 +2447,13 @@ msgstr "Recupera la partida:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Restaura" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2393,7 +2464,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2404,7 +2475,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2638,29 +2709,39 @@ msgid "" "\n" msgstr "" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "Mode ~Z~ip activat" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~T~ransicions activades" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~D~escarta la pągina" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~M~ostra el mapa" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~M~enś Principal" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~E~fecte de l'aigua activat" @@ -2784,37 +2865,37 @@ msgstr "Introducció alternativa" msgid "Use an alternative game intro (CD version only)" msgstr "Utilitza una introducció del joc alternativa (només per la versió CD)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 #, fuzzy msgid "Enable high resolution graphics" msgstr "Activa la barra grąfica dels punts d'impacte" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 #, fuzzy msgid "Enable high resolution graphics/content" msgstr "Activa la barra grąfica dels punts d'impacte" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Prefereix efectes de so digitals" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Prefereix els efectes de so digitals en lloc dels sintetitzats" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Utilitza IMF/Yamaha FB-01 per la sortida MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2822,37 +2903,46 @@ msgstr "" "Utilitza una tarja IBM Music Feature o un mņdul sintetitzador Yamaha FB-01 " "FM per la sortida MIDI" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Utilitza l'ąudio del CD" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "" "Utilitza l'ąudio del CD en lloc de l'ąudio intern del joc, si estą disponible" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Utilitza els cursors de Windows" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Utilitza els cursors de Windows (més petits i en blanc i negre) en lloc dels " "de DOS" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Utilitza cursors platejats" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Utilitza el conjunt alternatiu de cursors platejats, en lloc dels normals " "daurats" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Mostra les etiquetes dels objectes" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3524,7 +3614,7 @@ msgstr "Volum de mśsica:" msgid "Subtitle speed: " msgstr "Velocitat de subt.:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3533,7 +3623,7 @@ msgstr "" "El suport de MIDI natiu requereix l'actualització Roland de LucasArts,\n" "perņ no s'ha trobat %s. S'utilitzarą AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 #, fuzzy msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " @@ -3713,6 +3803,15 @@ msgstr "Mostra les etiquetes dels objectes" msgid "Show labels for objects on mouse hover" msgstr "Mostra etiquetes al posar el ratolķ sobre els objectes" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/cs_CZ.po b/po/cs_CZ.po index 3a308f977c..3a72b20898 100644 --- a/po/cs_CZ.po +++ b/po/cs_CZ.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.7.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-03 22:59+0100\n" "Last-Translator: Zbynģk Schwarz <zbynek.schwarz@gmail.com>\n" "Language-Team: \n" @@ -57,10 +57,11 @@ msgstr "Jķt nahoru" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -174,7 +175,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Trojśhrlnķk" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Rłzné" @@ -208,12 +209,12 @@ msgstr "Resetovat ve¹kerį nastavenķ FludSynth n ajejich vżchozķ hodnoty." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -243,15 +244,15 @@ msgstr "Zavųķt" msgid "Mouse click" msgstr "Kliknutķ my¹ķ" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Zobrazit klįvesnici" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Pųemapovat klįvesy" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Pųepnout celou obrazovku" @@ -325,8 +326,8 @@ msgid "" "English" msgstr "Jazyk hry. Toto z va¹ķ ©panģlské verze neudģlį Anglickou" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<vżchozķ>" @@ -348,11 +349,11 @@ msgstr "Platforma:" msgid "Engine" msgstr "Jįdro" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Obraz" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -365,7 +366,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Potlačit globįlnķ nastavenķ obrazu" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Zvuk" @@ -378,11 +379,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Potlačit globįlnķ nastavenķ zvuku" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Hlasitost" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Hlasitost" @@ -396,7 +397,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Potlačit globįlnķ nastavenķ hlasitosti" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -409,7 +410,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Potlačit globįlnķ nastavenķ MIDI" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -422,11 +423,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Potlačit globįlnķ nastavenķ MT-32" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Cesty" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Cesty" @@ -440,7 +441,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Cesta Hry:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Dodatečnį Cesta:" @@ -448,42 +449,42 @@ msgstr "Dodatečnį Cesta:" msgid "Specifies path to additional data used by the game" msgstr "Stanovķ cestu pro dodatečnį data pou¾itį ve hųe" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Dodatečnį Cesta:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Cesta pro ulo¾enķ:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Stanovuje, kam jsou umķstģny va¹e ulo¾ené hry" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Cesta pro ulo¾enķ:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "®įdné" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Vżchozķ" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Vybrat SoundFont" @@ -495,7 +496,7 @@ msgstr "Vyberte adresįų s daty hry" msgid "Select additional game directory" msgstr "Vyberte dodatečnż adresįų hry" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Vyberte adresįų pro ulo¾ené hry" @@ -503,7 +504,7 @@ msgstr "Vyberte adresįų pro ulo¾ené hry" msgid "This game ID is already taken. Please choose another one." msgstr "Toto ID hry je u¾ zabrané. Vyberte si, prosķm, jiné." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~U~končit" @@ -591,17 +592,18 @@ msgid "Search:" msgstr "Hledat:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Nahrįt hru:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Nahrįt" @@ -688,132 +690,132 @@ msgstr "Pųepnout do hry" msgid "Fast replay" msgstr "Rychlé pųehrįvįnķ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Nikdy" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "Ka¾dżch 5 min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "Ka¾dżch 10 min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "Ka¾dżch 15 min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "Ka¾dżch 30 min" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "®įdné" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Nelze pou¾ķt nģkteré zmģny mo¾nostķ grafiky:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "re¾im obrazu nemohl bżt zmģnģn." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "nastavenķ celé obrazovky nemohlo bżt zmģnģno" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "nastavenķ pomģru stran nemohlo bżt zmģnģno" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Re¾im obrazu:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Re¾im vykreslenķ:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Speciįlnķ re¾imy chvģnķ podporované nģkterżmi hrami" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Re¾im celé obrazovky" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Korekce pomģru stran" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Korigovat pomģr stran pro hry 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Prioritnķ Zaųķzenķ:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Hudebnķ zaųķzenķ" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Stanovķ prioritnķ zvukové zaųķzenķ nebo emulįtor zvukové karty" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Stanovķ vżstupnķ zvukové zaųķzenķ nebo emulįtor zvukové karty" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Prioritnķ Zaų.:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Hudebnķ zaųķzenķ" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib emulįtor" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib se pou¾ķvį pro hudbu v mnoha hrįch" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Vżstup. frekvence:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -821,66 +823,66 @@ msgstr "" "Vy¹¹ķ hodnota zpłsobķ lep¹ķ kvalitu zvuku, ale nemusķ bżt podporovįna Va¹i " "zvukovou kartou" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM Zaųķzenķ:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Stanovķ vżchozķ zvukové zaųķzenķ pro vżstup General MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Nepou¾ķvat hudbu General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Pou¾ķt prvnķ dostupné zaųķzenķ" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "SoundFont je podporovįn nģkterżmi zvukovżmi kartami, FluidSynth a Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Smķ¹enż re¾im AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Pou¾ķt obģ zvukové generace MIDI a AdLib" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "Zesķlenķ MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "Nastavenķ FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "Zaųķzenķ MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Stanovķ vżchozķ zvukové vżstupnķ zaųķzenķ pro Roland MT-32/LAPC1/CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Opravdovż Roland MT-32 (vypne GM emulaci)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -888,16 +890,16 @@ msgstr "" "Za¹krtnģte, pokud chcete pou¾ķt pravé hardwarové zaųķzenķ kompatibilnķ s " "Roland, pųipojené k va¹emu počķtači" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Opravdovż Roland MT-32 (¾įdnį GM emulace)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Zaųķzenķ Roland GS (zapne mapovįnķ MT-32)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -905,169 +907,181 @@ msgstr "" "Za¹krtnģte, pokud chcete povolit zįplaty mapovįnķ umo¾ņujķcķ emulovat MT-32 " "na zaųķzenķ Roland GS" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Nepou¾ķvat hudbu Roland MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Text a Ųeč" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Ųeč" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Titulky" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Oba" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Rychlost titulkł:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Text a Ųeč:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Ųeč" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Titl" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Oba" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Zobrazit titulky a pųehrįvat ųeč" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Rychlost titulkł" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Hlasitost hudby" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Hlasitost hudby" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Ztlumit V¹e" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Hlasitost zvukł" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Hlasitost speciįlnķch zvukovżch efektł" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Hlasitost zvukł" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Hlasitost ųeči" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Hlasitost ųeči" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Cesta ke Vzhledu:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Cesta ke Vzhledu:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Stanovķ cestu k dodatečnżm datłm pou¾ķvanį v¹emi hrami nebo ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Cesta k Pluginłm:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Cesta k Pluginłm:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Rłzné" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Vzhled:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "GUI Vykreslovač:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autouklįdįnķ:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autouklįdįnķ:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Klįvesy" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Jazyk GUI" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Jazyk GUI ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Pro pou¾itķ tģchto nastavenķ musķte restartovat ScummVM." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Do zvoleného adresįųe nelze zapisovat. Vyberte, prosķm, jinż." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Vyberte adresįų pro vhledy GUI" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Vyberte adresįų pro dodatečné soubory" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Vyberte adresįų pro zįsuvné moduly" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1240,39 +1254,60 @@ msgstr "Vykreslovač s vyhlazenżmi hranami" msgid "Antialiased" msgstr "S vyhlazenżmi hranami" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Zkontrolovat Aktualizace..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Vyčistit hodnotu" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Jįdro nepodporuje śroveņ ladģnķ '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menu" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Pųeskočit" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pauza" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Pųeskočit ųįdek" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Chyba pųi spu¹tģnķ hry:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Nelze nalézt ¾įdné jįdro schopné vybranou hru spustit" @@ -1367,16 +1402,33 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules Jantarovį" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Vyčistit hodnotu" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Hra v '%s' se zdį bżt neznįmį." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Prosķm nahlaste nįsledujķcķ data tżmu ScummVM spolu se jménem" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "hry, kterou jste se pokusili pųidat a jejķ verzi/jazyk/atd.:" @@ -1384,11 +1436,11 @@ msgstr "hry, kterou jste se pokusili pųidat a jejķ verzi/jazyk/atd.:" msgid "~R~esume" msgstr "~P~okračovat" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~N~ahrįt" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~U~lo¾it" @@ -1417,9 +1469,9 @@ msgstr "~N~įvrat do Spou¹tģče" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1434,9 +1486,10 @@ msgstr "Ulo¾it hru:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1461,13 +1514,13 @@ msgstr "" "Ulo¾enķ stavu hry selhalo (%s)! Prosķm pųečtģte si dokumentaci pro zįkladnķ " "informace a pokyny k zķskįnķ dal¹ķ podpory." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~Z~ru¹it" @@ -1623,11 +1676,11 @@ msgstr "Zvuk FM-Towns" msgid "PC-98 Audio" msgstr "Zvuk PC-98" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Zavįdķm MT-32 Emulįtor" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 Emulįtor" @@ -1744,11 +1797,11 @@ msgstr "Re¾im automatického ta¾enķ je nynķ" msgid "Swipe three fingers to the right to toggle." msgstr "Pro zapnutķ pųejeļte tųemi prsty doprava." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (bez filtrovįnķ)" @@ -2302,20 +2355,20 @@ msgstr "" "Nezapomeņte namapovat klįvesu k činnosti 'Skrżt Panel Nįstrojł, abyste " "vidģli celż inventįų" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Zkontrolovat Aktualizace..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Pou¾ķt płvodnķ obrazovky načtenķ/ulo¾enķ" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Pou¾ķt płvodnķ obrazovky načtenķ/ulo¾enķ mķsto ze ScummVM" @@ -2343,11 +2396,30 @@ msgstr "" "Povolķ podporu my¹i. Umo¾nķ pou¾ķt my¹ pro pohyb a pro ovlįdįnķ hernķch " "nabķdek." +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules Zelenį" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2357,13 +2429,13 @@ msgstr "Obnovit hru" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Obnovit" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2374,7 +2446,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2385,7 +2457,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2630,29 +2702,39 @@ msgstr "" "ladķcķ konzoli ScummVM a pou¾ķt pųķkaz 'import_savefile'.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~R~e¾im Svi¹tģnķ Aktivovįn" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~P~ųechody zapnuty" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~Z~ahodit Strįnku" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~Z~obrazit Mapu" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~H~lavnķ Menu" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~E~fekt Vody Zapnut" @@ -2775,36 +2857,36 @@ msgstr "Alternativnķ śvod" msgid "Use an alternative game intro (CD version only)" msgstr "Pou¾ķt jinou verzi śvodu (Pouze verze CD)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Pųekočit prłchod rozkladu barev EGA (pozadķ v plnżch barvįch)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Pųeskočit prłchod rozkladu barev EGA, obraze je zobrazen v plnżch barvįch" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Povolit grafiku ve vysokém rozli¹enķ" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Povolit grafiku/obsah ve vysokém rozli¹enķ" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Upųednostņovat digitįlnķ zvukové efekty" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Upųednostņovat digitįlnķ zvukové efekty pųed syntetizovanżmi" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Pou¾ķt IMF/Yamaha FB-01 pro vżstup MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2812,32 +2894,41 @@ msgstr "" "Pou¾ķt kartu IBM Music Feature nebo modul syntetizįtoru Yamaha FB-01 FM pro " "vżstup MIDI" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Pou¾ķt zvuky na CD" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Pou¾ķt zvuky na CD mķsto ve hųe, pokud je dostupné" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Pou¾ķt kurzory Windows" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "Pou¾ķt kurzory Windows (men¹ķ a černobķlé) mķsto kurzorł z DOS" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Pou¾ķt stųķbrné kurzory" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "Pou¾ķt alternativnķ sadu stųķbrnżch kurzorł mķsto standardnķch zlatżch" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Zobrazit jmenovky objektł" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3503,7 +3594,7 @@ msgstr "Hlasitost hudby:" msgid "Subtitle speed: " msgstr "Rychlost titulkł:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3512,7 +3603,7 @@ msgstr "" "Pųirozenį podpora MIDI vy¾aduje Aktualizaci Roland od LucasArts,\n" "ale %s chybķ. Mķsto toho je pou¾it AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3687,6 +3778,15 @@ msgstr "Zobrazit jmenovky objektł" msgid "Show labels for objects on mouse hover" msgstr "Zobrazit jmenovky objektł pųi najetķ my¹i" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/da_DK.po b/po/da_DK.po index 934297bd80..69692f03bc 100644 --- a/po/da_DK.po +++ b/po/da_DK.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-25 21:08+0100\n" "Last-Translator: Steffen Nyeland <steffen@nyeland.dk>\n" "Language-Team: Steffen Nyeland <steffen@nyeland.dk>\n" @@ -55,10 +55,11 @@ msgstr "Gå op" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -172,7 +173,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Triangulęr" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Andet" @@ -206,12 +207,12 @@ msgstr "Nulstil alle FluidSynth indstillinger til deres standard vęrdier." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -241,15 +242,15 @@ msgstr "Luk" msgid "Mouse click" msgstr "Muse klik" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Vis tastatur" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Kortlęg taster" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Skift fuldskęrm" @@ -325,8 +326,8 @@ msgstr "" "Spillets sprog. Dette vil ikke ęndre din spanske version af spillet til " "engelsk" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<standard>" @@ -348,11 +349,11 @@ msgstr "Platform:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafik" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -365,7 +366,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafik indstillinger" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Lyd" @@ -378,11 +379,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lyd indstillinger" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Lydstyrke" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Lydstyrke" @@ -396,7 +397,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale lydstyrke indstillinger" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -409,7 +410,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI indstillinger" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -422,11 +423,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32 indstillinger" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Stier" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Stier" @@ -440,7 +441,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Spil sti:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Ekstra sti:" @@ -448,42 +449,42 @@ msgstr "Ekstra sti:" msgid "Specifies path to additional data used by the game" msgstr "Angiver sti til ekstra data der bruges i spillet" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstra sti:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Gemme sti:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Angiver hvor dine gemmer bliver lagt" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Gemme sti:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Ingen" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Vęlg SoundFont" @@ -495,7 +496,7 @@ msgstr "Vęlg bibliotek med spil data" msgid "Select additional game directory" msgstr "Vęlg ekstra spil bibliotek" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Vęlg bibliotek til spil gemmer" @@ -503,7 +504,7 @@ msgstr "Vęlg bibliotek til spil gemmer" msgid "This game ID is already taken. Please choose another one." msgstr "Dette spil ID er allerede i brug. Vęlg venligst et andet." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~A~fslut" @@ -591,17 +592,18 @@ msgid "Search:" msgstr "Sųg:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Indlęs spil:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Indlęs" @@ -689,132 +691,132 @@ msgstr "Skift til Spil" msgid "Fast replay" msgstr "Hurtig afspil" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Aldrig" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "hvert 5. minut" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "hvert 10. minut" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "hvert 15. minut" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "hvert 30. minut" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Ingen" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Anvendelse af ęndringer for grafiske indstillinger fejlede:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "videotilstanden kunne ikke ęndres." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "fuld skęrm indstillingen kunne ikke ęndres" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "billedformat indstillingen ikke kunne ęndres" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Grafik tilstand:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Rendere tilstand:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Speciel farvereduceringstilstand understųttet a nogle spil" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Fuldskęrms tilstand" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Billedformat korrektion" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Korrekt billedformat til 320x200 spil" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Foretruk. enhed:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Musik enhed:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Angiver foretukket lyd enhed eller lydkort emulator" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Angiver lyd udgangsenhed eller lydkorts emulator" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Foretruk. enh.:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Musik enhed:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib emulator:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib bliver brugt til musik i mange spil" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Udgangsfrekvens:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -822,64 +824,64 @@ msgstr "" "Hųjere vęrdi angiver bedre lyd kvalitet, men understųttes måske ikke af dit " "lydkort" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM enhed:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Angiver standard lyd enhed for Generel MIDI-udgang" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Brug ikke Generel MIDI musik" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Brug fųrste tilgęngelig enhed" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "SoundFont er understųttet af nogle lydkort, FluidSynth og Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Blandet AdLib/MIDI tilstand" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Brug både MIDI og AdLib lyd generering" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDI lydstyrke:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "FluidSynth indstillinger" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32 enhed:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "Angiver standard lyd enhed for Roland MT-32/LAPC1/CM32I/CM64 udgang" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ęgte Roland MT-32 (undlad GM emulering)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -887,16 +889,16 @@ msgstr "" "Kryds af hvis du vil bruge din rigtige hardware Roland-kompatible lyd enhed " "tilsluttet til din computer" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Ęgte Roland MT-32 (ingen GM emulering)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland GS enhed (aktivér MT-32 tilknytninger)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -904,169 +906,181 @@ msgstr "" "Kryds af hvis du vil aktivere patch tilknytninger, for at emulere en MT-32 " "på en Roland GS enhed" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Brug ikke Roland MT-32 musik" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Tekst og tale:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Undertekster" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Begge" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Tekst hastighed:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Tekst og tale:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Tale" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Tekst" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Begge" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Vis undertekster og afspil tale" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Tekst hastighed:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Musik lydstyrke:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Musik lydstyrke:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Mute alle" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "SFX lydstyrke:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Lydstyrke for specielle lydeffekter" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "SFX lydstyrke:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Tale lydstyrke:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Tale lydstyrke:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Tema sti:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Tema sti:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Angiver sti til ekstra data brugt af alle spil eller ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Plugin sti:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugin sti:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Andet" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "GUI renderer:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Auto gemme:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Auto gemme:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Taster" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Sprog:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Sprog for brugerfladen i ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Du skal genstarte ScummVM fųr dine ęndringer har effekt." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Der kan ikke skrives til det valgte bibliotek. Vęlg venligst et andet." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Vęlg bibliotek for GUI temaer" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Vęlg bibliotek for ekstra filer" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Vęlg bibliotek for plugins" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1239,39 +1253,60 @@ msgstr "Antialias renderer" msgid "Antialiased" msgstr "Antialias" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Sųg efter opdateringer..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Slet vęrdi" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motor understųtter ikke fejlfindingsniveau '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menu" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Spring over" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Spring linje over" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Fejl ved kųrsel af spil:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Kunne ikke finde nogen motor istand til at afvikle det valgte spil" @@ -1366,17 +1401,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules brun" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Slet vęrdi" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Spillet i '%s' ser ud til at vęre ukendt." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Venligst, rapportere fųlgende data til ScummVM holdet sammen med navnet" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "på det spil, du forsųgte at tilfųje og dets version/sprog/ etc.:" @@ -1384,11 +1436,11 @@ msgstr "på det spil, du forsųgte at tilfųje og dets version/sprog/ etc.:" msgid "~R~esume" msgstr "Gen~o~ptag" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~H~ent" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~G~em" @@ -1417,9 +1469,9 @@ msgstr "~R~etur til oversigt" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1434,9 +1486,10 @@ msgstr "Gemmer:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1461,13 +1514,13 @@ msgstr "" "Gem af spiltilstand fejlede (%s)! Se venligst README for grundlęggende " "oplysninger, og for at få instruktioner om, hvordan man får yderligere hjęlp." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~F~ortryd" @@ -1623,11 +1676,11 @@ msgstr "FM Towns lyd" msgid "PC-98 Audio" msgstr "PC-98 lyd" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Initialisere MT-32 emulator" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 emulator" @@ -1744,11 +1797,11 @@ msgstr "Auto-tręk tilstand er nu" msgid "Swipe three fingers to the right to toggle." msgstr "Fųr tre fingre til hųjre for at skifte." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (Ingen filtrering)" @@ -2301,20 +2354,20 @@ msgstr "" "Glem ikke at tildele en tast til 'Skjul vęrktųjslinje' handling for at se " "hele oversigten" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Sųg efter opdateringer..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Brug original gem/indlęs skęrme" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Brug de originale gem/indlęs skęrme, istedet for dem fra ScummVM" @@ -2342,11 +2395,30 @@ msgstr "" "Aktivér muse support. Gųr det muligt at bruge musen til bevęgelse og i spil " "menuer." +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules grųn" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2356,13 +2428,13 @@ msgstr "Gendan spil:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Gendan" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2373,7 +2445,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2384,7 +2456,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2631,29 +2703,39 @@ msgstr "" "'import_savefile'.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Z~ip tilstand aktiveret" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~O~vergange aktiveret" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "Smi~d~ side" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "Vi~s~ kort" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "Hoved~m~enu" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~V~andeffekter aktiveret" @@ -2776,37 +2858,37 @@ msgstr "Alternativ intro" msgid "Use an alternative game intro (CD version only)" msgstr "Brug en alternativ spil intro (kun CD version)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Skip EGA farvereducering (fuldfarvet baggrunde)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Spring farvereducering i EGA spil over, grafikken bliver vist med fulde " "farver" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Aktivér grafik i hųj oplųsning" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Aktivér hųj oplųsnings grafik/indhold" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Foretręk digitale lydeffekter" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Foretręk digitale lydeffekter i stedet for syntetiserede" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Brug IMF/Yamaha FB-01 til MIDI-udgang" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2814,33 +2896,42 @@ msgstr "" "Bruge et IBM Musik Feature-kort eller et Yamaha FB-01 FM synth modul til " "MIDI-udgang" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Brug CD lyd" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Brug cd-lyd i stedet for lyd fra spillet, hvis tilgęngelige" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Brug Windows markųr" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "Brug Windows-markųrer (mindre og monokrome) i stedet for dem fra DOS" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Brug sųlv markųr" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Brug det alternative sęt af sųlv markųrer, i stedet for de normale gyldne" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Vis labels på genstande" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3506,7 +3597,7 @@ msgstr "Musik lydstyrke: " msgid "Subtitle speed: " msgstr "Tekst hastighed: " -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3515,7 +3606,7 @@ msgstr "" "Indbygget MIDI understųttelse kręver Roland opgradering fra LucasArts,\n" "men %s mangler. Bruger AdLib i stedet." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3695,6 +3786,15 @@ msgstr "Vis labels på genstande" msgid "Show labels for objects on mouse hover" msgstr "Vis labels for genstande musen er henover" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/de_DE.po b/po/de_DE.po index dbfeba57d5..65765ecca0 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -1,23 +1,22 @@ # German translation for ScummVM. # Copyright (C) 2010-2016 The ScummVM Team # This file is distributed under the same license as the ScummVM package. -# Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari <scummvm@rootfather.de>, 2016. +# Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari <rootfather@scummvm.org>, 2016. # msgid "" msgstr "" -"Project-Id-Version: ScummVM 1.8.0git\n" +"Project-Id-Version: ScummVM 1.9.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" -"PO-Revision-Date: 2016-02-22 20:53+0100\n" -"Last-Translator: Simon Sawatzki <SimSaw@gmx.de>\n" +"POT-Creation-Date: 2016-04-07 08:55+0200\n" +"PO-Revision-Date: 2016-05-01 15:45+0200\n" +"Last-Translator: Lothar Serra Mari <rootfather@scummvm.org>\n" "Language-Team: Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari " -"<scummvm@rootfather.de>\n" +"<rootfather@scummvm.org>\n" "Language: Deutsch\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Poedit 1.8.5\n" #: gui/about.cpp:94 #, c-format @@ -57,10 +56,11 @@ msgstr "Pfad hoch" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -174,7 +174,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Dreieck" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Sonstiges" @@ -200,7 +200,7 @@ msgstr "Siebenstufig" #: gui/fluidsynth-dialog.cpp:150 msgid "Reset" -msgstr "Rücksetzen" +msgstr "Zurücksetzen" #: gui/fluidsynth-dialog.cpp:150 msgid "Reset all FluidSynth settings to their default values." @@ -208,12 +208,12 @@ msgstr "Setzt alle FluidSynth-Einstellungen auf ihre Standard-Werte zurück." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -243,15 +243,15 @@ msgstr "Schließen" msgid "Mouse click" msgstr "Mausklick" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Tastatur anzeigen" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Tasten neu zuweisen" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Vollbild umschalten" @@ -327,8 +327,8 @@ msgstr "" "Sprache des Spiels. Diese Funktion wird nicht eine spanische Version des " "Spiels in eine deutsche verwandeln." -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<Standard>" @@ -350,11 +350,11 @@ msgstr "Plattform:" msgid "Engine" msgstr "Engine" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafik" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -367,7 +367,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Globale Grafik-Einstellungen übergehen" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Audio" @@ -380,11 +380,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Globale Audio-Einstellungen übergehen" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Lautstärke" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Lautst." @@ -398,7 +398,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Globale Lautstärke-Einstellungen übergehen" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -411,7 +411,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Globale MIDI-Einstellungen übergehen" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -424,11 +424,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Globale MT-32-Einstellungen übergehen" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Pfade" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Pfade" @@ -442,7 +442,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Spielpfad:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Extras:" @@ -450,42 +450,42 @@ msgstr "Extras:" msgid "Specifies path to additional data used by the game" msgstr "Legt das Verzeichnis für zusätzliche Spieldateien fest." -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Extras:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Spielstände:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Legt fest, wo die Spielstände gespeichert werden." -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Spielstände:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Keiner" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "SoundFont auswählen" @@ -497,7 +497,7 @@ msgstr "Verzeichnis mit Spieldateien auswählen" msgid "Select additional game directory" msgstr "Verzeichnis mit zusätzlichen Dateien auswählen" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Verzeichnis für Spielstände auswählen" @@ -505,7 +505,7 @@ msgstr "Verzeichnis für Spielstände auswählen" msgid "This game ID is already taken. Please choose another one." msgstr "Diese Spielkennung ist schon vergeben. Bitte eine andere wählen." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~B~eenden" @@ -595,17 +595,18 @@ msgid "Search:" msgstr "Suchen:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Spiel laden:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Laden" @@ -693,135 +694,135 @@ msgstr "Wechsle" msgid "Fast replay" msgstr "Schneller Modus" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Niemals" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "alle 5 Minuten" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "alle 10 Minuten" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "alle 15 Minuten" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "alle 30 Minuten" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Kein SoundFont" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Folgende Grafikoptionen konnten nicht geändert werden:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "Grafikmodus konnte nicht geändert werden." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "Vollbildeinstellung konnte nicht geändert werden." -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "" "Einstellung für Seitenverhältniskorrektur konnte nicht geändert werden." -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Grafikmodus:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Render-Modus:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "" "Spezielle Farbmischungsmethoden werden von manchen Spielen unterstützt." -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Vollbildmodus" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Seitenverhältnis korrigieren" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Seitenverhältnis für Spiele mit der Auflösung 320x200 korrigieren" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Bevorzugtes Gerät:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Musikgerät:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "Legt das bevorzugte Tonwiedergabe-Gerät oder den Soundkarten-Emulator fest." -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Legt das Musikwiedergabe-Gerät oder den Soundkarten-Emulator fest." -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Standard-Gerät:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Musikgerät:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib-Emulator" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib wird für die Musik in vielen Spielen verwendet." -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Ausgabefrequenz:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -829,68 +830,68 @@ msgstr "" "Höhere Werte bewirken eine bessere Soundqualität, werden aber möglicherweise " "nicht von jeder Soundkarte unterstützt." -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM-Gerät:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "" "Legt das standardmäßige Musikwiedergabe-Gerät für General-MIDI-Ausgabe fest." -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Keine General-MIDI-Musik" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Erstes verfügbares Gerät" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "SoundFont wird von einigen Soundkarten, FluidSynth und Timidity unterstützt." -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Gemischter AdLib/MIDI-Modus" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Kombiniert MIDI-Musik mit AdLib-Soundeffekten" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDI-Lautstärke:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "FluidSynth-Einstellungen" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32-Gerät:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Legt das standardmäßige Tonwiedergabe-Gerät für die Ausgabe von Roland MT-32/" "LAPC1/CM32l/CM64 fest." -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Echte Roland MT-32 (GM-Emulation deaktiviert)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -898,16 +899,16 @@ msgstr "" "Wählen Sie dies aus, wenn Sie ein echtes Roland-kompatibles Soundgerät " "verwenden" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Echte Roland MT-32 (keine GM-Emulation)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland-GS-Gerät (MT-32-Zuweisungen aktivieren)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -915,174 +916,186 @@ msgstr "" "Wählen Sie dies aus, wenn Sie ausbessernde Instrumentzuweisungen aktivieren " "möchten, um MT-32 auf einem Roland-GS-Gerät zu emulieren." -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Keine Roland-MT-32-Musik" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Sprache und Text:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Sprache" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Untertitel" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Beides" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Untertitel-Tempo:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Text u. Sprache:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Spr." -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Text" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "S+T" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Untertitel anzeigen und Sprachausgabe aktivieren" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Text-Tempo:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Musiklautstärke:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Musiklautstärke:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" -msgstr "Alles aus" +msgstr "Stumm" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Effektlautstärke:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Lautstärke spezieller Geräusch-Effekte" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Effektlautst.:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Sprachlautstärke:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Sprachlautst.:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Themen:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Themen:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Legt das Verzeichnis für zusätzliche Spieldateien für alle Spiele in ScummVM " "fest." -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Plugins:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugins:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Andere" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Thema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "GUI-Renderer:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autom. Speichern:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autospeichern:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Tasten" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Sprache:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Sprache der ScummVM-Oberfläche" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "Updates suchen:" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "Wie oft nach Aktualisierungen von ScummVM suchen?" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "Jetzt prüfen" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Sie müssen ScummVM neu starten, damit die Änderungen wirksam werden." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "In das gewählte Verzeichnis kann nicht geschrieben werden. Bitte ein anderes " "auswählen." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Verzeichnis für Oberflächen-Themen" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Verzeichnis für zusätzliche Dateien auswählen" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Verzeichnis für Erweiterungen auswählen" # Nicht übersetzen, da diese Nachricht nur für nicht-lateinische Sprachen relevant ist. -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1256,39 +1269,63 @@ msgstr "Kantenglättung" msgid "Antialiased" msgstr "Kantenglättung" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" +"ScummVM unterstützt die automatische Suche nach Aktualisierungen,\n" +"wozu ein Internetzugang erforderlich ist.\n" +"\n" +"Möchten Sie diese Funktion aktivieren?" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "(Sie können diese auch jederzeit im Options-Dialog unter dem Reiter \"Sonstiges\" aktivieren)" + +#: gui/updates-dialog.cpp:92 +msgid "Check for updates automatically" +msgstr "Automatisch nach Aktualisierungen suchen" + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "Fortfahren" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Wert löschen" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Engine unterstützt den Debug-Level \"%s\" nicht." -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menü" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Überspringen" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Zeile überspringen" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Fehler beim Ausführen des Spiels:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Konnte keine Spiel-Engine finden, die dieses Spiel starten kann." @@ -1383,18 +1420,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules Bernst." -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "täglich" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "wöchentlich" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "monatlich" + +#: common/updates.cpp:64 +msgid "<Bad value>" +msgstr "<Fehlerhafter Wert>" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Das Spiel im Verzeichnis \"%s\" scheint nicht bekannt zu sein." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Bitte geben Sie die folgenden Daten auf Englisch an das ScummVM-Team weiter " "sowie" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" "den Namen des Spiels, das Sie hinzufügen wollten, als auch die Version/" @@ -1404,11 +1457,11 @@ msgstr "" msgid "~R~esume" msgstr "~F~ortsetzen" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~L~aden" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~S~peichern" @@ -1437,9 +1490,9 @@ msgstr "Zur Spiele~l~iste" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1454,9 +1507,10 @@ msgstr "Speichern:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1480,13 +1534,13 @@ msgstr "" "Speichern des Spielstands %s fehlgeschlagen! Bitte lesen Sie die Liesmich-" "Datei für grundlegende Informationen und Anweisungen zu weiterer Hilfe." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~A~bbrechen" @@ -1646,11 +1700,11 @@ msgstr "FM-Towns-Audio" msgid "PC-98 Audio" msgstr "PC-98-Audio" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "MT-32-Emulator wird gestartet" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32-Emulation" @@ -1767,11 +1821,11 @@ msgstr "Automatisches Ziehen ist jetzt " msgid "Swipe three fingers to the right to toggle." msgstr "Zum Umschalten mit drei Fingern nach rechts wischen." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (ohne Filter)" @@ -2325,20 +2379,20 @@ msgstr "" "Vergessen Sie nicht, der Aktion \"Werkzeugleiste verbergen\" eine Taste " "zuzuweisen, um das ganze Inventar sehen zu können." -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Suche nach Aktualisierungen..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Originale Spielstand-Menüs" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2367,11 +2421,33 @@ msgstr "" "Aktiviere Maus-Unterstützung. Erlaubt die Verwendung der Maus zur Bewegung " "und in Menüs innerhalb des Spiels." +#: engines/agi/detection.cpp:177 +msgid "Use Hercules hires font" +msgstr "Verwende hochauflösende Hercules-Schrift" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" +"Verwende hochauflösende Hercules-Schriftart, wenn die Schriftarten-Datei " +"verfügbar ist." + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "Pausiere, wenn Befehle eingegeben werden" + +#: 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 "" +"Zeige eine Fenster mit einer Kommandozeile und pausiere das Spiel (wie in " +"SCI) anstelle einer Eingabe in Echtzeit." + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2381,13 +2457,13 @@ msgstr "Spiel laden:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Laden" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2398,7 +2474,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2409,7 +2485,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2660,29 +2736,39 @@ msgstr "" "\"import_savefile\" verwenden.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "Video vom Anflug auf Myst abspielen" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" +"Das Video, welches den Anflug auf Myst zeigt, wurde in der ursprünglichen " +"Engine nicht abgespielt." + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" -msgstr "Schneller ~R~aumwechsel aktiviert" +msgstr "~Zip-Modus aktiviert" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "Über~g~änge aktiviert" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" -msgstr "Seite ~w~egwerfen" +msgstr "Seite ~a~blegen" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +msgid "Show ~M~ap" msgstr "~K~arte anzeigen" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +msgid "Main Men~u~" msgstr "Haupt~m~enü" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~W~assereffekt aktiviert" @@ -2807,37 +2893,37 @@ msgstr "Alternativer Vorspann" msgid "Use an alternative game intro (CD version only)" msgstr "Verwendet einen alternativen Vorspann (nur bei CD-Version)." -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Überspringe EGA-Fehlerdiffusion (Vollfarbige Hintergründe)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Überspringe Fehlerdiffusion in EGA-Spielen, Grafik wird mit allen Farben " "gezeigt" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Aktiviere hochauflösende Grafik." -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Aktiviere hochauflösende Grafik/Inhalte" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Digitale Geräusch-Effekte bevorzugen" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Bevorzugt digitale Geräusch-Effekte statt synthethisierter." -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "IMF/Yamaha FB-01 für MIDI-Ausgabe verwenden" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2845,36 +2931,44 @@ msgstr "" "Verwendet eine Music-Feature-Karte von IBM oder ein Yamaha-FB-01-FM-" "Synthetisierungsmodul für die MIDI-Ausgabe." -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "CD-Ton verwenden" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Verwendet CD-Ton anstatt des Tons im Spiel, sofern verfügbar." -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Windows-Mauszeiger verwenden" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Verwendet die Windows-Mauszeiger (kleiner und schwarz-weiß) anstatt der von " "DOS." -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Silberne Mauszeiger verwenden" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Verwendet alternativen Satz silberner Mauszeiger anstatt der normalen " "goldenen." +#: engines/scumm/detection.cpp:1335 +msgid "Show Object Line" +msgstr "Objektzeile zeigen" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "Objektnamen und Verben am unteren Bildrand anzeigen" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3099,7 +3193,7 @@ msgstr "Zwischen Grafikfiltern wechseln" #: engines/scumm/help.cpp:102 msgid "Increase / Decrease scale factor" -msgstr "Größenverhätlnis höher/niedriger" +msgstr "Größenverhältnis höher/niedriger" #: engines/scumm/help.cpp:103 msgid "Toggle aspect-ratio correction" @@ -3540,7 +3634,7 @@ msgstr "Musiklautstärke:" msgid "Subtitle speed: " msgstr "Untertitel-Tempo:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3550,7 +3644,7 @@ msgstr "" "Roland-Upgrade von LucasArts, aber %s\n" "fehlt. Stattdessen wird AdLib verwendet." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3585,7 +3679,9 @@ msgstr "Originale Spielstand-Menüs verwenden" msgid "" "Files button in-game shows original savegame dialog rather than the ScummVM " "menu" -msgstr "Dateien-Schaltfläche im Spiel zeigt originales Spielstand-Menü statt dem von ScummVM." +msgstr "" +"Dateien-Schaltfläche im Spiel zeigt originales Spielstand-Menü statt dem von " +"ScummVM." #: engines/sherlock/detection.cpp:81 msgid "Pixellated scene transitions" @@ -3603,7 +3699,9 @@ msgstr "Bei Mausbewegung keine Klickpunkte anzeigen" msgid "" "Only show hotspot names after you actually click on a hotspot or action " "button" -msgstr "Zeigt Klickpunktnamen nur nach Klick auf selbigen oder auf einen Aktionspunkt." +msgstr "" +"Zeigt Klickpunktnamen nur nach Klick auf selbigen oder auf einen " +"Aktionspunkt." #: engines/sherlock/detection.cpp:101 msgid "Show character portraits" @@ -3619,7 +3717,8 @@ msgstr "Menüs in Blickfeld gleiten lassen" #: engines/sherlock/detection.cpp:112 msgid "Slide UI dialogs into view, rather than simply showing them immediately" -msgstr "Lässt Menüs in Blickfeld gleiten anstatt sie einfach sofort anzuzeigen." +msgstr "" +"Lässt Menüs in Blickfeld gleiten anstatt sie einfach sofort anzuzeigen." #: engines/sherlock/detection.cpp:121 msgid "Transparent windows" @@ -3733,6 +3832,17 @@ msgstr "Objektnamen zeigen" msgid "Show labels for objects on mouse hover" msgstr "Zeigt Objektbeschriftungen bei Mausberührung an." +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "Verwende englische Sprachausgabe" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" +"Verwende englische Sprachausgabe anstelle der deutschen, wenn eine andere " +"Sprache als Deutsch verwendet wird." + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/es_ES.po b/po/es_ES.po index 1593d4f815..784132da56 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-24 18:01+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -54,10 +54,11 @@ msgstr "Arriba" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -171,7 +172,7 @@ msgstr "Seno" msgid "Triangle" msgstr "Triįngulo" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Otras" @@ -205,12 +206,12 @@ msgstr "Volver a los valores por defecto de las opciones de FluidSynth" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -240,15 +241,15 @@ msgstr "Cerrar" msgid "Mouse click" msgstr "Clic de ratón" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Mostrar el teclado" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Asignar teclas" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Activar/Desactivar pantalla completa" @@ -324,8 +325,8 @@ msgstr "" "Idioma del juego. No sirve para pasar al inglés la versión espańola de un " "juego" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<por defecto>" @@ -347,11 +348,11 @@ msgstr "Plat.:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grįficos" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "Grįf." @@ -364,7 +365,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Opciones grįficas especķficas" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Sonido" @@ -377,11 +378,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Opciones de sonido especķficas" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volumen" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volumen" @@ -395,7 +396,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Opciones de volumen especķficas" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -408,7 +409,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Opciones de MIDI especķficas" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -421,11 +422,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Opciones de MT-32 especķficas" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Rutas" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Rutas" @@ -439,7 +440,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Juego:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Adicional:" @@ -447,42 +448,42 @@ msgstr "Adicional:" msgid "Specifies path to additional data used by the game" msgstr "Especifica un directorio para datos adicionales del juego" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Adicional:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Partidas:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Especifica dónde guardar tus partidas" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Partidas:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Ninguna" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Por defecto" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Selecciona un SoundFont" @@ -494,7 +495,7 @@ msgstr "Selecciona el directorio del juego" msgid "Select additional game directory" msgstr "Selecciona el directorio adicional" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Selecciona el directorio para partidas guardadas" @@ -502,7 +503,7 @@ msgstr "Selecciona el directorio para partidas guardadas" msgid "This game ID is already taken. Please choose another one." msgstr "Esta ID ya estį siendo usada. Por favor, elige otra." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~S~alir" @@ -590,17 +591,18 @@ msgid "Search:" msgstr "Buscar:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Cargar juego:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Cargar" @@ -688,135 +690,135 @@ msgstr "Volver al juego" msgid "Fast replay" msgstr "Repetición rįpida" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Nunca" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "cada 5 minutos" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "cada 10 minutos" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "cada 15 minutos" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "cada 30 minutos" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Ninguno" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Fallo al aplicar algunos cambios en las opciones grįficas:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "no se ha podido cambiar el modo de vķdeo." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "no se ha podido cambiar el ajuste de pantalla completa" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "no se ha podido cambiar el ajuste de corrección de aspecto" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Modo grįfico:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Renderizado:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Modos especiales de difuminado compatibles con algunos juegos" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Pantalla completa" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Corrección de aspecto" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Corregir relación de aspecto en juegos 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Disp. preferido:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Disp. de mśsica:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "Especifica qué dispositivo de sonido o emulador de tarjeta de sonido " "prefieres" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "" "Especifica el dispositivo de sonido o emulador de tarjeta de sonido de salida" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Disp. preferido:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Disp. de mśsica:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "Emul. de AdLib:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib se usa para la mśsica en muchos juegos" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Frec. de salida:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -824,68 +826,68 @@ msgstr "" "Los valores mįs altos ofrecen mayor calidad, pero puede que tu tarjeta de " "sonido no sea compatible" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "Dispositivo GM:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Especifica el dispositivo de salida General MIDI por defecto" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "No usar mśsica General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Utilizar el primer dispositivo disponible" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "SoundFont es compatible con algunas tarjetas de sonido, con FluidSynth y con " "Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Modo AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Usar tanto MIDI como AdLib en la generación de sonido" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "Ganancia MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "Opciones de FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "Disp. MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Especifica el dispositivo de sonido para la salida Roland MT-32/LAPC1/CM32l/" "CM64 por defecto" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 auténtica (desactivar emulación GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -893,16 +895,16 @@ msgstr "" "Marcar si se quiere usar un dispositivo de sonido real conectado al " "ordenador y compatible con Roland" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 real (sin emulación GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Dispositivo Roland GS (activar conversión MT-32)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -910,170 +912,182 @@ msgstr "" "Marca esta opción si quieres activar la conversión para emular una MT-32 en " "un dispositivo Roland GS" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "No usar mśsica Roland MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Texto y voces:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Voces" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Subtķtulos" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Ambos" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Vel. de subtķtulos:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Texto y voces:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Voz" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Subt" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "V&S" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Reproducir voces y subtķtulos" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Vel. de subt.:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Mśsica:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Mśsica:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Silenciar" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Efectos:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Volumen de los efectos de sonido" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Efectos:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Voces:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Voces:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Temas:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Temas:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Especifica el directorio adicional usado por los juegos y ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Plugins:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugins:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Otras" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "Interfaz:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autoguardado:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autoguardado:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Teclas" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Idioma:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Idioma de la interfaz de ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Tienes que reiniciar ScummVM para aplicar los cambios." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "No se puede escribir en el directorio elegido. Por favor, selecciona otro." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Selecciona el directorio de temas" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Selecciona el directorio adicional" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Selecciona el directorio de plugins" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1246,39 +1260,60 @@ msgstr "Suavizado" msgid "Antialiased" msgstr "Suavizado" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Buscar actualizaciones..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Eliminar valor" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "El motor no es compatible con el nivel de debug '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menś" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Saltar" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pausar" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Saltar frase" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Error al ejecutar el juego:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "No se ha podido encontrar ningśn motor capaz de ejecutar el juego" @@ -1373,16 +1408,33 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules įmbar" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Eliminar valor" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "El juego en '%s' parece ser desconocido." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Por favor, envķa al equipo de ScummVM esta información junto al nombre" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "del juego que has intentado ańadir y su versión/idioma/etc.:" @@ -1390,11 +1442,11 @@ msgstr "del juego que has intentado ańadir y su versión/idioma/etc.:" msgid "~R~esume" msgstr "~R~eanudar" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~C~argar" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~G~uardar" @@ -1423,9 +1475,9 @@ msgstr "~V~olver al lanzador" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1440,9 +1492,10 @@ msgstr "Guardar partida" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1468,13 +1521,13 @@ msgstr "" "archivo README para encontrar información bįsica e instrucciones sobre cómo " "obtener mįs ayuda." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~S~ķ" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~C~ancelar" @@ -1631,11 +1684,11 @@ msgstr "FM-Towns Audio" msgid "PC-98 Audio" msgstr "PC-98 Audio" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Iniciando el emulador de MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "Emulador de MT-32" @@ -1752,11 +1805,11 @@ msgstr "El modo de arrastre automįtico estį" msgid "Swipe three fingers to the right to toggle." msgstr "Desliza tres dedos hacia la derecha para cambiar de modo." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (sin filtros)" @@ -2309,20 +2362,20 @@ msgstr "" "No olvides asignar una tecla a la acción 'Ocultar barra de tareas' para ver " "todo el inventario" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Buscar actualizaciones..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Usar pantallas de guardar/cargar originales" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2351,11 +2404,30 @@ msgstr "" "Activa el ratón. Permite usar el ratón para moverse en el juego y en los " "menśs." +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules verde" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2365,13 +2437,13 @@ msgstr "Cargar partida:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Cargar" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2382,7 +2454,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2393,7 +2465,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2639,29 +2711,39 @@ msgstr "" "'import_savefile'.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "Modo ~Z~ip activado" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "Tra~n~siciones activadas" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~T~irar pįgina" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~M~ostrar el mapa" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~M~enś principal" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "Efecto ag~u~a activado" @@ -2785,37 +2867,37 @@ msgid "Use an alternative game intro (CD version only)" msgstr "" "Usa una introducción alternativa para el juego (solo para la versión CD)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Omitir difuminado EGA (colores completos)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Omitir pasada de difuminado en los juegos EGA. Los grįficos se muestran con " "los colores completos" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Activar grįficos de alta resolución" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Activar grįficos/contenido de alta resolución" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Preferir efectos de sonido digitales" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Preferir efectos de sonido digitales en vez de los sintetizados" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Usar IMF/Yamaha FB-01 para la salida MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2823,34 +2905,43 @@ msgstr "" "Usar una tarjeta IBM Music o un módulo sintetizador Yamaha FB-01 FM para la " "salida MIDI" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Usar CD audio" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Usar CD audio en vez del sonido interno del juego, si estį disponible" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Usar cursores de Windows" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Usar los cursores de Windows (mįs pequeńos y monocromos) en vez de los de DOS" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Usar cursores plateados" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Usar los cursores plateados alternativos, en vez de los dorados normales" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Mostrar etiquetas de objetos" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3516,7 +3607,7 @@ msgstr "Volumen de la mśsica:" msgid "Subtitle speed: " msgstr "Vel. de subtķtulos:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3525,7 +3616,7 @@ msgstr "" "El soporte MIDI nativo requiere la actualización Roland de LucasArts,\n" "pero %s no estį disponible. Se usarį AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3711,6 +3802,15 @@ msgstr "Mostrar etiquetas de objetos" msgid "Show labels for objects on mouse hover" msgstr "Muestra las etiquetas de los objetos al pasar el ratón" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2011-12-15 14:53+0100\n" "Last-Translator: Mikel Iturbe Urretxa <mikel@hamahiru.org>\n" "Language-Team: Librezale <librezale@librezale.org>\n" @@ -53,10 +53,11 @@ msgstr "Joan gora" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -170,7 +171,7 @@ msgstr "Sinua" msgid "Triangle" msgstr "Triangelua" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Beste" @@ -204,12 +205,12 @@ msgstr "Berrazarri FluidSynth-en ezarpen guztiak bere balio lehenetsietara" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -237,15 +238,15 @@ msgstr "Itxi" msgid "Mouse click" msgstr "Sagu-klika" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Erakutsi teklatua" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Esleitu teklak" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Txandakatu pantaila osoa" @@ -320,8 +321,8 @@ msgid "" msgstr "" "Jokoaren hizkuntza. Honek ez du zure ingelesezko bertsioa frantsesera pasako" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<lehenetsia>" @@ -343,11 +344,11 @@ msgstr "Plataforma:" msgid "Engine" msgstr "Motorea" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafikoak" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -360,7 +361,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Ezarpen grafiko globalak baliogabetu" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Soinua" @@ -373,11 +374,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Soinu ezarpen globalak baliogabetu" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Bolumena" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Bolumena" @@ -391,7 +392,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Bolumen ezarpen globalak baliogabetu" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -404,7 +405,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "MIDI ezarpen globalak baliogabetu" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -417,11 +418,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "MT-32 ezarpen globalak baliogabetu" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Bide-izenak" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Bideak" @@ -435,7 +436,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Jokoa:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Gehigarriak:" @@ -443,42 +444,42 @@ msgstr "Gehigarriak:" msgid "Specifies path to additional data used by the game" msgstr "Jokoak erabiltzen duen datu gehigarrien bide-izena" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Gehigarria:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Partida gordeak:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Zure gordetako partidak non gordeko diren zehazten du" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Partida gordeak:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Bat ere ez" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Lehenetsia" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "SoundFont-a aukeratu" @@ -490,7 +491,7 @@ msgstr "Jokoaren direktorioa aukeratu" msgid "Select additional game directory" msgstr "Direktorio gehigarria aukeratu" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Partida gordeen direktorioa aukeratu" @@ -498,7 +499,7 @@ msgstr "Partida gordeen direktorioa aukeratu" msgid "This game ID is already taken. Please choose another one." msgstr "ID hau jada erabilia izaten ari da. Mesedez, aukeratu beste bat." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~I~rten" @@ -586,17 +587,18 @@ msgid "Search:" msgstr "Bilatu:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Jokoa kargatu:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Kargatu" @@ -687,132 +689,132 @@ msgstr "Aldatu jokora" msgid "Fast replay" msgstr "Errepikappen bizkorra" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Inoiz ez" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "5 minuturo" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "10 minuturo" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "15 minuturo" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "30 minuturo" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Bat ere ez" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Ezin izan da grafikoen aukeretako batzuk aplikatu:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "ezin izan da bideo-modua aldatu." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "ezin izan da pantaila-osoaren ezarpena aldatu" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "formatu-ratioaren ezarpena ezin izan da aldatu" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Modu grafikoa:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Renderizazioa:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Joko batzuk onarturiko lausotze-modu bereziak" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Pantaila osoa" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Formatu-ratioaren zuzenketa" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "320x200 jokoentzako formatu-ratioa zuzendu" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Gogoko gailua:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Musika gailua:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Gogoko soinu txartel edo emuladorea zein den ezartzen du" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Irteerako soinu txartel edo emuladorea ezartzen du" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Gail. gogokoa:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Musika gailua:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib emuladorea:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib musikarako hainbat jokotan erabiltzen da" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Irteera maizt.:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -820,68 +822,68 @@ msgstr "" "Balio altuagoek soinu kalitate hobea ezartzen dute, baina baliteke zure " "soinu-txartela bateragarria ez izatea" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM gailua:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Defektuzko soinu txartela ezartzen du General MIDI irteerarako" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Ez erabili General MIDI musika" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Erabilgarri dagoen lehen gailua erabili" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "Zenbait soinu txartel bateragarriak dira SoundFont-ekin, FluidSynth eta " "Timidity besteak beste" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "AdLib/MIDI modua" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Soinua sortzerakoan MIDI eta AdLib erabili" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDI irabazia:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "FluidSynth Ezarpenak" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32 gailua:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Roland MT-32/LAPC1/CM32l/CM64 irteerarako defektuzko soinu txartela ezartzen " "du" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Benetako Roland MT-32 (GM emulazio gabe)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -889,16 +891,16 @@ msgstr "" "Markatu ordenagailura konektaturiko Roland-ekin bateragarria den soinu-" "gailua erabiltzeko" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Benetako Roland MT-32 (GM emulazio gabe)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland GS Gailua (gaitu MT-32 bihurketak)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -906,170 +908,182 @@ msgstr "" "Markatu Roland GS gailu batean MT-32 bat emulatzea ahalbidetzen " "dutenbihurketak gaitzeko" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Ez erabili Roland MT-32 musika" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Testu eta ahotsa:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Ahotsa" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Azpitituluak" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Biak" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Azpitit. abiadura:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Testu eta ahotsa:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Ahots." -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Azp." -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Biak" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Ahotsak erreproduzitu eta azpitituluak erakutsi" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Azpit. abiadura:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Musika:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Musika:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Mututu dena" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Efektuak:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Soinu efektu berezien bolumena" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Efektuak:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Ahotsak:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Ahotsak:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Gaiak:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Gaiak:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Joko guztiek edo ScummVM-k darabilten datu gehigarrien bide-izena ezartzen du" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Pluginak:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Pluginak:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Beste" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Gaia:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "Interfazea:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autogordetzea:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autogordetzea:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Teklak" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Hizkuntza" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "ScummVM interfazearen hizkuntza" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "ScummVM berrabiarazi behar duzu aldaketak indarrean jartzeko" -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Aukeraturiko direktorioan ezin da idatzi. Mesedez, aukeratu beste bat." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Gaien direktorioa aukeratu" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Fitxategi gehigarrien direktorioa aukeratu" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Pluginen direktorioa aukeratu" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1242,39 +1256,60 @@ msgstr "Errendatzaile lausotua" msgid "Antialiased" msgstr "Lausotua" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Eguneraketak bilatzen..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Balioa kendu:" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motoreak ez da '%s' debug mailarekin bateragarria" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menua" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Saltatu" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Gelditu" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Lerroa saltatu" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Jokoa exekutatzean errorea:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Ezin izan da aukeraturiko jokoa exekutatzeko gai den motorerik aurkitu" @@ -1369,16 +1404,33 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Herkules anbar-kolorekoa" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Balioa kendu:" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "'%s'-(e)ko jokoa ezezaguna dela dirudi" -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Mesedez, bidali hurrengo datuak ScummVM taldeari gehitzen saiatu zaren" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "jokoaren izen, bertsio/hizkuntza/e.a.-ekin batera:" @@ -1386,11 +1438,11 @@ msgstr "jokoaren izen, bertsio/hizkuntza/e.a.-ekin batera:" msgid "~R~esume" msgstr "~J~arraitu" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "Ka~r~gatu" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~G~orde" @@ -1419,9 +1471,9 @@ msgstr "It~z~uli abiarazlera" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1436,9 +1488,10 @@ msgstr "Gorde jokoa:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1462,13 +1515,13 @@ msgstr "" "Jokoaren egoera gordetzeak huts egin du (%s)! Jo ezazu README-ra oinarrizko " "informaziorako eta laguntza gehiago nola jaso jakiteko." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~A~dos" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~U~tzi" @@ -1624,11 +1677,11 @@ msgstr "FM-Towns soinua" msgid "PC-98 Audio" msgstr "PC-98 Soinua" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "MT-32 emuladorea hasieratzen" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 emuladorea" @@ -1745,11 +1798,11 @@ msgstr "Auto-arrastatzea orain:" msgid "Swipe three fingers to the right to toggle." msgstr "Pasatu hiru atzamar eskuinean gaitu/desgaitzeko." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (Iragazi gabe)" @@ -2302,20 +2355,20 @@ msgstr "" "Ez ahaztu 'tresna-barra ezkutatu' ekintza tekla bati esleitzea inbentario " "osoa ikusteko" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Eguneraketak bilatzen..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Erabili jatorrizko gorde/kargatu pantailak" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2344,11 +2397,30 @@ msgstr "" "Saguaren euskarria giatzen du. Sagua mugitzeko eta jokoko menuetan " "erabiltzea ahalbidetzen du" +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Herkules berdea" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2358,13 +2430,13 @@ msgstr "Jokoa kargatu:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Kargatu" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2375,7 +2447,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2386,7 +2458,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2632,29 +2704,39 @@ msgstr "" "nahi izanez gero ScummVM debug konsola ireki eta 'import_savefile'\n" "agindau erabili.\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Z~ip modua aktibaturik" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~T~rantsizioak gaituta" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "Orria ~b~ota" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~M~apa erakutsi" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "Menu ~n~agusia" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~U~r-efektua gaituta" @@ -2777,36 +2859,36 @@ msgstr "Sarrera alternatiboa" msgid "Use an alternative game intro (CD version only)" msgstr "Erabili sarrera alternatiboa (CD bertsioa soilik)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Saihestu EGA leuntze pausua (koloretako hondoak)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Saihestu leuntzea EGA jokoetan, grafikoak kolore guztiekin erakustendira" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Gaitu erresoluzio altuko grafikoak" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Gaitu erresoluzio altuko grafikoak/edukiak" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Lehenetsi soinu efektu digitalak" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Lehenetsi soinu efektu digitalak sintetizatuen ordez" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Erabili IMF/Yamaha FB-01 MIDI irteerarako" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2814,36 +2896,45 @@ msgstr "" "Erabili IBM Music Feature txartela edo Yamaha FB-01 FM " "sintetizatzailemodulua MIDI irteerarako" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Erabili audio CDa" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Erabili CD-ko audioa jokokoa beharrean, eskurarri badago" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Erabili Windows-eko kurtsoreak" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Erabili Windows-eko kurtsoreak (txikiagoak eta monokromoak) DOS-ekoak " "erabilibeharrean" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Erabili zilarrezko kurtsoreak" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Erabili zilar kolorezko kurtsore multzo alternatiboa, urre-koloreko " "kursorenormalak erabili beharrean" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Erakutsi objektuen etiketak" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3509,7 +3600,7 @@ msgstr "Musika: " msgid "Subtitle speed: " msgstr "Azpitit. abiadura:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3518,7 +3609,7 @@ msgstr "" "MIDI euskarri natiboak LucasArts-en Roland eguneraketa behar du,\n" "baina %s ez dago eskuragarri. AdLib erabiliko da." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3553,8 +3644,8 @@ msgid "" "Files button in-game shows original savegame dialog rather than the ScummVM " "menu" msgstr "" -"Jokoko Fitxategiak botoiak jatorrizko jokoa gordetzeko elkarrizketak erakusten " -"ditu, ScummVM-ren elkarrizketak erakutsi beharrean" +"Jokoko Fitxategiak botoiak jatorrizko jokoa gordetzeko elkarrizketak " +"erakusten ditu, ScummVM-ren elkarrizketak erakutsi beharrean" #: engines/sherlock/detection.cpp:81 msgid "Pixellated scene transitions" @@ -3590,8 +3681,8 @@ msgstr "Irristatu elkarrizketak" #: engines/sherlock/detection.cpp:112 msgid "Slide UI dialogs into view, rather than simply showing them immediately" -msgstr "Irristatu UI elkarrizketak pantailara, osorik bat-batean erakutsi " -"beharrean" +msgstr "" +"Irristatu UI elkarrizketak pantailara, osorik bat-batean erakutsi beharrean" #: engines/sherlock/detection.cpp:121 msgid "Transparent windows" @@ -3700,6 +3791,15 @@ msgstr "Erakutsi objektuen etiketak" msgid "Show labels for objects on mouse hover" msgstr "Erakutsi objektuen etiketak sagua pasatzean" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/fi_FI.po b/po/fi_FI.po index a306d8e537..bc0e1a269b 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.6.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2012-12-01 19:37+0200\n" "Last-Translator: Toni Saarela <saarela@gmail.com>\n" "Language-Team: Finnish\n" @@ -55,10 +55,11 @@ msgstr "Siirry ylös" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -176,7 +177,7 @@ msgstr "" msgid "Triangle" msgstr "" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Muut" @@ -210,12 +211,12 @@ msgstr "" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -244,15 +245,15 @@ msgstr "Sulje" msgid "Mouse click" msgstr "Hiiren klikkaus" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Näytä näppäimistö" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Määritä näppäimet uudelleen" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Kokoruututilan vaihto" @@ -328,8 +329,8 @@ msgstr "" "Pelin kieli. Tämä ei muuta esimerkiksi espanjankielistä versiota pelistä " "englanninkieliseksi." -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<oletus>" @@ -351,11 +352,11 @@ msgstr "Alusta:" msgid "Engine" msgstr "Moottori" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafiikka" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -368,7 +369,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Ohita globaalit grafiikka-asetukset" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Ääni" @@ -381,11 +382,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Ohita globaalit ääniasetukset" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Voimakkuus" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Voimakkuus" @@ -399,7 +400,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Ohita globaalit äänenvoimakkuusasetukset" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -412,7 +413,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Ohita globaalit MIDI-asetukset" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -425,11 +426,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Ohita globaalit MT-32 asetukset" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Polut" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Polut" @@ -443,7 +444,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Pelin polku:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Lisäkansio:" @@ -451,42 +452,42 @@ msgstr "Lisäkansio:" msgid "Specifies path to additional data used by the game" msgstr "Määrittää polun lisätiedostoihin joita peli mahdollisesti käyttää" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Lisäkansio:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Tallennuskansio:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Määrittää polun pelitallennuksille" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Tallennuskansio:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Ei määritelty" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Oletus" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Valitse äänifontti" @@ -498,7 +499,7 @@ msgstr "Valitse pelin kansio" msgid "Select additional game directory" msgstr "Valitse lisäkansio pelille" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Valitse kansio pelitallennuksille" @@ -506,7 +507,7 @@ msgstr "Valitse kansio pelitallennuksille" msgid "This game ID is already taken. Please choose another one." msgstr "Pelin tunnus on jo käytössä. Valitse jokin muu." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~L~opeta" @@ -594,17 +595,18 @@ msgid "Search:" msgstr "Etsi:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Lataa peli:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Lataa" @@ -698,134 +700,134 @@ msgstr "Vaihda" msgid "Fast replay" msgstr "Nopea moodi" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Ei koskaan" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "5 minuutin välein" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "10 minuutin välein" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "15 minuutin välein" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "30 minuutin välein" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Ei käytössä" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Joitain grafiikka-asetuksia ei saatu asetettua:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "videotilaa ei voitu vaihtaa." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "kokoruututilaa ei voitu muuttaa" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "kuvasuhdekorjausasetusta ei voitu muuttaa" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Grafiikkatila:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Renderöintitila:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Erityiset dithering asetukset joita jotkut pelit tukevat" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Kokoruututila" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Kuvasuhteen korjaus" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Oikea kuvasuhde 320x200 peleille" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Ensisijainen laite:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Musiikkilaite:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "Määrittää äänilaitteen tai äänikorttiemulaattorin jota ensisijaisesti tulisi " "käyttää" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Määrittää äänikortin tai äänikorttia emuloivan ohjelmiston" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Ensisijainen:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Musiikkilaite:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib emulaattori:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLibiä käytetään monien pelien musiikeissa" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Taajuus:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -833,65 +835,65 @@ msgstr "" "Isommat taajuudet merkitsevät parempaa äänenlaatua, mutta äänikorttisi ei " "ehkä tue niitä." -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM laite:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Määrittää oletuksena käytettävän äänilaitteen General MIDIlle" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Älä käytä General MIDIä musiikissa" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Käytä ensimmäistä laitetta" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "Äänifontti:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "Jotkut äänikortit tukevat äänifonttia (SoundFont), FluidSynth ja Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "Äänifontti:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Yhdistetty AdLib/MIDI tila" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Käytä sekä MIDIä että Adlibiä äänentuotantoon" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDIn äänilisäys:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32 laite:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "Määrittää oletusäänilaitteen Roland MT-32/LAPC1/CM32l/CM64:n käyttöön" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Aito Roland MT-32 (ei GM emulointia)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -899,187 +901,199 @@ msgstr "" "Valitse jos haluat käyttää aitoa Roland-yhteensopivaa laittetta joka on " "kytketty tietokoneeseesi" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Aito Roland MT-32 (ei GM emulointia)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 #, fuzzy msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Aito Roland MT-32 (ei GM emulointia)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" msgstr "" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Älä käytä Roland MT-32 musiikkia" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Tekstitys ja puhe:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Puhe" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Tekstitys" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Molemmat" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Tekstin nopeus:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Tekstitys ja puhe:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Puhe" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Tekstit" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Molemmat" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Näytä tekstitys ja käytä puhetta" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Tekstin nopeus:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Musiikki:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Musiikki:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Vaimenna" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Ääniefektit:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Erikoisefektit" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Ääniefektit:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Puhe:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Puhe:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Teemojen polku:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Teemojen polku:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Määrittää polun, jossa on lisätiedostoja joita ScummVM tai kaikki pelit " "käyttävät" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Pluginien sijainti:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Pluginien sijainti:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Muut" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Teema" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "GUI renderöijä:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autom. tallennus:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autom. tallennus:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Näppäimet" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "ScummVM:n kieli:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "ScummVM käyttöliittymän kieli" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "ScummVM pitää käynnistää uudelleen jotta muutokset tulevat voimaan." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Valittuun hakemistoon ei voi kirjoittaa. Valitse toinen hakemisto." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Valitse hakemisto käyttöliittymän teemoille" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Valitse hakemisto lisätiedostoille" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Valitse hakemisto plugineille" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1259,39 +1273,60 @@ msgstr "Antialiasoitu renderöijä (16 bpp)" msgid "Antialiased" msgstr "Antialiasoitu (16 bpp)" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Tarkista päivitykset..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Tyhjennä arvo" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Pelimoottori ei tue debug tasoa '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Valikko" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Ohita" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Tauko" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Ohita rivi" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Virhe ajettaessa peliä:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Pelimoottoria joka tukisi valittua peliä ei löytynyt" @@ -1386,17 +1421,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Tyhjennä arvo" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Peli hakemistossa '%s' näyttäisi olevan tuntematon." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Ole hyvä ja ilmoita ScummVM:n kehittäjille seuraavat tiedot, lisäksi kerro" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" "mikä peli oli kyseessä, ja sen versio, kieli, ja muut vastaavat tiedot." @@ -1405,11 +1457,11 @@ msgstr "" msgid "~R~esume" msgstr "~J~atka" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~L~ataa" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~T~allenna" @@ -1438,9 +1490,9 @@ msgstr "Palaa p~e~livalitsimeen" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1455,9 +1507,10 @@ msgstr "Tallenna peli:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1481,13 +1534,13 @@ msgstr "" "Pelitilan tallennus epäonnistui (%s)! Avaa LUEMINUT tiedosto saadaksesi " "lisätietoa." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~H~yväksy" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~P~eruuta" @@ -1642,11 +1695,11 @@ msgstr "" msgid "PC-98 Audio" msgstr "Ääni" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Alustetaan MT-32 emulaattoria" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 emulaattori" @@ -1765,12 +1818,12 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 #, fuzzy msgid "OpenGL" msgstr "Avaa" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "" @@ -2327,20 +2380,20 @@ msgstr "" "Muista määritellä näppäin työkalupalkin piilottamiselle, jotta voit nähdä " "koko tavaraluettelon" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Tarkista päivitykset..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Käytä alkuperäisiä tallenna/lataa valikkoja" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Käytä alkuperäisiä tallenna/lataa valikkoja, ScummVM valikoiden sijaan" @@ -2366,11 +2419,29 @@ msgid "" "Enables mouse support. Allows to use mouse for movement and in game menus." msgstr "" +#: engines/agi/detection.cpp:177 +msgid "Use Hercules hires font" +msgstr "" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2380,13 +2451,13 @@ msgstr "Lataa pelitallenne:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Lataa tallenne" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2397,7 +2468,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2408,7 +2479,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2640,29 +2711,39 @@ msgid "" "\n" msgstr "" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Z~ip moodi valittu" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "Siirtymät päällä" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "Pudota sivu" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "Näytä kartta" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "Päävalikko" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "Vesiefekti päällä" @@ -2785,71 +2866,80 @@ msgstr "Vaihtoehtoinen intro" msgid "Use an alternative game intro (CD version only)" msgstr "Käytä vaihtoehtoista pelin introa (vain CD versiossa)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 #, fuzzy msgid "Enable high resolution graphics" msgstr "Käytä kestopisteissä värillisiä grafiikkapalkkeja numeroiden sijaan" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 #, fuzzy msgid "Enable high resolution graphics/content" msgstr "Käytä kestopisteissä värillisiä grafiikkapalkkeja numeroiden sijaan" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Käytä mieluiten digitaalisia äänitehosteita." -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" "Käytä mieluiten digitaalisia äänitehosteita synteettisten tehosteiden sijaan." -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Käytä IMF/Yamaha FB-01:stä MIDI-musiikille" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" "Käytä IBM:n Music Feature korttia, tai Yamaha FB-01 FM moduulia MIDIlle" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Käytä CD:n ääntä" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Käytä CD:n audiota pelin audion sijaan, jos mahdollista." -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Käytä Windowsin kursoreita" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Käytä Windowsin kursoreita (pienempiä ja harmaasävyisiä) DOS kursorien sijaan" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Käytä hopeisia kursoreita" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "Käytä vaihtoehtoisia hopeisia kursoreita normaalien kultaisten sijaan" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Näytä esineiden tiedot" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3520,7 +3610,7 @@ msgstr "Musiikki:" msgid "Subtitle speed: " msgstr "Tekstin nopeus:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3529,7 +3619,7 @@ msgstr "" "Suora MIDI tuki vaatii Roland päivityksen LucasArtsilta, mutta\n" "%s puuttuu. Käytetään AdLibia sen sijaan." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 #, fuzzy msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " @@ -3702,6 +3792,15 @@ msgstr "Näytä esineiden tiedot" msgid "Show labels for objects on mouse hover" msgstr "Näytä esineiden kuvaus kohdistaessasi kursorin esineen ylle" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/fr_FR.po b/po/fr_FR.po index e223a96a54..05ac39d23d 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.8.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-20 23:17+0000\n" "Last-Translator: Thierry Crozat <criezy@scummvm.org>\n" "Language-Team: French <scummvm-devel@lists.sf.net>\n" @@ -55,10 +55,11 @@ msgstr "Remonter" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -172,7 +173,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Triangle" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Divers" @@ -206,12 +207,12 @@ msgstr "Remet tous les réglages ą leurs valeurs par défaut." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -240,15 +241,15 @@ msgstr "Fermer" msgid "Mouse click" msgstr "Clic de souris" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Afficher le clavier" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Changer l'affectation des touches" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Basculer en plein écran" @@ -324,8 +325,8 @@ msgstr "" "Langue du jeu. Cela ne traduira pas en anglais par magie votre version " "espagnole du jeu." -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<defaut>" @@ -347,11 +348,11 @@ msgstr "Systčme :" msgid "Engine" msgstr "Moteur" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Graphique" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -364,7 +365,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Réglages spécifiques ą ce jeux" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Audio" @@ -377,11 +378,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Réglages spécifiques ą ce jeux" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volume" @@ -395,7 +396,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Réglages spécifiques ą ce jeux" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -408,7 +409,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Réglages spécifiques ą ce jeux" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -421,11 +422,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Réglages spécifiques ą ce jeux" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Chemins" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Chemins" @@ -439,7 +440,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Chemin du Jeu :" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Extra :" @@ -447,42 +448,42 @@ msgstr "Extra :" msgid "Specifies path to additional data used by the game" msgstr "Définie un chemin vers des données suplémentaires utilisées par le jeu" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Extra :" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Sauvegardes :" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Définie l'emplacement oł les fichiers de sauvegarde sont créés" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Sauvegardes :" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Aucun" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Défaut" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Choisir une banque de sons" @@ -494,7 +495,7 @@ msgstr "Sélectionner le répertoire contenant les données du jeu" msgid "Select additional game directory" msgstr "Sélectionner un répertoire supplémentaire" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Sélectionner le répertoire pour les sauvegardes" @@ -502,7 +503,7 @@ msgstr "Sélectionner le répertoire pour les sauvegardes" msgid "This game ID is already taken. Please choose another one." msgstr "Cet ID est déją utilisé par un autre jeu. Choisissez en un autre svp." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~Q~uitter" @@ -591,17 +592,18 @@ msgid "Search:" msgstr "Filtre :" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Charger le jeu :" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Charger" @@ -690,134 +692,134 @@ msgstr "Retourner au jeu" msgid "Fast replay" msgstr "Rejouer rapidement" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Jamais" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "Toutes les 5 mins" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "Toutes les 10 mins" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "Toutes les 15 mins" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "Toutes les 30 mins" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Aucune" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Certaines options graphiques n'ont pu źtre changées :" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "le mode vidéo n'a pu źtre changé." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "le mode plein écran n'a pu źtre changé." -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "la correction de rapport d'aspect n'a pu źtre changée." -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Mode graphique :" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Mode de rendu :" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Mode spécial de tramage supporté par certains jeux" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Plein écran" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Correction du rapport d'aspect" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Corrige le rapport d'aspect pour les jeu 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Sortie Préféré :" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Sortie Audio :" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "Spécifie le périphérique de sortie audio ou l'émulateur de carte audio " "préféré" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Spécifie le périphérique de sortie audio ou l'émulateur de carte audio" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Sortie Préféré :" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Sortie Audio :" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "Émulateur AdLib :" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib est utilisé pour la musique dans de nombreux jeux" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Fréquence :" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -825,68 +827,68 @@ msgstr "" "Une valeur plus élevée donne une meilleure qualité audio mais peut ne pas " "źtre supporté par votre carte son" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "Sortie GM :" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Spécifie le périphérique audio par défaut pour la sortie General MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Ne pas utiliser la musique General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Utiliser le premier périphérique disponible" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "Banque de sons :" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "La banque de sons (SoundFont) est utilisée par certaines cartes audio, " "FluidSynth et Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont :" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Mode mixe AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Utiliser ą la fois MIDI et AdLib" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "Gain MIDI :" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "Paramčtres FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "Sortie MT-32 :" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Spécifie le périphérique audio par défaut pour la sortie Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 exacte (désactive l'émulation GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -894,16 +896,16 @@ msgstr "" "Vérifie si vous voulez utiliser un périphérique audio compatible Roland " "connecté ą l'ordinateur" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 exacte (pas d'ému GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland GS (active le mappage MT-32)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -911,174 +913,186 @@ msgstr "" "Utilisez cette option si vous voulez activez le mappage ą la volée pour une " "émulation MT-32 sur un appareil Roland GS." -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Ne pas utiliser la musique Roland MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Dialogue :" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Voix" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Sous-titres" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Les deux" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Vitesse des ST :" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Dialogue :" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Voix" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Subs" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "V&S" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Affiche les sous-titres et joue les dialogues audio" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Vitesse des ST :" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Volume Musique :" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Musique :" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Silence" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Volume Bruitage :" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Volume des effets spéciaux sonores" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Bruitage :" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Volume Dialogues :" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Dialogues :" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Thčmes :" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Thčmes :" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Spécifie un chemin vers des données supplémentaires utilisées par tous les " "jeux ou ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Plugins :" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugins :" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Divers" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Thčme :" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "Interface :" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Sauvegarde auto :" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Sauvegarde :" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Touches" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Langue :" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Langue de l'interface graphique de ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "Vérif. mises ą jour :" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "Fréquence des vérifications" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "Maintenant" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "" "Vous devez relancer ScummVM pour que le changement soit pris en compte." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "Le répertoire sélectionné est vérouillé en écriture. Sélectionnez un autre " "répertoire." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Sélectionner le répertoire des thčmes d'interface" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Sélectionner le répertoire pour les fichiers suplémentaires" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Sélectionner le répertoire des plugins" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1251,39 +1265,65 @@ msgstr "Rendu Anti-crénelé" msgid "Antialiased" msgstr "Anti-crénelé" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" +"ScummVM peut maintenant rechercher les mises ą jour\n" +"automatiquement, ce qui necessite un accčs internet.\n" +"\n" +"Voulez-vous activer cette options?" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" +"(Vous pouvez aussi activer cette option dans le tab 'Divers'\n" +"du dialogue d'options)" + +#: gui/updates-dialog.cpp:92 +msgid "Check for updates automatically" +msgstr "Vérifier les mises ą jour automatiquement" + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "Appliquer" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Effacer la valeur" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Le niveau de debug '%s' n'est pas supporté par ce moteur de jeu" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menu" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Passer" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Mettre en pause" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Passer la phrase" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Erreur lors de l'éxécution du jeu : " -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Impossible de trouver un moteur pour exécuter le jeu sélectionné" @@ -1378,18 +1418,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules Ambre" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "Une fois par jour" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "Une fois pas semaine" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "Une fois pas mois" + +#: common/updates.cpp:64 +msgid "<Bad value>" +msgstr "<Valeur invalide>" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Le jeu dans '%s' n'est pas reconnu." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Veuillez reporter les informations suivantes ą l'équipe ScummVM ainsi que le " "nom" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "du jeu que vous avez essayé d'ajouter, sa version, le langage, etc..." @@ -1397,11 +1453,11 @@ msgstr "du jeu que vous avez essayé d'ajouter, sa version, le langage, etc..." msgid "~R~esume" msgstr "~R~eprendre" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~C~harger" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~S~auver" @@ -1430,9 +1486,9 @@ msgstr "Retour au ~L~anceur" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1447,9 +1503,10 @@ msgstr "Sauvegarde :" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1474,13 +1531,13 @@ msgstr "" "Echec de la sauvegarde (%s)! Lisez le fichier README pour les informations " "de base et les instructions pour obtenir de l'aide supplémentaire." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~A~nnuler" @@ -1636,11 +1693,11 @@ msgstr "Audio FM Towns" msgid "PC-98 Audio" msgstr "Audio PC-98" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Initialisation de l'Émulateur MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "Émulateur MT-32" @@ -1757,11 +1814,11 @@ msgstr "Le mode glisser-auto est maintenant" msgid "Swipe three fingers to the right to toggle." msgstr "Glissez trois doigts vers la droite pour changer de mode." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (sans filtre)" @@ -2315,20 +2372,20 @@ msgstr "" "Noubliez pas d'affecter une touche ą l'action 'Cacher Bar d'Outils' pour " "pouvoir voir entičrement l'inventaire" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Recherche des mises ą jour..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Dialogues sauvegarde/chargement d'origine" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2358,11 +2415,32 @@ msgstr "" "Activer le support de la souris. Cela permet d'utiliser la souris pour les " "mouvements et la navigation dans les menus." +#: engines/agi/detection.cpp:177 +msgid "Use Hercules hires font" +msgstr "Utiliser les polices Hercules haute résolution" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" +"Utilise les polices Hercules haute résolution quand elles sont disponibles." + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "Pause lors de la saisie de commandes" + +#: 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 "" +"Affiche une fenźtre de saisie de commandes et interrompt le jeu (comme pour " +"les jeux SCI) ą la place d'un champ de saisie en temps réel." + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2372,13 +2450,13 @@ msgstr "Charger le jeu :" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Charger" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2389,7 +2467,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2400,7 +2478,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2647,29 +2725,37 @@ msgstr "" "\n" " \n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "Jouer la vidéo du survol de Myst" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "La vidéo du survol de Myst n'était pas jouée par le moteur originel." + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "Mode ~Z~ip Activé" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "T~r~ansitions activées" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~L~acher la Page" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" -msgstr "Afficher la Carte" +#: engines/mohawk/dialogs.cpp:103 +msgid "Show ~M~ap" +msgstr "Afficher la ~C~arte" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +msgid "Main Men~u~" msgstr "~M~enu Principal" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~E~ffets de l'Eau Activés" @@ -2792,37 +2878,37 @@ msgstr "Intro alternative" msgid "Use an alternative game intro (CD version only)" msgstr "Utiliser une intro alternative (version CD uniquement)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Passer l'étape de tramage EGA (fonds de couleurs pleines)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Passer l'étape de tramage dans les jeux EGA ; les images utilisent des " "couleurs pleines" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Utiliser les graphiques haute résolution" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Utiliser les graphiques haute résolution" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Préférer les effets sonores digitaux" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Préférer les effets sonores digitaux plutōt que ceux synthétisés" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Utiliser IMF/Yamaha FB-01 pour la sortie MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2830,36 +2916,44 @@ msgstr "" "Utiliser une carte IBM Music Feature ou un module Yamaha FB-01 FM pour la " "sortie MIDI" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Utiliser la musique du CD" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "" "Utiliser la musique du CD quand elle est disponible au lieu de la musique du " "jeu" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Utiliser les curseurs Windows" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Utiliser les curseurs Windows (plus petits et monochromes) au lieu des " "curseurs DOS" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Utiliser les curseurs argentés" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "Utiliser les curseurs argentés au lieu des curseurs normaux dorés" +#: engines/scumm/detection.cpp:1335 +msgid "Show Object Line" +msgstr "Afficher la barre d'objets" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "Afficher le nom des objets en bas de l'écran" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3525,7 +3619,7 @@ msgstr "Volume Musique :" msgid "Subtitle speed: " msgstr "Vitesse des ST :" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3534,7 +3628,7 @@ msgstr "" "Support MIDI natif requičre la mise ą jour Roland de LucasArt,\n" "mais %s manque. Utilise AdLib ą la place." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3723,6 +3817,17 @@ msgstr "Afficher la description des objets" msgid "Show labels for objects on mouse hover" msgstr "Afficher la description des objets lors de passage du pointeur" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "Utiliser les voix anglaises" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" +"Utilise les voix anglaises au lieu des voix allemandes pour tous les autres " +"langages" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/gl_ES.po b/po/gl_ES.po index 22b99fe2a7..1b2731dc5e 100644 --- a/po/gl_ES.po +++ b/po/gl_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.8.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-21 00:43+0100\n" "Last-Translator: Santiago G. Sanz <s.sanz@uvigo.es>\n" "Language-Team: Santiago G. Sanz <s.sanz@uvigo.es>\n" @@ -54,10 +54,11 @@ msgstr "Arriba" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -171,7 +172,7 @@ msgstr "Seno" msgid "Triangle" msgstr "Triįngulo" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Misc." @@ -206,12 +207,12 @@ msgstr "" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -241,15 +242,15 @@ msgstr "Pechar" msgid "Mouse click" msgstr "Premer co rato" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Mostrar teclado" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Asignar teclas" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Activar/desactivar pantalla completa" @@ -323,8 +324,8 @@ msgid "" "English" msgstr "Idioma do xogo. Non converterį a versión galega do xogo en inglesa" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<por defecto>" @@ -346,11 +347,11 @@ msgstr "Plataforma:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grįficos" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "Efectos grįficos" @@ -363,7 +364,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Anular a configuración dos grįficos" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Son" @@ -376,11 +377,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Anular a configuración do son" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volume" @@ -394,7 +395,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Anular a configuración do volume" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -407,7 +408,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Anular a configuración de MIDI" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -420,11 +421,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Anular a configuración de MT-32" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Camińos" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Camińos" @@ -438,7 +439,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Camińo do xogo:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Camińo adicional:" @@ -446,42 +447,42 @@ msgstr "Camińo adicional:" msgid "Specifies path to additional data used by the game" msgstr "Especifica o camińo dos datos adicionais usados no xogo" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Camińo adicional:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Camińo de gardado:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Especifica o lugar dos ficheiros de gardado" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Camińo de gardado:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Ningśn" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Predefinido" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Seleccionar SoundFont" @@ -493,7 +494,7 @@ msgstr "Selecciona un directorio con datos de xogo" msgid "Select additional game directory" msgstr "Selecciona un directorio con datos adicionais" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Selecciona un directorio para ficheiros de gardado" @@ -501,7 +502,7 @@ msgstr "Selecciona un directorio para ficheiros de gardado" msgid "This game ID is already taken. Please choose another one." msgstr "Este ID de xogo xa estį en uso. Selecciona outro." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~S~aķr" @@ -589,17 +590,18 @@ msgid "Search:" msgstr "Buscar:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Cargar partida:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Cargar" @@ -686,132 +688,132 @@ msgstr "Cambiar ao xogo" msgid "Fast replay" msgstr "Repetición rįpida" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Nunca" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "cada 5 min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "cada 10 min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "cada 15 min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "cada 30 min" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Ningunha" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Erro ao aplicar os cambios na configuración dos grįficos:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "non se puido cambiar o modo de vķdeo." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "non se puido cambiar a configuración de pantalla completa." -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "non se puido cambiar a proporción." -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Grįficos:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Procesamento:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Modos de interpolación de cores compatibles con algśns xogos" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Pantalla completa" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Corrección de proporción" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Corrixir a proporción para os xogos en 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Dispositivo preferido:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Dispositivo de mśsica:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Especifica o dispositivo ou emulador de tarxeta de son preferido" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Especifica o dispositivo ou emulador de tarxeta de son de saķda" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Disp. preferido:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Disp. mśsica:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "Emulador de AdLib:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "Moitos xogos empregan AdLib para a mśsica" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Taxa de saķda:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -819,84 +821,84 @@ msgstr "" "A maior valor, maior calidade do son, mais talvez non sexa compatible coa " "tarxeta" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "Dispositivo de GM:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "" "Especifica o dispositivo de son por defecto para a saķda de General MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Non empregar mśsica en General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Empregar o primeiro dispositivo dispońible" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "SoundFont é compatible con algunhas tarxetas de son, FluidSynth e Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Modo AdLib/MIDI mixto" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Empregar xeración de son MIDI e mįis AdLib" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "Ganancia de MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "Configuración de FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "Dispositivo de MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Especifica o dispositivo por defecto para a saķda de Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 verdadeiro (sen emulación de GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" msgstr "" "Marcar para empregar o hardware compatible con Roland conectado ao sistema" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 (sen emulación de GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Dispositivo Roland GS (activar atribución MT-32)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -904,170 +906,182 @@ msgstr "" "Marcar para activar a atribución de parches e emular MT-32 nun dispositivo " "Roland GS" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Non empregar mśsica en Roland MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Texto e voz:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Voz" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Subtķtulos" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Ambos" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Velocidade dos subtķtulos:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Texto e voz:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Voz" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Subs" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Ambos" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Mostrar os subtķtulos e reproducir as voces" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Velocidade subs:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Volume de mśsica:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Volume mśsica:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Silenciar todo" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Volume de efectos:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Volume dos efectos de son" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Volume efectos:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Volume de voz:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Volume voz:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Camińo do tema:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Camińo tema:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Especificar o camińo dos datos adicionais de todos os xogos ou de ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Camińo dos complementos:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Camińo complementos:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Misc." -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "Procesamento da interfaz:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autogardado:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autogardado:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Teclas" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Idioma de interfaz:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Idioma da interfaz de ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Debes reiniciar ScummVM para que os cambios teńan efecto." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Non é posible escribir no directorio elixido. Selecciona outro." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Seleccionar directorio para temas de interfaz" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Seleccionar directorio para ficheiros adicionais" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Seleccionar directorio para complementos" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1240,39 +1254,60 @@ msgstr "Procesamento antidistorsión" msgid "Antialiased" msgstr "Antidistorsión" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Buscar actualizacións..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Limpar valor" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "O motor non é compatible co nivel de depuración %s" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menś" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Omitir" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pausa" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Omitir lińa" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Erro de execución do xogo:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Non se puido atopar un motor para executar o xogo seleccionado" @@ -1367,16 +1402,33 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules įmbar" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Limpar valor" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "O xogo de %s semella ser descońecido." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Facilita esta información ao equipo de ScummVM, xunto co nome" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "do xogo que tentaches engadir, xunto coa versión, lingua, etc.:" @@ -1384,11 +1436,11 @@ msgstr "do xogo que tentaches engadir, xunto coa versión, lingua, etc.:" msgid "~R~esume" msgstr "~R~etomar" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~C~argar" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~G~ardar" @@ -1417,9 +1469,9 @@ msgstr "~V~olver ao Iniciador" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1434,9 +1486,10 @@ msgstr "Gardar partida:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1461,13 +1514,13 @@ msgstr "" "Erro ao gardar (%s)! Consulta o ficheiro README para obter información " "bįsica e mįis instrucións para acadar asistencia adicional." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~A~ceptar" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~C~ancelar" @@ -1623,11 +1676,11 @@ msgstr "FM-Towns Audio" msgid "PC-98 Audio" msgstr "PC-98 Audio" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Iniciando emulador de MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "Emulador de MT-32" @@ -1744,11 +1797,11 @@ msgstr "O modo Autoarrastrar estį" msgid "Swipe three fingers to the right to toggle." msgstr "Arrastra tres dedos į dereita para cambiar o estado." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (Sen filtraxe)" @@ -2300,20 +2353,20 @@ msgstr "" "Non esquezas asignar unha tecla į acción Ocultar barra de ferramentas para " "ver o inventario completo" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Buscar actualizacións..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Empregar pantallas orixinais de gardado e carga" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2342,11 +2395,30 @@ msgstr "" "Activa a compatibilidade co rato. Permite o uso do rato para o movemento e " "os menśs do xogo." +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules verde" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2356,13 +2428,13 @@ msgstr "Restaurar xogo:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Restaurar" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2373,7 +2445,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2384,7 +2456,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2631,29 +2703,39 @@ msgstr "" "\".\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "Modo ~C~omprimido activado" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~T~ransicións activadas" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~D~eixar folla" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "Mo~s~trar mapa" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~M~enś principal" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "Efecto de ~a~uga activado" @@ -2775,37 +2857,37 @@ msgstr "Intro alternativa" msgid "Use an alternative game intro (CD version only)" msgstr "Emprega unha introdución alternativa para o xogo (só versión en CD)." -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Omitir interpolación de cores EGA (fondos de cor completa)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Omite a interpolación de cores EGA. Os grįficos móstranse con cores " "completas." -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Activar grįficos de alta resolución" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Activa os grįficos ou o contido de alta resolución." -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Preferir efectos de son dixitais" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Dį preferencia aos efectos de son dixitais no canto dos sintéticos." -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Empregar IMF/Yamaha FB-01 para a saķda de MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2813,36 +2895,45 @@ msgstr "" "Emprega unha tarxeta IBM Music Feature ou un módulo de sintetizador Yamaha " "FB-01 FM para a saķda de MIDI." -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Empregar son de CD" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Emprega son de CD no canto do do xogo, de ser o caso." -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Empregar cursores de Windows" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Emprega os cursores de Windows (mįis pequenos e monocromos) no canto dos de " "DOS." -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Empregar cursores prateados" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Emprega o xogo de cursores prateados alternativo, no canto dos dourados " "normais." +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Mostrar etiquetas" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3508,7 +3599,7 @@ msgstr "Volume de mśsica:" msgid "Subtitle speed: " msgstr "Velocidade dos subtķtulos:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3517,7 +3608,7 @@ msgstr "" "A compatibilidade nativa con MIDI precisa a actualización de Roland\n" "de LucasArts, mais falla %s. Empregarase AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3700,6 +3791,15 @@ msgstr "Mostrar etiquetas" msgid "Show labels for objects on mouse hover" msgstr "Mostra as etiquetas dos obxectos ao apuntar co rato." +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/hu_HU.po b/po/hu_HU.po index 02878f4fbc..1033063868 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" -"PO-Revision-Date: 2016-02-21 06:24+0200\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" +"PO-Revision-Date: 2016-04-08 07:38+0200\n" "Last-Translator: George Kormendi <grubycza@hotmail.com>\n" "Language-Team: Hungarian\n" "Language: Magyar\n" @@ -55,10 +55,11 @@ msgstr "Feljebb" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -172,7 +173,7 @@ msgstr "Szķnusz" msgid "Triangle" msgstr "Hįromszög" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Vegyes" @@ -206,12 +207,12 @@ msgstr "Minden FluidSynth beįllķtįs alapértelmezett értékre." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -240,15 +241,15 @@ msgstr "Bezįr" msgid "Mouse click" msgstr "Egérkattintįs" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Billentyūzet beįllķtįsok" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Billentyūk įtįllķtįsa" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Teljesképernyõ kapcsoló" @@ -322,8 +323,8 @@ msgid "" msgstr "" "A jįték nyelve. Ne įllķtsd įt a pl. Spanyol nyelvū jįtékodat Angol nyelvre" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<alapértelmezett>" @@ -345,11 +346,11 @@ msgstr "Platform:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafika" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -362,7 +363,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Globįlis grafikai beįllķtįsok felülbķrįlįsa" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Audió" @@ -375,11 +376,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Globįlis audió beįllķtįsok felülbķrįlįsa" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Hangerõ" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Hangerõ" @@ -393,7 +394,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Globįlis hangerõbeįllķtįsok felülbķrįlįsa" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -406,7 +407,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Globįlis MIDI beįllķtįsok felülbķrįlįsa" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -419,11 +420,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Globįlis MT-32 beįllķtįsok felülbķrįlįsa" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Mappįk" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Mappįk" @@ -437,7 +438,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Jįték Mappa:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Extra Mappa:" @@ -445,42 +446,42 @@ msgstr "Extra Mappa:" msgid "Specifies path to additional data used by the game" msgstr "Mappa kivįlasztįs a jįtékok kiegészķtõ fįjljaihoz" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Extra Mappa:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Mentés Mappa:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Jįtékmentések helyének meghatįrozįsa" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Mentés Mappa:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Nincs" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Alapértelmezett" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "SoundFont kivįlasztįs" @@ -492,7 +493,7 @@ msgstr "Jįtékok helyének kivįlasztįsa" msgid "Select additional game directory" msgstr "Vįlassz mappįt a jįték kiegészķtõkhöz" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Vįlaszz jįtékmentéseknek mappįt" @@ -500,7 +501,7 @@ msgstr "Vįlaszz jįtékmentéseknek mappįt" msgid "This game ID is already taken. Please choose another one." msgstr "Ez a jįtékazonosķtó ID mįr foglalt, Vįlassz egy mįsikat." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "Kilépés" @@ -588,17 +589,18 @@ msgid "Search:" msgstr "Keresés:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Jįték betöltése:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Betöltés" @@ -686,197 +688,197 @@ msgstr "Įtvįlt jįtékra" msgid "Fast replay" msgstr "Gyors visszajįtszįs" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Soha" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "5 percenként" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "10 percenként" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "15 percenként" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "30 percenként" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Nincs" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Néhįny grafikus opció vįltoztatįsa sikertelen:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "a videómód nem vįltozott." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "a teljesképernyõs beįllķtįs nem vįltozott" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "a képméretarįny beįllķtįsok nem vįltoztak" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Grafikus mód:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Kirajzolįs mód:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Néhįny jįték tįmogatja a speciįlis įrnyalįsi módokat" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Teljesképernyõs mód:" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Képméretarįny korrekció" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Helyes oldalarįny a 320x200 jįtékokhoz" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Elsõdleges eszköz:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Zene eszköz:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Elsõdleges hangeszköz vagy hang emulįtor beįllķtįsok" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Hangeszköz vagy hangkįrtya emulįtor beįllķtįsok" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Elsõdleges eszk.:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Zene eszköz:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib emulįtor:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib meghajtót sok jįték hasznįlja zenéhez" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Kimeneti rįta:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" msgstr "" "Nagyobb értékek jobb hangminõséget adnak, de nem minden hangkįrtya tįmogatja" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM Eszköz:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Alapértelmezett hangeszköz General MIDI kimenethez" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Ne hasznįlj General MIDI zenét" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Elsõ elérhetõ eszköz hasznįlata" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "Néhįny hangkįrya, FluidSynth és Timidyti tįmogatja a SoundFont betöltését" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Vegyes AdLib/MIDI mód" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "MIDI és AdLib hanggenerįtorok hasznįlata" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDI erõsķtés:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "FluidSynth Beįllķtįsa" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32 Eszköz:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "Roland MT-32/LAPC1/CM32l/CM64 alapértelmezett hangeszközök beįllķtįsa" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 Hardver (GM emulįció tiltva)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -884,16 +886,16 @@ msgstr "" "Jelöld be, ha hardveres Roland-Kompatibilis hangeszköz van csatlakoztatva a " "gépedhez és hasznįlni akarod" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 Hardver (GM emulįció nincs)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland GS eszköz (MT-32 mapping engedélyezés)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -901,169 +903,181 @@ msgstr "" "Ellenõrzés ha engedélyezni akarod az emulįlt MT-32 Folt leképezést a Roland " "GS eszközön" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Ne hasznįlj Roland MT-32 zenét" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Szöveg és beszéd:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Csak beszéd" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Csak felirat" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Mind" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Felirat sebesség:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Felirat és beszéd:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Besz" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Text" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Mind" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Hang és feliratok megjelenķtése" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Felirat sebesség:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Zene hangerõ:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Zene hangerõ:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Összes némķtįsa" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "SFX hangerõ:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Speciįlis hangeffektusok hangereje" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "SFX hangerõ:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Beszéd hangerõ:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Beszéd hangerõ:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Téma Mappa:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Téma Mappa:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Minden jéték és ScummVM kiegészķtõ fįjljainak mappįja:" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Plugin Mappa:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugin Mappa:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Vegyes" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Téma:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "GUI Renderelõ:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Automentés:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Automentés:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Billentyūk" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "GUI nyelve:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "A ScummVM GUI nyelve" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "Frissķtés ellenõrzés:" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "Milyen gyakran ellenõrizze a ScummVM frissķtéseket" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "Ellenõrzés most" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Indķtsd śjra a ScummVM-et a vįltozįsok érvényesķtéséhez." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "A kivįlasztott mappįba nem lehet ķrni, vįlassz egy mįsikat" -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "GUI téma mappa kivįlasztįsa" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Mappa vįlasztįs az extra fįjloknak" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Plugin mappa kivįlasztįsa" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1236,39 +1250,63 @@ msgstr "Élsimķtįsos leképezõ" msgid "Antialiased" msgstr "Élsimķtott" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" +"ScummVM mįr tįmogatja az automatikus frissķtéseket\n" +"amelyhez internet hozzįférés szükséges.\n" +"\n" +"Szeretné, engedélyezni ezt a funkciót?" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "(Bįrmikor engedélyezheti a beįllķtįsok ablakban az Egyéb fülnél)" + +#: gui/updates-dialog.cpp:92 +msgid "Check for updates automatically" +msgstr "Frissķtések automatikus keresése" + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "Folyamatban" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Érték törlése" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "A motor nem tįmogatja a '%s' debug szintet" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menü" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Tovįbb" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Szünet" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Sor įtlépése" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Hiba a jįték futtatįsakor:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Nem talįlható olyan jįtékmotor ami a vįlasztott jįtékot tįmogatja" @@ -1363,16 +1401,32 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules Sįrga" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "Naponta" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "Hetente" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "Havonta" + +#: common/updates.cpp:64 +msgid "<Bad value>" +msgstr "<Rossz érték>" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "A '%s' jįték ismeretlennek tūnik." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Kérlek jelezd a ScummVM csapatnak a következõ adatokat, együtt a jįték" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "cķmével és megbķzható adataival jįtékverzió/nyelv(ek)/stb.:" @@ -1380,11 +1434,11 @@ msgstr "cķmével és megbķzható adataival jįtékverzió/nyelv(ek)/stb.:" msgid "~R~esume" msgstr "Folytatįs" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~B~etöltés" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "Mentés" @@ -1413,9 +1467,9 @@ msgstr "Visszatérés az indķtóba" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1430,9 +1484,10 @@ msgstr "Jįték mentése:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1456,13 +1511,13 @@ msgstr "" "(%s) jįtékmentés nem sikerült!. Olvassd el a README-t az alap " "informįciókról, és hogy hogyan segķthetsz a késõbbiekben." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~M~égse" @@ -1616,11 +1671,11 @@ msgstr "FM-Towns Hang" msgid "PC-98 Audio" msgstr "PC-98 Hang" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "MT-32 Emulįtor inicializįlįsa" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 Emulįtor" @@ -1737,11 +1792,11 @@ msgstr "Auto-hśz módban van" msgid "Swipe three fingers to the right to toggle." msgstr "Üsd hįrom śjjal hogy biztosan vįltson." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (Nincs szūrés)" @@ -2291,20 +2346,20 @@ msgstr "" "Ne felejts billentyūt tįrsķtani az 'Eszköztįr rejtés' mūvelethez, hogy lįsd " "a teljes listįt" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Frissķtések keresése..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Eredeti ment/tölt képernyõk hasznįlata" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Az eredeti mentés/betöltés képernyõ hasznįlata a ScummVM képek helyett" @@ -2332,11 +2387,31 @@ msgstr "" "Egérmód engélyezve. Lehetõvé teszi az egérrel mozgatįst jįtékban és " "jįtékmenükben." +#: engines/agi/detection.cpp:177 +msgid "Use Hercules hires font" +msgstr "Hercules hires font hasznįlata" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "Hercules hires font hasznįlata, ha a font fįjl elérhetõ." + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "Szünet a parancsok beķrįsakor" + +#: 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 "" +"Parancssor ablak megjelenķtése és jįték szüneteltetése (mint a SCI) valós " +"idejü parancs helyett." + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2346,13 +2421,13 @@ msgstr "Jįtékmenet visszaįllķtįsa:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Visszaįllķtįs" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2363,7 +2438,7 @@ msgstr "" "\n" "%s fįjlból nem sikerült" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2374,7 +2449,7 @@ msgstr "" "\n" "%s fįjlba nem sikerült" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2619,29 +2694,37 @@ msgstr "" "utasķtįst.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "Myst bevezetõ film lejįtszįsa" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "A Myst bevezetõ filmet nem jįtszotta le az eredeti motor." + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Z~ip Mód aktivįlva" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~Į~tmenetek engedélyezve" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "Oldal~D~obįs" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" -msgstr "~S~ Térkép" +#: engines/mohawk/dialogs.cpp:103 +msgid "Show ~M~ap" +msgstr "~M~ Térkép nézet" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" -msgstr "Fõ~M~enü" +#: engines/mohawk/dialogs.cpp:109 +msgid "Main Men~u~" +msgstr "Fõ Menü ~u~" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "Vķzeffektus engedélyezve" @@ -2763,36 +2846,36 @@ msgstr "Alternatķv intro" msgid "Use an alternative game intro (CD version only)" msgstr "Alternatķv jįtékintro hasznįlata (csak CD verziónįl)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "EGA szķnmodulįció įtugrįsa (Szķnes hįttereknél)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Szķnmodulįció įtugrįsa EGA jįtékoknįl, grafikįk teljes szķnben lįthatók" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Nagy felbontįsś grafika engedélyezése" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Nagy felbontįsś grafika/tartalom engedélyezése" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Digitįlis hangeffektusok elõnyben" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Digitįlis hanghatįsok elõnyben a szintetizįltakkal szemben" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "IMF/Yamaha FB-01 hasznįlata MIDI kimentre" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2800,32 +2883,40 @@ msgstr "" "IBM Music Feature kįrtya vagy Yamaha FB-01 FM szintetizįtor modul hasznįlata " "MIDI kimenetre" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "CD audió hasznįlata" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "CD audió hasznįlata a jįtékban lévõvel szemben, ha elérhetõ" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Windows kurzorok hasznįlata" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "Windows kurzorok hasznįlata (kisebb és monokróm) a DOS-osok helyett " -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Ezüst kurzor hasznįlata" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "Alternatķv ezüst kurzorszett hasznįlata, a normįl arany helyett" +#: engines/scumm/detection.cpp:1335 +msgid "Show Object Line" +msgstr "Tįrgynév sor lįtható" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "Tįrgyak neveinek megjelenķtése a képernyõ aljįn" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3491,7 +3582,7 @@ msgstr "Zene hangereje:" msgid "Subtitle speed: " msgstr "Felirat sebesség:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3500,7 +3591,7 @@ msgstr "" "Native MIDI tįmogatįshoz kell a Roland Upgrade a LucasArts-tól,\n" "a %s hiįnyzik. AdLib-ot hasznįlok helyette." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3682,6 +3773,16 @@ msgstr "Tįrgycimke lįtható" msgid "Show labels for objects on mouse hover" msgstr "Tįrgycimke lįtható ha az egér felette van" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "Angol beszéd hasznįlata" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" +"Angol beszéd hasznįlata a Német helyett minden nyelven, a Németen kķvül" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/it_IT.po b/po/it_IT.po index 880c0ca7df..434dd6b46e 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2014-07-03 17:59-0600\n" "Last-Translator: Matteo 'Maff' Angelino <matteo.maff at gmail dot com>\n" "Language-Team: Italian\n" @@ -53,10 +53,11 @@ msgstr "Su" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -171,7 +172,7 @@ msgstr "Seno" msgid "Triangle" msgstr "Triangolo" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Varie" @@ -206,12 +207,12 @@ msgstr "" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -241,15 +242,15 @@ msgstr "Chiudi" msgid "Mouse click" msgstr "Clic del mouse" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Mostra tastiera" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Riprogramma tasti" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Attiva / disattiva schermo intero" @@ -324,8 +325,8 @@ msgid "" msgstr "" "Lingua del gioco. Un gioco inglese non potrą risultare tradotto in italiano" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<predefinito>" @@ -347,11 +348,11 @@ msgstr "Piattaf.:" msgid "Engine" msgstr "Motore" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafica" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "Grafica" @@ -364,7 +365,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Ignora le impostazioni grafiche globali" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Audio" @@ -377,11 +378,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Ignora le impostazioni audio globali" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volume" @@ -395,7 +396,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Ignora le impostazioni globali di volume" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -408,7 +409,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Ignora le impostazioni MIDI globali" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -421,11 +422,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Ignora le impostazioni MT-32 globali" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Percorsi" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Perc." @@ -439,7 +440,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Perc. gioco:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Percorso extra:" @@ -447,42 +448,42 @@ msgstr "Percorso extra:" msgid "Specifies path to additional data used by the game" msgstr "Specifica il percorso di ulteriori dati usati dal gioco" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Perc. extra:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Salvataggi:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Specifica dove archiviare i salvataggi" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Salvataggi:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Nessuno" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Predefinito" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Seleziona SoundFont" @@ -494,7 +495,7 @@ msgstr "Seleziona la cartella contenente i file di gioco" msgid "Select additional game directory" msgstr "Seleziona la cartella di gioco aggiuntiva" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Seleziona la cartella dei salvataggi" @@ -502,7 +503,7 @@ msgstr "Seleziona la cartella dei salvataggi" msgid "This game ID is already taken. Please choose another one." msgstr "Questo ID di gioco č gią in uso. Si prega di sceglierne un'altro." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "C~h~iudi" @@ -590,17 +591,18 @@ msgid "Search:" msgstr "Cerca:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Carica gioco:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Carica" @@ -693,134 +695,134 @@ msgstr "Sposta" msgid "Fast replay" msgstr "Modalitą veloce" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Mai" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "ogni 5 minuti" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "ogni 10 minuti" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "ogni 15 minuti" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "ogni 30 minuti" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Nessuno" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Impossibile applicare alcuni dei cambiamenti nelle opzioni grafiche." -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "impossibile modificare la modalitą video." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "impossibile modificare l'impostazione schermo intero" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "impossibile modificare l'impostazione proporzioni" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Modalitą:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Resa grafica:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Modalitą di resa grafica speciali supportate da alcuni giochi" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Modalitą a schermo intero" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Correzione proporzioni" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Corregge le proporzioni dei giochi 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Disp. preferito:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Dispositivo audio:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "Specifica il dispositivo audio o l'emulatore della scheda audio preferiti" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "" "Specifica il dispositivo di output audio o l'emulatore della scheda audio" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Disp. preferito:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Disposit. audio:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "Emulatore AdLib:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib č utilizzato per la musica in molti giochi" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Frequenza:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -828,66 +830,66 @@ msgstr "" "Valori pił alti restituiscono un suono di maggior qualitą, ma potrebbero non " "essere supportati dalla tua scheda audio" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "Dispositivo GM:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Specifica il dispositivo audio predefinito per l'output General MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Non utilizzare la musica General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Utilizza il primo dispositivo disponibile" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "SoundFont č supportato da alcune schede audio, FluidSynth e Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Modalitą mista AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Utilizza generazione di suono sia MIDI che AdLib" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "Guadagno MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "Impostazioni FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "Disposit. MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Specifica il dispositivo audio predefinito per l'output Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 effettivo (disattiva emulazione GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -895,16 +897,16 @@ msgstr "" "Seleziona se vuoi usare il dispositivo hardware audio compatibile con Roland " "che č connesso al tuo computer" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 effettivo (disat.emul.GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Dispositivo Roland GS (attiva mappature MT-32)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -912,169 +914,181 @@ msgstr "" "Seleziona se vuoi attivare le mappature per emulare un MT-32 su un " "dispositivo Roland GS" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Non utilizzare la musica Roland MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Testo e voci:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Voci" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Sottotitoli" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Entrambi" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Velocitą testo:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Testo e voci:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Voci" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Sub" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Entr." -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Mostra i sottotitoli e attiva le voci" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Velocitą testo:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Volume musica:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Volume musica:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Disattiva audio" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Volume effetti:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Volume degli effetti sonori" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Volume effetti:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Volume voci:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Volume voci:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Percorso tema:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Perc. tema:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Specifica il percorso di ulteriori dati usati dai giochi o da ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Percorso plugin:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Perc. plugin:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Varie" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "Renderer GUI:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autosalva:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autosalva:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Tasti" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Lingua GUI:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Lingua dell'interfaccia grafica di ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Devi riavviare ScummVM affinché le modifiche abbiano effetto." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "La cartella scelta č in sola lettura. Si prega di sceglierne un'altra." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Seleziona la cartella dei temi dell'interfaccia" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Seleziona la cartella dei file aggiuntivi" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Seleziona la cartella dei plugin" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1251,39 +1265,60 @@ msgstr "Renderer con antialiasing" msgid "Antialiased" msgstr "Con antialiasing" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Cerca aggiornamenti..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Cancella" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Il motore non supporta il livello di debug '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menu" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Salta" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pausa" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Salta battuta" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Errore nell'esecuzione del gioco:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "" "Impossibile trovare un motore in grado di eseguire il gioco selezionato" @@ -1379,16 +1414,33 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules ambra" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Cancella" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Il gioco in '%s' sembra essere sconosciuto." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Per favore, riporta i seguenti dati al team di ScummVM con il nome" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "del gioco che hai provato ad aggiungere e la sua versione/lingua/ecc.:" @@ -1396,11 +1448,11 @@ msgstr "del gioco che hai provato ad aggiungere e la sua versione/lingua/ecc.:" msgid "~R~esume" msgstr "~R~ipristina" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~C~arica" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~S~alva" @@ -1429,9 +1481,9 @@ msgstr "~V~ai a elenco giochi" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1446,9 +1498,10 @@ msgstr "Salva gioco:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1474,13 +1527,13 @@ msgstr "" "informazioni di base e per le istruzioni su come ottenere ulteriore " "assistenza." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~A~nnulla" @@ -1639,11 +1692,11 @@ msgstr "Emulatore FM Towns" msgid "PC-98 Audio" msgstr "Audio" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Avvio in corso dell'emulatore MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "Emulatore MT-32" @@ -1761,11 +1814,11 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (senza filtri)" @@ -2318,20 +2371,20 @@ msgstr "" "Non dimenticare di mappare un tasto per l'azione \"Nascondi barra degli " "strumenti\" per vedere l'intero inventario" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Cerca aggiornamenti..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Usa schermate di salvataggio originali" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2359,11 +2412,30 @@ msgid "" "Enables mouse support. Allows to use mouse for movement and in game menus." msgstr "" +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules verde" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2373,13 +2445,13 @@ msgstr "Ripristina gioco:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Ripristina" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2390,7 +2462,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2401,7 +2473,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2635,29 +2707,39 @@ msgid "" "\n" msgstr "" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "Modalitą ~Z~ip attivata" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~T~ransizioni attive" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~L~ascia pagina" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~M~ostra mappa" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~M~enu principale" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~E~ffetto acqua attivo" @@ -2781,37 +2863,37 @@ msgstr "Intro alternativa" msgid "Use an alternative game intro (CD version only)" msgstr "Usa un'intro del gioco alternativa (solo versione CD)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 #, fuzzy msgid "Enable high resolution graphics" msgstr "Attiva le barre di Hit Point" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 #, fuzzy msgid "Enable high resolution graphics/content" msgstr "Attiva le barre di Hit Point" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Scegli effetti sonori digitali" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Scegli gli effetti sonori digitali al posto di quelli sintetizzati" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Usa IMF/Yamaha FB-01 per output MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2819,35 +2901,44 @@ msgstr "" "Usa una scheda IBM Music Feature o un modulo synth Yamaha FB-01 FM per " "l'output MIDI" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Usa audio da CD" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "" "Usa l'audio da CD al posto di quello incorporato nel gioco, se disponibile" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Usa cursori di Windows" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Usa i cursori di Windows (pił piccoli e monocromatici) al posto di quelli DOS" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Usa cursori d'argento" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Usa il set alternativo di cursori d'argento al posto di quelli normali d'oro" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Mostra etichette oggetti" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3519,7 +3610,7 @@ msgstr "Volume musica:" msgid "Subtitle speed: " msgstr "Velocitą testo:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3528,7 +3619,7 @@ msgstr "" "Il supporto nativo MIDI richiede il Roland Upgrade della LucasArts,\n" "ma %s non č presente. Verrą usato AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 #, fuzzy msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " @@ -3708,6 +3799,15 @@ msgstr "Mostra etichette oggetti" msgid "Show labels for objects on mouse hover" msgstr "Mostra etichette per gli oggetti al passaggio del mouse" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/nb_NO.po b/po/nb_NO.po index 8f105c6d55..de9be4c50e 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-25 23:42+0100\n" "Last-Translator: Einar Johan Trųan Sųmåen <einarjohants@gmail.com>\n" "Language-Team: somaen <einarjohants@gmail.com>\n" @@ -56,10 +56,11 @@ msgstr "Oppover" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -173,7 +174,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Trekant" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Diverse" @@ -207,12 +208,12 @@ msgstr "Nullstill alle FluidSynth-instillinger til standardverdier" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -241,15 +242,15 @@ msgstr "Lukk" msgid "Mouse click" msgstr "Musklikk" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Vis tastatur" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Omkoble taster" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Veksle fullskjerm" @@ -325,8 +326,8 @@ msgstr "" "Spillets språk. Dette vil ikke gjųre din spanske spillversjon om til engelsk " "versjon" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<standard>" @@ -348,11 +349,11 @@ msgstr "Plattform:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafikk" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -365,7 +366,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafikkinstillinger" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Lyd" @@ -378,11 +379,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lydinstillinger" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volum" @@ -396,7 +397,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale voluminstillinger" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -409,7 +410,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI-instillinger" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -422,11 +423,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32-instillinger" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Sti" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Sti" @@ -440,7 +441,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Spillsti:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Ekstrasti:" @@ -448,42 +449,42 @@ msgstr "Ekstrasti:" msgid "Specifies path to additional data used by the game" msgstr "Bestemmer sti til ytterligere data brukt av spillet" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Lagringssti:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Bestemmer sti til lagrede spill" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Lagringssti:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Ingen" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Velg SoundFont" @@ -495,7 +496,7 @@ msgstr "Velg mappe med spilldata" msgid "Select additional game directory" msgstr "Velg mappe med ytterligere data" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Velg mappe for lagrede spill" @@ -503,7 +504,7 @@ msgstr "Velg mappe for lagrede spill" msgid "This game ID is already taken. Please choose another one." msgstr "Denne spill-IDen er allerede i bruk. Vennligst velg en annen." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~A~vslutt" @@ -591,17 +592,18 @@ msgid "Search:" msgstr "Sųk:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Åpne spill:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Åpne" @@ -691,132 +693,132 @@ msgstr "Bytt til Spill" msgid "Fast replay" msgstr "Rask replay" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Aldri" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "hvert 5. min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "hvert 10. min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "hvert 15. min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "hvert 30. min" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Ingen" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Klarte ikke å aktivere enkelte av endringene i grafikkinstillinger:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "videomodusen kunne ikke endres." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "fullskjermsinnstillingen kunne ikke endres" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "aspektrate-innstillingen kunne ikke endres" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Grafikkmodus:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Tegnemodus:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Spesiel dithering-modus stųttet av enkelte spill" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Fullskjermsmodus" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Aspekt-rate korrigering" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Korriger aspekt-rate for 320x200-spill" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Foretrukket enhet:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Musikkenhet:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Velger foretrukket lydenhet eller lydkort-emulator" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Velger ut-lydenhet eller lydkortemulator" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Foretrukket enh.:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Musikkenhet:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib-emulator:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib brukes til musikk i mange spill" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Utrate:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -824,64 +826,64 @@ msgstr "" "Hųyere verdier gir bedre lydkvalitet, men stųttes kanskje ikke av ditt " "lydkort " -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM-enhet:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Velger standard lydenhet for General MIDI-utdata" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Ikke bruk General MIDI-musikk" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Bruk fųrste tilgjengelige enhet" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "SoundFont stųttes ikke av enkelte lydkort, FluidSynth og Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Mikset AdLib/MIDI-modus" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Bruk både MIDI- og AdLib- lydgenerering" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDI gain:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "FluidSynth-instillinger" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32 Enhet:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "Velger standard lydenhet for Roland MT-32/LAPC1/CM32I/CM64-avspilling" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -889,16 +891,16 @@ msgstr "" "Velg hvis du har et ekte Roland-kompatible lydkort tilkoblet maskinen, og " "vil bruke dette." -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland GS Modus (aktiver MT32-mapping)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -906,169 +908,181 @@ msgstr "" "Aktiver hvis du vil slå på patch mappinger for å emulere en MT-32 eller " "Roland GS enhet" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Ikke bruk Roland MT-32-musikk" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Undertekster" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Begge" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Teksthastighet:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Tale" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Tekst" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Begge" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Vis undertekster, og spill av tale" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Underteksthastighet:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Musikkvolum:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Musikkvolum:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Demp alle" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Volum for spesielle lydeffekter" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Talevolum:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Talevolum:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Velger sti for ytterligere data brukt av alle spill eller ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Pluginsti:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Pluginsti:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Div" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "GUI-tegner:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autolagre:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autolagre:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Taster" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "GUI-språk:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Språk i ScummVM-GUIet" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Du må starte ScummVM på nytt for at endringene skal tre i kraft. " -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Den valgte mappen kan ikke skrives til. Vennligst velg en annen." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Velg mappe for GUI-temaer" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Velg mappe for ytterligere filer" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Velg mappe for plugins" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1241,39 +1255,60 @@ msgstr "Kantutjevnet tegner" msgid "Antialiased" msgstr "Kantutjevnet" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Sjekk for oppdateringer..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Tųm verdi" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motoren stųtter ikke debug-nivå '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Meny" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Hopp over" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Hopp over linje" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Problem ved kjųring av spill:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Kunne ikke finne noen motor som kunne kjųre det valgte spillet" @@ -1368,17 +1403,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules Oransje" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Tųm verdi" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Spillet i '%s' ser ut til å vęre ukjent." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Vennligst rapporter de fųlgende dataene til ScummVM-teamet sammen med navnet" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "på spillet du forsųkte å legge til, og dets versjon/språk/etc.:" @@ -1386,11 +1438,11 @@ msgstr "på spillet du forsųkte å legge til, og dets versjon/språk/etc.:" msgid "~R~esume" msgstr "~F~ortsett" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~Å~pne" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~L~agre" @@ -1419,9 +1471,9 @@ msgstr "~T~ilbake til oppstarter" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1436,9 +1488,10 @@ msgstr "Lagret spill:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1463,13 +1516,13 @@ msgstr "" "Lagring av spilltilstand feilet (%s)! Vennligst konsulter README-filen for " "grunnleggende informasjon og instruksjon om hvordan du får ytterligere hjelp." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~A~vbryt" @@ -1625,11 +1678,11 @@ msgstr "FM Towns Lyd" msgid "PC-98 Audio" msgstr "PC-98 Lyd" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Initialiserer MT-32-Emulator" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 Emulator" @@ -1746,11 +1799,11 @@ msgstr "Auto-dramodus er nå" msgid "Swipe three fingers to the right to toggle." msgstr "Sveip tre fingre til hųyre for å veksle" -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (Ingen filtrering)" @@ -2303,20 +2356,20 @@ msgstr "" "Ikke glem å koble en tast til handlingen 'Skjul verktųylinje' for å se hele " "inventaret" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Sjekk for oppdateringer..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Bruk originale lagre/laste-skjermer" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Bruk de originale lagre/laste-skjermene, istedenfor ScummVM-variantene" @@ -2343,11 +2396,30 @@ msgid "" msgstr "" "Aktiver musstųtte. Tillater å bruke mus for bevegelse og i spillmenyer." +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules Grųnn" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2357,13 +2429,13 @@ msgstr "Gjennopprett spill:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Gjenopprett" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2374,7 +2446,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2385,7 +2457,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2630,29 +2702,39 @@ msgstr "" "ScummVM debugkonsollen og bruke kommandoen «import_savefile»\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Z~ipmodus aktivert" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~O~verganger aktivert" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~D~ropp Side" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "Vi~s~ Kart" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "Hoved~m~eny" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~V~anneffekt aktivert" @@ -2774,35 +2856,35 @@ msgstr "Alternativ intro" msgid "Use an alternative game intro (CD version only)" msgstr "Bruk en alternativ intro (Kun for CD-versjon)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Hopp over EGA dithering (fullfarge bakgrunner)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Aktiver hųyopplųselig grafikk" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Aktiver hųyopplųselig grafikk/innhold" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Foretrekk digitale lydeffekter" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Foretrekk digitale lydeffekter fremfor syntetiske" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Bruk IMF/Yamaha-FB-01 for MIDI-output" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2810,33 +2892,42 @@ msgstr "" "Bruk et IBM Music Feature-kort eller en Yamaha FB-01 FM-synthmodul til MIDI " "output" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Bruk CD-lyd" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Bruk CD-lyd istedenfor spillets lyd, hvis tilgjengelig" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Bruk Windows-muspekere" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "Bruk Windows-muspekerene (mindre, og monokrome) isteden" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Bruk sųlvmuspekere" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Bruk det alternative settet med sųlvmuspekere, istedenfor de normale gylne." +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Vis objektmerkelapper" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3502,7 +3593,7 @@ msgstr "Musikkvolum: " msgid "Subtitle speed: " msgstr "Teksthastighet: " -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3511,7 +3602,7 @@ msgstr "" "Ekte MIDI-stųtte krever «Roland Upgrade» fra LucasArts,\n" "men %s mangler. Bruker AdLib istedet." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3688,6 +3779,15 @@ msgstr "Vis objektmerkelapper" msgid "Show labels for objects on mouse hover" msgstr "Vis merkelapper for objekter når musa står over dem" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/nl_NL.po b/po/nl_NL.po index 99d1400b04..032daf4590 100644 --- a/po/nl_NL.po +++ b/po/nl_NL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.8.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-21 13:05+0100\n" "Last-Translator: Ben Castricum <scummvm@bencastricum.nl>\n" "Language-Team: Ben Castricum <scummvm@bencastricum.nl>\n" @@ -56,10 +56,11 @@ msgstr "Ga omhoog" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -173,7 +174,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Driehoek" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Misc" @@ -207,12 +208,12 @@ msgstr "Alle FluidSynth instellingen terugzetten naar de standaard waarden." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -242,15 +243,15 @@ msgstr "Sluiten" msgid "Mouse click" msgstr "Muisklik" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Toon toetsenbord" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Toetsen opnieuw koppelen" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Volledig scherm in-/uitschakelen" @@ -326,8 +327,8 @@ msgstr "" "De taal van het spel. Dit verandert een Engels spel niet naar een " "Nederlandse." -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<standaard>" @@ -349,11 +350,11 @@ msgstr "Platform:" msgid "Engine" msgstr "Engine" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Beeld" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -366,7 +367,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Negeer algemene grafische instellingen" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Geluid" @@ -379,11 +380,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Negeer algemene audio instellingen" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volume" @@ -397,7 +398,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Negeer algemene volume instellingen" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -410,7 +411,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Negeer algemene MIDI instellingen" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -423,11 +424,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Negeer algemene MT-32 instellingen" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Paden" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Paden" @@ -441,7 +442,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Spel Pad:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Extra Pad:" @@ -449,42 +450,42 @@ msgstr "Extra Pad:" msgid "Specifies path to additional data used by the game" msgstr "Specificeer pad naar additionele data voor het spel" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Extra Pad:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Bewaar Pad:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Bepaalt waar opgeslagen spellen worden bewaard." -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Bewaar Pad:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Geen" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standaard" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Selecteer SoundFont" @@ -496,7 +497,7 @@ msgstr "Selecteer map met speldata" msgid "Select additional game directory" msgstr "Selecteer additionele speldatamap" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Selecteer map voor opgeslagen spellen" @@ -504,7 +505,7 @@ msgstr "Selecteer map voor opgeslagen spellen" msgid "This game ID is already taken. Please choose another one." msgstr "Dit spel-ID is al in gebruik. Kies a.u.b. een andere." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~S~toppen" @@ -594,17 +595,18 @@ msgid "Search:" msgstr "Zoeken:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Laad spel:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Laden" @@ -697,132 +699,132 @@ msgstr "Schakel naar Spel" msgid "Fast replay" msgstr "Snelle herhaling" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Nooit" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "elke 5 minuten" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "elke 10 minuten" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "elke 15 minuten" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "elke 30 minuten" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Geen" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Sommige grafische opties konden niet worden toegepast:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "de videomodus kon niet veranderd worden." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "de volledig-scherminstelling kon niet veranderd worden" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "de pixelverhoudinginstelling kon niet veranderd worden" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Grafische modus:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Render modus:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Speciale ditheringmodi die door sommige games ondersteund worden." -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Volledig-scherm modus" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Pixelverhoudingcorrectie" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Corrigeer de pixelverhouding voor 320x200 spellen." -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Voorkeursapparaat:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Muziekapparaat:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Specificeert het voorkeurs geluidsapparaat of geluidskaartemulator" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Specificeert geluidsapparaat of geluidskaartemulator" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Voorkeursapparaat:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Muziekapparaat:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib emulator:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib word in vele spelen voor muziek gebruikt" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Output snelheid:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -830,67 +832,67 @@ msgstr "" "Hogere waarden geven betere geluidskwaliteit maar worden mogelijk niet " "ondersteund door uw geluidskaart." -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM Apparaat:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Specificeert het standaard geluidsapparaat voor General MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Geen General MIDI muziek gebruiken" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Gebruik eerst beschikbare apparaat" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "SoundFont wordt ondersteund door FluidSynth en Timidity en sommige " "geluidskaarten." -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Gemengde AdLib/MIDI modus" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Gebruik zowel MIDI als AdLib geluid" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDI gain:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "FluidSynth Instellingen" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32 Apparaat:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Specificeert het standaard geluidsapparaat voor Roland MT-32/LAPC1/CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Waarheidsgetrouwe Roland MT-32 (GM emulatie uitschakelen)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -898,16 +900,16 @@ msgstr "" "Selecteer als u een hardware Roland-compatible geluidsapparaat gekoppeld aan " "uw computer wilt gebruiken" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Echte Roland MT-32 (geen GM emulatie)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland GS Device (met MT-32 mappings)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -915,171 +917,183 @@ msgstr "" "Selecteer dit als u patchmappings wilt om een MT-32 op een Roland GS " "apparaat te emuleren." -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Geen Roland MT-32 muziek gebruiken" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Spraak en/of tekst:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Spraak" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Tekst" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Beide" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Snelheid tekst:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Spraak en/of text:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Sprk" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Text" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Beide" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Toon tekst en speel spraak af" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Snelheid text:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Muziek volume:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Muziek volume:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Alles Dempen" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "SFX volume:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Volume voor speciale geluidseffecten" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "SFX volume:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Spraak volume:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Spraak volume:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Thema Pad:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Thema Pad:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Specificeert het pad for aanvullende data voor ScummVM zelf of de spellen." -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Plugins Pad:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugins Pad:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Misc" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Thema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "GUI Renderer:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autosave:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autosave:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Toetsen" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "GUI Taal:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Taal van de ScummVM GUI" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "U dient ScummVM opnieuw op te starten om de wijzigingen te activeren." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "Er kan niet worden geschreven in de gekozen map. Selecteer a.u.b. een andere." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Selecteer map voor GUI themas" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Selecteer map voor extra bestanden" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Selecteer map voor plugins" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1252,39 +1266,60 @@ msgstr "Antialiased Renderer" msgid "Antialiased" msgstr "Antialiased" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Controleren op updates..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Veld leegmaken" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Engine ondersteunt debug level '%s' niet" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menu" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Overslaan" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pauze" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Regel overslaan" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Fout tijdens het starten van spel:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "" "Kon geen engine vinden die in staat was het geselecteerde spel te spelen" @@ -1380,17 +1415,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules Amber" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Veld leegmaken" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Het spel in '%s' lijkt onbekend te zijn." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Raporteer a.u.b. de volgende gegevens aan het ScummVM team samen met de naam" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "van het spel die u probeerde toe te voegen, en haar versie/taal/etc.:" @@ -1398,11 +1450,11 @@ msgstr "van het spel die u probeerde toe te voegen, en haar versie/taal/etc.:" msgid "~R~esume" msgstr "~H~ervatten" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~L~aden" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "Op~s~laan" @@ -1431,9 +1483,9 @@ msgstr "S~t~artmenu" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1448,9 +1500,10 @@ msgstr "Spel opslaan:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1476,13 +1529,13 @@ msgstr "" "basisinformatie, en voor instructies voor het verkrijgen van verdere " "assistentie." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~A~nnuleer" @@ -1640,11 +1693,11 @@ msgstr "FM-Towns Geluid" msgid "PC-98 Audio" msgstr "PC-98 Geluid" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "MT-32 Emulator initialiseren" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 Emulator" @@ -1761,11 +1814,11 @@ msgstr "Auto-sleep modus is nu" msgid "Swipe three fingers to the right to toggle." msgstr "Swipe drie vingers naar rechts om te schakelen." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (geen filters)" @@ -2319,20 +2372,20 @@ msgstr "" "Vergeet niet de 'Verberg werkbalk' te koppelen aan een toets om de hele " "inventaris te zien." -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Controleren op updates..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Gebruik originele opslaan/laad schermen" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2361,11 +2414,30 @@ msgstr "" "Zet muis ondersteuning aan. Maakt het mogelijk om de muis te gebruiken voor " "bewegen en in spelmenus." +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules Groen" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2375,13 +2447,13 @@ msgstr "Laad opgeslagen spel:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Laad" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2392,7 +2464,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2403,7 +2475,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2649,29 +2721,39 @@ msgstr "" "gebruiken.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Z~ip Modus Aangezet" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~O~vergangen Aangezet" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "Laat Pagina ~V~allen" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~T~oon Map" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~H~oofdmenu" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~W~ater Effect Aangezet" @@ -2796,37 +2878,37 @@ msgid "Use an alternative game intro (CD version only)" msgstr "" "Gebruik een alternatieve versie van de intro (alleen voor de CD versie)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Sla EGA dithering stap over (volledige kleuren achtergronden)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Sla dithering stap in EGA spellen over, beelden worden getoond met volledige " "kleuren" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Gebruik hoge resolutie beelden" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Gebruik hoge resolutie beelden" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Geef de voorkeur aan digitale geluidseffecten" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Geef de voorkeur aan digitale geluidseffecten boven gesynthetiseerde" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Gebruik IMF/Yamaha FB-01 voor MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2834,36 +2916,45 @@ msgstr "" "Gebruik een IBM Music Feature kaart of eem Yamaha FB-01 FM synth module voor " "MIDI" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Gebruik CD audio" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Gebruik CD audio in plaats van in-game audio, als dat beschikbaar is." -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Gebruik Windows muisaanwijzers" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Gebruik Windows muisaanwijzers (kleiner en monochrome) in plaats van de DOS " "muisaanwijzers" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Gebruik zilveren muisaanwijzers" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Gebruik de alternative set van zilveren cursors, in plaats van de normale " "gouden" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Toon objectnamen" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3529,7 +3620,7 @@ msgstr "Muziek volume:" msgid "Subtitle speed: " msgstr "Snelheid ondertitels:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3538,7 +3629,7 @@ msgstr "" "Voor MIDI support is de Roland Upgrade van Lucasarts vereist,\n" "maar %s ontbreekt. Er wordt nu AdLib gebruikt." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3719,6 +3810,15 @@ msgstr "Toon objectnamen" msgid "Show labels for objects on mouse hover" msgstr "Toon labels voor objecten als de muis er over zweeft" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/nn_NO.po b/po/nn_NO.po index 62f7c07beb..e09e138dcc 100644 --- a/po/nn_NO.po +++ b/po/nn_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-26 00:37+0100\n" "Last-Translator: Einar Johan TrĆøan SĆømĆ„en <einarjohants@gmail.com>\n" "Language-Team: somaen <einarjohants@gmail.com>\n" @@ -56,10 +56,11 @@ msgstr "Oppover" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -173,7 +174,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Triangel" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Diverse" @@ -207,12 +208,12 @@ msgstr "Nullstill alle FluidSynth-instillingar til standardverdiar" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -241,15 +242,15 @@ msgstr "Steng" msgid "Mouse click" msgstr "Musklikk" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Syn Tastatur" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Omkople tastar" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Veksle fullskjerm" @@ -325,8 +326,8 @@ msgstr "" "Spelets språk. Dette vil ikkje gjere den spanske versjonen av spelet til ein " "engelsk versjon" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<standard>" @@ -348,11 +349,11 @@ msgstr "Plattform:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafikk" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -365,7 +366,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafikkinstillingar" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Lyd" @@ -378,11 +379,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lydinstillingar" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volum" @@ -396,7 +397,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale voluminstillingar" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -409,7 +410,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI-instillingar" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -422,11 +423,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32-instillingar" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Stiar" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Stiar" @@ -440,7 +441,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Spelsti:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Ekstrasti:" @@ -448,42 +449,42 @@ msgstr "Ekstrasti:" msgid "Specifies path to additional data used by the game" msgstr "Veljer sti til tilleggsdata nytta av spelet" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Lagringssti:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Veljer kor lagra spel vert lagra" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Lagringssti:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Ingen" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Vel SoundFont" @@ -495,7 +496,7 @@ msgstr "Vel mappe med speldata" msgid "Select additional game directory" msgstr "Vel mappe med tileggsdata for spelet" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Vel mappe for lagra spel" @@ -503,7 +504,7 @@ msgstr "Vel mappe for lagra spel" msgid "This game ID is already taken. Please choose another one." msgstr "Denne spel-IDen er allerede teken. Vęr vennleg og vel ein anna." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~A~vslutt" @@ -591,17 +592,18 @@ msgid "Search:" msgstr "Sųk:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Åpne spel:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Åpne" @@ -689,132 +691,132 @@ msgstr "Bytt til spel" msgid "Fast replay" msgstr "" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Aldri" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "kvart 5. min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "kvart 10. min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "kvart 15. min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "kvart 30. min" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Ingen" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Klarte ikkje å aktivere nokre av grafikkvalendringane:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "Kunne ikkje endre videomodus." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "Fullskjerminstillinga kunne ikkje endrast" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "aspektrate-innstillinga kunne ikkje endrast" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Grafikkmodus:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Teiknemodus:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Spesielle dithering-modus som stųttast av nokre spel" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Fullskjermsmodus" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Aspekt-korrigering" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Rett opp aspekt for 320x200 spel" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Fųretrukken eining:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Musikkeining:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Musikkeining:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib emulator:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib nyttast til musikk i mange spel" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -822,64 +824,64 @@ msgstr "" "Hųgare verdier gir betre lydkvalitet, men stųttast kanskje ikkje av " "lydkortet ditt" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM Eining:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Veljer standard lydeining for General MIDI avspeling" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Ikkje nytt General MIDI musikk" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Nytt fųrste tilgjengelege eining" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "SoundFont stųttast av enkelte lydkort, FluidSynth og Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Blanda AdLib/MIDI-modus" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Nytt båe MIDI og AdLib lydskaping" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDI gain:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "FluidSynth instillingar" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32 Eining:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "Veljer standard lydeining for Roland MT-32/LAPC1/CM32l/CM64 avspeling" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -887,184 +889,196 @@ msgstr "" "Vel om du vil nytte din Roland-kompatible lydeining som du har tilkopla " "datamaskina di." -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Ekte Roland MT-32 (ingen GS-emulering)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" msgstr "" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Ikkje nytt Roland MT-32 musikk" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Teksting" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Begge" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Undertekstfart:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Tale" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Tekst" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Båe" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Vis teksting og spel av tale" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Undertekstfart:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Musikkvolum:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Musikkvolum:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Demp alle" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Spesiallydeffekt volum" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Talevolum:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Talevolum:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Pluginsti:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Pluginsti:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Div" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "GUI-teiknar:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autolagre:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autolagre:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Tastar" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "GUI-språk:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Språk i ScummVM-GUIet" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Du må starte ScummVM på nytt for at endringane skal tre i kraft." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Den velde mappa kan ikkje skrivast til. Vennlegst vel ein annan." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Vel ei mappe for GUI-tema:" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Vel ei mappe for ekstra filer" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Vel ei mappe for plugins" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1237,39 +1251,60 @@ msgstr "Kantutjevna teiknar" msgid "Antialiased" msgstr "Kantutjevna" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "SJå etter oppdateringar..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Tųm verdi" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motoren stųttar ikkje debug-nivå '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Meny" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Hopp over" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Hopp over linje" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Feil under kųyring av spel:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Kunne ikkje finne nokon motor som kunne kųyre det velde spelet." @@ -1364,17 +1399,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules Raudgul" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Tųm verdi" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Spelet i '%s' ser ut til å vere ukjend." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Vennlegst rapporter fųlgjande data til ScummVM-teamet, saman med namnet" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "på spelet du prųvde å leggje til, samt versjon/språk/etc.:" @@ -1382,11 +1434,11 @@ msgstr "på spelet du prųvde å leggje til, samt versjon/språk/etc.:" msgid "~R~esume" msgstr "~F~ortsett" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~Å~pne" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~L~agre" @@ -1415,9 +1467,9 @@ msgstr "Tilbake til Oppsta~r~tar" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1432,9 +1484,10 @@ msgstr "Lagra spel:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1460,13 +1513,13 @@ msgstr "" "grunnlegjande informasjon, og for instruskjonar om korleis du kan få " "ytterlegare hjelp." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~A~vbryt" @@ -1618,11 +1671,11 @@ msgstr "FM-Towns Lyd" msgid "PC-98 Audio" msgstr "PC-98 Lyd" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Initialiserar MT-32 Emulator" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 Emulator" @@ -1739,11 +1792,11 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "Sveip tre fingre til hųgre for å veksle" -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (Ingen filtrering)" @@ -2294,20 +2347,20 @@ msgstr "" "Ikkje glųym å kople ein tast til 'Skjul verktųylinje' for å se heile " "inventaret" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "SJå etter oppdateringar..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Nytt opprinnelege skjermar for lagring/lasting" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2331,11 +2384,30 @@ msgid "" "Enables mouse support. Allows to use mouse for movement and in game menus." msgstr "" +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules Grųnn" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2345,13 +2417,13 @@ msgstr "Gjenopprett spel:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Gjenopprett" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2359,7 +2431,7 @@ msgid "" "%s" msgstr "" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2367,7 +2439,7 @@ msgid "" "%s" msgstr "" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2592,29 +2664,39 @@ msgid "" "\n" msgstr "" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Z~ipmodus aktivert" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~O~vergangar aktivert" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~S~yn Kart" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "Hoved~m~eny" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~V~anneffekt aktivert" @@ -2725,35 +2807,35 @@ msgstr "Alternativ intro" msgid "Use an alternative game intro (CD version only)" msgstr "Nytt alternativ spillåpning (Kun CD-versjon)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Nytt hųgopplųyseleg grafikk" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Nytt hųgopplųyseleg grafikk/innhald" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Foretrekk digitale lydeffekter" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Nytt IMF/Yamaha FB-01 til MIDI-output" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2761,32 +2843,41 @@ msgstr "" "Nytt eit IBM Music Feature-kort eller ein Yamaha FB-01 FM synth modul for " "MIDI avspeling" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Nytt CD-lyd" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Nytt CD-lyd istaden for spellyd, om den er tilgjengeleg" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Nytt Windospeikarar" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "Nytt windowspeikarane (mindre og monokrome) istaden for DOS-peikarane" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Nytt sųlvpeikarar" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "Nytt det alternative settet med sųlvpeikarar, istaden for dei gylne" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Syn objektmerkelappar" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3452,14 +3543,14 @@ msgstr "Musikkvolum:" msgid "Subtitle speed: " msgstr "Subtitle speed: " -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3631,6 +3722,15 @@ msgstr "Syn objektmerkelappar" msgid "Show labels for objects on mouse hover" msgstr "Syn merkelappar for objekt når musa er over dei" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/pl_PL.po b/po/pl_PL.po index 6546259ade..3ed207efea 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-20 23:43+0100\n" "Last-Translator: Micha³ Zi±bkowski <mziab@o2.pl>\n" "Language-Team: Grajpopolsku.pl <grajpopolsku@gmail.com>\n" @@ -59,10 +59,11 @@ msgstr "W górź" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -176,7 +177,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Trójk±t" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Róæne" @@ -210,12 +211,12 @@ msgstr "Przywróę domy¶lne warto¶ci wszystkich ustawień FluidSynth." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -244,15 +245,15 @@ msgstr "Zamknij" msgid "Mouse click" msgstr "Klikniźcie" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Wy¶wietl klawiaturź" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Dostosuj klawisze" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "W³±cz/wy³±cz pe³ny ekran" @@ -326,8 +327,8 @@ msgid "" "English" msgstr "Jźzyk gry. Nie zmieni to hiszpańskiej wersji gry w angielsk±." -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<domy¶lne>" @@ -349,11 +350,11 @@ msgstr "Platforma:" msgid "Engine" msgstr "Silnik" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafika" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "Grafika" @@ -366,7 +367,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Uæyj w³asnych ustawień grafiki" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "D¼wiźk" @@ -379,11 +380,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Uæyj w³asnych ustawień d¼wiźku" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "G³o¶no¶ę" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "G³o¶no¶ę" @@ -397,7 +398,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Uæyj w³asnych ustawień g³o¶no¶ci" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -410,7 +411,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Uæyj w³asnych ustawień MIDI" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -423,11 +424,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Uæyj w³asnych ustawień MT-32" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "¦cieæki" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "¦cieæki" @@ -441,7 +442,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "¦cieæka gry:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "¦c. dodatków:" @@ -449,42 +450,42 @@ msgstr "¦c. dodatków:" msgid "Specifies path to additional data used by the game" msgstr "Okre¶la ¶cieækź dodatkowych danych gry" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "¦c. dodatków:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "¦cieæka zapisów:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Okre¶la gdzie zapisywaę stan gry" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "¦cieæka zapisów:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Brak" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Domy¶lnie" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Wybierz SoundFont" @@ -496,7 +497,7 @@ msgstr "Wybierz katalog z plikami gry" msgid "Select additional game directory" msgstr "Wybierz dodatkowy katalog gry" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Wybierz katalog dla zapisów" @@ -504,7 +505,7 @@ msgstr "Wybierz katalog dla zapisów" msgid "This game ID is already taken. Please choose another one." msgstr "Identyfikator jest juæ zajźty. Wybierz inny." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~Z~akończ" @@ -592,17 +593,18 @@ msgid "Search:" msgstr "Szukaj" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Wczytaj grź:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Wczytaj" @@ -688,132 +690,132 @@ msgstr "Prze³±cz do gry" msgid "Fast replay" msgstr "Szybka powtórka" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Nigdy" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "co 5 min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "co 10 min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "co 15 min" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "co 30 min" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Brak" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Nie uda³o siź zastosowaę czź¶ci zmian opcji grafiki:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "nie uda³o siź zmienię trybu wideo." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "nie uda³o siź zmienię trybu pe³noekranowego" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "nie uda³o siź zmienię formatu obrazu" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Tryb grafiki:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Renderer:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Specjalne tryby ditheringu wspierane przez niektóre gry" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Pe³ny ekran" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Korekcja formatu obrazu" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Korekcja formatu obrazu dla gier 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Pref. urz±dzenie:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Urz. muzyczne:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Okre¶la preferowane urz±dzenie d¼wiźkowe lub emulator karty d¼wiźkowej" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Okre¶la wyj¶ciowe urz±dzenie d¼wiźkowe lub emulator karty d¼wiźkowej" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Pref. urz±dzenie:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Urz. muzyczne:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "Emulator AdLib:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib jest uæywany do muzyki w wielu grach" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Czźst. wyj.:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -821,67 +823,67 @@ msgstr "" "Wyæsze warto¶ci daj± lepsz± jako¶ę d¼wiźku, ale mog± byę nieobs³ugiwane " "przez twoj± kartź d¼wiźkow±" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "Urz±dzenie GM:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Okre¶la domy¶lne urz±dzenie d¼wiźkowe dla wyj¶cia General MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Nie uæywaj muzyki General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Uæyj pierwszego dostźpnego urz±dzenia" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "SoundFont jest wspierany przez niektóre karty d¼wiźkowe, FluidSynth i " "Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Tryb miksowanego AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Uæywaj obu generatorów d¼wiźku, MIDI i AdLib, jednocze¶nie" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "Wzm. MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "Ustawienia FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "Urz±dzenie MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Okre¶la domy¶lne urz±dzenie d¼wiźku dla wyj¶cia Roland MT-32/LAPC1/CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Prawdziwy Roland MT-32 (wy³±cz emulacjź GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -889,16 +891,16 @@ msgstr "" "Zaznacz, je¶li chcesz uæywaę swojej prawdziwej karty kompatybilnej z Roland " "pod³±czonej do twojego komputera" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Prawdziwy Roland MT-32 (brak emulacji GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland w trybie GS (w³±cz mapowanie MT-32)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -906,169 +908,181 @@ msgstr "" "Zaznacz, je¶li chcesz w³±czyę ³atki mapowania pozwalaj±ce na emulacjź MT-32 " "na urz±dzeniu Roland GS" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Nie uæywaj muzyki Roland MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Tekst i mowa:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Mowa" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Napisy" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Oba" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Prźd. napisów:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Tekst i mowa:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Mowa" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Napisy" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Oba" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Wy¶wietlaj napisy i odtwarzaj mowź" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Prźd. napisów:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "G³o¶no¶ę muzyki:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "G³o¶no¶ę muzyki:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Wycisz" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "G³. efekt. d¼w.:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "G³o¶no¶ę efektów d¼w." -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "G³. efekt. d¼w.:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "G³o¶no¶ę mowy:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "G³o¶no¶ę mowy:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "¦cieæka stylu:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "¦cieæka stylu:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Okre¶la ¶cieækź dla dodatkowych danych dla wszystkich gier lub ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "¦cieæka wtyczek:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "¦cieæka wtyczek:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Róæne" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Styl:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "Renderer interf.:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autozapis:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autozapis:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Klawisze" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Jźzyk interfejsu:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Jźzyk interfejsu ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Musisz zrestartowaę ScummVM, by zmiany zosta³y uwzglźdnione." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Ten katalog jest zabezpieczony przed zapisem. Wybierz inny." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Wybierz katalog dla stylów GUI." -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Wybierz katalog dla dodatkowych plików" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Wybierz katalog dla wtyczek" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1241,39 +1255,60 @@ msgstr "Wyg³adzany renderer" msgid "Antialiased" msgstr "Wyg³adzany" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Sprawd¼ aktualizacjź..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Wyczy¶ę" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Silnik nie wspiera poziomu debugowania '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menu" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Pomiń" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Wstrzymaj" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Pomiń liniź" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "B³±d podczas uruchamiania gry:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Nie uda³o siź znale¼ę silnika zdolnego do uruchomienia zaznaczonej gry" @@ -1368,16 +1403,33 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Bursztynowy Hercules" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Wyczy¶ę" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Gra w '%s' wygl±da na nieznan±." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Przekaæ poniæsze dane zespo³owi ScummVM razem z nazw±" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "gry, któr± próbowa³e¶ dodaę oraz jej wersj±, jźzykiem itd.:" @@ -1385,11 +1437,11 @@ msgstr "gry, któr± próbowa³e¶ dodaę oraz jej wersj±, jźzykiem itd.:" msgid "~R~esume" msgstr "~W~znów" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~W~czytaj" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~Z~apisz" @@ -1418,9 +1470,9 @@ msgstr "~P~owrót do launchera" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1435,9 +1487,10 @@ msgstr "Zapis:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1462,13 +1515,13 @@ msgstr "" "Zapis stanu gry nie powiód³ siź (%s)! Aby uzyskaę podstawowe informacje oraz " "dowiedzieę jak szukaę dalszej pomocy, sprawd¼ plik README." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~A~nuluj" @@ -1620,11 +1673,11 @@ msgstr "D¼wiźk FM-Towns" msgid "PC-98 Audio" msgstr "D¼wiźk PC-98" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Inicjalizacja emulatora MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "Emulator MT-32" @@ -1741,11 +1794,11 @@ msgstr "Tryb automatycznego przeci±gania jest" msgid "Swipe three fingers to the right to toggle." msgstr "Przesuń trzema palcami, æeby zmienię." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (bez filtrowania)" @@ -2295,20 +2348,20 @@ msgstr "" "Nie zapomnij przypisaę klawisza 'Ukryj pasek narzździ', by widzieę ca³y " "ekwipunek" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Sprawd¼ aktualizacjź..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Uæyj oryginalnych ekranów odczytu/zapisu" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Uæyj oryginalnych ekranów odczytu/zapisu zamiast tych ze ScummVM" @@ -2336,11 +2389,30 @@ msgstr "" "W³±cza obs³ugź myszki. Pozwala na uæycie myszki do przemieszczania i w menu " "gry." +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Zielony Hercules" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2350,13 +2422,13 @@ msgstr "Wznów grź:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Wznów" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2367,7 +2439,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2378,7 +2450,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2621,29 +2693,39 @@ msgstr "" "debugowania ScummVM i uæyę komendy 'import_savefile'.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~T~ryb turbo aktywny" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~P~rzej¶cia w³±czone" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~O~pu¶ę stronź" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~P~okaæ mapź" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~M~enu g³ówne" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~E~fekty wody w³±czone" @@ -2764,36 +2846,36 @@ msgstr "Alternatywne intro" msgid "Use an alternative game intro (CD version only)" msgstr "Uæyj alternatywnego intra (tylko dla wersji CD)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Pomiń dithering EGA (t³a w pe³nym kolorze)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "Pomiń dithering w grach EGA, grafika bździe wy¶wietlana w pe³nym kolorze" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "W³±cz grafikź wysokiej rozdzielczo¶ci" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "W³±cz grafikź/zawarto¶ę wysokiej rozdzielczo¶ci" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Preferuj cyfrowe efekty d¼wiźkowe" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Preferuj cyfrowe efekty d¼wiźkowe zamiast syntezowanych" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Uæyj IMF/Yamaha FB-01 dla wyj¶cia MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2801,34 +2883,43 @@ msgstr "" "Uæyj karty IBM Music Feature lub modu³u syntezy FM Yamaha FB-01 dla wyj¶cia " "MIDI" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Uæyj CD audio" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Uæyj CD audio zamiast muzyki w grze, je¶li jest dostźpne" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Uæyj windowsowych kursorów" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Uæyj windowsowych kursorów (mniejsze i monochromatyczne) zamiast DOS-owych" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Uæyj srebrnych kursorów" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Uæyj alternatywnego zestawu srebrnych kursorów zamiast zwyk³ych z³otych" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Pokaæ etykiety obiektów" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3494,7 +3585,7 @@ msgstr "G³o¶no¶ę muzyki: " msgid "Subtitle speed: " msgstr "Prźd. napisów: " -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3503,7 +3594,7 @@ msgstr "" "Natywne wsparcie MIDI wymaga aktualizacji Rolanda od LucasArts,\n" "ale brakuje %s. Prze³±czam na tryb AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3688,6 +3779,15 @@ msgstr "Pokaæ etykiety obiektów" msgid "Show labels for objects on mouse hover" msgstr "Pokaæ etykiety obiektów przy najechaniu myszk±" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/pt_BR.po b/po/pt_BR.po index b42ccf2bff..adf05bbf79 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2011-10-21 21:30-0300\n" "Last-Translator: Saulo Benigno <saulobenigno@gmail.com>\n" "Language-Team: ScummBR (www.scummbr.com) <scummbr@yahoo.com.br>\n" @@ -58,10 +58,11 @@ msgstr "Acima" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -179,7 +180,7 @@ msgstr "" msgid "Triangle" msgstr "" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Outros" @@ -213,12 +214,12 @@ msgstr "" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -247,15 +248,15 @@ msgstr "Fechar" msgid "Mouse click" msgstr "Clique do mouse" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Mostrar teclado" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Remapear teclas" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 #, fuzzy msgid "Toggle fullscreen" msgstr "Habilita Tela Cheia" @@ -330,8 +331,8 @@ msgid "" "English" msgstr "Idioma do jogo. Isto nćo irį passar seu jogo Inglźs para Portuguźs" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<padrćo>" @@ -354,11 +355,11 @@ msgstr "Sistema:" msgid "Engine" msgstr "Examinar" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grįficos" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -371,7 +372,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Sobrepor configuraēćo global de grįficos" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Įudio" @@ -384,11 +385,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Sobrepor configuraēćo global de įudio" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volume" @@ -402,7 +403,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Sobrepor configuraēćo global de volume" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -415,7 +416,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Sobrepor configuraēćo global de MIDI" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -428,11 +429,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Sobrepor configuraēćo global de MT-32" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Pastas" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Pastas" @@ -446,7 +447,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Pasta do Jogo:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Pasta de Extras" @@ -454,42 +455,42 @@ msgstr "Pasta de Extras" msgid "Specifies path to additional data used by the game" msgstr "Especifique a pasta para dados utilizados no jogo" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Pasta de Extras" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Pasta para Salvar" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Especifique onde guardar seus jogos salvos" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Pasta para Salvar" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Nenhum(a)" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Padrćo" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Selecione o SoundFont" @@ -501,7 +502,7 @@ msgstr "Selecione a pasta com os arquivos do jogo" msgid "Select additional game directory" msgstr "Selecione a pasta adicional do jogo" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Selecione a pasta para os jogos salvos" @@ -509,7 +510,7 @@ msgstr "Selecione a pasta para os jogos salvos" msgid "This game ID is already taken. Please choose another one." msgstr "Este código jį esta sendo utilizado. Por favor, escolha outro." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~S~air" @@ -598,17 +599,18 @@ msgid "Search:" msgstr "Pesquisar:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Carregar jogo:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Carregar" @@ -704,132 +706,132 @@ msgstr "Trocar" msgid "Fast replay" msgstr "Modo rįpido" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Nunca" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "a cada 5 mins" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "a cada 10 mins" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "a cada 15 mins" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "a cada 30 mins" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Nenhum(a)" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Falha ao aplicar algumas mudanēas nas opēões de grįfico:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "o modo de vķdeo nćo pōde ser alterado." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "a configuraēćo de tela cheia nćo pōde ser mudada" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "a configuraēćo de proporēćo nćo pōde ser mudada" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Modo grįfico:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Renderizaēćo" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Modos especiais de dithering suportados por alguns jogos" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Modo Tela Cheia" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Correēćo de proporēćo" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Correēćo de proporēćo para jogos 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Dispositivo pref.:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Disp. de mśsica:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Especifica o dispositivo de som preferido ou emulador de placa de som" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Especifica o dispositivo de saķda de som ou emulador de placa de som" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Dispositivo pref.:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Dispositivo de mśsica:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "Emulador AdLib:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib é utilizado para mśsica em vįrios jogos" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Taxa de saķda:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -837,66 +839,66 @@ msgstr "" "Maior valor especifica melhor qualidade de som, mas pode nćo ser suportado " "por sua placa de som" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "Dispositivo GM:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Especifique o dispositivo de som padrćo para a saķda General MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Nćo usar mśsica General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Usar o primeiro dispositivo disponķvel" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "SoundFont é suportado por algumas placas de som, FluidSynth e Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Mixar AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Usar MIDI e AdLib juntos na geraēćo de som" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "Ganho MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "Dispositivo MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Especifique o dispositivo de som padrćo para a saķda Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 real (desligar emulaēćo GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -904,187 +906,199 @@ msgstr "" "Verifique se vocź quer usar o seu dispositivo de hardware de som compatķvel " "com Roland" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 real (sem emulaēćo GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 #, fuzzy msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland MT-32 real (desligar emulaēćo GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" msgstr "" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Nćo usar mśsica Roland MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Texto e Voz:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Voz" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Legendas" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Ambos" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Rapidez legendas:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Texto e Voz:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Voz" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Legs" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Ambos" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Mostrar legenda e vozes (dublagem)" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Velocidade das legendas:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Volume da Mśsica:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Volume da Mśsica:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Mudo" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Volume dos Sons:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Volume dos efeitos sonoros especiais" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Volume dos Sons:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Volume da Voz:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Volume da Voz:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Pasta do Tema" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Pasta do Tema" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Especifica a pasta para os dados adicionais usados por todos os jogos ou " "ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Pasta de Plugins:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Pasta de Plugins:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Outros" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "Renderizador GUI:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Auto-Salvar:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Auto-Salvar:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Teclas" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Idioma do GUI:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Linguagem do ScummVM GUI" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Vocź tem que reiniciar o ScummVM para funcionar." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "O diretório escolhido nćo pode ser usado. Por favor, selecione outro." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Selecione a pasta para os temas da Interface de Uso Grįfico" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Selecione a pasta para os arquivos extras" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Selecione a pasta para os plugins" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1268,39 +1282,60 @@ msgstr "Renderizador Anti-Serrilhamento (16bpp)" msgid "Antialiased" msgstr "Anti-Serrilhamento (16bpp)" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Procurar por Atualizaēões..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Limpar valor" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Esse programa nćo suporta o nķvel de debug '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Menu" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Pular" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pausar" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Pula linha" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Erro ao executar o jogo:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "" "Nćo foi possķvel encontrar qualquer programa capaz de rodar o jogo " @@ -1397,17 +1432,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules Amber" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Limpar valor" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "O jogo em '% s' parece ser desconhecido." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Por favor, informe os seguintes dados para a equipe ScummVM junto com o nome" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "do jogo que vocź tentou adicionar e sua versćo/idioma/etc.:" @@ -1415,11 +1467,11 @@ msgstr "do jogo que vocź tentou adicionar e sua versćo/idioma/etc.:" msgid "~R~esume" msgstr "~V~oltar ao jogo" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~C~arregar" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~S~alvar" @@ -1448,9 +1500,9 @@ msgstr "~V~oltar ao menu" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1465,9 +1517,10 @@ msgstr "Salvar jogo:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1493,13 +1546,13 @@ msgstr "" "Por favor, consulte o README para obter informaēões bįsicas, e para obter " "instruēões sobre como obter assistźncia adicional." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~C~ancelar" @@ -1658,11 +1711,11 @@ msgstr "Emulador FM Towns" msgid "PC-98 Audio" msgstr "Įudio" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Inicializando Emulador MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "Emulador MT-32" @@ -1781,12 +1834,12 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 #, fuzzy msgid "OpenGL" msgstr "Abrir" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "" @@ -2342,20 +2395,20 @@ msgstr "" "Nćo se esqueēa de mapear uma tecla para \"Ocultar a barra de ferramentas\" " "para ver todo o seu inventįrio" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Procurar por Atualizaēões..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2379,11 +2432,30 @@ msgid "" "Enables mouse support. Allows to use mouse for movement and in game menus." msgstr "" +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules Green" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2393,13 +2465,13 @@ msgstr "Restaurar jogo:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Restaurar" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2410,7 +2482,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2421,7 +2493,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2672,29 +2744,39 @@ msgid "" "\n" msgstr "" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "Modo ~Z~ip ativado" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "Modo ~T~ransiēões ativado" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~S~oltar Pįgina" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~E~xibir Mapa" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~M~enu Principal ScummVM" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "Modo ~E~feitos de įgua ativado" @@ -2819,68 +2901,76 @@ msgstr "" msgid "Use an alternative game intro (CD version only)" msgstr "" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 #, fuzzy msgid "Prefer digital sound effects" msgstr "Volume dos efeitos sonoros especiais" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 #, fuzzy msgid "Use silver cursors" msgstr "Cursor normal" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +#: engines/scumm/detection.cpp:1335 +msgid "Show Object Line" +msgstr "" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3551,7 +3641,7 @@ msgstr "Volume da Mśsica:" msgid "Subtitle speed: " msgstr "Rapidez legendas:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3561,7 +3651,7 @@ msgstr "" "LucasArts,\n" "mas %s estį faltando. Utilizando AdLib ao invés." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 #, fuzzy msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " @@ -3741,6 +3831,15 @@ msgstr "" msgid "Show labels for objects on mouse hover" msgstr "" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/ru_RU.po b/po/ru_RU.po index ba91013bb5..514d094e64 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.8.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-21 23:32+0300\n" "Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n" "Language-Team: Russian\n" @@ -56,10 +56,11 @@ msgstr "²ŅÕąå" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -173,7 +174,7 @@ msgstr "ĮŲŻćįŽŲŌŠ" msgid "Triangle" msgstr "ĀąÕćÓŽŪģŻŠļ" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "ĄŠ×ŻŽÕ" @@ -207,12 +208,12 @@ msgstr "ĮŃąŽįŲāģ ŅįÕ ćįāŠŻŽŅŚŲ FluidSynth Ņ ׯŠēÕŻŲļ ߎ ćÜŽŪēŠŻŲī." #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -242,15 +243,15 @@ msgstr "·ŠŚąėāģ" msgid "Mouse click" msgstr "ŗŪŲŚ Üėčģī" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "æŽŚŠ×Šāģ ŚŪŠŅŲŠāćąć" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "æÕąÕŻŠ×ŻŠēŲāģ ŚŪŠŅŲčŲ" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "æÕąÕŚŪīēÕŻŲÕ ŻŠ ŅÕįģ ķŚąŠŻ" @@ -325,8 +326,8 @@ msgid "" msgstr "" "Ļ×ėŚ ŲÓąė. ø×ÜÕŻÕŻŲÕ ķāŽŁ ŻŠįāąŽŁŚŲ ŻÕ ßąÕŅąŠāŲā ŲÓąć ŻŠ ŠŻÓŪŲŁįŚŽÜ Ņ ąćįįŚćī" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<ߎ ćÜŽŪēŠŻŲī>" @@ -348,11 +349,11 @@ msgstr "æŪŠā䎹܊:" msgid "Engine" msgstr "“ŅŲÖŽŚ" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "³ąŠäŲŚŠ" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "³ąä" @@ -365,7 +366,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "æÕąÕŚąėāģ ÓŪŽŃŠŪģŻėÕ ćįāŠŻŽŅŚŲ ÓąŠäŲŚŲ" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "°ćŌŲŽ" @@ -378,11 +379,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "æÕąÕŚąėāģ ÓŪŽŃŠŪģŻėÕ ćįāŠŻŽŅŚŲ ŠćŌŲŽ" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "³ąŽÜŚŽįāģ" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "³ąŽÜŚ" @@ -396,7 +397,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "æÕąÕŚąėāģ ÓŪŽŃŠŪģŻėÕ ćįāŠŻŽŅŚŲ ÓąŽÜŚŽįāŲ" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -409,7 +410,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "æÕąÕŚąėāģ ÓŪŽŃŠŪģŻėÕ ćįāŠŻŽŅŚŲ MIDI" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -422,11 +423,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "æÕąÕŚąėāģ ÓŪŽŃŠŪģŻėÕ ćįāŠŻŽŅŚŲ MT-32" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "æćāŲ" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "æćāŲ" @@ -440,7 +441,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "³ŌÕ ŲÓąŠ:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "“Žß. ßćāģ:" @@ -448,42 +449,42 @@ msgstr "“Žß. ßćāģ:" msgid "Specifies path to additional data used by the game" msgstr "ĆŚŠ×ėŅŠÕā ßćāģ Ś ŌŽßŽŪŻŲāÕŪģŻėÜ äŠŁŪŠÜ ŌŠŻŻėå ŌŪļ ŲÓąė" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "“Žß. ßćāģ:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "ĮŽåąŠŻÕŻŲļ ŲÓą:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "ĆŚŠ×ėŅŠÕā ßćāģ Ś įŽåąŠŻÕŻŲļÜ ŲÓąė" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "æćāģ įŽåą:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "½Õ ׊ŌŠŻ" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "æŽ ćÜŽŪēŠŻŲī" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "²ėŃÕąŲāÕ SoundFont" @@ -495,7 +496,7 @@ msgstr "²ėŃÕąŲāÕ ŌŲąÕŚāŽąŲī į 䊣ŪŠÜŲ ŲÓąė" msgid "Select additional game directory" msgstr "²ėŃÕąŲāÕ ŌŽßŽŪŻŲāÕŪģŻćī ŌŲąÕŚāŽąŲī ŲÓąė" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "²ėŃÕąŲāÕ ŌŲąÕŚāŽąŲī ŌŪļ įŽåąŠŻÕŻŲŁ" @@ -503,7 +504,7 @@ msgstr "²ėŃÕąŲāÕ ŌŲąÕŚāŽąŲī ŌŪļ įŽåąŠŻÕŻŲŁ" msgid "This game ID is already taken. Please choose another one." msgstr "ĶāŽā ID ŲÓąė ćÖÕ ŲįߎŪģ×ćÕāįļ. æŽÖŠŪćŁįāŠ, ŅėŃÕąŲāÕ ŌąćÓŽŁ." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~²~ėåŽŌ" @@ -591,17 +592,18 @@ msgid "Search:" msgstr "æŽŲįŚ:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "·ŠÓąć×Ųāģ ŲÓąć:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "·ŠÓąć×Ųāģ" @@ -688,133 +690,133 @@ msgstr "æÕąÕŚŪīēŲāģįļ Ņ ŲÓąć" msgid "Fast replay" msgstr "±ėįāąŽÕ ŅŽįßąŽŲ×ŅÕŌÕŻŲÕ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "½ŲŚŽÓŌŠ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "ŚŠÖŌėÕ 5 ÜŲŻćā" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "ŚŠÖŌėÕ 10 ÜŲŻćā" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "ŚŠÖŌėÕ 15 ÜŲŻćā" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "ŚŠÖŌėÕ 30 ÜŲŻćā" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 Ś³ę" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "½Õ ׊ŌŠŻ" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "½Õ ćŌŠŪŽįģ ßąŲÜÕŻŲāģ Ų×ÜÕŻÕŻŲļ ŻÕŚŽāŽąėå ÓąŠäŲēÕįŚŲå ŻŠįāąŽÕŚ:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "ŅŲŌÕŽąÕÖŲÜ ŻÕ ÜŽÖÕā Ńėāģ Ų×ÜÕŻńŻ." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "ߎŪŻŽķŚąŠŻŻėŁ ąÕÖŲÜ ŻÕ ÜŽÖÕā Ńėāģ Ų×ÜÕŻńŻ" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "ąÕÖŲÜ ŚŽąąÕŚāŲąŽŅŚŲ įŽŽāŻŽčÕŻŲļ įāŽąŽŻ ŻÕ ÜŽÖÕā Ńėāģ Ų×ÜÕŻńŻ" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "³ąŠä. ąÕÖŲÜ:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "ĄÕÖŲÜ ąŠįāąŠ:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "ĮßÕęŲŠŪģŻėÕ ąÕÖŲÜė ąÕŻŌÕąŲŻÓŠ, ߎŌŌÕąÖŲŅŠÕÜėÕ ŻÕŚŽāŽąėÜŲ ŲÓąŠÜŲ" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "æŽŪŻŽķŚąŠŻŻėŁ ąÕÖŲÜ" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "ŗŽąąÕŚęŲļ įŽŽāŻŽčÕŻŲļ įāŽąŽŻ" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "ŗŽąąÕŚāŲąŽŅŠāģ įŽŽāŻŽčÕŻŲÕ įāŽąŽŻ ŌŪļ ŲÓą į ąŠ×ąÕčÕŻŲÕÜ 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "æąÕŌߎēŲāŠÕÜŽÕ:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "·Ņ挎ŅŽÕ ćįā-ŅŽ:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "ĆŚŠ×ėŅŠÕā ßąÕŌߎēŲāŠÕÜŽÕ ×Ņ挎ŅŽÕ ćįāąŽŁįāŅŽ ŲŪŲ ķÜćŪļāŽą ×Ņ挎ŅŽŁ ŚŠąāė" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "ĆŚŠ×ėŅŠÕā ŅėåŽŌŻŽÕ ×Ņ挎ŅŽÕ ćįāąŽŁįāŅŽ ŲŪŲ ķÜćŪļāŽą ×Ņ挎ŅŽŁ ŚŠąāė" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "æąÕŌߎēŲāŠÕÜŽÕ:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "·Ņ挎ŅŽÕ ćįā-ŅŽ:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "ĶÜćŪļāŽą AdLib:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "·Ņ挎ŅŠļ ŚŠąāŠ AdLib ŲįߎŪģ×ćÕāįļ ÜŻŽÓŲÜŲ ŲÓąŠÜŲ" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "ĒŠįāŽāŠ ×Ņ挊:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -822,68 +824,68 @@ msgstr "" "±¾ŪģčŲÕ ×ŻŠēÕŻŲļ ׊ŌŠīā ŪćēčÕÕ ŚŠēÕįāŅŽ ×Ņ挊, ŽŌŻŠŚŽ ŽŻŲ ÜŽÓćā ŻÕ " "ߎŌŌÕąÖŲŅŠāģįļ ŅŠčÕŁ ×Ņ挎ŅŽŁ ŚŠąāŽŁ" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "ĆįāąŽŁįāŅŽ GM:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "ĆŚŠ×ėŅŠÕā ŅėåŽŌŻŽÕ ×Ņ挎ŅŽÕ ćįāąŽŁįāŅŽ ŌŪļ MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "½Õ ŲįߎŪģ׎ŅŠāģ Üć×ėŚć ŌŪļ General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "øįߎŪģ׎ŅŠāģ ßÕąŅŽÕ ŌŽįāć߯ŽÕ ćįāąŽŁįāŅŽ" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "SoundFont'ė ߎŌŌÕąÖŲŅŠīāįļ ŻÕŚŽāŽąėÜŲ ×Ņ挎ŅėÜŲ ŚŠąāŠÜŲ, FluidSynth Ų " "Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "ĮÜÕ芯ŻėŁ ąÕÖŲÜ AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "øįߎŪģ׎ŅŠāģ Ų MIDI, Ų AdLib ŌŪļ ÓÕŻÕąŠęŲŲ ×Ņ挊" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "ĆįŲŪÕŻŲÕ MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "½ŠįāąŽŁŚŲ FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "Ćįāą. MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "ĆŚŠ×ėŅŠÕā ×Ņ挎ŅŽÕ ćįāąŽŁįāŅŽ ߎ ćÜŽŪēŠŻŲī ŌŪļ ŅėŅŽŌŠ ŻŠ Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "½ŠįāŽļéŲŁ Roland MT-32 (׊߹ÕāŲāģ ķÜćŪļęŲī GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -891,16 +893,16 @@ msgstr "" "¾āÜÕāģāÕ, ÕįŪŲ ć ŅŠį ߎŌŚŪīēÕŻŽ Roland-įŽŅÜÕįāŲÜŽÕ ×Ņ挎ŅŽÕ ćįāąŽŁįāŅŽ Ų Ņė " "åŽāŲāÕ ÕÓŽ ŲįߎŪģ׎ŅŠāģ" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "½ŠįāŽļéŲŁ Roland MT-32 (ŃÕ× ķÜćŪļęŲŲ GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "ĆįāąŽŁįāŅŽ Roland GS (ąŠ×ąÕčŲāģ ÜŠßßŲŻÓ MT-32)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -908,171 +910,183 @@ msgstr "" "¾āÜÕāģāÕ, ÕįŪŲ åŽāŲāÕ ąŠ×ąÕčŲāģ ÜŠßßŲŻÓ ŌŪļ ķÜćŪļęŲŲ MT-32 ŻŠ ćįāąŽŁįāŅÕ " "Roland GS" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "½Õ ŲįߎŪģ׎ŅŠāģ Üć×ėŚć ŌŪļ MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "ĀÕŚįā Ų Ž×ŅćēŚŠ:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "¾×ŅćēŚŠ" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "ĮćŃāŲāąė" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "¾ŃŠ" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "ĮŚŽąŽįāģ āŲāąŽŅ:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "ĀÕŚįā Ų Ž×ŅćēŚŠ:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "¾×Ņ" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "ĮćŃ" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "¾ŃŠ" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "æŽŚŠ×ėŅŠāģ įćŃāŲāąė Ų ŅŽįßąŽŲ×ŅŽŌŲāģ ąÕēģ" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "ĮŚŽąŽįāģ āŲāąŽŅ:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "³ąŽÜŚ. Üć×ėŚŲ:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "³ąŽÜŚ. Üć×ėŚŲ:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "²ėŚŪ. Ņįń" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "³ąŽÜŚŽįāģ SFX:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "³ąŽÜŚŽįāģ įßÕęŲŠŪģŻėå ×Ņ挎Ņėå ķääÕŚāŽŅ" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "³ąŽÜŚ. SFX:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "³ąŽÜŚ. Ž×ŅćēŚŲ:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "³ąŽÜŚ. Ž×ŅćēŚŲ:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "æćāģ Ś āÕÜŠÜ:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "³ŌÕ āÕÜė:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "ĆŚŠ×ėŅŠÕā ßćāģ Ś ŌŽßŽŪŻŲāÕŪģŻėÜ äŠŁŪŠÜ ŌŠŻŻėå, ŲįߎŪģ×ćÕÜėå ŅįÕÜŲ ŲÓąŠÜŲ " "ŪŲŃŽ ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "æćāģ Ś ßŪŠÓŲŻŠÜ:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "æćāģ Ś ßŪŠÓŲŻŠÜ:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "ĄŠ×ŻŽÕ" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "ĀÕÜŠ:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "ĄŲįŽŅŠŪŚŠ GUI:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "°ŅāŽįŽåąŠŻÕŻŲÕ:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "°ŅāŽįŽåą.:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "ŗŪŠŅŲčŲ" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Ļ×ėŚ GUI:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Ļ×ėŚ ÓąŠäŲēÕįŚŽÓŽ ŲŻāÕąäÕŁįŠ ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "æąŽŅÕąļāģ ŽŃŻŽŅŪÕŻŲļ:" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "ŗŠŚ ēŠįāŽ ßąŽŅÕąļāģ ŽŃŻŽŅŪÕŻŲļ ScummVM" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "æąŽŅÕąŲāģ įÕŁēŠį" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "²ė ŌŽŪÖŻė ßÕąÕ׊ßćįāŲāģ ScummVM, ēāŽŃė ßąŲÜÕŻŲāģ Ų×ÜÕŻÕŻŲļ." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "½Õ ÜŽÓć ßŲįŠāģ Ņ ŅėŃąŠŻŻćī ŌŲąÕŚāŽąŲī. æŽÖŠŪćŁįāŠ, 挊ÖŲāÕ ŌąćÓćī." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "²ėŃÕąŲāÕ ŌŲąÕŚāŽąŲī ŌŪļ āÕÜ GUI" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "²ėŃÕąŲāÕ ŌŲąÕŚāŽąŲī į ŌŽßŽŪŻŲāÕŪģŻėÜŲ 䊣ŪŠÜŲ" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "²ėŃÕąŲāÕ ŌŲąÕŚāŽąŲī į ßŪŠÓŲŻŠÜŲ" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1245,39 +1259,63 @@ msgstr "ĄŠįāÕąŲ׊āŽą įŽ įÓŪŠÖŲŅŠŻŲÕÜ" msgid "Antialiased" msgstr "ĮŽ įÓŪŠÖŲŅŠŻŲÕÜ" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" +"ScummVM įāŠŪ ߎŌŌÕąÖŲŅŠāģ ŠŅāŽÜŠāŲēÕįŚćī ßąŽŅÕąŚć\n" +"ŽŃŻŽŅŪÕŻŲŁ, ŚŽāŽąŠļ āąÕŃćÕā ŌŽįāćߊ Ņ øŻāÕąŻÕā\n" +"\n" +"ÅŽāÕŪŲ Ńė Ņė ŅŚŪīēŲāģ ķāć ŽßęŲī?" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "(²ė ÜŽÖÕāÕ ŅįÕÓŌŠ Õń ŅŚŪīēėāģ Ņ ¾ßęŲļå ŻŠ ׊ŚŪŠŌŚć “ąćÓŽÕ)" + +#: gui/updates-dialog.cpp:92 +msgid "Check for updates automatically" +msgstr "°ŅāŽÜŠāŲēÕįŚŲ ßąŽŅÕąŲāģ ŽŃŻŽŅŪÕŻŲļ" + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "æąŽŌŽŪÖŲāģ" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "¾ēŲįāŲāģ ׯŠēÕŻŲÕ" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "“ŅŲÖŽŚ ŻÕ ߎŌŌÕąÖŲŅŠÕā 湎ŅÕŻģ ŽāŪŠŌŚŲ '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "¼ÕŻī" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "æąŽßćįāŲāģ" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "æŠć׊" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "æąŽßćįāŲāģ įāąŽŚć" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "¾čŲŃŚŠ ׊ßćįŚŠ ŲÓąė:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "½Õ ÜŽÓć ŻŠŁāŲ ŌŅŲÖŽŚ ŌŪļ ׊ßćįŚŠ ŅėŃąŠŻŻŽŁ ŲÓąė" @@ -1372,17 +1410,33 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules ĻŻāŠąŻėŁ" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "µÖÕŌŻÕŅŻŽ" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "µÖÕŻÕŌÕŪģŻŽ" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "µÖÕÜÕįļēŻŽ" + +#: common/updates.cpp:64 +msgid "<Bad value>" +msgstr "<½ÕßąŠŅŲŪģŻŽÕ ׯŠēÕŻŲÕ>" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "ŗŠÖÕāįļ, ēāŽ ŲÓąŠ '%s' Õéń ŻÕŲ×ŅÕįāŻŠ." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "æŽÖŠŪćŁįāŠ, ßÕąÕŌŠŁāÕ įŪÕŌćīéŲÕ ŌŠŻŻėÕ ŚŽÜŠŻŌÕ ScummVM ŅÜÕįāÕ į ŻŠ×ŅŠŻŲÕÜ" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "ŲÓąė, ŚŽāŽąćī Ņė ßėāŠÕāÕįģ ŌŽŃŠŅŲāģ, Ų 挊ÖŲāÕ Õń ŅÕąįŲī, ļ×ėŚ Ų ā.Ō." @@ -1390,11 +1444,11 @@ msgstr "ŲÓąė, ŚŽāŽąćī Ņė ßėāŠÕāÕįģ ŌŽŃŠŅŲāģ, Ų 挊ÖŲāÕ Õń ŅÕąįŲī, ļ×ėŚ Ų ā.Ō." msgid "~R~esume" msgstr "æąŽŌŽŪ~Ö~Ųāģ" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~·~ŠÓąć×Ųāģ" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~·~ŠßŲįŠāģ" @@ -1423,9 +1477,9 @@ msgstr "~²~ ÓŪŠŅŻŽÕ ÜÕŻī" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1440,9 +1494,10 @@ msgstr "ĮŽåąŠŻŲāģ ŲÓąć:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1468,13 +1523,13 @@ msgstr "" "ъ׎ŅŽŁ ŲŻäŽąÜŠęŲÕŁ, Š āŠŚÖÕ ŲŻįāąćŚęŲļÜŲ Ž āŽÜ, ŚŠŚ ߎŪćēŲāģ ŌŠŪģŻÕŁčćī " "ߎ܎éģ." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "¾~ā~ÜÕŻŠ" @@ -1632,11 +1687,11 @@ msgstr "°ćŌŲŽ FM-Towns" msgid "PC-98 Audio" msgstr "°ćŌŲŽ PC-98" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "½ŠįāąŠŲŅŠī ķÜćŪļāŽą MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "ĶÜćŪļāŽą MT-32" @@ -1753,11 +1808,11 @@ msgstr "ĄÕÖŲÜ ŠŅāŽŌąķÓŠ įÕŁēŠį" msgid "Swipe three fingers to the right to toggle." msgstr "æąŽŅÕŌŲāÕ āąÕÜļ ߊŪģęŠÜŲ ŻŠßąŠŅŽ ŌŪļ ßÕąÕŚŪīēÕŻŲļ." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (ŃÕ× äŲŪģāąŽŅ)" @@ -2307,20 +2362,20 @@ msgstr "" "½Õ ׊ŃćŌģāÕ ŻŠ×ŻŠēŲāģ ŚŪŠŅŲčć ŌŪļ ŌÕŁįāŅŲļ 'Hide Toolbar', ēāŽŃė ćŅŲŌÕāģ " "ŅÕįģ ŲŻŅÕŻāŠąģ Ņ ŲÓąÕ" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." -msgstr "æąŽŅÕąļī ŽŃŻŽŅŪÕŻŲļ..." +msgstr "æąŽŅÕąŲāģ ŽŃŻŽŅŪÕŻŲļ..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "øįߎŪģ׎ŅŠāģ ŽąŲÓŲŻŠŪģŻėÕ ķŚąŠŻė ׊ßŲįŲ/ēāÕŻŲļ ŲÓąė" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2350,11 +2405,32 @@ msgstr "" "²ŚŪīēŠÕā ߎŌŌÕąÖŚć ÜėčŲ. æŽ×ŅŽŪļÕā ŲįߎŪģ׎ŅŠāģ Üėčģ ŌŪļ ßÕąÕÜÕéÕŻŲļ Ų Ņ " "ÜÕŻī ŲÓąė." +#: engines/agi/detection.cpp:177 +msgid "Use Hercules hires font" +msgstr "øįߎŪģ׎ŅŠāģ čąŲäā Hercules" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" +"øįߎŪģ×ćÕā čąŲäā ŅėįŽŚŽÓŽ ąŠ×ąÕčÕŻŲļ Hercules, ÕįŪŲ ŌŽįāćßÕŻ 䊣Ū įŽ čąŲäāŽÜ." + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "æŠć׊ ŅŽ ŅąÕÜļ ŅŅŽŌŠ ŚŽÜŠŻŌ" + +#: 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 "" +"æŽŚŠ×ėŅŠÕā ŽŚŻŽ įŽ įāąŽŚŽŁ ŅŅŽŌŠ ŚŽÜŠŻŌė Ų įāŠŅŲā ŲÓąć ŻŠ ߊć×ć (ŚŠŚ Ņ SCI) " +"ŅÜÕįāŽŅŅŽŌŠ Ņ ąÕŠŪģŻŽÜ ŅąÕÜÕŻŲ." + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2364,13 +2440,13 @@ msgstr "²ŽįįāŠŻŽŅŲāģ ŲÓąć:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "²ŽįįāŠŻŽŅŲāģ" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2381,7 +2457,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2392,7 +2468,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2639,29 +2715,37 @@ msgstr "" "ŽāŚąėāģ ŽāŪŠŌŽēŻćī ŚŽŻįŽŪģ ScummVM Ų ŅŅÕįāŲ ŚŽÜŠŻŌć 'import_savefile'.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "æąŽŲÓąėŅŠāģ ąŽŪŲŚ ßąŽŪńāŠ ŻŠŌ Myst" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "ĄŽŪŲŚ ßąŽŪńāŠ ŻŠŌ Myst ŻÕ ßąŽŲÓąėŅŠŪįļ ŽąŲÓŲŻŠŪģŻėÜ ŌŅŲÖŚŽÜ." + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Ą~ÕÖŲÜ ŃėįāąŽÓŽ ßÕąÕåŽŌŠ ŠŚāŲŅŲąŽŅŠŻ" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~æ~ÕąÕåŽŌė ŠŚāŲŅŲąŽŅŠŻė" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~²~ėŃąŽįŲāģ įāąŠŻŲęć" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +msgid "Show ~M~ap" msgstr "æ~Ž~ŚŠ×Šāģ ŚŠąāć" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +msgid "Main Men~u~" msgstr "~³~ŪŠŅŻŽÕ ÜÕŻī" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~Ķ~ääÕŚāė ŅŽŌė ŅŚŪīēÕŻė" @@ -2783,38 +2867,38 @@ msgstr "°ŪģāÕąŻŠāŲŅŻŽÕ ŅįāćßŪÕŻŲÕ" msgid "Use an alternative game intro (CD version only)" msgstr "øįߎŪģ׎ŅŠāģ ŠŪģāÕąŻŠāŲŅŻŽÕ ŅįāćßŪÕŻŲÕ (āŽŪģŚŽ ŌŪļ CD-ŅÕąįŲŲ ŲÓąė)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "½Õ ŌÕŪŠāģ ŠßßąŽŚįŲÜŠęŲī ęŅÕāŽŅ EGA (ߎŪŻŽęŅÕāŻėÕ äŽŻė)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "æąŽßćįŚŠÕā ßąŽåŽŌ ŠßßąŽŚįŲÜŠęŲŲ ęŅÕāŽŅ EGA, ÓąŠäŲŚŠ ŃćŌÕā ߎŚŠ×ŠŻŠ įŽ ŅįÕÜŲ " "ęŅÕāŠÜŲ" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "²ŚŪīēŲāģ ŽāŽŃąŠÖÕŻŲÕ ÓąŠäŲŚŲ ŅėįŽŚŽÓŽ ąŠ×ąÕčÕŻŲļ" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "²ŚŪīēŲāģ ÓąŠäŲŚć Ų ŚŽŻāÕŻā ŅėįŽŚŽÓŽ ąŠąÕčÕŻŲļ" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "æąÕŌߎēŲāŠāģ ęŲ乎ŅėÕ ×Ņ挎ŅėÕ ķääÕŚāė" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" "¾āŌŠŅŠāģ ßąÕŌߎēāÕŻŲÕ ęŲ乎ŅėÜ ×Ņ挎ŅėÜ ķääÕŚāŠÜ ŅÜÕįāŽ įŲŻāÕ×ŲąŽŅŠŻŻėå" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "øįߎŪģ׎ŅŠāģ IMF/Yamaha FB-01 ŌŪļ ŅėŅŽŌŠ MIDI" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2822,37 +2906,45 @@ msgstr "" "øįߎŪģ׎ŅŠāģ ×Ņ挎Ņćī ŚŠąāć IBM Music Feature ŲŪŲ ÜŽŌćŪģ įŲŻāÕ׊ Yamaha " "FB-01 FM ŌŪļ MIDI" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "øįߎŪģ׎ŅŠāģ CD-ŠćŌŲŽ" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "" "øįߎŪģ׎ŅŠāģ ×Ņ挎ŅėÕ ŌŽąŽÖŚŲ į CD ŅÜÕįāŽ Üć×ėŚŲ Ų× äŠŁŪŽŅ ŲÓąė (ÕįŪŲ " "ŌŽįāć߯Ž)" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "øįߎŪģ׎ŅŠāģ ŚćąįŽąė Windows" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "øįߎŪģ׎ŅŠāģ ŚćąįŽąė Windows (ÜÕŻģčŲÕ ßŽ ąŠ×ÜÕąć Ų ŽŌŻŽęŅÕāŻėÕ) ŅÜÕįāŽ " "ŚćąįŽąŽŅ DOS" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "øįߎŪģ׎ŅŠāģ įÕąÕŃąļŻėÕ ŚćąįŽąė" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "øįߎŪģ׎ŅŠāģ ŠŪģāÕąŻŠāŲŅŻėŁ ŻŠŃŽą įÕąÕŃąļŻėå ŚćąįŽąŽŅ ŅÜÕįāŽ ŽŃėēŻėå ׎ŪŽāėå" +#: engines/scumm/detection.cpp:1335 +msgid "Show Object Line" +msgstr "æŽŚŠ×ėŅŠāģ ŪŲŻŲŲ ŽŃźÕŚāŽŅ" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "æŽŚŠ×ėŅŠāģ ŻŠ×ŅŠŻŲļ ŽŃźÕŚāŽŅ ŅŻŲ×ć ķŚąŠŻŠ" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3518,7 +3610,7 @@ msgstr "³ąŽÜŚ. Üć×ėŚŲ: " msgid "Subtitle speed: " msgstr "ĮŚŽąŽįāģ āŲāąŽŅ: " -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3527,7 +3619,7 @@ msgstr "" "ĄÕÖŲÜ \"ąŽŌŻŽÓŽ\" MIDI āąÕŃćÕā ŽŃŻŽŅŪÕŻŲÕ Roland Upgrade Žā\n" "LucasArts, ŻŽ ŻÕ åŅŠāŠÕā %s. æÕąÕŚŪīēŠīįģ ŻŠ AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3708,6 +3800,17 @@ msgstr "æŽŚŠ×ėŅŠāģ ŻŠ×ŅŠŻŲļ ŽŃźÕŚāŽŅ" msgid "Show labels for objects on mouse hover" msgstr "æŽŚŠ×ėŅŠÕā ŻŠ×ŅŠŻŲļ ŽŃźÕŚāŽŅ ßąŲ ŻŠŅÕŌÕŻŲŲ ŚćąįŽąŠ ÜėčŲ" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "øįߎŪģ׎ŅŠāģ ŠŻÓŪŲŁįŚćī Ž×ŅćēŚć" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" +"øįߎŪģ׎ŅŠāģ ŠŻÓŪŲŁįŚćī Ž×ŅćēŚć ŅÜÕįāŽ ŻÕÜÕꌎŁ ŌŪļ ŅįÕå ļ×ėŚŽŅ ŚąŽÜÕ " +"ŻÕÜÕꌎӎ" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" @@ -3769,70 +3872,3 @@ msgid "Use MPEG video from the DVD version, instead of lower resolution AVI" msgstr "" "øįߎŪģ׎ŅŠāģ MPEG-ŅŲŌÕŽ Ų× DVD-ŅÕąįŲŲ ŅÜÕįāŽ ŅŲŌÕŽ ŻŲ׌ŽÓŽ ąŠ×ąÕčÕŻŲļ Ņ " "䎹܊āÕ AVI" - -#~ msgid "EGA undithering" -#~ msgstr "EGA ŃÕ× ąŠįāąŠ" - -#~ msgid "Enable undithering in EGA games" -#~ msgstr "²ŚŪīēŠÕā ąÕÖŲÜ ŃÕ× ąŠįāąŲąŽŅŠŻŲļ Ņ EGA ŲÓąŠå" - -#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2" -#~ msgstr "" -#~ "½ŠŁŌÕŻė ׊įāŠŅŚŲ Ņ 䎹܊āÕ MPEG-2, ŻŽ ScummVM ŃėŪ įŽŃąŠŻ ŃÕ× ßŽŌŌÕąÖŚŲ " -#~ "MPEG-2" - -#~ msgctxt "lowres" -#~ msgid "Mass Add..." -#~ msgstr "¼ŻŽÓŽ ŲÓą..." - -#~ msgid "" -#~ "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" -#~ msgstr "" -#~ "²ėŚŪīēŠÕā įŽßŽįāŠŅŪÕŻŲÕ General MIDI ŌŪļ ŲÓą į ×Ņ挎ŅŽŁ ŌŽąŽÖŚŽŁ ŌŪļ " -#~ "Roland MT-32" - -#~ msgid "Standard (16bpp)" -#~ msgstr "ĮāŠŻŌŠąāŻėŁ ąŠįāÕąŲ׊āŽą (16bpp)" - -#~ msgid "MPEG2 cutscenes are no longer supported" -#~ msgstr "·ŠįāŠŅŚŲ Ņ 䎹܊āÕ MPEG2 ŃŽŪģčÕ ŻÕ ߎŌŌÕąÖŲŅŠīāįļ" - -#~ msgid "OpenGL Normal" -#~ msgstr "OpenGL ŃÕ× ćŅÕŪŲēÕŻŲļ" - -#~ msgid "OpenGL Conserve" -#~ msgstr "OpenGL į įŽåąŠŻÕŻŲÕÜ" - -#~ msgid "OpenGL Original" -#~ msgstr "OpenGL ŲׯŠēŠŪģŻėŁ" - -#~ msgid "Current display mode" -#~ msgstr "ĀÕŚćéŲŁ ŅŲŌÕŽąÕÖŲÜ" - -#~ msgid "Current scale" -#~ msgstr "ĀÕŚćéŲŁ ÜŠįčāŠŃ" - -#~ msgid "Active filter mode: Linear" -#~ msgstr "°ŚāŲŅŻėŁ ąÕÖŲÜ äŲŪģāąŠ: »ŲŻÕŁŻėŁ" - -#~ msgid "Active filter mode: Nearest" -#~ msgstr "°ŚāŲŅŻėŁ ąÕÖŲÜ äŲŪģāąŠ: ±ŪŲÖŠŁčŲŁ" - -#~ msgid "Enable Roland GS Mode" -#~ msgstr "²ŚŪīēŲāģ ąÕÖŲÜ Roland GS" - -#~ msgctxt "lowres" -#~ msgid "Add Game..." -#~ msgstr "“ŽŃ. ŲÓąć" - -#~ msgid "Add Game..." -#~ msgstr "“ŽŃŠŅŲāģ ŲÓąć..." - -#~ msgid "Discovered %d new games." -#~ msgstr "½ŠŁŌÕŻŽ %d ŻŽŅėå ŲÓą." - -#~ msgid "Command line argument not processed" -#~ msgstr "æŠąŠÜÕāąė ŚŽÜŠŻŌŻŽŁ įāąŽŚŲ ŻÕ ŽŃąŠŃŽāŠŻė" - -#~ msgid "Invalid Path" -#~ msgstr "½ÕŅÕąŻėŁ ßćāģ" diff --git a/po/scummvm.pot b/po/scummvm.pot index 1edbe00e20..8bc74ef781 100644 --- a/po/scummvm.pot +++ b/po/scummvm.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.9.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -54,10 +54,11 @@ msgstr "" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -171,7 +172,7 @@ msgstr "" msgid "Triangle" msgstr "" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "" @@ -205,12 +206,12 @@ msgstr "" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -238,15 +239,15 @@ msgstr "" msgid "Mouse click" msgstr "" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "" @@ -318,8 +319,8 @@ msgid "" "English" msgstr "" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "" @@ -341,11 +342,11 @@ msgstr "" msgid "Engine" msgstr "" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "" @@ -358,7 +359,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "" @@ -371,11 +372,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "" @@ -389,7 +390,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "" @@ -402,7 +403,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "" @@ -415,11 +416,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "" @@ -433,7 +434,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "" @@ -441,42 +442,42 @@ msgstr "" msgid "Specifies path to additional data used by the game" msgstr "" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "" @@ -488,7 +489,7 @@ msgstr "" msgid "Select additional game directory" msgstr "" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "" @@ -496,7 +497,7 @@ msgstr "" msgid "This game ID is already taken. Please choose another one." msgstr "" -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "" @@ -584,17 +585,18 @@ msgid "Search:" msgstr "" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "" @@ -679,378 +681,390 @@ msgstr "" msgid "Fast replay" msgstr "" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "" -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" msgstr "" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" msgstr "" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" msgstr "" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "" -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1221,39 +1235,59 @@ msgstr "" msgid "Antialiased" msgstr "" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +msgid "Check for updates automatically" +msgstr "" + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "" @@ -1348,16 +1382,32 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +msgid "<Bad value>" +msgstr "" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "" -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" @@ -1365,11 +1415,11 @@ msgstr "" msgid "~R~esume" msgstr "" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "" @@ -1398,9 +1448,9 @@ msgstr "" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1415,9 +1465,10 @@ msgstr "" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1437,13 +1488,13 @@ msgid "" "and for instructions on how to obtain further assistance." msgstr "" -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "" @@ -1576,11 +1627,11 @@ msgstr "" msgid "PC-98 Audio" msgstr "" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "" @@ -1697,11 +1748,11 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "" @@ -2249,20 +2300,20 @@ msgid "" "Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" msgstr "" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "" #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2286,11 +2337,29 @@ msgid "" "Enables mouse support. Allows to use mouse for movement and in game menus." msgstr "" +#: engines/agi/detection.cpp:177 +msgid "Use Hercules hires font" +msgstr "" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2300,13 +2369,13 @@ msgstr "" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2314,7 +2383,7 @@ msgid "" "%s" msgstr "" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2322,7 +2391,7 @@ msgid "" "%s" msgstr "" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2540,29 +2609,37 @@ msgid "" "\n" msgstr "" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +msgid "Show ~M~ap" msgstr "" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +msgid "Main Men~u~" msgstr "" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "" @@ -2671,66 +2748,74 @@ msgstr "" msgid "Use an alternative game intro (CD version only)" msgstr "" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +#: engines/scumm/detection.cpp:1335 +msgid "Show Object Line" +msgstr "" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3396,14 +3481,14 @@ msgstr "" msgid "Subtitle speed: " msgstr "" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3556,6 +3641,15 @@ msgstr "" msgid "Show labels for objects on mouse hover" msgstr "" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/sv_SE.po b/po/sv_SE.po index 82357b4dc2..894dfadec3 100644 --- a/po/sv_SE.po +++ b/po/sv_SE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-02-25 23:06+0100\n" "Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n" "Language-Team: \n" @@ -56,10 +56,11 @@ msgstr "Uppåt" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -173,7 +174,7 @@ msgstr "Sinus" msgid "Triangle" msgstr "Triangel" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Diverse" @@ -208,12 +209,12 @@ msgstr "" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -243,15 +244,15 @@ msgstr "Stäng" msgid "Mouse click" msgstr "Musklick" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Visa tangentbord" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Ställ in tangenter" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Fullskärmsläge" @@ -327,8 +328,8 @@ msgstr "" "Spelets språk. Den här inställningen omvandlar inte din spanska spelversion " "till en engelsk" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<standard>" @@ -350,11 +351,11 @@ msgstr "Plattform:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Grafik" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -367,7 +368,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Överskrid globala grafikinställningar" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Ljud" @@ -380,11 +381,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Överskrid globala ljudinställningar" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Volym" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "Volym" @@ -398,7 +399,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Överskrid globala volyminställningar" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -411,7 +412,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Överskrid globala MIDI-inställningar" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -424,11 +425,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Överskrid globala MT-32 inställningar" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Sökvägar" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Sökvägar" @@ -442,7 +443,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Sökv. spel:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Sökv. extra:" @@ -450,42 +451,42 @@ msgstr "Sökv. extra:" msgid "Specifies path to additional data used by the game" msgstr "Bestämmer sökvägen till ytterligare data som spelet använder" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Sökv. extra:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Sökv. sparat:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Bestämmer var dina spardata lagras" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Sökv. sparat:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Ingen" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Välj SoundFont" @@ -497,7 +498,7 @@ msgstr "Välj katalog med speldata" msgid "Select additional game directory" msgstr "Välj en ytterligare spelkatalog" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Välj katalog för spardata" @@ -505,7 +506,7 @@ msgstr "Välj katalog för spardata" msgid "This game ID is already taken. Please choose another one." msgstr "Detta ID-namn är upptaget. Var god välj ett annat." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~A~vsluta" @@ -593,17 +594,18 @@ msgid "Search:" msgstr "Sök:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Ladda spel:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Ladda" @@ -691,132 +693,132 @@ msgstr "Växla till spelet" msgid "Fast replay" msgstr "Snabb uppspelning" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Aldrig" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "var 5:e minut" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "var 10:e minut" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "var 15:e minut" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "var 30:e minut" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Ingen" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Kunde inte verkställa några av grafikinställningarna:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "videoläget kunde inte ändras." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "fullskärmsinställningen kunde inte ändras." -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "inställningen för bildförhållandet kunde inte ändras." -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Grafikläge:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Renderingsläge:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Speciella gitterlägen stödda av vissa spel" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Fullskärmsläge" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Korrektion av bildförhållande" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "Korrigerar bildförhållanden för 320x200-spel" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Föredragen enhet:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Musikenhet:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Bestämmer din föredragna emulator för ljudenhet eller ljudkort" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Bestämmer emulator för ljudenhet eller ljudkort" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Föredr. enhet:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Musikenhet:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib-emulator:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib används för musik i många spel" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Ljudfrekvens:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -824,65 +826,65 @@ msgstr "" "Ett högre värde betecknar bättre ljudkvalitet men stöds kanske inte av ditt " "ljudkort" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM-enhet:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Bestämmer standardenheten för General MIDI-uppspelning" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Använd inte General MIDI-musik" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Använd första tillgängliga enhet" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "SoundFont stöds endast av vissa ljudkort, FluidSynth och Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Blandat AdLib/MIDI-läge" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "Använd både MIDI och AdLib för ljudgeneration" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDI gain:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "FluidSynth inställningar" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32 enhet:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Bestämmer standardenheten för Roland MT-32/LAPC1/CM32I/CM64-uppspelning" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Äkta Roland MT-32 (inaktivera GM-emulation)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -890,16 +892,16 @@ msgstr "" "Aktivera om du vill använda din verkliga Roland-kompatibla och dator-" "anslutna ljudenhet" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Äkta Roland MT-32 (ingen GM-emulation)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland GS-enhet (aktivera MT-32 mappings)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -907,171 +909,183 @@ msgstr "" "Aktivera om du vill använda patch mapping för att emulera en MT-32 på en " "Roland GS-enhet" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Använd inte Roland MT-32 musik" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Undertext och tal:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Tal" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Undertexter" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Båda" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Texthastighet:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Text och tal:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Tal" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Text" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Båda" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Visa undertexter och spela upp tal" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Texthastighet:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Musikvolym:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Musikvolym:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Ljud av" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "SFX-volym:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Volym för specialeffekter" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "SFX-volym:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Talvolym:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Talvolym:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Sökv. tema:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Sökv. tema:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Bestämmer sökväg till andra data som används av alla spel eller ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Sökv. tillägg:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Sökv. tillägg:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Diverse" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "GUI-rendering:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Autospara:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Autospara:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Tangenter" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "GUI-språk:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "Språk för ScummVM:s användargränssnitt" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 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:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "Det går inte att skriva till den valda katalogen. Var god välj en annan." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Välj katalog för GUI-teman" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Välj katalog för extra filer" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Välj katalog för tillägg" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1244,39 +1258,60 @@ msgstr "Antialiserad rendering" msgid "Antialiased" msgstr "Antialiserad" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Sök efter uppdateringar..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Töm sökfältet" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motorn stöder inte debug-nivå '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Meny" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Skippa" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Paus" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Skippa rad" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Fel under körning av spel:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Kunde inte hitta en motor kapabel till att köra det valda spelet" @@ -1371,17 +1406,34 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Herkules bärnsten" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Töm sökfältet" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Spelet i '%s' verkar vara okänt." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Var god rapportera följande data till ScummVM-teamet tillsammans med namnet" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "på spelet du försökte lägga till och dess version/språk/etc.:" @@ -1389,11 +1441,11 @@ msgstr "på spelet du försökte lägga till och dess version/språk/etc.:" msgid "~R~esume" msgstr "~F~ortsätt" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~L~adda" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~S~para" @@ -1422,9 +1474,9 @@ msgstr "Åte~r~vänd till launcher" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1439,9 +1491,10 @@ msgstr "Spara spelet:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1466,13 +1519,13 @@ msgstr "" "Kunde inte spara data (%s)! Var god läs README-filen för grundläggande " "information och instruktioner för hur du kan få mer hjälp." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "A~v~bryt" @@ -1628,11 +1681,11 @@ msgstr "FM Towns-ljud" msgid "PC-98 Audio" msgstr "PC-98 ljud" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Initialiserar MT-32 emulator" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 emulator" @@ -1749,11 +1802,11 @@ msgstr "Automatiskt dragläge " msgid "Swipe three fingers to the right to toggle." msgstr "Svep åt höger med tre fingrar för att byta läge." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (ingen filtrering)" @@ -2306,20 +2359,20 @@ msgstr "" "Glöm inte att välja en tangent för \"Göm verktygsrad\" för att se hela " "inventariet" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Sök efter uppdateringar..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Använd originalskärmar för spara/ladda" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Använder originalskärmarna för spara/ladda istället för ScummVM:s" @@ -2347,11 +2400,30 @@ msgstr "" "Aktiverar musstöd. Möjliggör användning av musen för rörelser och i " "spelmenyer." +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Herkules grön" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2361,13 +2433,13 @@ msgstr "Återställ spel:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Återställ" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2378,7 +2450,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2389,7 +2461,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2636,29 +2708,39 @@ msgstr "" "och använda kommandot 'import_savefile'.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Z~ipläge aktiverat" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "Öv~e~rgångar aktiverade" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "Släpp si~d~a" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~V~isa karta" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "Huvud~m~eny" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~V~atteneffekt aktiverad" @@ -2782,35 +2864,35 @@ msgstr "Alternativt intro" msgid "Use an alternative game intro (CD version only)" msgstr "Använd alternativt spelintro (endast CD-version)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Skippa EGA-gitterpass (bakgrunder i full färg)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "Skippa gitterpass i EGA-spel. Grafik visas i full färg." -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "Aktivera högupplöst grafik" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Aktivera högupplöst grafik/innehåll" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Föredra digitala ljudeffekter" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Föredra digitala ljudeffekter istället för syntetiserade" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Använd IMF/Yamaha FB-01 för MIDI-uppspelning" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2818,34 +2900,43 @@ msgstr "" "Använd ett IMB Music Feature-kort eller en Yamaha FB-01 FM synthmodul för " "MIDI-uppspelning" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Använd CD-ljud" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Använd CD-ljud istället för spelets ljud, om tillgängligt" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Använd Windows muspekare" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" "Använd Windows muspekare (mindre och svartvit) istället för DOS-pekaren" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Använd silverpekare" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "Använd de alternativa silverpekarna istället för de normala guldpekarna" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Visa etiketter" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3511,7 +3602,7 @@ msgstr "Musikvolym: " msgid "Subtitle speed: " msgstr "Texthastighet: " -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3520,7 +3611,7 @@ msgstr "" "Stöd för Native MIDI kräver Roland-uppdateringen från LucasArts,\n" "men %s saknas. Använder AdLib istället." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3699,6 +3790,15 @@ msgstr "Visa etiketter" msgid "Show labels for objects on mouse hover" msgstr "Visar etiketter för objekten som musen pekar på" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/uk_UA.po b/po/uk_UA.po index 5ab87a4155..5b4f3078ec 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2015-11-06 10:07+0300\n" "Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n" "Language-Team: Ukrainian\n" @@ -56,10 +56,11 @@ msgstr "²ÓŽąć" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -173,7 +174,7 @@ msgstr "ĮŲŻćįŽ÷ŌŠ" msgid "Triangle" msgstr "ĀąŲŚćāŻŲŚ" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "ĄöׯÕ" @@ -207,12 +208,12 @@ msgstr "ĮŚŲŻćāŲ Ņįö ŻŠŪŠčāćŅŠŻŻļ FluidSynth ŌŽ ÷å ׯŠēÕŻģ ׊ ׊܎ŅēÕŻŻļÜ" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -242,15 +243,15 @@ msgstr "·ŠŚąŲāŲ" msgid "Mouse click" msgstr "ŗŪöŚ ÜŲ茎ī" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "æŽŚŠ×ŠāŲ ŚŪŠŅöŠāćąć" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "æÕąÕßąŲׯŠēŲāŲ ŚŪŠŅöčö" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "æÕąÕÜŚŻćāŲ ߎŅŻŽÕŚąŠŻŻŲŁ ąÕÖŲÜ" @@ -326,8 +327,8 @@ msgstr "" "¼ŽŅŠ ÓąŲ. ·ÜöŻŠ ęģŽÓŽ ŻŠŪŠčāćŅŠŻŻļ ŻÕ ßÕąÕāŅŽąŲāģ Óąć ŠŻÓŪöŁįģŚŽī ŻŠ " "挹Š÷ŻįģŚć" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<׊ ćÜŽŅēŠŻŻļÜ>" @@ -349,11 +350,11 @@ msgstr "æŪŠā䎹܊:" msgid "Engine" msgstr "“ŅŲÖŽŚ" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "³ąŠäöŚŠ" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "³ąä" @@ -366,7 +367,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "æÕąÕŚąŲāŲ ÓŪŽŃŠŪģŻö ćįāŠŻŽŅŚŲ ÓąŠäöŚŲ" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "°ćŌöŽ" @@ -379,11 +380,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "æÕąÕŚąŲāŲ ÓŪŽŃŠŪģŻö ćįāŠŻŽŅŚŲ ŠćŌöŽ" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "³ćēŻöįāģ" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "³ćēŻ." @@ -397,7 +398,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "æÕąÕŚąŲāŲ ÓŪŽŃŠŪģŻö ćįāŠŻŽŅŚŲ ÓćēŻŽįāö" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -410,7 +411,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "æÕąÕŚąŲāŲ ÓŪŽŃŠŪģŻö ćįāŠŻŽŅŚŲ MIDI" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -423,11 +424,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "æÕąÕŚąŲāŲ ÓŪŽŃŠŪģŻö ćįāŠŻŽŅŚŲ MT-32" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "ČŪļåŲ" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "ČŪļåŲ" @@ -441,7 +442,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "ČŪļå ŌŽ ÓąŲ:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "“ŽŌŠāŚ. čŪļå:" @@ -449,42 +450,42 @@ msgstr "“ŽŌŠāŚ. čŪļå:" msgid "Specifies path to additional data used by the game" msgstr "²ŚŠ×ćō čŪļå ŌŽ ŌŽŌŠāŚŽŅŲå 䊣ŪöŅ ŌŠŻŲå ŌŪļ ÓąŲ" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "“ŽŌ. čŪļå:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "ČŪļå ×ŃÕą.:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "²ŚŠ×ćō čŪļå ŌŽ ×ŃÕąÕÖÕŻģ ÓąŲ" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "ČŪļå ×ŃÕą.:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "½Õ ׊ŅŌŠŻŲŁ" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "·Š ćÜŽŅēŠŻŻļÜ" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "²ŲŃÕąöāģ SoundFont" @@ -496,7 +497,7 @@ msgstr "²ŲŃÕąöāģ ߊߌć × äŠŁŪŠÜŲ ÓąŲ" msgid "Select additional game directory" msgstr "²ŲŃÕąöāģ ŌŽŌŠāŚŽŅć ߊߌć ÓąŲ" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "²ŲŃÕąöāģ ߊߌć ŌŪļ ×ŃÕąÕÖÕŻģ" @@ -504,7 +505,7 @@ msgstr "²ŲŃÕąöāģ ߊߌć ŌŪļ ×ŃÕąÕÖÕŻģ" msgid "This game ID is already taken. Please choose another one." msgstr "ĘÕŁ ID ÓąŲ ŅÖÕ ŅŲŚŽąŲįāŽŅćōāģįļ. ±ćŌģ ŪŠįŚŠ, ŅŲŃÕąöāģ öŻčŲŁ." -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~²~ŲåöŌ" @@ -592,17 +593,18 @@ msgid "Search:" msgstr "æŽčćŚ:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "·ŠŅŠŻāŠÖŲāŲ Óąć:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "·ŠŅŠŻāŠÖŲāŲ" @@ -689,132 +691,132 @@ msgstr "æÕąÕŚŪīēŲāŲįļ ŻŠ Óąć" msgid "Fast replay" msgstr "ČŅŲŌŚÕ ŅöŌāŅŽąÕŻŻļ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "½öŚŽŪŲ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "ŚŽÖŻö 5 åŅ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "ŚŽÖŻö 10 åŅ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "ŚŽÖŻö 15 åŅ" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "ŚŽÖŻö 30 åŅ" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 Ś³ę" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 Ś³ę" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "½Õ ׊ŌŠŻŲŁ" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "½Õ ŅŌŠŪŽįļ ׊įāŽįćŅŠāŲ ŌÕļŚö ×ö ×ÜöŻ ÓąŠäöēŻŲå ŻŠŪŠčāćŅŠŻģ:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "ŻÕ ŅŌŠŪŽįļ ×ÜöŻŲāŲ ÓąŠäöēŻŲŁ ąÕÖŲÜ." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "ŻÕ ŅŌŠŪŽįļ ×ÜöŻŲāŲ ąÕÖŲÜ ßŽŅŻŽÓŽ ÕŚąŠŻć" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "ŻÕ ŅŌŠŪŽįļ ×ÜöŻŲāŲ ąÕÖŲÜ ŚŽąÕŚęö÷ įßöŅŅöŌŻŽčÕŻŻļ įāŽąöŻ" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "³ąŠäöēŻ. ąÕÖŲÜ:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "ĄÕÖŲÜ ąŠįāąćŅ.:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "ĮßÕęöŠŪģŻö ąÕÖŲÜŲ ąŠįāąćŅŠŻŻļ, ļŚö ßöŌāąŲÜćīāģ ŌÕļŚö öÓąŲ" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "æŽŅŻŽÕŚąŠŻŻŲŁ ąÕÖŲÜ" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "ŗŽąÕŚęöļ įßöŅŅöŌŻŽčÕŻŻļ įāŽąöŻ" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "ŗŽąŲÓćŅŠāŲ įßöŅŅöŌŻŽčÕŻŻļ įāŽąöŻ ŌŪļ öÓŽą × ÓąŠäöŚŽī 320x200" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "ĆߎŌŽŃŠŻŲŁ ßąŲįāąöŁ:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "¼ć×Ųē. ßąŲįāąöŁ:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "²ŚŠ×ćō ćߎŌŽŃŠŻŲŁ ×Ņ挎ŅŲŁ ßąŲįāąöŁ ŠŃŽ ÕÜćŪļāŽą ×Ņ挎ŅŽ÷ ŚŠąāŲ" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "²ŚŠ×ćō ŅŲåöŌŻŲŁ ×Ņ挎ŅŲŁ ßąŲįāąöŁ ŠŃŽ ÕÜćŪļāŽą ×Ņ挎ŅŽ÷ ŚŠąāŲ" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "ĆߎŌŽŃ. ßąŲįāąöŁ:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "¼ć×ŲēŻŲŁ ßąŲįāąöŁ:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "µÜćŪļāŽą AdLib:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "·Ņ挎ŅŠ ŚŠąāŠ AdLib ŅŲŚŽąŲįāŽŅćōāģįļ ŃŠÓŠāģÜŠ öÓąŠÜŲ" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "²ŲåöŌŻŠ ēŠįāŽāŠ:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -822,67 +824,67 @@ msgstr "" "²ÕŪŲŚö ׯŠēÕŻŻļ ׊ŌŠīāģ ŚąŠéć ļŚöįāģ ×ŅćŚć, ßąŽāÕ ŅŽŻŲ ÜŽÖćāģ ŻÕ " "ßöŌāąŲÜćŅŠāŲįļ ŅŠčŽī ×Ņ挎ŅŽī ŚŠąāŽī" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "æąŲįāąöŁ GM:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "²ŚŠ×ćō ŅŲåöŌŻŲŁ ×Ņ挎ŅŲŁ ßąŲįāąöŁ ŌŪļ General MIDI" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "½Õ ŅŲŚŽąŲįāŽŅćŅŠāŲ Üć×ŲŚć General MIDI" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ ßÕąčŲŁ ŻŠļŅŻŲŁ ßąŲįāąöŁ" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "" "SoundFont ßöŌāąŲÜćōāģįļ ŌÕļŚŲÜŲ ×Ņ挎ŅŲÜŲ ŚŠąāŠÜŲ, FluidSynth āŠ Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "·Üö芯ŲŁ ąÕÖŲÜ AdLib/MIDI" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ ö MIDI ö AdLib ŌŪļ ÓÕŻÕąŠęö÷ ×ŅćŚć" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "æŽįŲŪÕŻŻļ MIDI:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "½ŠŪŠčāćŅŠŻŻļ FluidSynth" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "æąŲįāąöŁ MT-32:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "²ŚŠ×ćō ×Ņ挎ŅŲŁ ßąŲįāąöŁ ׊ ćÜŽŅēŠŻŻļÜ ŌŪļ ŅŲŅŽŌć ŻŠ Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "ĮßąŠŅÖŻöŁ Roland MT-32 (ŅŲÜŚŻćāŲ ÕÜćŪļęŲī GM)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -890,16 +892,16 @@ msgstr "" "²öŌÜöāģāÕ, ļŚéŽ ć ŅŠį ßöŌŚŪīēÕŻŽ Roland-įćÜöįŻŲŁ ×Ņ挎ŅŲŁ ßąŲįāąöŁ ö ŅŲ " "åŽēÕāÕ ŁŽÓŽ ŅŲŚŽąŲįāŽŅćŅŠāŲ" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "ĮßąŠŅÖŻöŁ Roland MT-32 (ŅŲÜŚŻćāŲ ÕÜćŪļęŲī GM)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "ĄÕÖŲÜ Roland GS (ŅŅöÜŚŻćāŲ ÜŠßŪÕŻŻļ MT-32)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -907,171 +909,183 @@ msgstr "" "²öŌÜöāģāÕ, ļŚéŽ åŽēÕāÕ ŅŚŪīēŲāŲ ŪŠāŚŲ ŌŪļ öįāąćÜÕŻāöŅ ŌŪļ ÕÜćŪļęö÷ MT-32 ŻŠ " "Roland" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "½Õ ŅŲŚŽąŲįāŽŅćŅŠāŲ Üć×ŲŚć ŌŪļ Roland MT-32" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "ĀÕŚįā ö Ž×ŅćēŚŠ:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "¾×ŅćēŚŠ" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "ĮćŃāŲāąŲ" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "²įÕ" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "ČŅŲŌ. įćŃāŲāąöŅ:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "ĀÕŚįā ö Ž×ŅćēŚŠ:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "¾×Ņ" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "ĮćŃ" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "²įÕ" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "æŽŚŠ×ćŅŠāŲ įćŃāŲāąŲ ö ŅöŌāŅŽąīŅŠāŲ ÜŽŅć" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "ČŅŲŌ. įćŃāŲāąöŅ:" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "³ćēŻöįāģ Üć×ŲŚŲ:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "³ćēŻöįāģ Üć×ŲŚŲ:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "²ŲÜŚŻćāŲ ŅįÕ" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "³ćēŻöįāģ ÕäÕŚāöŅ:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "³ćēŻöįāģ įßÕęöŠŪģŻŲå ×Ņ挎ŅŲå ÕäÕŚāöŅ" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "³ćēŻ. ÕäÕŚāöŅ:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "³ćēŻöįāģ Ž×ŅćēŚŲ:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "³ćēŻ. Ž×ŅćēŚŲ:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "ČŪļå ŌŽ āÕÜ:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "ČŪļå ŌŽ āÕÜ:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "²ŚŠ×ćō čŪļå ŌŽ ŌŽŌŠāŚŽŅŲå 䊣ŪöŅ ŌŠŻŲå, ļŚö ŅŲŚŽąŲįāŽŅćīāģįļ ćįöÜŠ öÓąŠÜŲ " "ŠŃŽ ScummVM" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "ČŪļå ŌŽ ŅāćŪŚöŅ:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "ČŪļå ŌŽ ŅāćŪŚöŅ:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "ĄöׯÕ" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "ĀÕÜŠ:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "ĄŠįāÕą. GUI:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "°ŅāŽ×ŃÕąÕÖÕŻŻļ:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "°ŅāŽ×ŃÕąÕÖ.:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "ŗŪŠŅöčö" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "¼ŽŅŠ öŻāÕąä.:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "¼ŽŅŠ ÓąŠäöēŻŽÓŽ öŻāÕąäÕŁįć ScummVM" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "æÕąÕŅöąļāŲ ŽŻŽŅŪÕŻŻļ:" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "ĻŚ ēŠįāŽ ßÕąÕŅöąļāŲ ŽŻŽŅŪÕŻŻļ ScummVM" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "æÕąÕŅöąŲāŲ ׊ąŠ×" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "²Ų ߎŅŲŻŻö ßÕąÕ׊ßćįāŲāŲ ScummVM éŽŃ ׊įāŽįćŅŠāŲ ×ÜöŻŲ." -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "½Õ ÜŽÖć ßŲįŠāŲ ć ŅŲŃąŠŻć ߊߌć. ±ćŌģ ŪŠįŚŠ, ŅŚŠÖöāģ öŻčć." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "²ŲŃÕąöāģ ߊߌć ŌŪļ āÕÜ GUI" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "²ŲŃÕąöāģ ߊߌć × ŌŽŌŠāŚŽŅŲÜŲ 䊣ŪŠÜŲ" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "²ŲŃÕąöāģ ߊߌć ×ö ŅāćŪŚŠÜŲ" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1244,39 +1258,63 @@ msgstr "ĄŠįāÕąŲ׊āŽą ×ö ×ÓŪŠŌÖćŅŠŻŻļÜ" msgid "Antialiased" msgstr "·ö ×ÓŪŠŌÖćŅŠŻŻļÜ" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" +"ScummVM įāŠŅ ßöŌāąŲÜćŅŠāŲ ŠŅāŽÜŠāŲēŻć ßÕąÕŅöąŚć\n" +"ŽŻŽŅŪÕŻģ, éŽ ßŽāąÕŃćō ŌŽįćßć ŌŽ ¦ŻāÕąŻÕāć.\n" +"\n" +"ĒŲ åŽāöŪŲ Ń ŅŲ ŅŚŪīēŲāŲ āŠŚć ßÕąÕŅöąŚć?" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "(²Ų ׊ŅÖŌŲ ÜŽÖÕāÕ ŅŚŪīēŲāŲ ÷÷ ć ½ŠŪŠčāćŅŠŻŻļå ŻŠ ׊ŚŪŠŌęö ¦ŻčÕ)" + +#: gui/updates-dialog.cpp:92 +msgid "Check for updates automatically" +msgstr "°ŅāŽÜŠāėēŻŽ ßÕąÕŅöąļāŲ ŽŻŽŅŪÕŻŻļ" + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "æąŽŌŽŅÖŲāŲ" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "¾ēŲįāŲāŲ ׯŠēÕŻŻļ" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "“ŅŲÖŽŚ ŻÕ ßöŌāąŲÜćō ąöŅÕŻģ ŅöŌŪŠŌŚŲ '%s'" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "¼ÕŻī" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "æąŽßćįāŲāŲ" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "æŠć׊" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "æąŽßćįāŲāŲ ąļŌŽŚ" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "æŽÜŲŪŚŠ ׊ßćįŚć ÓąŲ:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "½Õ ÜŽÖć ׯŠŁāŲ ŌŅŲÖŽŚ ŌŪļ ׊ßćįŚć ŅŲŃąŠŻŽ÷ ÓąŲ" @@ -1371,16 +1409,32 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules ŃćąčāŲŻŻŲŁ" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "ÉŽŌÕŻŻŽ" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "ÉŽāŲÖŻļ" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "ÉŽÜöįļęļ" + +#: common/updates.cpp:64 +msgid "<Bad value>" +msgstr "<½ÕŅöąŻÕ ׯŠēÕŻŻļ>" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "³ąŠ ć '%s' ŻÕŅöŌŽÜŠ." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "±ćŌģ ŪŠįŚŠ, ßÕąÕŌŠŁāÕ ŻŲÖēÕŻŠŅÕŌÕŻć öŻäŽąÜŠęöī ŚŽÜŠŻŌö ScummVM ąŠ×ŽÜ ×" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "ŻŠ×ŅŽī ÓąŲ, ļŚć ŅŲ ŻŠÜŠÓŠōāÕįģ ŌŽŌŠāŲ, Š āŠŚŽÖ ÷÷ ŅÕąįöī/ÜŽŅć/āŠ öŻčÕ:" @@ -1388,11 +1442,11 @@ msgstr "ŻŠ×ŅŽī ÓąŲ, ļŚć ŅŲ ŻŠÜŠÓŠōāÕįģ ŌŽŌŠāŲ, Š āŠŚŽÖ ÷÷ ŅÕąįöī/ÜŽŅć/āŠ öŻčÕ:" msgid "~R~esume" msgstr "æąŽŌŽŅ~Ö~ŲāŲ" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~·~ŠŅŠŻāŠÖŲāŲ" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~·~ŠßŲįŠāŲ" @@ -1421,9 +1475,9 @@ msgstr "~æ~ŽŅÕą.Ņ ÓŽŪŽŅŻÕ ÜÕŻī" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1438,9 +1492,10 @@ msgstr "·ŃÕąÕÓāŲ Óąć: " #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1465,13 +1520,13 @@ msgstr "" "·ŃÕąÕÖÕŻŻļ įāŠŻć ÓąŲ ŻÕ ŅŌŠŪŽįļ (%s)!. ±ćŌģ-ŪŠįŚŠ, ŌŲŅöāģįļ 䊣Ū README ŌŪļ " "ŽįŻŽŅŻŽ÷ öŻŽąÜŠęö÷, Š āŠŚŽÖ öŻįāąćŚęöŁ, ļŚ ŽāąŲÜŠāŲ ߎŌŠŪģčć ŌŽßŽÜŽÓć." -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "²ö~Ō~ÜöŻŠ" @@ -1627,11 +1682,11 @@ msgstr "°ćŌöŽ FM-Towns" msgid "PC-98 Audio" msgstr "°ćŌöŽ PC-98" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "½ŠŪŠčāŽŅćī ÕÜćŪļāŽą MT-32" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "µÜćŪļāŽą MT-32" @@ -1748,11 +1803,11 @@ msgstr "ĄÕÖŲÜ įŠÜŽāļÓŻÕŻŻļ ŅŚŪīēÕŻŽ" msgid "Swipe three fingers to the right to toggle." msgstr "æąŽŅÕŌöāģ āąģŽÜŠ ߊŪģęļÜö ŻŠßąŠŅŽ ŌŪļ ßÕąÕŚŪīēÕŻŻļ." -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL (ŃÕ× äöŪģāąöŅ)" @@ -2304,20 +2359,20 @@ msgstr "" "½Õ ׊ŃćŌģāÕ ßÕąÕßąŲׯŠēŲāŲ ŚŻŽßŚć ŌŪļ Ōö÷ 'ĮåŽŅŠāŲ æŠŻÕŪģ öŻįāą.' éŽŃ " "ߎъēŲāŲ ŅÕįģ öŻŅÕŻāŠą" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." -msgstr "æÕąÕŅöąļī ŽŻŽŅŪÕŻŻļ..." +msgstr "æÕąÕŅöąŲāŲ ŽŻŽŅŪÕŻŻļ..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ ŽąŲÓ. ×ŃÕąÕÖÕŻŻļ/׊ŅŠŻāŠÖÕŻŻļ ÕŚąŠŻŲ" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" @@ -2346,11 +2401,33 @@ msgstr "" "²ŚŪīēŠō ßöŌāąŲÜŚć ÜŲčö. “Ž×ŅŽŪļō ŅŲŚŽąŲįāŽŅćŅŠāŲ ÜŲčć ŌŪļ ßÕąÕįćŅŠŻŻļ āŠ " "ćßąŠŅŪöŻŻļ ÜÕŻī." +#: engines/agi/detection.cpp:177 +msgid "Use Hercules hires font" +msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ čąŲäā Hercules" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" +"²ŲŚŽąŲįāŽŅćō čąŲäā ŅŲįŽŚŽÓŽ ąŽ×ÓŠŪćÖÕŻŻļ Hercules, ļŚéŽ 䊣Ū × čąŲäāŽÜ ō " +"ŌŽįć߯ŲŁ" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "ĮāŠŅŲāŲ ŻŠ ߊć×ć ßöŌ ēŠį ŅŅŽŌć ŚŽÜŠŻŌ" + +#: 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 "" +"æŽŚŠ×ćō ŅöŚŻŽ ŌŪļ ŅŅŽŌć ŚŽÜŠŻŌŲ āŠ įāŠŅŲāģ Óąć ŻŠ ߊć×ć (ߎŌöŃŻŽ ŌŽ SCI)," +"׊Üöįāģ ŃÕ×ߎįÕąÕŌŻģŽÓŽ ŅŅŽŌć." + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2360,13 +2437,13 @@ msgstr "²öŌŻŽŅŲāŲ Óąć:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "²öŌŻŽŅŲāŲ" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2377,7 +2454,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2388,7 +2465,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2633,29 +2710,37 @@ msgstr "" "ŅöŌŚąŲāŲ ŚŽŻįŽŪģ ŅöŌŪŠŌēŲŚŠ ö ŅŅÕįāŲ ŚŽÜŠŻŌć 'import_savefile'.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "æŽŚŠ×ćŅŠāŲ ąŽŪöŚ ߎŪģŽāć ŻŠŌ Myst" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "ĄŽŪöŚ ߎŪģŽāć ŻŠŌ Myst ŻÕ ߎŚŠ×ćŅŠŅįļ ŽąŲÓöŻŠŪģŻŲÜ ŌŅŲÖŚŽÜ" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "ĄÕÖŲÜ čŅŲŌŚŽÓŽ ßÕąÕåŽŌć ŠŚāŲŅŽŅŠŻŽ" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "æÕąÕåŽŌŲ ŠŚāŲŅŽŅŠŻŽ" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "²ŲŚŲŻćāŲ įāŽąöŻŚć" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +msgid "Show ~M~ap" msgstr "æŽŚŠ×ŠāŲ ÜŠßć" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +msgid "Main Men~u~" msgstr "³ŽŪŽŅŻÕ ÜÕŻī" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "µäÕŚāŲ ŅŽŌŲ ćŅöÜŚŻÕŻŽ" @@ -2776,37 +2861,37 @@ msgstr "°ŪāÕąŻŠāŲŅŻŲŁ Ņįāćß" msgid "Use an alternative game intro (CD version only)" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ ŠŪģāÕąŻŠāŲŅŻŲŁ Ņįāćß ÓąŲ (āöŪģŚŲ CD ŅÕąįöļ)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "½Õ ąŽŃŲāŲ ąŠįāąćŅŠŻŻļ EGA (䎯Ų ć ߎŅŻŽÜć ŚŽŪģŽąö)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "" "½Õ ąŽŃŲāŲ ŚąŽŚ ąŠįāąćŅŠŻŻļ ć öÓąŠå EGA, ÓąŠäöŚć ŃćŌÕ ßŽŚŠ×ŠŻŽ ć ߎŅŻŽÜć " "ŚŽŪģŽąö" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "ĆŅöÜŚŻćāŲ ÓąŠäöŚć ŅŲįŽŚŽÓŽ ąŽ×ÓŠŪćÖÕŻŻļ" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "ĆŅöÜŚŻćāŲ ÓąŠäöŚć āŠ ŚŽŻāÕŻā ć ŅŲįŽŚŽÜć ąŽ×ÓŠŪćÖÕŻŻö" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "½ŠŌŠŅŠāŲ ßÕąÕŅŠÓć ęŲ乎ŅŲÜ ×Ņ挎ŅŲÜ ÕäÕŚāŠÜ" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "²öŌŌŠŅŠāŲ ßÕąÕŅŠÓć ęŲ乎ŅŲÜ ×Ņ挎ŅŲÜ ÕäÕŚāŠÜ, Š ŻÕ įŲŻāÕ׎ŅŠŻŲÜ" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ IMF/Yahama FB-01 ŌŪļ MIDI ŅŲåŽŌć" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2814,34 +2899,42 @@ msgstr "" "²ŲŚŽąŲįāŽŅćŅŠāŲ ŌŪļŅ ŅŲŅŽŌć MIDI ąÕÖŲÜ ŚŠąāŲ IBM Feature ŠŃŽ FM įöŻāÕ× " "Yamaha FB-01" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ CD ŠćŌöŽ" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ CD ŠćŌöŽ ׊Üöįāģ ć-Óąö ŠćŌöŽ, ļŚéŽ āŠŚö ō" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ Windows ŚćąįŽąŲ" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ Windows ŚćąįŽąŲ (ÜÕŻčŲå ö ÜŽŻŽåąŽÜŻŲå), ׊Üöįāģ DOS" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ įąöŃŻö ŚćąįŽąŲ" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" "²ŲŚŽąŲįāŽŅćŅŠāŲ ŠŪģāÕąŻŠāŲŅŻŲŁ ŻŠŃöą įąöŃŻŲå ŚćąįŽąöŅ, ׊Üöįāģ ×ŅŲēŠŁŻŲå " "׎ŪŽāŲå" +#: engines/scumm/detection.cpp:1335 +msgid "Show Object Line" +msgstr "æŽŚŠ×ćŅŠāŲ ŪöŻö÷ ŽŃ'ōŚāöŅ" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "æŽŚŠ×ćŅŠāŲ ŻŠ×ŅŲ ŽŃ'ōŚāŲŅ ŅŻŲ×ć ÕŚąŠŻć" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3507,7 +3600,7 @@ msgstr "³ćēŻöįāģ Üć×ŲŚŲ: " msgid "Subtitle speed: " msgstr "ČŅŲŌ. įćŃāŲāąöŅ: " -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3516,7 +3609,7 @@ msgstr "" "ĄÕÖŲÜ \"ąöŌŻŽÓŽ\" MIDI ߎāąÕŃćō ߎŻŽŅŪÕŻŻļ Roland Upgrade ŅöŌ\n" "LucasArts, ßąŽāÕ %s ŅöŌįćāŻöŁ. æÕąÕÜŲŚŠīįģ ŻŠ AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3551,8 +3644,8 @@ msgid "" "Files button in-game shows original savegame dialog rather than the ScummVM " "menu" msgstr "" -"ŗŻŽßŚŠ \"ÄŠŁŪŲ\" ć Óąö ߎŚŠ×ćŅŠāŲÜÕ ŽąŲÓöŻŠŪģŻŲŁ ÕŚąŠŻ ×ŃÕąÕÖÕŻŻļ " -"׊Üöįāģ ÜÕŻī ScummVM" +"ŗŻŽßŚŠ \"ÄŠŁŪŲ\" ć Óąö ߎŚŠ×ćŅŠāŲÜÕ ŽąŲÓöŻŠŪģŻŲŁ ÕŚąŠŻ ×ŃÕąÕÖÕŻŻļ ׊Üöįāģ " +"ÜÕŻī ScummVM" #: engines/sherlock/detection.cpp:81 msgid "Pixellated scene transitions" @@ -3571,8 +3664,8 @@ msgid "" "Only show hotspot names after you actually click on a hotspot or action " "button" msgstr "" -"æŽŚŠ×ćŅŠāŲ ŻŠ×ŅŲ ęöŚŠŅŲå āŽēŽŚ āöŪģŚŲ ßöįŪļ ŃÕ×ߎįÕąÕŌŻģŽÓŽ ŚŪöŚć ߎ ŻŲÜ " -"ŠŃŽ Ōö÷ × ŻŲÜŲ" +"æŽŚŠ×ćŅŠāŲ ŻŠ×ŅŲ ęöŚŠŅŲå āŽēŽŚ āöŪģŚŲ ßöįŪļ ŃÕ×ߎįÕąÕŌŻģŽÓŽ ŚŪöŚć ߎ ŻŲÜ ŠŃŽ " +"Ōö÷ × ŻŲÜŲ" #: engines/sherlock/detection.cpp:101 msgid "Show character portraits" @@ -3694,6 +3787,17 @@ msgstr "æŽŚŠ×ćŅŠāŲ ÜöāŚŲ ŽŃ'ōŚāöŅ" msgid "Show labels for objects on mouse hover" msgstr "æŽŚŠ×ćŅŠāŲ ÜöāŚŲ ŌŪļ ŽŃ'ōŚāöŅ ßąŲ ŻŠŅÕŌÕŻŻö ÜŲčö" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "²ŲŚŽąŲįāŽŅćŅŠāŲ Ž×ŅćēÕŻŻļ ŠŻÓŪöŁįģŚŽī" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" +"²ŲŚŽąŲįāŽŅćŅŠāŲ Ž×ŅćēÕŻŻļ ŠŻÓŪöŁįŚŽī ׊Üöįāģ ŻöÜÕęģŚŽÓŽ ŌŪļ Ņįöå ÜŽŅ ŽŚąöÜ " +"ŻöÜÕęģŚŽ÷" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" diff --git a/po/zh-Latn_CN.po b/po/zh-Latn_CN.po index 12105429a7..d90a6ba715 100644 --- a/po/zh-Latn_CN.po +++ b/po/zh-Latn_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.9.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-02-20 21:22+0000\n" +"POT-Creation-Date: 2016-04-07 08:55+0100\n" "PO-Revision-Date: 2016-03-15 04:09-0700\n" "Last-Translator: Chenbo Li <lichenbo1949@gmail.com>\n" "Language-Team: Chenbo Li <lichenbo1949@gmail.com>\n" @@ -54,10 +54,11 @@ msgstr "ShangYiJi" #: gui/browser.cpp:75 gui/chooser.cpp:46 gui/editrecorddialog.cpp:67 #: gui/filebrowser-dialog.cpp:64 gui/fluidsynth-dialog.cpp:152 #: gui/KeysDialog.cpp:43 gui/launcher.cpp:351 gui/massadd.cpp:95 -#: gui/options.cpp:1237 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 +#: gui/options.cpp:1255 gui/predictivedialog.cpp:73 gui/recorderdialog.cpp:70 #: gui/recorderdialog.cpp:156 gui/saveload-dialog.cpp:216 #: gui/saveload-dialog.cpp:276 gui/saveload-dialog.cpp:547 -#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 engines/engine.cpp:546 +#: gui/saveload-dialog.cpp:931 gui/themebrowser.cpp:55 +#: gui/updates-dialog.cpp:113 engines/engine.cpp:546 #: backends/events/default/default-events.cpp:196 #: backends/events/default/default-events.cpp:218 #: backends/platform/wii/options.cpp:48 engines/drascula/saveload.cpp:49 @@ -171,7 +172,7 @@ msgstr "Zhengxian" msgid "Triangle" msgstr "Sanjiaoxing" -#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1168 +#: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1170 msgid "Misc" msgstr "Zaxiang" @@ -205,12 +206,12 @@ msgstr "Chongzhi Suoyou de FluidSynth Shezhi" #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:352 #: gui/launcher.cpp:1050 gui/launcher.cpp:1054 gui/massadd.cpp:92 -#: gui/options.cpp:1238 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 +#: gui/options.cpp:1256 gui/saveload-dialog.cpp:932 engines/engine.cpp:465 #: engines/engine.cpp:476 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 #: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49 #: engines/groovie/script.cpp:408 engines/parallaction/saveload.cpp:274 -#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1834 +#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1831 #: engines/scumm/players/player_v3m.cpp:130 #: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524 @@ -238,15 +239,15 @@ msgstr "Guanbi" msgid "Mouse click" msgstr "Shubiao Danji" -#: gui/gui-manager.cpp:126 base/main.cpp:322 +#: gui/gui-manager.cpp:126 base/main.cpp:325 msgid "Display keyboard" msgstr "Xianshi Jianpan" -#: gui/gui-manager.cpp:130 base/main.cpp:326 +#: gui/gui-manager.cpp:130 base/main.cpp:329 msgid "Remap keys" msgstr "Yingshe Jianwei" -#: gui/gui-manager.cpp:133 base/main.cpp:329 engines/scumm/help.cpp:87 +#: gui/gui-manager.cpp:133 base/main.cpp:332 engines/scumm/help.cpp:87 msgid "Toggle fullscreen" msgstr "Quanping Qiehuan" @@ -321,8 +322,8 @@ msgid "" msgstr "" "Youxi de Yuyan. CiXiang buhui jiang Yige XibanyaYu Banben Zhuancheng Yingwen" -#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87 -#: gui/options.cpp:735 gui/options.cpp:748 gui/options.cpp:1208 +#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:89 +#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210 #: audio/null.cpp:41 msgid "<default>" msgstr "<Moren>" @@ -344,11 +345,11 @@ msgstr "Pingtai:" msgid "Engine" msgstr "Yinqing" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "Graphics" msgstr "Tuxiang" -#: gui/launcher.cpp:245 gui/options.cpp:1071 gui/options.cpp:1088 +#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090 msgid "GFX" msgstr "GFX" @@ -361,7 +362,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Fugai Quanju Tuxiang Shezhi" -#: gui/launcher.cpp:257 gui/options.cpp:1094 +#: gui/launcher.cpp:257 gui/options.cpp:1096 msgid "Audio" msgstr "Yinpin" @@ -374,11 +375,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Fugai QUanju Yinpin Shezhi" -#: gui/launcher.cpp:271 gui/options.cpp:1099 +#: gui/launcher.cpp:271 gui/options.cpp:1101 msgid "Volume" msgstr "Yinliang" -#: gui/launcher.cpp:273 gui/options.cpp:1101 +#: gui/launcher.cpp:273 gui/options.cpp:1103 msgctxt "lowres" msgid "Volume" msgstr "YinLiang" @@ -392,7 +393,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Fugai Quanju YinLiang Shezhi" -#: gui/launcher.cpp:286 gui/options.cpp:1109 +#: gui/launcher.cpp:286 gui/options.cpp:1111 msgid "MIDI" msgstr "MIDI" @@ -405,7 +406,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Fugai Quanju MIDI Shezhi" -#: gui/launcher.cpp:300 gui/options.cpp:1115 +#: gui/launcher.cpp:300 gui/options.cpp:1117 msgid "MT-32" msgstr "MT-32" @@ -418,11 +419,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Fugai Quanju MT-32 Shezhi" -#: gui/launcher.cpp:314 gui/options.cpp:1122 +#: gui/launcher.cpp:314 gui/options.cpp:1124 msgid "Paths" msgstr "Lujing" -#: gui/launcher.cpp:316 gui/options.cpp:1124 +#: gui/launcher.cpp:316 gui/options.cpp:1126 msgctxt "lowres" msgid "Paths" msgstr "Lujing" @@ -436,7 +437,7 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Youxi Lujing:" -#: gui/launcher.cpp:330 gui/options.cpp:1148 +#: gui/launcher.cpp:330 gui/options.cpp:1150 msgid "Extra Path:" msgstr "Qita Lujing:" @@ -444,42 +445,42 @@ msgstr "Qita Lujing:" msgid "Specifies path to additional data used by the game" msgstr "Zhiding Youxi Suoyong de Shuju de Cunfang Lujing" -#: gui/launcher.cpp:332 gui/options.cpp:1150 +#: gui/launcher.cpp:332 gui/options.cpp:1152 msgctxt "lowres" msgid "Extra Path:" msgstr "Qita Lujing:" -#: gui/launcher.cpp:339 gui/options.cpp:1132 +#: gui/launcher.cpp:339 gui/options.cpp:1134 msgid "Save Path:" msgstr "Baocun Lujing:" #: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342 -#: gui/options.cpp:1132 gui/options.cpp:1134 gui/options.cpp:1135 +#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137 msgid "Specifies where your saved games are put" msgstr "Zhiding Nin Jiang Youxi Baocun Zai le Nali" -#: gui/launcher.cpp:341 gui/options.cpp:1134 +#: gui/launcher.cpp:341 gui/options.cpp:1136 msgctxt "lowres" msgid "Save Path:" msgstr "Baocun Lujing:" #: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517 -#: gui/launcher.cpp:571 gui/options.cpp:1143 gui/options.cpp:1151 -#: gui/options.cpp:1160 gui/options.cpp:1275 gui/options.cpp:1281 -#: gui/options.cpp:1289 gui/options.cpp:1319 gui/options.cpp:1325 -#: gui/options.cpp:1332 gui/options.cpp:1425 gui/options.cpp:1428 -#: gui/options.cpp:1440 +#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153 +#: gui/options.cpp:1162 gui/options.cpp:1293 gui/options.cpp:1299 +#: gui/options.cpp:1307 gui/options.cpp:1337 gui/options.cpp:1343 +#: gui/options.cpp:1350 gui/options.cpp:1456 gui/options.cpp:1459 +#: gui/options.cpp:1471 msgctxt "path" msgid "None" msgstr "Wu" #: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575 -#: gui/options.cpp:1269 gui/options.cpp:1313 gui/options.cpp:1431 +#: gui/options.cpp:1287 gui/options.cpp:1331 gui/options.cpp:1462 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Moren" -#: gui/launcher.cpp:510 gui/options.cpp:1434 +#: gui/launcher.cpp:510 gui/options.cpp:1465 msgid "Select SoundFont" msgstr "Xuanze SoundFont" @@ -491,7 +492,7 @@ msgstr "Xuanze Youxi Shuju Mulu" msgid "Select additional game directory" msgstr "Xuanze Qita Youxi Mulu" -#: gui/launcher.cpp:559 gui/options.cpp:1377 +#: gui/launcher.cpp:559 gui/options.cpp:1408 msgid "Select directory for saved games" msgstr "Xuanze Youxi Baocun Mulu" @@ -499,7 +500,7 @@ msgstr "Xuanze Youxi Baocun Mulu" msgid "This game ID is already taken. Please choose another one." msgstr "Ci Youxi ID Yi Bei Zhanyong. Qing Xuanze Qita Mingcheng" -#: gui/launcher.cpp:626 engines/dialogs.cpp:111 +#: gui/launcher.cpp:626 engines/dialogs.cpp:111 engines/mohawk/dialogs.cpp:115 msgid "~Q~uit" msgstr "~Q~Tuichu" @@ -587,17 +588,18 @@ msgid "Search:" msgstr "Sousuo:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214 -#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353 -#: engines/tsage/scenes.cpp:600 +#: engines/mohawk/dialogs.cpp:120 engines/mohawk/riven.cpp:718 +#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600 msgid "Load game:" msgstr "Jiazai Youxi:" #: gui/launcher.cpp:685 engines/dialogs.cpp:115 #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 -#: engines/cruise/menu.cpp:214 engines/mohawk/riven.cpp:718 -#: engines/parallaction/saveload.cpp:197 engines/pegasus/pegasus.cpp:353 -#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600 +#: engines/cruise/menu.cpp:214 engines/mohawk/dialogs.cpp:120 +#: engines/mohawk/riven.cpp:718 engines/parallaction/saveload.cpp:197 +#: engines/pegasus/pegasus.cpp:353 engines/scumm/dialogs.cpp:189 +#: engines/tsage/scenes.cpp:600 msgid "Load" msgstr "Jiazai" @@ -684,132 +686,132 @@ msgstr "Qiehuan zhi Youxi" msgid "Fast replay" msgstr "Kuaisu Huitui" -#: gui/options.cpp:85 +#: gui/options.cpp:87 common/updates.cpp:56 msgid "Never" msgstr "Yongbu" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 5 mins" msgstr "Mei 5 Fenzhong" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 10 mins" msgstr "Mei 10 Fenzhong" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 15 mins" msgstr "Mei 15 Fenzhong" -#: gui/options.cpp:85 +#: gui/options.cpp:87 msgid "every 30 mins" msgstr "Mei 30 Fenzhong" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "8 kHz" msgstr "8 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "11 kHz" msgstr "11 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "22 kHz" msgstr "22 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "44 kHz" msgstr "44 kHz" -#: gui/options.cpp:87 +#: gui/options.cpp:89 msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:255 gui/options.cpp:479 gui/options.cpp:580 -#: gui/options.cpp:649 gui/options.cpp:857 +#: gui/options.cpp:257 gui/options.cpp:481 gui/options.cpp:582 +#: gui/options.cpp:651 gui/options.cpp:859 msgctxt "soundfont" msgid "None" msgstr "Wu" -#: gui/options.cpp:389 +#: gui/options.cpp:391 msgid "Failed to apply some of the graphic options changes:" msgstr "Tuxing Xuanxiang Genggai Shibai:" -#: gui/options.cpp:401 +#: gui/options.cpp:403 msgid "the video mode could not be changed." msgstr "Shipin Moshi Wufa Genggai." -#: gui/options.cpp:407 +#: gui/options.cpp:409 msgid "the fullscreen setting could not be changed" msgstr "Quanping Shezhi Wufa Genggai" -#: gui/options.cpp:413 +#: gui/options.cpp:415 msgid "the aspect ratio setting could not be changed" msgstr "Bili Xuanxiang Wufa Genggai" -#: gui/options.cpp:732 +#: gui/options.cpp:734 msgid "Graphics mode:" msgstr "Tuxing Moshi:" -#: gui/options.cpp:746 +#: gui/options.cpp:748 msgid "Render mode:" msgstr "Xuanran Moshi:" -#: gui/options.cpp:746 gui/options.cpp:747 +#: gui/options.cpp:748 gui/options.cpp:749 msgid "Special dithering modes supported by some games" msgstr "Youxi Zhichi Teshu de Doudong Moshi" -#: gui/options.cpp:758 +#: gui/options.cpp:760 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2316 msgid "Fullscreen mode" msgstr "Quanping Moshi" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Aspect ratio correction" msgstr "Bili Jiaozheng" -#: gui/options.cpp:761 +#: gui/options.cpp:763 msgid "Correct aspect ratio for 320x200 games" msgstr "320x200 Youxi Bili Jiaozheng" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Preferred Device:" msgstr "Youxian Shebei:" -#: gui/options.cpp:769 +#: gui/options.cpp:771 msgid "Music Device:" msgstr "Yinyue Shebei:" -#: gui/options.cpp:769 gui/options.cpp:771 +#: gui/options.cpp:771 gui/options.cpp:773 msgid "Specifies preferred sound device or sound card emulator" msgstr "Zhiding Youxian Shengyin Shebei huo Shengka Moniqi" -#: gui/options.cpp:769 gui/options.cpp:771 gui/options.cpp:772 +#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774 msgid "Specifies output sound device or sound card emulator" msgstr "Zhiding Shuchu Shengyin Shebei huo Shengka Moniqi" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Youxian Shebei:" -#: gui/options.cpp:771 +#: gui/options.cpp:773 msgctxt "lowres" msgid "Music Device:" msgstr "Yinyue Shebei:" -#: gui/options.cpp:798 +#: gui/options.cpp:800 msgid "AdLib emulator:" msgstr "AdLib Moniqi:" -#: gui/options.cpp:798 gui/options.cpp:799 +#: gui/options.cpp:800 gui/options.cpp:801 msgid "AdLib is used for music in many games" msgstr "AdLib bei Henduo Youxi Yonglai Bofang Yinyue" -#: gui/options.cpp:809 +#: gui/options.cpp:811 msgid "Output rate:" msgstr "Shuchu Malv:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:811 gui/options.cpp:812 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -817,66 +819,66 @@ msgstr "" "Genggao de Shuxing Hui Tisheng Yinyue Zhiliang dan Youkeneng Nin de Shengka " "Buzhichi" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "GM Device:" msgstr "GM Shebei:" -#: gui/options.cpp:820 +#: gui/options.cpp:822 msgid "Specifies default sound device for General MIDI output" msgstr "Zhiding Tongyong MIDI Shuchu Moren Shengyin Shebei" -#: gui/options.cpp:831 +#: gui/options.cpp:833 msgid "Don't use General MIDI music" msgstr "Buyao Shiyong Tongyong MIDI Yinyue" -#: gui/options.cpp:842 gui/options.cpp:908 +#: gui/options.cpp:844 gui/options.cpp:910 msgid "Use first available device" msgstr "Shiyong Diyige keyong de Shebei" -#: gui/options.cpp:854 +#: gui/options.cpp:856 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:854 gui/options.cpp:856 gui/options.cpp:857 +#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859 msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity" msgstr "Yixie Shengka Zhichi SoundFont, Biru FluidSynth He Timidity" -#: gui/options.cpp:856 +#: gui/options.cpp:858 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Mixed AdLib/MIDI mode" msgstr "Hunhe AdLib/MIDI Moshi" -#: gui/options.cpp:862 +#: gui/options.cpp:864 msgid "Use both MIDI and AdLib sound generation" msgstr "TongShi Shiyong MIDI He AdLib Shengyin Shengcheng" -#: gui/options.cpp:865 +#: gui/options.cpp:867 msgid "MIDI gain:" msgstr "MIDI gain:" -#: gui/options.cpp:872 +#: gui/options.cpp:874 msgid "FluidSynth Settings" msgstr "FluidSynth Xuanxiang" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "MT-32 Device:" msgstr "MT-32 Shebei:" -#: gui/options.cpp:879 +#: gui/options.cpp:881 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "QIng Zhiding Yongyu Roland MT-32/LAPC1/CM32I/CM64 Shuchu de Moren Shengyin " "Shebei" -#: gui/options.cpp:884 +#: gui/options.cpp:886 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Zhen Roland MT-32 (Jinyong GM Moni)" -#: gui/options.cpp:884 gui/options.cpp:886 +#: gui/options.cpp:886 gui/options.cpp:888 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -884,16 +886,16 @@ msgstr "" "Jiancha Shifou Nin Xiang Shiyong Lianjie Dao Jisuanji de Zhenshi de Yingjian " "Roland Jianrong Shengyin Shebei" -#: gui/options.cpp:886 +#: gui/options.cpp:888 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Zhen Roland MT-32 Shebei (Wu GM Moni)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "Roland GS Device (enable MT-32 mappings)" msgstr "Roland GS Shebei (Qiyong MT-32 Yingshe)" -#: gui/options.cpp:889 +#: gui/options.cpp:891 msgid "" "Check if you want to enable patch mappings to emulate an MT-32 on a Roland " "GS device" @@ -901,169 +903,181 @@ msgstr "" "Jiancha Shifou Nin Xiang Qiyong patch Yingshe Lai Zai Roland GS Shebei " "Shangmian Moni MT-32" -#: gui/options.cpp:898 +#: gui/options.cpp:900 msgid "Don't use Roland MT-32 music" msgstr "Buyao Shiyong Roland MT-32 Yinyue" -#: gui/options.cpp:925 +#: gui/options.cpp:927 msgid "Text and Speech:" msgstr "Wenzi he Yuyin:" -#: gui/options.cpp:929 gui/options.cpp:939 +#: gui/options.cpp:931 gui/options.cpp:941 msgid "Speech" msgstr "Yuyin" -#: gui/options.cpp:930 gui/options.cpp:940 +#: gui/options.cpp:932 gui/options.cpp:942 msgid "Subtitles" msgstr "Zimu" -#: gui/options.cpp:931 +#: gui/options.cpp:933 msgid "Both" msgstr "Liangzhe" -#: gui/options.cpp:933 +#: gui/options.cpp:935 msgid "Subtitle speed:" msgstr "Zimu Sudu:" -#: gui/options.cpp:935 +#: gui/options.cpp:937 msgctxt "lowres" msgid "Text and Speech:" msgstr "Wenben he Yuyin:" -#: gui/options.cpp:939 +#: gui/options.cpp:941 msgid "Spch" msgstr "Zimu" -#: gui/options.cpp:940 +#: gui/options.cpp:942 msgid "Subs" msgstr "Yuyin" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgctxt "lowres" msgid "Both" msgstr "Dou" -#: gui/options.cpp:941 +#: gui/options.cpp:943 msgid "Show subtitles and play speech" msgstr "Xianshi Zimu Bing Bofang Yuyin" -#: gui/options.cpp:943 +#: gui/options.cpp:945 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Zimu Sudu" -#: gui/options.cpp:959 +#: gui/options.cpp:961 msgid "Music volume:" msgstr "Yinyue Yinliang:" -#: gui/options.cpp:961 +#: gui/options.cpp:963 msgctxt "lowres" msgid "Music volume:" msgstr "Yinyue Yinliang:" -#: gui/options.cpp:968 +#: gui/options.cpp:970 msgid "Mute All" msgstr "Quanbu Jinyin" -#: gui/options.cpp:971 +#: gui/options.cpp:973 msgid "SFX volume:" msgstr "Yinxiao Yinliang:" -#: gui/options.cpp:971 gui/options.cpp:973 gui/options.cpp:974 +#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976 msgid "Special sound effects volume" msgstr "Texiao Yinliang" -#: gui/options.cpp:973 +#: gui/options.cpp:975 msgctxt "lowres" msgid "SFX volume:" msgstr "Yinxiao Yinliang:" -#: gui/options.cpp:981 +#: gui/options.cpp:983 msgid "Speech volume:" msgstr "Yuyin Yinliang:" -#: gui/options.cpp:983 +#: gui/options.cpp:985 msgctxt "lowres" msgid "Speech volume:" msgstr "Yuyin Yinliang:" -#: gui/options.cpp:1140 +#: gui/options.cpp:1142 msgid "Theme Path:" msgstr "Zhuti Lujing:" -#: gui/options.cpp:1142 +#: gui/options.cpp:1144 msgctxt "lowres" msgid "Theme Path:" msgstr "Zhuti Lujing:" -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Zhiding Suoyou Youxi huo ScummVM de Shuju Lujing" -#: gui/options.cpp:1157 +#: gui/options.cpp:1159 msgid "Plugins Path:" msgstr "Chajian Lujing:" -#: gui/options.cpp:1159 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Plugins Path:" msgstr "Chajian Lujing:" -#: gui/options.cpp:1170 +#: gui/options.cpp:1172 msgctxt "lowres" msgid "Misc" msgstr "Zaxiang" -#: gui/options.cpp:1172 +#: gui/options.cpp:1174 msgid "Theme:" msgstr "Zhuti:" -#: gui/options.cpp:1176 +#: gui/options.cpp:1178 msgid "GUI Renderer:" msgstr "Jiemian Xuanran:" -#: gui/options.cpp:1188 +#: gui/options.cpp:1190 msgid "Autosave:" msgstr "Zidong Baocun:" -#: gui/options.cpp:1190 +#: gui/options.cpp:1192 msgctxt "lowres" msgid "Autosave:" msgstr "Zidong Baocun:" -#: gui/options.cpp:1198 +#: gui/options.cpp:1200 msgid "Keys" msgstr "Guanjianzi" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "GUI Language:" msgstr "Jiemian Yuyan:" -#: gui/options.cpp:1205 +#: gui/options.cpp:1207 msgid "Language of ScummVM GUI" msgstr "ScummVM Jiemian Yuyan" -#: gui/options.cpp:1364 +#: gui/options.cpp:1235 +msgid "Update check:" +msgstr "" + +#: gui/options.cpp:1235 +msgid "How often to check ScummVM updates" +msgstr "" + +#: gui/options.cpp:1247 +msgid "Check now" +msgstr "" + +#: gui/options.cpp:1382 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Nin Xuyao Chongqi ScummVM Lai Shi Genggai Shengxiao" -#: gui/options.cpp:1384 +#: gui/options.cpp:1415 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Zhiding de Mulu Buneng Xieru. Qing Xuanze Qita de Mulu." -#: gui/options.cpp:1393 +#: gui/options.cpp:1424 msgid "Select directory for GUI themes" msgstr "Xuanze Jiemian Zhuti de Mulu" -#: gui/options.cpp:1403 +#: gui/options.cpp:1434 msgid "Select directory for extra files" msgstr "Xuanze QIta Wenjian Mulu" -#: gui/options.cpp:1414 +#: gui/options.cpp:1445 msgid "Select directory for plugins" msgstr "Xuanze Chajian Mulu" -#: gui/options.cpp:1467 +#: gui/options.cpp:1498 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -1236,39 +1250,60 @@ msgstr "Fanjuchi Xuanranqi" msgid "Antialiased" msgstr "Fanjuchi" -#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333 +#: gui/updates-dialog.cpp:51 +msgid "" +"ScummVM now supports automatic check for updates\n" +"which requires access to the Internet.\n" +"\n" +"Would you like to enable this feature?" +msgstr "" + +#: gui/updates-dialog.cpp:55 +msgid "(You can always enable it in the options dialog on the Misc tab)" +msgstr "" + +#: gui/updates-dialog.cpp:92 +#, fuzzy +msgid "Check for updates automatically" +msgstr "Jiancha Gengxin..." + +#: gui/updates-dialog.cpp:111 +msgid "Proceed" +msgstr "" + +#: gui/widget.cpp:327 gui/widget.cpp:329 gui/widget.cpp:335 gui/widget.cpp:337 msgid "Clear value" msgstr "Qingchu Zhi" -#: base/main.cpp:237 +#: base/main.cpp:240 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Yinqing Buzhichi Tiaoshi Jibie ā%sā" -#: base/main.cpp:309 +#: base/main.cpp:312 msgid "Menu" msgstr "Caidan" -#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Tiaoguo" -#: base/main.cpp:315 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:318 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Zanting" -#: base/main.cpp:318 +#: base/main.cpp:321 msgid "Skip line" msgstr "Tiaoguo Cihang" -#: base/main.cpp:510 +#: base/main.cpp:520 msgid "Error running game:" msgstr "Youxi Yunxing Cuowu:" -#: base/main.cpp:557 +#: base/main.cpp:567 msgid "Could not find any engine capable of running the selected game" msgstr "Wufa Zhaodao Shihe Yunxing Youxi de Yinqing" @@ -1363,16 +1398,33 @@ msgctxt "lowres" msgid "Hercules Amber" msgstr "Hercules Amber" -#: engines/advancedDetector.cpp:317 +#: common/updates.cpp:58 +msgid "Daily" +msgstr "" + +#: common/updates.cpp:60 +msgid "Weekly" +msgstr "" + +#: common/updates.cpp:62 +msgid "Monthly" +msgstr "" + +#: common/updates.cpp:64 +#, fuzzy +msgid "<Bad value>" +msgstr "Qingchu Zhi" + +#: engines/advancedDetector.cpp:334 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "'%s' Zhong de Youxi Weizhi." -#: engines/advancedDetector.cpp:318 +#: engines/advancedDetector.cpp:335 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Qing JIang Xialie Shuju Yiji Youxi Baogao Gei ScummVM Tuandui" -#: engines/advancedDetector.cpp:320 +#: engines/advancedDetector.cpp:337 msgid "of the game you tried to add and its version/language/etc.:" msgstr "BingQie Fushang Shitu Tianjia de Youximing Yiji Banben/Yuyan Deng" @@ -1380,11 +1432,11 @@ msgstr "BingQie Fushang Shitu Tianjia de Youximing Yiji Banben/Yuyan Deng" msgid "~R~esume" msgstr "~R~Jixu" -#: engines/dialogs.cpp:87 +#: engines/dialogs.cpp:87 engines/mohawk/dialogs.cpp:113 msgid "~L~oad" msgstr "~L~Zairu" -#: engines/dialogs.cpp:91 +#: engines/dialogs.cpp:91 engines/mohawk/dialogs.cpp:114 msgid "~S~ave" msgstr "~S~Baocun" @@ -1413,9 +1465,9 @@ msgstr "~R~Fanhui Qidongqi" #: engines/avalanche/parser.cpp:1899 engines/cge/events.cpp:74 #: engines/cge2/events.cpp:67 engines/cruise/menu.cpp:212 #: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261 -#: engines/hugo/file.cpp:298 engines/neverhood/menumodule.cpp:877 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:121 +#: engines/neverhood/menumodule.cpp:877 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save game:" @@ -1430,9 +1482,10 @@ msgstr "Baocun Youxi:" #: engines/cge/events.cpp:74 engines/cge2/events.cpp:67 #: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336 #: engines/dreamweb/saveload.cpp:261 engines/hugo/file.cpp:298 -#: engines/neverhood/menumodule.cpp:877 engines/parallaction/saveload.cpp:212 -#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:768 -#: engines/scumm/dialogs.cpp:188 engines/sherlock/scalpel/scalpel.cpp:1249 +#: engines/mohawk/dialogs.cpp:121 engines/neverhood/menumodule.cpp:877 +#: engines/parallaction/saveload.cpp:212 engines/pegasus/pegasus.cpp:377 +#: engines/sci/engine/kfile.cpp:778 engines/scumm/dialogs.cpp:188 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:281 #: engines/toon/toon.cpp:3338 engines/tsage/scenes.cpp:598 msgid "Save" @@ -1456,13 +1509,13 @@ msgstr "" "Cundang Baocun Shibai (%s)! Qing Chayue README Huode Jiben Xinxi, Yiji " "Gengduo Xinxi" -#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109 -#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106 +#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:117 +#: engines/mohawk/dialogs.cpp:242 engines/tsage/dialogs.cpp:106 msgid "~O~K" msgstr "~O~Queding" -#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110 -#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107 +#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:118 +#: engines/mohawk/dialogs.cpp:243 engines/tsage/dialogs.cpp:107 msgid "~C~ancel" msgstr "~C~Quxiao" @@ -1618,11 +1671,11 @@ msgstr "FM-Towns Yinpin" msgid "PC-98 Audio" msgstr "PC-98 Yinpin" -#: audio/softsynth/mt32.cpp:200 +#: audio/softsynth/mt32.cpp:196 msgid "Initializing MT-32 Emulator" msgstr "Chushihua MT-32 Moniqi" -#: audio/softsynth/mt32.cpp:426 +#: audio/softsynth/mt32.cpp:434 msgid "MT-32 Emulator" msgstr "MT-32 Moniqi" @@ -1739,11 +1792,11 @@ msgstr "Muqian Wei Zidong Tuozhuai Moshi" msgid "Swipe three fingers to the right to toggle." msgstr "Xiangyou Huadong San Gen Shouzhi Qiehuan" -#: backends/graphics/opengl/opengl-graphics.cpp:119 +#: backends/graphics/opengl/opengl-graphics.cpp:126 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:120 +#: backends/graphics/opengl/opengl-graphics.cpp:127 msgid "OpenGL (No filtering)" msgstr "OpenGL" @@ -2293,20 +2346,20 @@ msgstr "" "Buyao Wnagji Yingshe YIge Jian Dao 'YIncang Gongjulan' Lai Chakan Suoyou " "xiang" -#: backends/updates/macosx/macosx-updates.mm:67 +#: backends/updates/macosx/macosx-updates.mm:68 msgid "Check for Updates..." msgstr "Jiancha Gengxin..." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:47 -#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:404 +#: engines/neverhood/detection.cpp:160 engines/sci/detection.cpp:410 #: engines/toltecs/detection.cpp:200 engines/zvision/detection_tables.h:51 msgid "Use original save/load screens" msgstr "Shiyong Yuanshi Baocun/Zairu Pingmu" #: engines/agi/detection.cpp:148 engines/cine/detection.cpp:71 #: engines/drascula/detection.cpp:303 engines/dreamweb/detection.cpp:48 -#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:405 +#: engines/neverhood/detection.cpp:161 engines/sci/detection.cpp:411 #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Shiyong Yuanshi Baocun/Zairu Pingmu, Bu Shiyong ScummVM de" @@ -2332,11 +2385,30 @@ msgstr "" "Qiyong shubiao zhichi. Yunxu Shiyong Shubiao jinxing Yidong He Youxi Nei " "Caidan" +#: engines/agi/detection.cpp:177 +#, fuzzy +msgid "Use Hercules hires font" +msgstr "Hercules Green" + +#: engines/agi/detection.cpp:178 +msgid "Uses Hercules hires font, when font file is available." +msgstr "" + +#: engines/agi/detection.cpp:187 +msgid "Pause when entering commands" +msgstr "" + +#: 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 "" + #: engines/agi/saveload.cpp:777 engines/avalanche/parser.cpp:1887 #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore game:" @@ -2346,13 +2418,13 @@ msgstr "Huifu Youxi:" #: engines/cge/events.cpp:85 engines/cge2/events.cpp:78 #: engines/drascula/saveload.cpp:349 engines/dreamweb/saveload.cpp:169 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:890 -#: engines/sci/engine/kfile.cpp:867 engines/sherlock/scalpel/scalpel.cpp:1262 +#: engines/sci/engine/kfile.cpp:877 engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:256 #: engines/toon/toon.cpp:3430 msgid "Restore" msgstr "Huifu" -#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2377 +#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2374 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2363,7 +2435,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2370 +#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2367 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2374,7 +2446,7 @@ msgstr "" "\n" "%s" -#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2388 +#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2385 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2620,29 +2692,39 @@ msgstr "" "'import_savefile'.\n" "\n" +#: engines/mohawk/detection.cpp:168 +msgid "Play the Myst fly by movie" +msgstr "" + +#: engines/mohawk/detection.cpp:169 +msgid "The Myst fly by movie was not played by the original engine." +msgstr "" + #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167 +#: engines/mohawk/dialogs.cpp:96 engines/mohawk/dialogs.cpp:239 msgid "~Z~ip Mode Activated" msgstr "~Z~Yasuo Moshi Qidong" -#: engines/mohawk/dialogs.cpp:93 +#: engines/mohawk/dialogs.cpp:97 msgid "~T~ransitions Enabled" msgstr "~T~Qiyong Zhuanyi" #. I18N: Drop book page -#: engines/mohawk/dialogs.cpp:95 +#: engines/mohawk/dialogs.cpp:99 msgid "~D~rop Page" msgstr "~D~shanchu Yemian" -#: engines/mohawk/dialogs.cpp:99 -msgid "~S~how Map" +#: engines/mohawk/dialogs.cpp:103 +#, fuzzy +msgid "Show ~M~ap" msgstr "~S~Xianshi Ditu" -#: engines/mohawk/dialogs.cpp:105 -msgid "~M~ain Menu" +#: engines/mohawk/dialogs.cpp:109 +#, fuzzy +msgid "Main Men~u~" msgstr "~M~Zhucaidan" -#: engines/mohawk/dialogs.cpp:168 +#: engines/mohawk/dialogs.cpp:240 msgid "~W~ater Effect Enabled" msgstr "~W~Qiyong Shuimian Xiaoguo" @@ -2762,35 +2844,35 @@ msgstr "QIta Jieshao" msgid "Use an alternative game intro (CD version only)" msgstr "Shiyong Qita Youxi Jieshao (Jin CD Ban)" -#: engines/sci/detection.cpp:374 +#: engines/sci/detection.cpp:380 msgid "Skip EGA dithering pass (full color backgrounds)" msgstr "Tiaoguo EGA Doudong (quancai Beijing)" -#: engines/sci/detection.cpp:375 +#: engines/sci/detection.cpp:381 msgid "Skip dithering pass in EGA games, graphics are shown with full colors" msgstr "tiaoguo EGA Youxi Zhong de Doudong, Tuxiang Yi Quancai Xianshi" -#: engines/sci/detection.cpp:384 +#: engines/sci/detection.cpp:390 msgid "Enable high resolution graphics" msgstr "QIyong Gaofenbianlv Tu" -#: engines/sci/detection.cpp:385 +#: engines/sci/detection.cpp:391 msgid "Enable high resolution graphics/content" msgstr "Qiyong Gaofenbianlv Tubian/Neirong" -#: engines/sci/detection.cpp:394 +#: engines/sci/detection.cpp:400 msgid "Prefer digital sound effects" msgstr "Youxianshiyong Shuzi Yinxiao" -#: engines/sci/detection.cpp:395 +#: engines/sci/detection.cpp:401 msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Youxian SHiyong shuzi YInxiao, er fei Hecheng" -#: engines/sci/detection.cpp:414 +#: engines/sci/detection.cpp:420 msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Shiyong IMF/yamaha Fb-01 Huo MIDI shuchu" -#: engines/sci/detection.cpp:415 +#: engines/sci/detection.cpp:421 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" @@ -2798,32 +2880,41 @@ msgstr "" "Shiyong IBM Music Feature Ka Huozhe Yamaha FB-01 FM hecheng Mokuai zuowei " "MIDI shuchu" -#: engines/sci/detection.cpp:425 +#: engines/sci/detection.cpp:431 msgid "Use CD audio" msgstr "Shiyong CD YInpin" -#: engines/sci/detection.cpp:426 +#: engines/sci/detection.cpp:432 msgid "Use CD audio instead of in-game audio, if available" msgstr "Shiyong CD Yinpin erfei Youxinei Yinpin (ruguo keyong)" -#: engines/sci/detection.cpp:436 +#: engines/sci/detection.cpp:442 msgid "Use Windows cursors" msgstr "Shiyong WIndows Guangbiao" -#: engines/sci/detection.cpp:437 +#: engines/sci/detection.cpp:443 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "Shiyong Windows Guangbiao (gengxiao Danse) erfei DOS Guangbiao" -#: engines/sci/detection.cpp:447 +#: engines/sci/detection.cpp:453 msgid "Use silver cursors" msgstr "Shiyong Yinse Guangbiao" -#: engines/sci/detection.cpp:448 +#: engines/sci/detection.cpp:454 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "Shiyong Qita Yinse Guangbiao" +#: engines/scumm/detection.cpp:1335 +#, fuzzy +msgid "Show Object Line" +msgstr "Xianshi Wuti Biaoqian" + +#: engines/scumm/detection.cpp:1336 +msgid "Show the names of objects at the bottom of the screen" +msgstr "" + #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -3489,7 +3580,7 @@ msgstr "Yinyue Yinliang:" msgid "Subtitle speed: " msgstr "Zimu Sudu:" -#: engines/scumm/scumm.cpp:1832 +#: engines/scumm/scumm.cpp:1829 #, c-format msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" @@ -3498,7 +3589,7 @@ msgstr "" "Bendi MIDI Zhichi Xuyao Cong LucasArts Shengji Zhi Roland,\n" "Dnahsi %s meiyou zhaodao. Shiyong AdLib." -#: engines/scumm/scumm.cpp:2644 +#: engines/scumm/scumm.cpp:2645 msgid "" "Usually, Maniac Mansion would start now. But for that to work, the game " "files for Maniac Mansion have to be in the 'Maniac' directory inside the " @@ -3671,6 +3762,15 @@ msgstr "Xianshi Wuti Biaoqian" msgid "Show labels for objects on mouse hover" msgstr "Dang Shubiao Yishang Shi Xianshi Wuti Biaoqian" +#: engines/sword25/detection.cpp:46 +msgid "Use English speech" +msgstr "" + +#: engines/sword25/detection.cpp:47 +msgid "" +"Use English speech instead of German for every language other than German" +msgstr "" + #: engines/teenagent/resources.cpp:95 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" @@ -53,8 +53,43 @@ ifdef DYNAMIC_MODULES endif # Special target to create a application wrapper for Mac OS X + +ifdef USE_DOCKTILEPLUGIN + +# The NsDockTilePlugIn needs to be compiled in both 32 and 64 bits irrespective of how ScummVM itself is compiled. +# Therefore do not use $(CXXFLAGS) and $(LDFLAGS). + +ScummVMDockTilePlugin32.o: + $(CXX) -mmacosx-version-min=10.6 -arch i386 -O2 -c $(srcdir)/backends/taskbar/macosx/dockplugin/dockplugin.m -o ScummVMDockTilePlugin32.o + +ScummVMDockTilePlugin32: ScummVMDockTilePlugin32.o + $(CXX) -mmacosx-version-min=10.6 -arch i386 -bundle -framework Foundation -framework AppKit -fobjc-link-runtime ScummVMDockTilePlugin32.o -o ScummVMDockTilePlugin32 + +ScummVMDockTilePlugin64.o: + $(CXX) -mmacosx-version-min=10.6 -arch x86_64 -O2 -c $(srcdir)/backends/taskbar/macosx/dockplugin/dockplugin.m -o ScummVMDockTilePlugin64.o + +ScummVMDockTilePlugin64: ScummVMDockTilePlugin64.o + $(CXX) -mmacosx-version-min=10.6 -arch x86_64 -bundle -framework Foundation -framework AppKit -fobjc-link-runtime ScummVMDockTilePlugin64.o -o ScummVMDockTilePlugin64 + +ScummVMDockTilePlugin: ScummVMDockTilePlugin32 ScummVMDockTilePlugin64 + lipo -create ScummVMDockTilePlugin32 ScummVMDockTilePlugin64 -output ScummVMDockTilePlugin + +scummvm.docktileplugin: ScummVMDockTilePlugin + mkdir -p scummvm.docktileplugin/Contents + cp $(srcdir)/dists/macosx/dockplugin/Info.plist scummvm.docktileplugin/Contents + mkdir -p scummvm.docktileplugin/Contents/MacOS + cp ScummVMDockTilePlugIn scummvm.docktileplugin/Contents/MacOS/ + chmod 644 scummvm.docktileplugin/Contents/MacOS/ScummVMDockTilePlugIn + +endif + bundle_name = ScummVM.app + +ifdef USE_DOCKTILEPLUGIN +bundle: scummvm-static scummvm.docktileplugin +else bundle: scummvm-static +endif mkdir -p $(bundle_name)/Contents/MacOS mkdir -p $(bundle_name)/Contents/Resources echo "APPL????" > $(bundle_name)/Contents/PkgInfo @@ -62,7 +97,8 @@ bundle: scummvm-static ifdef USE_SPARKLE mkdir -p $(bundle_name)/Contents/Frameworks cp $(srcdir)/dists/macosx/dsa_pub.pem $(bundle_name)/Contents/Resources/ - cp -R $(STATICLIBPATH)/Sparkle.framework $(bundle_name)/Contents/Frameworks/ + rm -rf $(bundle_name)/Contents/Frameworks/Sparkle.framework + cp -R $(SPARKLEPATH)/Sparkle.framework $(bundle_name)/Contents/Frameworks/ endif cp $(srcdir)/icons/scummvm.icns $(bundle_name)/Contents/Resources/ cp $(DIST_FILES_DOCS) $(bundle_name)/ @@ -75,6 +111,10 @@ endif cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm chmod 755 $(bundle_name)/Contents/MacOS/scummvm $(STRIP) $(bundle_name)/Contents/MacOS/scummvm +ifdef USE_DOCKTILEPLUGIN + mkdir -p $(bundle_name)/Contents/PlugIns + cp -r scummvm.docktileplugin $(bundle_name)/Contents/PlugIns/ +endif iphonebundle: iphone mkdir -p $(bundle_name) @@ -290,7 +330,10 @@ OSX_ZLIB ?= $(STATICLIBPATH)/lib/libz.a endif ifdef USE_SPARKLE -OSX_STATIC_LIBS += -framework Sparkle -F$(STATICLIBPATH) +ifneq ($(SPARKLEPATH),) +OSX_STATIC_LIBS += -F$(SPARKLEPATH) +endif +OSX_STATIC_LIBS += -framework Sparkle -Wl,-rpath,@loader_path/../Frameworks endif # Special target to create a static linked binary for Mac OS X. @@ -363,6 +406,9 @@ osxsnap: bundle ScummVM-snapshot.dmg rm -rf ScummVM-snapshot +publish-appcast: + scp dists/macosx/scummvm_appcast.xml www.scummvm.org:/var/www/html/appcasts/macosx/release.xml + # # Windows specific # @@ -441,12 +487,12 @@ CUR_BRANCH := $(shell cd $(srcdir); git describe --all |cut -d '-' -f 4-) ideprojects: devtools/create_project ifeq ($(VER_DIRTY), -dirty) - $(error You have uncommitted changes) -endif + $(error You have uncommitted changes) +endif ifeq "$(CUR_BRANCH)" "heads/master" - $(error You cannot do it on master) + $(error You cannot do it on master) else ifeq "$(CUR_BRANCH)" "" - $(error You must be on a release branch) + $(error You must be on a release branch) endif @echo Creating Code::Blocks project files... @cd $(srcdir)/dists/codeblocks && ../../devtools/create_project/create_project ../.. --codeblocks >/dev/null && git add -f engines/plugins_table.h *.workspace *.cbp diff --git a/video/mpegps_decoder.cpp b/video/mpegps_decoder.cpp index 6942efbe87..d2e9554c8f 100644 --- a/video/mpegps_decoder.cpp +++ b/video/mpegps_decoder.cpp @@ -21,7 +21,6 @@ */ #include "audio/audiostream.h" -#include "audio/decoders/raw.h" #include "audio/decoders/mp3.h" #include "common/debug.h" #include "common/endian.h" diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp index 91f8e1dafc..4f14e2ea4f 100644 --- a/video/psx_decoder.cpp +++ b/video/psx_decoder.cpp @@ -24,7 +24,6 @@ // MDEC video emulation based on http://kenai.com/downloads/jpsxdec/Old/PlayStation1_STR_format1-00.txt #include "audio/audiostream.h" -#include "audio/mixer.h" #include "audio/decoders/raw.h" #include "common/bitstream.h" #include "common/huffman.h" |