diff options
613 files changed, 10053 insertions, 7599 deletions
@@ -1,11 +1,17 @@ For a more comprehensive changelog of the latest experimental code, see: https://github.com/scummvm/scummvm/commits/ -1.9.0 (YYYY-MM-DD) +1.10.0 (YYYY-MM-DD) + + +1.9.0 (2016-10-17) New Games: - Added support for Myst. - Added support for Myst: Masterpiece Edition. - Added support for U.F.O.s. + - Added support for Hi-Res Adventure #0: Mission Asteroid. + - Added support for Hi-Res Adventure #1: Mystery House. + - Added support for Hi-Res Adventure #2: The Wizard and the Princess. General: - Fixed audio corruption in the MS ADPCM decoder. @@ -53,6 +59,7 @@ For a more comprehensive changelog of the latest experimental code, see: Sherlock: - Fixed a bug that could cause a crash in The Case of the Serrated Scalpel. + - Fixed an issue with item hotspots in The Case of the Serrated Scalpel. - Fixed a bug that caused game lockups in the inventory of The Case of the Rose Tattoo. Amiga port: diff --git a/audio/alsa_opl.cpp b/audio/alsa_opl.cpp index 6b9e48e987..faad4018cd 100644 --- a/audio/alsa_opl.cpp +++ b/audio/alsa_opl.cpp @@ -123,7 +123,7 @@ void OPL::clear() { } else if (_type == Config::kOpl2) { for (int i = 0; i < kOpl2Operators; ++i) { _oper[i].left = 1; - _oper[i].right = 1; + _oper[i].right = 1; } } } @@ -152,7 +152,7 @@ bool OPL::init() { while (!snd_ctl_hwdep_next_device(ctl, &dev) && dev >= 0) { name = Common::String::format("hw:%d,%d", card, dev); - if (snd_hwdep_open(&_opl, name.c_str(), SND_HWDEP_OPEN_WRITE) < 0) + if (snd_hwdep_open(&_opl, name.c_str(), SND_HWDEP_OPEN_WRITE) < 0) continue; if (!snd_hwdep_info(_opl, info)) { diff --git a/audio/fmopl.cpp b/audio/fmopl.cpp index cc00ace264..a43b08c422 100644 --- a/audio/fmopl.cpp +++ b/audio/fmopl.cpp @@ -248,7 +248,7 @@ void RealOPL::onTimer() { if (_baseFreq > kMaxFreq) { // We run faster than our max, so run the callback multiple // times to approximate the actual timer callback frequency. - uint totalTicks = _baseFreq + _remainingTicks; + uint totalTicks = _baseFreq + _remainingTicks; callbacks = totalTicks / kMaxFreq; _remainingTicks = totalTicks % kMaxFreq; } diff --git a/audio/miles_adlib.cpp b/audio/miles_adlib.cpp index 0693d1e7ac..790e38932d 100644 --- a/audio/miles_adlib.cpp +++ b/audio/miles_adlib.cpp @@ -561,7 +561,7 @@ void MidiDriver_Miles_AdLib::noteOff(byte midiChannel, byte note) { _virtualFmVoices[virtualFmVoice].sustained = true; continue; } - // + // releaseFmVoice(virtualFmVoice); } } @@ -601,7 +601,7 @@ void MidiDriver_Miles_AdLib::prioritySort() { } } - // + // while (virtualFmVoicesCount) { uint16 unvoicedHighestPriority = 0; byte unvoicedHighestFmVoice = 0; @@ -688,7 +688,7 @@ void MidiDriver_Miles_AdLib::releaseFmVoice(byte virtualFmVoice) { // One less voice active on this MIDI channel assert(_midiChannels[midiChannel].currentActiveVoicesCount); - _midiChannels[midiChannel].currentActiveVoicesCount--; + _midiChannels[midiChannel].currentActiveVoicesCount--; } void MidiDriver_Miles_AdLib::releaseSustain(byte midiChannel) { diff --git a/audio/softsynth/fmtowns_pc98/towns_euphony.cpp b/audio/softsynth/fmtowns_pc98/towns_euphony.cpp index aea714f68f..d63f990282 100644 --- a/audio/softsynth/fmtowns_pc98/towns_euphony.cpp +++ b/audio/softsynth/fmtowns_pc98/towns_euphony.cpp @@ -62,7 +62,7 @@ bool EuphonyPlayer::init() { } } } - + if (!_drivers[0] || !_drivers[1]) return false; @@ -323,7 +323,7 @@ bool EuphonyPlayer::parseEvent() { EVENT(programChange_channelAftertouch), EVENT(programChange_channelAftertouch), EVENT(controlChange_pitchWheel), - + EVENT(sysex), EVENT(advanceBar), EVENT(notImpl), @@ -661,7 +661,7 @@ bool EuphonyDriver::init() { delete[] _channels; delete[] _partToChanMapping; delete[] _sustainChannels; - + _channels = new Channel[128]; _partToChanMapping = new int8[16]; _sustainChannels = new int8[16]; @@ -674,7 +674,7 @@ void EuphonyDriver::reset() { _intf->callback(74); _intf->callback(70, 0); _intf->callback(75, 3); - + _currentEvent.clear(); memset(_sustainChannels, 0, 16); memset(_partToChanMapping, -1, 16); diff --git a/audio/softsynth/fmtowns_pc98/towns_euphony.h b/audio/softsynth/fmtowns_pc98/towns_euphony.h index 76aa153a37..65e55fac40 100644 --- a/audio/softsynth/fmtowns_pc98/towns_euphony.h +++ b/audio/softsynth/fmtowns_pc98/towns_euphony.h @@ -120,7 +120,7 @@ public: int setTempo(int tempo); void setLoopStatus(bool loop); - + bool isPlaying() {return _playing; } int configPart_enable(int part, int val); @@ -148,10 +148,10 @@ private: void updateHangingNotes(); void clearHangingNotes(); - + void resetAllControls(); void allPartsOff(); - + uint8 appendEvent(uint8 evt, uint8 chan); typedef bool(EuphonyPlayer::*EuphonyEvent)(); @@ -190,7 +190,7 @@ private: uint16 len; SavedEvent *next; }; - + SavedEvent *_savedEventsChain; uint8 _defaultBarLength; diff --git a/backends/audiocd/macosx/macosx-audiocd.h b/backends/audiocd/macosx/macosx-audiocd.h index 55b8c7b8c6..42edd5de4f 100644 --- a/backends/audiocd/macosx/macosx-audiocd.h +++ b/backends/audiocd/macosx/macosx-audiocd.h @@ -58,4 +58,4 @@ AudioCDManager *createMacOSXAudioCDManager(); #endif -#endif // +#endif // diff --git a/backends/audiocd/win32/win32-audiocd.cpp b/backends/audiocd/win32/win32-audiocd.cpp index 6c057efdb7..b3cde308b9 100644 --- a/backends/audiocd/win32/win32-audiocd.cpp +++ b/backends/audiocd/win32/win32-audiocd.cpp @@ -385,4 +385,4 @@ AudioCDManager *createWin32AudioCDManager() { return new Win32AudioCDManager(); } -#endif // WIN32
\ No newline at end of file +#endif // WIN32 diff --git a/backends/events/androidsdl/androidsdl-events.cpp b/backends/events/androidsdl/androidsdl-events.cpp index 18e696a897..c8a730aa8e 100644 --- a/backends/events/androidsdl/androidsdl-events.cpp +++ b/backends/events/androidsdl/androidsdl-events.cpp @@ -84,7 +84,7 @@ bool AndroidSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) { int AndroidSdlEventSource::mapKey(SDLKey sdlKey, SDLMod mod, Uint16 unicode) { Common::KeyCode key = SDLToOSystemKeycode(sdlKey); - + if (key >= Common::KEYCODE_F1 && key <= Common::KEYCODE_F9) { return key - Common::KEYCODE_F1 + Common::ASCII_F1; } else if (key >= Common::KEYCODE_KP0 && key <= Common::KEYCODE_KP9) { diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp index 746ae6a5a0..ce5715210a 100644 --- a/backends/fs/posix/posix-fs.cpp +++ b/backends/fs/posix/posix-fs.cpp @@ -267,7 +267,7 @@ bool POSIXFilesystemNode::create(bool isDir) { } } - if (success) { + if (success) { setFlags(); if (_isValid) { if (_isDirectory != isDir) warning("failed to create %s: got %s", isDir ? "directory" : "file", _isDirectory ? "directory" : "file"); diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp index 46041bf499..e036b75019 100644 --- a/backends/fs/wii/wii-fs.cpp +++ b/backends/fs/wii/wii-fs.cpp @@ -168,7 +168,7 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi if (newPath.lastChar() != '/') newPath += '/'; newPath += pent->d_name; - + bool isDir = false; tmpdir = opendir(newPath.c_str()); if(tmpdir) @@ -176,17 +176,17 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi isDir = true; closedir(tmpdir); } - + if ((mode == Common::FSNode::kListFilesOnly && isDir) || (mode == Common::FSNode::kListDirectoriesOnly && !isDir)) continue; - + struct stat st; st.st_mode = 0; st.st_mode |= ( isDir ? S_IFDIR : 0 ); st.st_mode |= S_IRUSR; st.st_mode |= S_IWUSR; - + list.push_back(new WiiFilesystemNode(newPath, &st)); } diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 33c82b9fd6..f6ae25c4ee 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -612,9 +612,9 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) { #ifdef USE_OSD if (getFeatureState(OSystem::kFeatureFullscreenMode)) { - displayMessageOnOSD("Fullscreen mode"); + displayMessageOnOSD(_("Fullscreen mode")); } else { - displayMessageOnOSD("Windowed mode"); + displayMessageOnOSD(_("Windowed mode")); } #endif return true; @@ -707,7 +707,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) { #ifdef USE_OSD int windowWidth = 0, windowHeight = 0; getWindowDimensions(&windowWidth, &windowHeight); - const Common::String osdMsg = Common::String::format("Resolution: %dx%d", windowWidth, windowHeight); + const Common::String osdMsg = Common::String::format(_("Resolution: %dx%d"), windowWidth, windowHeight); displayMessageOnOSD(osdMsg.c_str()); #endif @@ -727,9 +727,10 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) { assert(!_ignoreLoadVideoMode); #ifdef USE_OSD - Common::String osdMsg = "Aspect ratio correction: "; - osdMsg += getFeatureState(OSystem::kFeatureAspectRatioCorrection) ? "enabled" : "disabled"; - displayMessageOnOSD(osdMsg.c_str()); + if (getFeatureState(OSystem::kFeatureAspectRatioCorrection)) + displayMessageOnOSD(_("Enabled aspect ratio correction")); + else + displayMessageOnOSD(_("Disabled aspect ratio correction")); #endif return true; @@ -773,7 +774,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) { assert(!_ignoreLoadVideoMode); #ifdef USE_OSD - const Common::String osdMsg = Common::String::format("Graphics mode: %s", _(modeDesc->description)); + const Common::String osdMsg = Common::String::format(_("Graphics mode: %s"), _(modeDesc->description)); displayMessageOnOSD(osdMsg.c_str()); #endif diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index adb84bfb24..46e243c945 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -2176,9 +2176,8 @@ void SurfaceSdlGraphicsManager::displayActivityIconOnOSD(const Graphics::Surface Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends if (_osdIconSurface && !icon) { - // Add a dirty rect to clear the icon on the next update - SDL_Rect dstRect = getOSDIconRect(); - addDirtyRect(dstRect.x, dstRect.y, dstRect.w, dstRect.h, true); + // Force a redraw to clear the icon on the next update + _forceFull = true; } if (_osdIconSurface) { @@ -2249,6 +2248,7 @@ void SurfaceSdlGraphicsManager::updateOSD() { _osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration; } SDL_SetAlpha(_osdMessageSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdMessageAlpha); + _forceFull = true; } if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) { @@ -2256,14 +2256,9 @@ void SurfaceSdlGraphicsManager::updateOSD() { } } - if (_osdMessageSurface) { - SDL_Rect dstRect = getOSDMessageRect(); - addDirtyRect(dstRect.x, dstRect.y, dstRect.w, dstRect.h, true); - } - if (_osdIconSurface) { - SDL_Rect dstRect = getOSDIconRect(); - addDirtyRect(dstRect.x, dstRect.y, dstRect.w, dstRect.h, true); + // Redraw the area below the icon for the transparent blit to give correct results. + _forceFull = true; } } diff --git a/backends/platform/3ds/config.cpp b/backends/platform/3ds/config.cpp index 117b979d9f..bfadc5ac06 100644 --- a/backends/platform/3ds/config.cpp +++ b/backends/platform/3ds/config.cpp @@ -57,7 +57,7 @@ void loadConfig() { config.stretchToFit = confGetBool("stretchtofit", false); config.sensitivity = confGetInt("sensitivity", -5); config.screen = confGetInt("screen", kScreenBoth); - + // Turn off the backlight of any screen not used if (R_SUCCEEDED(gspLcdInit())) { if (config.screen == kScreenTop) { @@ -70,7 +70,7 @@ void loadConfig() { GSPLCD_PowerOnBacklight(GSPLCD_SCREEN_BOTH); gspLcdExit(); } - + OSystem_3DS *osys = (OSystem_3DS *)g_system; osys->updateConfig(); } diff --git a/backends/platform/3ds/config.h b/backends/platform/3ds/config.h index c8b75736ad..02560b2040 100644 --- a/backends/platform/3ds/config.h +++ b/backends/platform/3ds/config.h @@ -26,7 +26,7 @@ #include "common/str.h" namespace _3DS { - + struct Config { bool showCursor; bool snapToBorder; diff --git a/backends/platform/3ds/gui.h b/backends/platform/3ds/gui.h index 66c6547139..8e82c6c851 100644 --- a/backends/platform/3ds/gui.h +++ b/backends/platform/3ds/gui.h @@ -33,7 +33,7 @@ public: protected: virtual void close(); - + uint32 _timer; static StatusMessageDialog* _opened; }; diff --git a/backends/platform/3ds/main.cpp b/backends/platform/3ds/main.cpp index 6cc2c5cf5d..e9046d7c28 100644 --- a/backends/platform/3ds/main.cpp +++ b/backends/platform/3ds/main.cpp @@ -41,13 +41,13 @@ int main(int argc, char *argv[]) { scummvm_main(0, nullptr); delete dynamic_cast<_3DS::OSystem_3DS*>(g_system); - + // Turn on both screen backlights before exiting. if (R_SUCCEEDED(gspLcdInit())) { GSPLCD_PowerOnBacklight(GSPLCD_SCREEN_BOTH); gspLcdExit(); } - + cfguExit(); gfxExit(); return 0; diff --git a/backends/platform/3ds/options-dialog.cpp b/backends/platform/3ds/options-dialog.cpp index 0f8bfd0c66..60fe7f818f 100644 --- a/backends/platform/3ds/options-dialog.cpp +++ b/backends/platform/3ds/options-dialog.cpp @@ -33,11 +33,11 @@ #include "common/translation.h" namespace _3DS { - + bool optionMenuOpened = false; OptionsDialog::OptionsDialog() : GUI::Dialog(20, 20, 280, 200) { - + optionMenuOpened = true; new GUI::ButtonWidget(this, 120, 180, 72, 16, _("~C~lose"), 0, GUI::kCloseCmd); @@ -45,10 +45,10 @@ OptionsDialog::OptionsDialog() : GUI::Dialog(20, 20, 280, 200) { _showCursorCheckbox = new GUI::CheckboxWidget(this, 5, 5, 130, 20, _("Show mouse cursor"), 0, 0, 'T'); _showCursorCheckbox->setState(config.showCursor); - + _snapToBorderCheckbox = new GUI::CheckboxWidget(this, 5, 22, 130, 20, _("Snap to edges"), 0, 0, 'T'); _snapToBorderCheckbox->setState(config.snapToBorder); - + _stretchToFitCheckbox = new GUI::CheckboxWidget(this, 140, 5, 130, 20, _("Stretch to fit"), 0, 0, 'T'); _stretchToFitCheckbox->setState(config.stretchToFit); diff --git a/backends/platform/3ds/options-dialog.h b/backends/platform/3ds/options-dialog.h index 6673b88e7b..d8c0d7bc7d 100644 --- a/backends/platform/3ds/options-dialog.h +++ b/backends/platform/3ds/options-dialog.h @@ -33,7 +33,7 @@ #include "scumm/dialogs.h" namespace _3DS { - + enum { kSave = 0x10000000, kScreenRadioGroup, @@ -41,7 +41,7 @@ enum { kScreenBottom, kScreenBoth, }; - + extern bool optionMenuOpened; class OptionsDialog : public GUI::Dialog { diff --git a/backends/platform/3ds/osystem-audio.cpp b/backends/platform/3ds/osystem-audio.cpp index 17e419c36d..58262372cc 100644 --- a/backends/platform/3ds/osystem-audio.cpp +++ b/backends/platform/3ds/osystem-audio.cpp @@ -41,31 +41,31 @@ static void audioThreadFunc(void *arg) { uint32 lastTime = osys->getMillis(true); uint32 time = lastTime; ndspWaveBuf buffers[bufferCount]; - + for (i = 0; i < bufferCount; ++i) { memset(&buffers[i], 0, sizeof(ndspWaveBuf)); buffers[i].data_vaddr = linearAlloc(bufferSize); buffers[i].looping = false; buffers[i].status = NDSP_WBUF_FREE; } - + ndspChnReset(channel); ndspChnSetInterp(channel, NDSP_INTERP_LINEAR); ndspChnSetRate(channel, sampleRate); ndspChnSetFormat(channel, NDSP_FORMAT_STEREO_PCM16); - while (!osys->exiting) { + while (!osys->exiting) { osys->delayMillis(100); // Note: Increasing the delay requires a bigger buffer - + time = osys->getMillis(true); sampleLen = (time - lastTime) * 22 * 4; // sampleRate / 1000 * channelCount * sizeof(int16); lastTime = time; - + if (!osys->sleeping && sampleLen > 0) { bufferIndex++; bufferIndex %= bufferCount; ndspWaveBuf *buf = &buffers[bufferIndex]; - + buf->nsamples = mixer->mixCallback(buf->data_adpcm, sampleLen); if (buf->nsamples > 0) { DSP_FlushDataCache(buf->data_vaddr, bufferSize); @@ -73,14 +73,14 @@ static void audioThreadFunc(void *arg) { } } } - + for (i = 0; i < bufferCount; ++i) linearFree(buffers[i].data_pcm8); } void OSystem_3DS::initAudio() { _mixer = new Audio::MixerImpl(this, 22050); - + hasAudio = R_SUCCEEDED(ndspInit()); _mixer->setReady(false); @@ -97,7 +97,7 @@ void OSystem_3DS::destroyAudio() { threadFree(audioThread); ndspExit(); } - + delete _mixer; _mixer = 0; } diff --git a/backends/platform/3ds/osystem-events.cpp b/backends/platform/3ds/osystem-events.cpp index ae8a9b8b2b..064540fa66 100644 --- a/backends/platform/3ds/osystem-events.cpp +++ b/backends/platform/3ds/osystem-events.cpp @@ -44,7 +44,7 @@ static void pushEventQueue(Common::Queue<Common::Event> *queue, Common::Event &e static void eventThreadFunc(void *arg) { OSystem_3DS *osys = (OSystem_3DS *)g_system; auto eventQueue = (Common::Queue<Common::Event> *)arg; - + uint32 touchStartTime = osys->getMillis(); touchPosition lastTouch = {0, 0}; bool isRightClick = false; @@ -55,19 +55,19 @@ static void eventThreadFunc(void *arg) { int circleDeadzone = 20; int borderSnapZone = 6; Common::Event event; - + while (!osys->exiting) { do { osys->delayMillis(10); } while (osys->sleeping && !osys->exiting); - + hidScanInput(); touchPosition touch; circlePosition circle; u32 held = hidKeysHeld(); u32 keysPressed = hidKeysDown(); u32 keysReleased = hidKeysUp(); - + // C-Pad used to control the cursor hidCircleRead(&circle); if (circle.dx < circleDeadzone && circle.dx > -circleDeadzone) @@ -76,7 +76,7 @@ static void eventThreadFunc(void *arg) { circle.dy = 0; cursorDeltaX = (0.0002f + config.sensitivity / 100000.f) * circle.dx * abs(circle.dx); cursorDeltaY = (0.0002f + config.sensitivity / 100000.f) * circle.dy * abs(circle.dy); - + // Touch screen events if (held & KEY_TOUCH) { hidTouchRead(&touch); @@ -97,7 +97,7 @@ static void eventThreadFunc(void *arg) { osys->warpMouse(touch.px, touch.py); event.mouse.x = touch.px; event.mouse.y = touch.py; - + if (keysPressed & KEY_TOUCH) { touchStartTime = osys->getMillis(); isRightClick = (held & KEY_X || held & KEY_DUP); @@ -109,7 +109,7 @@ static void eventThreadFunc(void *arg) { event.type = Common::EVENT_MOUSEMOVE; pushEventQueue(eventQueue, event); } - + lastTouch = touch; } else if (keysReleased & KEY_TOUCH) { event.mouse.x = lastTouch.px; @@ -136,13 +136,13 @@ static void eventThreadFunc(void *arg) { lastTouch.px = cursorX; lastTouch.py = cursorY; osys->transformPoint(lastTouch); - osys->warpMouse(lastTouch.px, lastTouch.py); + osys->warpMouse(lastTouch.px, lastTouch.py); event.mouse.x = lastTouch.px; event.mouse.y = lastTouch.py; event.type = Common::EVENT_MOUSEMOVE; pushEventQueue(eventQueue, event); } - + // Button events if (keysPressed & KEY_R) { if (inputMode == MODE_DRAG) { @@ -195,7 +195,7 @@ static void eventThreadFunc(void *arg) { event.kbd.flags = 0; pushEventQueue(eventQueue, event); } - + // TODO: EVENT_PREDICTIVE_DIALOG // EVENT_SCREEN_CHANGED } @@ -203,7 +203,7 @@ static void eventThreadFunc(void *arg) { static void aptHookFunc(APT_HookType hookType, void *param) { OSystem_3DS *osys = (OSystem_3DS *)g_system; - + switch (hookType) { case APTHOOK_ONSUSPEND: case APTHOOK_ONSLEEP: @@ -246,7 +246,7 @@ void OSystem_3DS::initEvents() { svcGetThreadPriority(&prio, CUR_THREAD_HANDLE); _timerThread = threadCreate(&timerThreadFunc, this, 32 * 1024, prio - 1, -2, false); _eventThread = threadCreate(&eventThreadFunc, &_eventQueue, 32 * 1024, prio - 1, -2, false); - + aptHook(&cookie, aptHookFunc, this); } @@ -277,7 +277,7 @@ bool OSystem_3DS::pollEvent(Common::Event &event) { StatusMessageDialog dialog(messageOSD, 800); dialog.runModal(); } - + aptMainLoop(); // Call apt hook when necessary if (optionMenuOpening) { @@ -289,12 +289,12 @@ bool OSystem_3DS::pollEvent(Common::Event &event) { if (g_engine) g_engine->pauseEngine(false); } - + Common::StackLock lock(*eventMutex); - + if (_eventQueue.empty()) return false; - + event = _eventQueue.pop(); return true; } diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp index 0cfd70c9cd..ec60956805 100644 --- a/backends/platform/3ds/osystem-graphics.cpp +++ b/backends/platform/3ds/osystem-graphics.cpp @@ -35,7 +35,7 @@ GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO)) namespace _3DS { - + void OSystem_3DS::initGraphics() { _pfGame = Graphics::PixelFormat::createFormatCLUT8(); _pfGameTexture = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0); @@ -60,23 +60,23 @@ void OSystem_3DS::initGraphics() { shaderProgramInit(&_program); shaderProgramSetVsh(&_program, &_dvlb->DVLE[0]); C3D_BindProgram(&_program); - + _projectionLocation = shaderInstanceGetUniformLocation(_program.vertexShader, "projection"); _modelviewLocation = shaderInstanceGetUniformLocation(_program.vertexShader, "modelView"); - + C3D_AttrInfo *attrInfo = C3D_GetAttrInfo(); AttrInfo_Init(attrInfo); AttrInfo_AddLoader(attrInfo, 0, GPU_FLOAT, 3); // v0=position AttrInfo_AddLoader(attrInfo, 1, GPU_FLOAT, 2); // v1=texcoord - + Mtx_OrthoTilt(&_projectionTop, 0.0, 400.0, 240.0, 0.0, 0.0, 1.0); Mtx_OrthoTilt(&_projectionBottom, 0.0, 320.0, 240.0, 0.0, 0.0, 1.0); - + C3D_TexEnv *env = C3D_GetTexEnv(0); C3D_TexEnvSrc(env, C3D_Both, GPU_TEXTURE0, 0, 0); C3D_TexEnvOp(env, C3D_Both, 0, 0, 0); C3D_TexEnvFunc(env, C3D_Both, GPU_REPLACE); - + C3D_DepthTest(false, GPU_GEQUAL, GPU_WRITE_ALL); C3D_CullFace(GPU_CULL_NONE); } @@ -148,14 +148,14 @@ void OSystem_3DS::initSize(uint width, uint height, _gameHeight = height; _gameTopTexture.create(width, height, _pfGameTexture); _overlay.create(getOverlayWidth(), getOverlayHeight(), _pfGameTexture); - + if (format) { debug("pixelformat: %d %d %d %d %d", format->bytesPerPixel, format->rBits(), format->gBits(), format->bBits(), format->aBits());; _pfGame = *format; } _gameScreen.create(width, height, _pfGame); - + _focusDirty = true; _focusRect = Common::Rect(_gameWidth, _gameHeight); @@ -169,7 +169,7 @@ void OSystem_3DS::updateSize() { _gameBottomTexture.setScale(320.f / _gameWidth, 240.f / _gameHeight); } else { float ratio = static_cast<float>(_gameWidth) / _gameHeight; - + if (ratio > 400.f / 240.f) { float r = 400.f / _gameWidth; _gameTopTexture.setScale(r, r); @@ -224,7 +224,7 @@ OSystem::TransactionError OSystem_3DS::endGFXTransaction() { void OSystem_3DS::setPalette(const byte *colors, uint start, uint num) { assert(start + num <= 256); memcpy(_palette + 3 * start, colors, 3 * num); - + // Manually update all color that were changed if (_gameScreen.format.bytesPerPixel == 1) { flushGameScreen(); @@ -240,10 +240,10 @@ void OSystem_3DS::copyRectToScreen(const void *buf, int pitch, int x, Common::Rect rect(x, y, x+w, y+h); _gameScreen.copyRectToSurface(buf, pitch, x, y, w, h); Graphics::Surface subSurface = _gameScreen.getSubArea(rect); - + Graphics::Surface *convertedSubSurface = subSurface.convertTo(_pfGameTexture, _palette); _gameTopTexture.copyRectToSurface(*convertedSubSurface, x, y, Common::Rect(w, h)); - + convertedSubSurface->free(); delete convertedSubSurface; _gameTopTexture.markDirty(); @@ -268,7 +268,7 @@ void OSystem_3DS::updateScreen() { if (sleeping || exiting) return; - + // updateFocus(); C3D_FrameBegin(C3D_FRAME_SYNCDRAW); @@ -288,7 +288,7 @@ void OSystem_3DS::updateScreen() { _cursorTexture.render(); } } - + // Render bottom screen C3D_FrameDrawOn(_renderTargetBottom); if (config.screen == kScreenBottom || config.screen == kScreenBoth) { @@ -327,7 +327,7 @@ void OSystem_3DS::clearFocusRectangle() { } void OSystem_3DS::updateFocus() { - + if (_focusClearTime && getMillis() - _focusClearTime > 5000) { _focusClearTime = 0; _focusDirty = true; @@ -361,26 +361,26 @@ void OSystem_3DS::updateFocus() { _focusStepScaleX = duration * (_focusTargetScaleX - _focusScaleX); _focusStepScaleY = duration * (_focusTargetScaleY - _focusScaleY); } - + if (_focusDirty || _focusPosX != _focusTargetPosX || _focusPosY != _focusTargetPosY || _focusScaleX != _focusTargetScaleX || _focusScaleY != _focusTargetScaleY) { _focusDirty = false; - + if ((_focusStepPosX > 0 && _focusPosX > _focusTargetPosX) || (_focusStepPosX < 0 && _focusPosX < _focusTargetPosX)) _focusPosX = _focusTargetPosX; else if (_focusPosX != _focusTargetPosX) _focusPosX += _focusStepPosX; - + if ((_focusStepPosY > 0 && _focusPosY > _focusTargetPosY) || (_focusStepPosY < 0 && _focusPosY < _focusTargetPosY)) _focusPosY = _focusTargetPosY; else if (_focusPosY != _focusTargetPosY) _focusPosY += _focusStepPosY; - + if ((_focusStepScaleX > 0 && _focusScaleX > _focusTargetScaleX) || (_focusStepScaleX < 0 && _focusScaleX < _focusTargetScaleX)) _focusScaleX = _focusTargetScaleX; else if (_focusScaleX != _focusTargetScaleX) _focusScaleX += _focusStepScaleX; - + if ((_focusStepScaleY > 0 && _focusScaleY > _focusTargetScaleY) || (_focusStepScaleY < 0 && _focusScaleY < _focusTargetScaleY)) _focusScaleY = _focusTargetScaleY; else if (_focusScaleY != _focusTargetScaleY) @@ -476,10 +476,10 @@ void OSystem_3DS::setMouseCursor(const void *buf, uint w, uint h, _cursor.create(w, h, _pfCursor); _cursorTexture.create(w, h, _pfGameTexture); } - + _cursor.copyRectToSurface(buf, w, 0, 0, w, h); flushCursor(); - + warpMouse(_cursorX, _cursorY); } @@ -497,7 +497,7 @@ void OSystem_3DS::flushCursor() { _cursorTexture.markDirty(); converted->free(); delete converted; - + if (_pfCursor.bytesPerPixel == 1) { uint* dest = (uint*) _cursorTexture.getPixels(); byte* src = (byte*) _cursor.getPixels(); diff --git a/backends/platform/3ds/osystem.cpp b/backends/platform/3ds/osystem.cpp index f6278eb16b..e19ff8f8de 100644 --- a/backends/platform/3ds/osystem.cpp +++ b/backends/platform/3ds/osystem.cpp @@ -85,7 +85,7 @@ OSystem_3DS::~OSystem_3DS() { destroyEvents(); destroyAudio(); destroyGraphics(); - + delete _timerManager; _timerManager = 0; } @@ -109,7 +109,7 @@ void OSystem_3DS::initBackend() { _timerManager = new DefaultTimerManager(); _savefileManager = new DefaultSaveFileManager("/3ds/scummvm/saves/"); - + initGraphics(); initAudio(); initEvents(); diff --git a/backends/platform/3ds/osystem.h b/backends/platform/3ds/osystem.h index 478085acba..5df49fe593 100644 --- a/backends/platform/3ds/osystem.h +++ b/backends/platform/3ds/osystem.h @@ -57,12 +57,12 @@ class OSystem_3DS : public EventsBaseBackend, public PaletteManager { public: OSystem_3DS(); virtual ~OSystem_3DS(); - + volatile bool exiting; volatile bool sleeping; virtual void initBackend(); - + virtual bool hasFeature(OSystem::Feature f); virtual void setFeatureState(OSystem::Feature f, bool enable); virtual bool getFeatureState(OSystem::Feature f); @@ -72,22 +72,22 @@ public: virtual uint32 getMillis(bool skipRecord = false); virtual void delayMillis(uint msecs); virtual void getTimeAndDate(TimeDate &t) const; - + virtual MutexRef createMutex(); virtual void lockMutex(MutexRef mutex); virtual void unlockMutex(MutexRef mutex); virtual void deleteMutex(MutexRef mutex); virtual void logMessage(LogMessageType::Type type, const char *message); - + virtual Audio::Mixer *getMixer(); virtual PaletteManager *getPaletteManager() { return this; } virtual Common::String getSystemLanguage() const; virtual void fatalError(); virtual void quit(); - + virtual Common::String getDefaultConfigFileName(); - + // Graphics virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const; int getDefaultGraphicsMode() const; @@ -131,16 +131,16 @@ public: int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); void setCursorPalette(const byte *colors, uint start, uint num); - + // Transform point from touchscreen coords into gamescreen coords void transformPoint(touchPosition &point); - + void setCursorDelta(float deltaX, float deltaY); - + void updateFocus(); void updateConfig(); void updateSize(); - + private: void initGraphics(); void destroyGraphics(); @@ -148,18 +148,18 @@ private: void destroyAudio(); void initEvents(); void destroyEvents(); - + void flushGameScreen(); void flushCursor(); - + protected: Audio::MixerImpl *_mixer; - + private: u16 _gameWidth, _gameHeight; u16 _gameTopX, _gameTopY; u16 _gameBottomX, _gameBottomY; - + // Audio Thread audioThread; @@ -169,15 +169,15 @@ private: Graphics::PixelFormat _pfCursor; byte _palette[3 * 256]; byte _cursorPalette[3 * 256]; - + Graphics::Surface _gameScreen; Sprite _gameTopTexture; Sprite _gameBottomTexture; Sprite _overlay; - + int _screenShakeOffset; bool _overlayVisible; - + DVLB_s *_dvlb; shaderProgram_s _program; int _projectionLocation; @@ -186,7 +186,7 @@ private: C3D_Mtx _projectionBottom; C3D_RenderTarget* _renderTargetTop; C3D_RenderTarget* _renderTargetBottom; - + // Focus Common::Rect _focusRect; bool _focusDirty; @@ -198,12 +198,12 @@ private: float _focusTargetScaleX, _focusTargetScaleY; float _focusStepScaleX, _focusStepScaleY; uint32 _focusClearTime; - + // Events Thread _eventThread; Thread _timerThread; Common::Queue<Common::Event> _eventQueue; - + // Cursor Graphics::Surface _cursor; Sprite _cursorTexture; diff --git a/backends/platform/3ds/sprite.cpp b/backends/platform/3ds/sprite.cpp index f97c611473..842729c051 100644 --- a/backends/platform/3ds/sprite.cpp +++ b/backends/platform/3ds/sprite.cpp @@ -57,7 +57,7 @@ Sprite::~Sprite() { void Sprite::create(uint16 width, uint16 height, const Graphics::PixelFormat &f) { free(); - + actualWidth = width; actualHeight = height; format = f; @@ -73,7 +73,7 @@ void Sprite::create(uint16 width, uint16 height, const Graphics::PixelFormat &f) assert(pixels && texture.data); clear(); } - + float x = 0.f, y = 0.f; float u = (float)width/w; float v = (float)height/h; diff --git a/backends/platform/3ds/sprite.h b/backends/platform/3ds/sprite.h index 6d88ae4ce1..129c2689e7 100644 --- a/backends/platform/3ds/sprite.h +++ b/backends/platform/3ds/sprite.h @@ -46,16 +46,16 @@ public: void render(); void clear(uint32 color = 0); void markDirty(){ dirtyPixels = true; } - + void setPosition(int x, int y); void setScale(float x, float y); float getScaleX(){ return scaleX; } float getScaleY(){ return scaleY; } C3D_Mtx* getMatrix(); - + uint16 actualWidth; uint16 actualHeight; - + private: bool dirtyPixels; bool dirtyMatrix; diff --git a/backends/platform/androidsdl/androidsdl-main.cpp b/backends/platform/androidsdl/androidsdl-main.cpp index 26a73579c0..364d686c1b 100644 --- a/backends/platform/androidsdl/androidsdl-main.cpp +++ b/backends/platform/androidsdl/androidsdl-main.cpp @@ -20,11 +20,16 @@ * */ +#define FORBIDDEN_SYMBOL_EXCEPTION_system + #include "backends/platform/androidsdl/androidsdl-sdl.h" #include "base/main.h" int main(int argc, char *argv[]) { + // Copy over config file from previous version of ScummVM if applicable + system("ls $DATADIR/.config/scummvm/scummvm.ini || (mkdir -p $DATADIR/.config/scummvm && cp $APPDIR/scummvmrc $DATADIR/.config/scummvm/scummvm.ini )"); + // Create our OSystem instance g_system = new OSystem_ANDROIDSDL(); assert(g_system); diff --git a/backends/platform/androidsdl/androidsdl-sdl.cpp b/backends/platform/androidsdl/androidsdl-sdl.cpp index b4a575e1f6..3d0429e098 100644 --- a/backends/platform/androidsdl/androidsdl-sdl.cpp +++ b/backends/platform/androidsdl/androidsdl-sdl.cpp @@ -28,7 +28,7 @@ void OSystem_ANDROIDSDL::initBackend() { // Create the backend custom managers - + if (_eventSource == 0) _eventSource = new AndroidSdlEventSource(); @@ -37,10 +37,10 @@ void OSystem_ANDROIDSDL::initBackend() { if (!ConfMan.hasKey("browser_lastpath")) ConfMan.set("browser_lastpath", "/storage"); - + if (!ConfMan.hasKey("gfx_mode")) ConfMan.set("gfx_mode", "2x"); - + // Call parent implementation of this method OSystem_POSIX::initBackend(); } diff --git a/backends/platform/dingux/README.GCW0 b/backends/platform/dingux/README.GCW0 index 1b7e30e266..95438084c2 100644 --- a/backends/platform/dingux/README.GCW0 +++ b/backends/platform/dingux/README.GCW0 @@ -27,6 +27,11 @@ It's pretty simple if you are running Linux on an x86/amd64 machine: Troubleshooting =============== +Please be advised that currently games with a resolution above 320x240 +are disabled due to the limited screen resolution on the GCW0. This could be +changed in the future, but higher resolution games will require use of +an HDMI connection. + In case you need to submit a bugreport, you may find the log file at the following path: diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h index d30e3ab177..065ea7de68 100644 --- a/backends/platform/ds/arm9/source/gbampsave.h +++ b/backends/platform/ds/arm9/source/gbampsave.h @@ -29,7 +29,7 @@ class GBAMPSaveFileManager : public Common::SaveFileManager { public: virtual void updateSavefilesList(Common::StringArray &lockedFiles); virtual Common::InSaveFile *openRawFile(const Common::String &filename); - + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true); virtual Common::InSaveFile *openForLoading(const Common::String &filename); diff --git a/backends/platform/ios7/ios7_osys_events.cpp b/backends/platform/ios7/ios7_osys_events.cpp index 3621c084db..da467cf5d6 100644 --- a/backends/platform/ios7/ios7_osys_events.cpp +++ b/backends/platform/ios7/ios7_osys_events.cpp @@ -91,16 +91,16 @@ bool OSystem_iOS7::pollEvent(Common::Event &event) { if (!handleEvent_secondMouseUp(event, internalEvent.value1, internalEvent.value2)) return false; break; - + case kInputKeyPressed: handleEvent_keyPressed(event, internalEvent.value1); break; - + case kInputSwipe: if (!handleEvent_swipe(event, internalEvent.value1, internalEvent.value2)) return false; break; - + case kInputTap: if (!handleEvent_tap(event, (UIViewTapDescription) internalEvent.value1, internalEvent.value2)) return false; @@ -109,7 +109,7 @@ bool OSystem_iOS7::pollEvent(Common::Event &event) { default: break; } - + return true; } return false; @@ -499,14 +499,14 @@ bool OSystem_iOS7::handleEvent_swipe(Common::Event &event, int direction, int to } break; } - + event.kbd.keycode = _queuedInputEvent.kbd.keycode = keycode; event.kbd.ascii = _queuedInputEvent.kbd.ascii = 0; event.type = Common::EVENT_KEYDOWN; _queuedInputEvent.type = Common::EVENT_KEYUP; event.kbd.flags = _queuedInputEvent.kbd.flags = 0; _queuedEventTime = getMillis() + kQueuedInputEventDelay; - + return true; } else if (touches == 2) { diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm index 5c0434d43e..8dbfb71b74 100644 --- a/backends/platform/ios7/ios7_video.mm +++ b/backends/platform/ios7/ios7_video.mm @@ -931,7 +931,7 @@ uint getSizeNextPOT(uint size) { CGPoint point = [touch locationInView:self]; if (![self getMouseCoords:point eventX:&x eventY:&y]) return; - + [self addEvent:InternalEvent(kInputMouseSecondDragged, x, y)]; } } diff --git a/backends/platform/ps2/irxboot.cpp b/backends/platform/ps2/irxboot.cpp index 0e05047c6e..64d6e989d6 100644 --- a/backends/platform/ps2/irxboot.cpp +++ b/backends/platform/ps2/irxboot.cpp @@ -151,7 +151,7 @@ int loadIrxModules(int device, const char *irxPath, IrxReference **modules, IrxT irxFiles = irxType[type]; numFiles = numIrx[type]; resModules = (IrxReference *)memalign(64, numFiles * sizeof(IrxReference)); - curModule = resModules; + curModule = resModules; for (int i = 0; i < numFiles; i++) { curModule->fileRef = irxFiles + i; diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index 1aa74b7d9b..e914cdb9c9 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -628,7 +628,7 @@ bool OSystem_PS2::usbMassPresent(void) { } bool OSystem_PS2::netPresent(void) { - if (_useNet) + if (_useNet) return true; return false; diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index 212af6723e..e90d459e67 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -56,7 +56,7 @@ void OSystem_MacOSX::init() { // Initialize taskbar manager _taskbarManager = new MacOSXTaskbarManager(); #endif - + // Invoke parent implementation of this method OSystem_POSIX::init(); } diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h index 929f2f91fa..72bb4a4787 100644 --- a/backends/platform/sdl/macosx/macosx.h +++ b/backends/platform/sdl/macosx/macosx.h @@ -35,7 +35,7 @@ public: virtual bool hasTextInClipboard(); virtual Common::String getTextFromClipboard(); - + virtual bool openUrl(const Common::String &url); virtual Common::String getSystemLanguage() const; diff --git a/backends/platform/sdl/posix/posix.h b/backends/platform/sdl/posix/posix.h index e5110ff632..bd3a069d5b 100644 --- a/backends/platform/sdl/posix/posix.h +++ b/backends/platform/sdl/posix/posix.h @@ -65,7 +65,7 @@ protected: virtual Common::WriteStream *createLogFile(); virtual AudioCDManager *createAudioCDManager(); - + bool launchBrowser(const Common::String& client, const Common::String &url); }; diff --git a/backends/platform/tizen/form.cpp b/backends/platform/tizen/form.cpp index 568829dc96..2a9a3967cc 100644 --- a/backends/platform/tizen/form.cpp +++ b/backends/platform/tizen/form.cpp @@ -318,16 +318,16 @@ void TizenAppForm::invokeShortcut() { case kControlMouse: setButtonShortcut(); break; - + case kEscapeKey: pushKey(Common::KEYCODE_ESCAPE); break; - + case kGameMenu: _buttonState = kLeftButton; pushKey(Common::KEYCODE_F5); break; - + case kShowKeypad: showKeypad(); break; @@ -338,7 +338,7 @@ void TizenAppForm::showKeypad() { // display the soft keyboard if (_state == kActiveState) { _buttonState = kLeftButton; - + Common::Event e; e.type = Common::EVENT_VIRTUAL_KEYBOARD; if (_eventQueueLock) { diff --git a/backends/platform/tizen/graphics.cpp b/backends/platform/tizen/graphics.cpp index 61dbfc38fb..85dbbd2c08 100644 --- a/backends/platform/tizen/graphics.cpp +++ b/backends/platform/tizen/graphics.cpp @@ -103,7 +103,7 @@ Common::List<Graphics::PixelFormat> TizenGraphicsManager::getSupportedFormats() } bool TizenGraphicsManager::hasFeature(OSystem::Feature f) { - bool result = + bool result = (f == OSystem::kFeatureVirtualKeyboard || OpenGLGraphicsManager::hasFeature(f)); return result; diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp index a958974209..d1fdabeec9 100644 --- a/backends/saves/default/default-saves.cpp +++ b/backends/saves/default/default-saves.cpp @@ -181,7 +181,7 @@ bool DefaultSaveFileManager::removeSavefile(const Common::String &filename) { assureCached(getSavePath()); if (getError().getCode() != Common::kNoError) return false; - + #ifdef USE_LIBCURL // Update file's timestamp Common::HashMap<Common::String, uint32> timestamps = loadTimestamps(); diff --git a/backends/taskbar/macosx/dockplugin/dockplugin.m b/backends/taskbar/macosx/dockplugin/dockplugin.m index 9d864ef2a8..95f961a39d 100644 --- a/backends/taskbar/macosx/dockplugin/dockplugin.m +++ b/backends/taskbar/macosx/dockplugin/dockplugin.m @@ -72,7 +72,7 @@ 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]; @@ -88,7 +88,7 @@ - (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]; @@ -97,7 +97,7 @@ game = gameId; [game retain]; - + return self; } @@ -108,7 +108,7 @@ - (IBAction) startGame { NSLog(@"Starting Game %@...", game); - + NSString *scummVMPath = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:@"org.scummvm.scummvm"]; if (scummVMPath == nil) { NSLog(@"Cannot find ScummVM.app!"); diff --git a/backends/taskbar/macosx/macosx-taskbar.h b/backends/taskbar/macosx/macosx-taskbar.h index 55bb97a691..145cbd4f3a 100644 --- a/backends/taskbar/macosx/macosx-taskbar.h +++ b/backends/taskbar/macosx/macosx-taskbar.h @@ -40,16 +40,16 @@ public: virtual void addRecent(const Common::String &name, const Common::String &description); virtual void notifyError(); virtual void clearError(); - + private: Common::String getIconPath(const Common::String&); void initApplicationIconView(); void clearApplicationIconView(); - + void initOverlayIconView(); void clearOverlayIconView(); - + double _progress; }; diff --git a/backends/taskbar/macosx/macosx-taskbar.mm b/backends/taskbar/macosx/macosx-taskbar.mm index c842eb8090..692fa84429 100644 --- a/backends/taskbar/macosx/macosx-taskbar.mm +++ b/backends/taskbar/macosx/macosx-taskbar.mm @@ -112,11 +112,11 @@ void MacOSXTaskbarManager::setOverlayIcon(const Common::String &name, const Comm [_dockTile performSelector:@selector(display)]; return; } - + Common::String path = getIconPath(name); if (path.empty()) return; - + initOverlayIconView(); CFStringRef imageFile = CFStringCreateWithCString(0, path.c_str(), kCFStringEncodingASCII); @@ -136,7 +136,7 @@ void MacOSXTaskbarManager::setProgressValue(int completed, int total) { _progress = (double)completed / (double)total; else if (_progress < 0) _progress = 0.0; - + NSImage *mainIcon = [[NSApp applicationIconImage] copy]; double barSize = [mainIcon size].width; double progressSize = barSize * _progress; @@ -150,7 +150,7 @@ void MacOSXTaskbarManager::setProgressValue(int completed, int total) { initApplicationIconView(); [_applicationIconView setImage:mainIcon]; [mainIcon release]; - + [_dockTile performSelector:@selector(display)]; } @@ -207,50 +207,50 @@ Common::String MacOSXTaskbarManager::getIconPath(const Common::String& target) { // fallback to the extra path // // Icons can be either in a subfolder named "icons" or directly in the path - + Common::String iconsPath = ConfMan.get("iconspath"); Common::String extraPath = ConfMan.get("extrapath"); - + #define TRY_ICON_PATH(path) { \ Common::FSNode node((path)); \ if (node.exists()) \ return (path); \ } - + if (!iconsPath.empty()) { TRY_ICON_PATH(iconsPath + "/" + target + ".png"); TRY_ICON_PATH(iconsPath + "/" + ConfMan.get("gameid") + ".png"); TRY_ICON_PATH(iconsPath + "/icons/" + target + ".png"); TRY_ICON_PATH(iconsPath + "/icons/" + ConfMan.get("gameid") + ".png"); } - + if (!extraPath.empty()) { TRY_ICON_PATH(extraPath + "/" + target + ".png"); TRY_ICON_PATH(extraPath + "/" + ConfMan.get("gameid") + ".png"); TRY_ICON_PATH(extraPath + "/icons/" + target + ".png"); TRY_ICON_PATH(extraPath + "/icons/" + ConfMan.get("gameid") + ".png"); } - + 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()) { @@ -258,7 +258,7 @@ void MacOSXTaskbarManager::addRecent(const Common::String &name, const Common::S [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"]; diff --git a/backends/updates/win32/win32-updates.cpp b/backends/updates/win32/win32-updates.cpp index 356ff9c903..aebeab531b 100644 --- a/backends/updates/win32/win32-updates.cpp +++ b/backends/updates/win32/win32-updates.cpp @@ -55,7 +55,7 @@ Win32UpdateManager::Win32UpdateManager() { win_sparkle_set_appcast_url(appcastUrl); win_sparkle_init(); - + if (!ConfMan.hasKey("updates_check") || ConfMan.getInt("updates_check") == Common::UpdateManager::kUpdateIntervalNotSupported) { setAutomaticallyChecksForUpdates(kUpdateStateDisabled); @@ -117,7 +117,7 @@ int Win32UpdateManager::getUpdateCheckInterval() { bool Win32UpdateManager::getLastUpdateCheckTimeAndDate(TimeDate &t) { time_t updateTime = win_sparkle_get_last_check_time(); tm *ut = localtime(&updateTime); - + t.tm_wday = ut->tm_wday; t.tm_year = ut->tm_year; t.tm_mon = ut->tm_mon; diff --git a/base/main.cpp b/base/main.cpp index 6b6868b78a..7807ddff7d 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -482,7 +482,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { dlg.runModal(); } #endif - + #ifdef USE_LIBCURL CloudMan.init(); CloudMan.syncSaves(); diff --git a/common/algorithm.h b/common/algorithm.h index 13cdd9f991..0d3a11b348 100644 --- a/common/algorithm.h +++ b/common/algorithm.h @@ -274,7 +274,7 @@ T gcd(T a, T b) { * Replacement algorithm for iterables. * * Replaces all occurrences of "original" in [begin, end) with occurrences of "replaced". - * + * * @param[in, out] begin: First element to be examined. * @param[in] end: Last element in the seubsection. Not examined. * @param[in] original: Elements to be replaced. diff --git a/common/util.h b/common/util.h index 1f635f3654..13c364e97d 100644 --- a/common/util.h +++ b/common/util.h @@ -180,7 +180,7 @@ bool isPrint(int c); /** - * Test whether the given character is a punctuation character, + * Test whether the given character is a punctuation character, * (i.e not alphanumeric. * * @param c the character to test @@ -2881,7 +2881,7 @@ if test -n "$_host"; then _mt32emu=no _seq_midi=no _timidity=no - _build_scalers=no + _build_scalers=yes _optimization_level=-O3 _vkeybd=yes _keymapper=yes diff --git a/devtools/convbdf.cpp b/devtools/convbdf.cpp index 59ea5cc4e5..31fdbd0010 100644 --- a/devtools/convbdf.cpp +++ b/devtools/convbdf.cpp @@ -38,7 +38,10 @@ struct BdfBoundingBox { }; struct BdfFont { + char *familyName; + char *slant; int maxAdvance; + int size; int height; BdfBoundingBox defaultBox; int ascent; @@ -51,7 +54,7 @@ struct BdfFont { unsigned char *advances; BdfBoundingBox *boxes; - BdfFont() : bitmaps(0), advances(0), boxes(0) { + BdfFont() : bitmaps(0), advances(0), boxes(0), familyName(0), slant(0) { } ~BdfFont() { @@ -62,6 +65,8 @@ struct BdfFont { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; } }; @@ -137,8 +142,9 @@ int main(int argc, char *argv[]) { if (in.fail() || in.eof()) error("Premature end of file"); - if (hasPrefix(line, "SIZE ")) { - // Ignore + if (hasPrefix(line, "PIXEL_SIZE ")) { + if (sscanf(line.c_str(), "PIXEL_SIZE %d", &font.size) != 1) + error("Invalid PIXEL_SIZE"); } else if (hasPrefix(line, "FONT ")) { fontName = line.substr(5); } else if (hasPrefix(line, "COPYRIGHT ")) { @@ -159,6 +165,24 @@ int main(int argc, char *argv[]) { memset(font.bitmaps, 0, sizeof(unsigned char *) * font.numCharacters); font.advances = new unsigned char[font.numCharacters]; font.boxes = new BdfBoundingBox[font.numCharacters]; + } else if (hasPrefix(line, "FAMILY_NAME \"")) { + font.familyName = new char[line.size()]; // We will definitely fit here + strncpy(font.familyName, &line.c_str()[13], line.size() - 1); + char *p = &font.familyName[strlen(font.familyName)]; + while (p != font.familyName && *p != '"') + p--; + if (p == font.familyName) + error("Invalid FAMILY_NAME"); + *p = '\0'; // Remove last quote + } else if (hasPrefix(line, "SLANT \"")) { + font.familyName = new char[line.size()]; // We will definitely fit here + strncpy(font.familyName, &line.c_str()[7], line.size() - 1); + char *p = &font.slant[strlen(font.slant)]; + while (p != font.slant && *p != '"') + p--; + if (p == font.slant) + error("Invalid SLANT"); + *p = '\0'; // Remove last quote } else if (hasPrefix(line, "FONT_ASCENT ")) { if (sscanf(line.c_str(), "FONT_ASCENT %d", &font.ascent) != 1) error("Invalid FONT_ASCENT"); @@ -481,8 +505,11 @@ int main(int argc, char *argv[]) { printf("// Font structure\n" "static const BdfFontData desc = {\n" + "\t\"%s\", // Family name\n" + "\t\"%s\", // Slant\n" "\t%d, // Max advance\n" "\t%d, // Height\n" + "\t%d, // Size\n" "\t{ %d, %d, %d, %d }, // Bounding box\n" "\t%d, // Ascent\n" "\n" @@ -491,7 +518,7 @@ int main(int argc, char *argv[]) { "\t%d, // Characters\n" "\n" "\tbitmapTable, // Bitmaps\n", - font.maxAdvance, font.height, font.defaultBox.width, + font.familyName, font.slant, font.maxAdvance, font.size, font.height, font.defaultBox.width, font.defaultBox.height, font.defaultBox.xOffset, font.defaultBox.yOffset, font.ascent, font.firstCharacter, font.defaultCharacter, font.numCharacters); diff --git a/devtools/create_kyradat/types.cpp b/devtools/create_kyradat/types.cpp index 1f8430ab7f..52cd769f2f 100644 --- a/devtools/create_kyradat/types.cpp +++ b/devtools/create_kyradat/types.cpp @@ -132,7 +132,7 @@ static void writeStringList(PAKFile &out, const char *filename, const StringList // Step 2: Write data byte *const output = new byte[size]; - + byte *dst = output; WRITE_BE_UINT32(dst, provider->numEntries); dst += 4; for (uint i = 0; i < provider->numEntries; ++i) { diff --git a/devtools/create_mortdat/create_mortdat.cpp b/devtools/create_mortdat/create_mortdat.cpp index 2d7c9ad3b9..4dc1a92f2f 100644 --- a/devtools/create_mortdat/create_mortdat.cpp +++ b/devtools/create_mortdat/create_mortdat.cpp @@ -113,7 +113,7 @@ void openOutputFile(const char *outFilename) { } /** - * Write out the data for the font + * Write out the data for the font */ void writeFontBlock() { const int knownAddr[3] = {0x30cd, 0x36b0, 0x36c0}; @@ -149,7 +149,7 @@ void writeFontBlock() { } void writeStaticStrings(const char **strings, DataType dataType, int languageId) { - // Write out a section header + // Write out a section header const char sStaticStrings[4] = { 'S', 'S', 'T', 'R' }; const char sGameStrings[4] = { 'G', 'S', 'T', 'R' }; diff --git a/devtools/create_mortdat/enginetext.h b/devtools/create_mortdat/enginetext.h index a257ddd5a2..d10edf8b1e 100644 --- a/devtools/create_mortdat/enginetext.h +++ b/devtools/create_mortdat/enginetext.h @@ -43,7 +43,7 @@ const char *engineDataEn[] = { "% of hints...", "Do you want to wake up?", "OK", - "", + "", " Save", " Load", @@ -96,7 +96,7 @@ const char *engineDataFr[] = { "% des indices...", "D\202sirez-vous vous r\202veiller?", "OK", - "", + "", " Sauvegarde", " Chargement", @@ -150,7 +150,7 @@ const char *engineDataDe[] = { "% der Hinweise| bemerken muessen...", "Moechten Sie aufwachen?", "OK", - "", + "", " schreiben", " lesen", diff --git a/devtools/create_titanic/create_titanic_dat.cpp b/devtools/create_titanic/create_titanic_dat.cpp index 253269262e..fc9222467f 100644 --- a/devtools/create_titanic/create_titanic_dat.cpp +++ b/devtools/create_titanic/create_titanic_dat.cpp @@ -527,7 +527,7 @@ static const char *const STRINGS_DE[] = { "Sie befinden sich bereits an Ihrem gew\xFCnschten Reiseziel.", "Passagieren Ihrer Klasse ist der Zugang zu diesem Bereich nicht gestattet.", "Wir bedauern, aber Sie m\xFCssen mindestens Dritte Klasse sein " - "bevor Sie um Hilfe bitten k\xF6nnen.", + "bevor Sie um Hilfe bitten k\xF6nnen.", "Ihnen wurde keine Kabine zugeteilt.", "Wir bedauern, aber dieser Aufzug geht nicht tiefer als bis in den 27. Stock.", "Sie m\xFCssen zuerst das Spiel selektieren, das Sie laden m\xF6" "chten.", @@ -560,7 +560,7 @@ static const char *const STRINGS_DE[] = { "aber das k\xF6nnen Sie eben nicht.", "Eine Schale Pistazien.", "Keine Schale Pistazien.", - + "Sommer", "Herbst", "Winter", @@ -572,7 +572,7 @@ static const char *const STRINGS_DE[] = { "Pflanzen bitte nicht ber\0xFC" "nhren.", "!\0xBC" "ta'\0xAD" "ta! !T\0xAA" "z n\0xAA" " sappibundli t\0xAA" "cn\0xAA" "z!", - + "Stop", "!Hanaz!", "VorwSrts", diff --git a/devtools/create_titanic/winexe_pe.h b/devtools/create_titanic/winexe_pe.h index 41929e3077..3a065c9258 100644 --- a/devtools/create_titanic/winexe_pe.h +++ b/devtools/create_titanic/winexe_pe.h @@ -88,7 +88,7 @@ public: /** Return a stream to the specified resource (or 0 if non-existent). */ File *getResource(const WinResourceID &type, const WinResourceID &name, const WinResourceID &lang); - + /** Returns true if the resources is empty */ bool empty() const { return _sections.empty(); } private: diff --git a/dists/androidsdl/scummvm/AndroidAppSettings.cfg b/dists/androidsdl/scummvm/AndroidAppSettings.cfg index d9f05ad2f4..a4db29093f 100644 --- a/dists/androidsdl/scummvm/AndroidAppSettings.cfg +++ b/dists/androidsdl/scummvm/AndroidAppSettings.cfg @@ -6,10 +6,10 @@ AppSettingVersion=19 LibSdlVersion=1.2 # Specify application name (e.x. My Application) -AppName="ScummVM-SDL" +AppName="ScummVM" # Specify reversed site name of application (e.x. com.mysite.myapp) -AppFullName=org.scummvm.sdl +AppFullName=org.scummvm.scummvm # Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape ScreenOrientation=h @@ -171,10 +171,10 @@ MultiABI="armeabi" AppMinimumRAM=256 # Application version code (integer) -AppVersionCode=@ANDROID_VERSIONCODE@ +AppVersionCode=20 # Application user-visible version name (string) -AppVersionName="1.9.0git" +AppVersionName="1.10.0git" # Reset SDL config when updating application to the new version (y) / (n) ResetSdlConfigForThisVersion=y diff --git a/dists/androidsdl/scummvm/AndroidAppSettings.cfg.in b/dists/androidsdl/scummvm/AndroidAppSettings.cfg.in index bb437d2a7d..dea60277df 100644 --- a/dists/androidsdl/scummvm/AndroidAppSettings.cfg.in +++ b/dists/androidsdl/scummvm/AndroidAppSettings.cfg.in @@ -6,10 +6,10 @@ AppSettingVersion=19 LibSdlVersion=1.2 # Specify application name (e.x. My Application) -AppName="ScummVM-SDL" +AppName="ScummVM" # Specify reversed site name of application (e.x. com.mysite.myapp) -AppFullName=org.scummvm.sdl +AppFullName=org.scummvm.scummvm # Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape ScreenOrientation=h @@ -165,7 +165,7 @@ FirstStartMenuOptions='' # Enable multi-ABI binary, with hardware FPU support - it will also work on old devices, # but .apk size is 2x bigger (y) / (n) / (x86) / (all) -MultiABI="armeabi-v7a" +MultiABI="armeabi" # Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower AppMinimumRAM=256 diff --git a/dists/macosx/scummvm_appcast.xml b/dists/macosx/scummvm_appcast.xml index 35fbc54908..60837c0c12 100644 --- a/dists/macosx/scummvm_appcast.xml +++ b/dists/macosx/scummvm_appcast.xml @@ -6,6 +6,16 @@ <description>Most recent changes with links to updates.</description> <language>en</language> <item> + <title>Version 1.9.0</title> + <sparkle:releaseNotesLink> + https://scummvm.org/frs/scummvm/1.9.0/ReleaseNotes + </sparkle:releaseNotesLink> + <pubDate>Mon, 17 Oct 2016 22:36:00 +0000</pubDate> + <enclosure url="https://www.scummvm.org/frs/scummvm/1.9.0/scummvm-1.9.0-macosx.dmg" + sparkle:version="1.9.0" length="16642939" type="application/octet-stream" + sparkle:dsaSignature="MC0CFFcJJ0j1aJg99T44EQsh5JxWFxtYAhUAi6tVS4lYWLnybDudMCpx3IHjT+k=" /> + </item> + <item> <title>Version 1.8.1</title> <sparkle:releaseNotesLink> https://scummvm.org/frs/scummvm/1.8.1/ReleaseNotes diff --git a/dists/raspberrypi/README_raspberrypi b/dists/raspberrypi/README_raspberrypi new file mode 100644 index 0000000000..da1d70a113 --- /dev/null +++ b/dists/raspberrypi/README_raspberrypi @@ -0,0 +1,46 @@ +ScummVM Raspberry Pi README +------------------------------------------------------------------------------- + +NOTES ON NEEDED DEPENDENCIES + +The Raspberry Pi version is linked against the following GNU/Linux libraries +that may or may not be already installed on a Raspberry Pi GNU/Linux system +and hence needs them installed in your system before running ScummVM on it: + -SDL2, version 2.0.4 recommended and included. See notes on this below. + -libVorbis, for OGG music needed by some engines and the fantastic + enhanced music packs by James Woodcock. + -libJPEG, needed by some engines. + -libPNG, needed by some engines. + +So, if you are in Raspbian, for example, you can install these, except +SDL 2.0.4 by doing: + +sudo apt-get install libvorbis0a libjpeg62-turbo libpng12-0 + +You can look at the other library dependencies by running ldd on the +scummvm executable. They are standard GNU Linux, C++ and Raspberry Pi +Video Core IV libraries that should come installed with your system. + +RUNNING SCUMMVM ON THE RASPBERRY PI SERIES OF MICROCOMPUTERS +------------------------------------------------------------ + +To launch Scummvm on the Raspberry Pi, run the scummvm.sh script. +It will run the scummvm binary using the SDL2 library in the lib +directory. +You can do so like this: +cd scummvm +./scummvm.sh + +Notes on SDL2 version 2.0.4 +---------------------------------------------- + +This version of ScummVM is built against SDL2, and stable version 2.0.4 is +recommended. Previous versions could have mouse input bugs on the Pi. +Using SDL 1.x on the Pi is buggy, even if a hacky dispmanx (native 2D API) +backend exists, it's not recommended at all. + +For this reason, a Pi-version-gnostic of libSDL2-2.0.so.0 (will work on a Pi1, +Pi2 or Pi3) is included until the Raspbian people finally include SDL 2.0.4 +with the system by default. +That's why you should run scummvm using the scummvm.sh script instead of +running the binary directly. diff --git a/dists/raspberrypi/scummvm.sh b/dists/raspberrypi/scummvm.sh new file mode 100755 index 0000000000..b21df5cd9a --- /dev/null +++ b/dists/raspberrypi/scummvm.sh @@ -0,0 +1,2 @@ +#!/bin/sh +LD_LIBRARY_PATH=./lib ./scummvm diff --git a/doc/cz/PrectiMe b/doc/cz/PrectiMe index 030ddac916..bdb9b1aed6 100644 --- a/doc/cz/PrectiMe +++ b/doc/cz/PrectiMe @@ -1,2135 +1,2138 @@ -\rPХEФTIMФ ScummVM
-------------------------------------------------------------------------
-
-Pro vУce informacУ, seznamy kompatibility, podrobnosti o dotacУch, nejnovФjХЁУ verze,
-novinky o vУНvoji a dalХЁУ, prosУm navХЁtivte domovskou strУЁnku ScummVM na: <http://www.scummvm.org/>
-
-
-Obsah:
-------
-1.0) Уvod
- * 1.1 O ScummVM
- * 1.2 RychlУН nУЁvod
- * 1.3 NejФastФjХЁУ otУЁzky
-2.0) Kontakt
- * 2.1 HlУЁХЁenУ chyb
-3.0) PodporovanУЉ hry
- * 3.1 Ochrana proti kopУrovУЁnУ
- * 3.2 DatovУЉ soubory
- * 3.3 PoznУЁmky ke hrУЁm Multi-CD
- * 3.4 ZnУЁmУЉ problУЉmy
- * 3.5 PoznУЁmky k Beneath a Steel Sky
- * 3.6 PoznУЁmky ke hrУЁm Broken Sword
- * * 3.6.1 Broken Sword
- * * 3.6.2 Broken Sword II
- * * 3.6.3 Videa zТ her Broken Sword
- * * 3.6.4 Videa her Broken Sword ve zpФtnУЉm pohledu
- * 3.7 PoznУЁmky k Day of the Tentacle
- * 3.8 PoznУЁmky k Discworld II
- * 3.9 PoznУЁmky k DraФУ Historie
- * 3.10 PoznУЁmky k Flight of the Amazon Queen
- * 3.11 PoznУЁmky ke Gobliiins
- * 3.12 PoznУЁmky k Inherit the Earth: Quest for the Orb
- * 3.13 PoznУЁmky k Maniac Mansion na Apple II/NES
- * 3.14 PoznУЁmky k Mickey's Space Adventure
- * 3.15 PoznУЁmky k Nippon Safes Inc. na Amiga
- * 3.16 PoznУЁmky k Simon the Sorcerer
- * 3.17 PoznУЁmky k The Curse of Monkey Island
- * 3.18 PoznУЁmky k The Feeble Files
- * 3.19 PoznУЁmky k The Legend of Kyrandia
- * 3.20 PoznУЁmky k Troll's Tale
- * 3.21 PoznУЁmky k Winnie the Pooh
- * 3.22 PoznУЁmky k PХedvУdavУЉmu VstupnУmu Dialogu her Sierra AGI
- * 3.23 Titulky a hlasy soubФХОnФ v hrУЁch Sierra SCI
- * 3.24 PoznУЁmky k hrУЁm Zork
- * 3.25 PoznУЁmky ke hrУЁm Commodore64
- * 3.26 PoznУЁmky ke hrУЁm Macintosh
-4.0) PodporovanУЉ platformy
-5.0) SpuХЁtФnУ ScummVM
- * 5.1 MoХОnosti pХУkazovУЉho ХУЁdku
- * 5.2 Volby jazyka
- * 5.3 GrafickУЉ filtry
- * 5.4 GlobУЁlnУ menu
- * 5.5 KlУЁvesovУЉ zkratky
-6.0) UloХОenУЉ hry
- * 6.1 AutomatickУЉ uklУЁdУЁnУ
- * 6.2 PХevod uloХОenУНch her
- * 6.3 ZobrazenУ/NaФtenУ uloХОenУНch her z pХУkazovУЉho ХУЁdku
-7.0) Hudba a zvuk
- * 7.1 Emulace AdLib
- * 7.2 Emulace FluidSynth MIDI
- * 7.3 Emulace MT-32
- * 7.4 Emulace MIDI
- * 7.5 PХirozenУЁ podpora MIDI
- * * 7.5.1 PouХОitУ voleb MIDI pro pХizpХЏsobenУ vУНstupu pХirozenУЉho MIDI
- * 7.6 Podpora nativnУho UNIX, ALSA a sekvenceru dmedia
- * * 7.6.1 Sekvencer ALSA [POUZE UNIX]
- * * 7.6.2 Sekvencer dmedia IRIX [POUZE UNIX]
- * 7.7 Podpora MIDI serveru TiMidity++
- * 7.8 PouХОitУ komprimovanУНch zvukovУНch souborХЏ (MP3, Ogg Vorbis, Flac)
- * * 7.8.1 PouХОitУ souborХЏ MP3 pro zvuky z CD
- * * 7.8.2 PouХОitУ souborХЏ Ogg Vorbis pro zvuky z CD
- * * 7.8.3 PouХОitУ souborХЏ Flac pro zvuky z CD
- * * 7.8.4 KomprimovУЁnУ MONSTER.SOU pomocУ MP3
- * * 7.8.5 KomprimovУЁnУ MONSTER.SOU pomocУ Ogg Vorbis
- * * 7.8.6 KomprimovУЁnУ MONSTER.SOU pomocУ Flac
- * * 7.8.7 KomprimovУЁnУ hudby/zvukХЏ/hlasХЏ v hrУЁch AGOS
- * * 7.8.8 KomprimovУЁnУ hlasХЏ/hudby v Broken Sword
- * * 7.8.9 KomprimovУЁnУ hlasХЏ/hudby v Broken Sword II
- * 7.7 Podpora MIDI serveru TiMidity++
- * 7.8 PouХОitУ komprimovanУНch zvukovУНch souborХЏ (MP3, Ogg Vorbis, Flac)
- * 7.9 VУНstupnУ vzorkovacУ kmitoФet
-8.0) Soubor sТ nastavenУm
- * 8.1 RozpoznУЁvanУЁ klУФovУЁ slova nastavenУ
- * 8.2 VlastnУ hernУ volby, kterУЉ mohou bУНt pХepУnУЁny pomoci grafickУЉho rozhranУ
-9.0) SestavenУ
-10.0) PodФkovУЁnУ
-
-
-1.0) Уvod:
----- -----
-
-1.1) O ScummVM:
----- ----------
-ScummVM je program, kterУН VУЁm umoХОХuje spouХЁtФt urФitУЉ klasickУЉ grafickУЉ point-and-click adventury, za pХedpokladu, ХОe jiХО mУЁte jejich datovУЉ soubory. A teФ ta chytrУЁ ФУЁst: ScummVM jenom nahrazuje spouХЁtФФe, kterУЉ jsou dodУЁvУЁny se hrou, coХО VУЁm umoХОХuje hrУЁt hry vТ systУЉmech, pro kterУЉ nikdy nebyly navrХОeny!
-
-PХЏvodnФ byl navrХОen pro spouХЁtФnУ her SCUMM od LucasArts SCUMM, jako napХ. Maniac Mansion, Monkey Island, Day of the Tentacle nebo Sam and Max. SCUMM znamenУЁ 'NУЁstroj pro VytvУЁХenУ Skriptu pro Maniac Mansion', coХО byla prvnУ hra, pro kterou LucasArts tento systУЉm navrhl. A mnohem pozdФji dal svУЉ jmУЉno ScummVM ('VM' znamenУЁ VirtuУЁlnУ Stroj).
-
-Postupem Фasu byla pХidУЁna podpora pro spoustu her mimo SCUMM a
-ScummVM nynУ takУЉ podporuje mnoho AGI a SCI her od Sierra (napХ. King's Quest 1-6, Space Quest 1-5, ...), Discworld 1 a 2, Simon the Sorcerer 1 and 2, Beneath A Steel Sky, Lure of the Temptress, Broken Sword I a II, Flight of the Amazon Queen, Gobliiins 1-3, sУЉrie The Legend of Kyrandia, mnoho ze SCUMMТ her pro dФti od Humongous Entertainment (vФetnФ her Freddi Fish a Putt Putt) a mnoho dalХЁУch. Na strУЁnce kompatibility mХЏХОete najУt УКplnУН seznam sТ podrobnostmi, kterУЉ adventury jsou podporovУЁny a jak dobХe. ScummVM je neustУЁle zlepХЁovУЁn a proto navХЁtФvujte naХЁe strУЁnky Фasto.
-
-Mezi systУЉmy, na kterУНch mХЏХОete tyto hrУЁt, jsou bФХОnУЉ stolnУ poФУtaФe (majУcУ Windows, Linux, Mac OS X, ...), hernУ konzole
-(Dreamcast, Nintendo DS a Wii, PS2, PSP, ...), chytrУЉ telefony (Android,
-iPhone, PocketPC, Symbian ...) a dalХЁУ.
-
-VТ souФasnosti je ScummVM stУЁle velkou ФУЁstУ ve vУНvoji. NezapomeХte, ХОe i kdyХО se snaХОУme zajistit, aby mnoho her bylo moХОno dokonФit pouze sТ pУЁr vУЁХОnУНmi chybami, pУЁdy programu mohou nastat a my neposkytujeme ХОУЁdnУЉ zУЁruky. PХes to vХЁechno, nФkterУЉ hry byly podporovУЁny po dlouhou dobu
-A mФly by fungovat vТ poХУЁdku seТ vХЁemi novФjХЁУmi stabilnУmi verzemi. Jak dobХe bude hra ve ScummVM fungovat mХЏХОete zjistit prohlУЉdnutУm strУЁnky kompatibility.
-VlastnФ, pokud budete troХЁiФku hledat, mХЏХОete zjistit, ХОe ScummVM je pouХОУvУЁn i komerФnФ pro znovu vydУЁnУ nФkterУНch podporovanУНch her na modernУch platformУЁch. To ukazuje, ХОe i nФkolik spoleФnostУ je spokojeno sТ kvalitou softwaru a jako moc dobХe mХЏХОe nФkterУЉ hry spouХЁtФt.
-
-Pokud mУЁte ScummVM rУЁdi, mХЏХОete ho podpoХit dotacУ pomocУ tlaФУtka PayPal na strУЁnce ScummVM. To nУЁm pomХЏХОe zakoupit nУЁstroje potХebnУЉ ke snadnФjХЁУmu a rychlejХЁУmu vУНvoji ScummVM. Pokud nemХЏХОete podpoХit dotacУ, pomozte a pХispФjte zУЁplatou!
-
-1.2) RychlУН nУЁvod:
----- -------------
-Pro ty netrpФlivУЉ zТ VУЁs je tu nУЁvod, jak ScummVM spustit vТ nФkolika krocУch.
-
-1. StУЁhnФte si ScummVM z <http://www.scummvm.org/downloads.php> a nainstalujte ho.
-
-2. Na VaХЁem pevnУЉm disku vytvoХte sloХОku a zkopУrujte datovУЉ soubory zТ pХЏvodnУho mУЉdia do tУЉto sloХОky. Zopakujte pro vХЁechny hry, kterУЉ chcete hrУЁt
-
-3. SpusХЅte ScummVM, zvolte 'PХidat hru', zvolte adresУЁХ sТ datovУНmi soubory hry (nesnaХОte se volit datovУЉ soubory samotnУЉ!) a stisknФte
-'Zvolit'.
-
-4. MФlo by se objevit dialogovУЉ okno umoХОХujУcУ VУЁm pozmФnit rХЏznУЁ nastavenУ, pokud tak chcete (i kdyХО by mФlo bУНt vТ poХУЁdku vХЁechno nechat ve vУНchozУm nastavenУ). DialogovУЉ okno potvrФte.
-
-5. VТ seznamu vyberte hru, kterou chcete hrУЁt a stisknФte 'Spustit'.
-
-VТ budoucnu byste mФli bУНt schopni pХeskoФit na krok 5, pokud nechcete pХidat dalХЁУ hry.
-
-Rada: Pokud chcete pХidat vУce her najednou, zkuste stisknout a drХОet klУЁvesu shift pХedtУm, neХО kliknete na 'PХidat hru' т tlaФУtko se zmФnУ na 'HromadnУЉ PХidУЁnУ' a pokud ho stisknФte, jste znovu poХОУЁdУЁni o zvolenУ sloХОky, ale tentokrУЁt ScummVM prohledУЁ vХЁechny podsloХОky pro podporovanУЉ hry.
-
-
-1.3) NejФastФjХЁУ otУЁzky
----- ------------------
-Na <http://www.scummvm.org/faq/> jsme pro VУЁs pХipravili seznam nejФastФjХЁУch otУЁzek a jejich odpovФdУ.
-
-
-2.0) Kontakt:
----- --------
-NejjednoduХЁХЁУm zpХЏsobem, jak kontaktovat tУНm ScummVM je pХedloХОenУm hlУЁХЁenУ o chybФ (viz oddУl 2.1) nebo pouХОitУm naХЁich fУГr na <http://forums.scummvm.org>.
-MХЏХОete se takУЉ pХipojit a odesУlat a e-maily na korespondenФnУ seznam scummvm-devel, nebo si s nУЁmi popovУdejte na IRC (#scummvm na irc.freenode.net) NeХОУЁdejte nУЁs, prosУm, o podporu nefungujУcУ hry т nejdХУve si pХeФtФte nejФastФjХЁУ otУЁzky na naХЁУ strУЁnce
-
-2.1) HlУЁХЁenУ chyb:
----- -------------
-Abyste mohli nahlУЁsit chybu, nejdХУve si, prosУme, vytvoХte si УКФet na SourceForge a kliknФte na odkaz "Bug Tracker" na naХЁУ strУЁnce. UjistФte se, prosУm, ХОe se chyba dУЁ znovu zjistit a stУЁle se objevuje vТ nejnovФjХЁУ verzi git/dennУho sestavenУ. TakУЉ na naХЁУ strУЁnce zkontrolujte seznam znУЁmУНch problУЉmХЏ (nУХОe) a seznam kompatibility pro tuto hru, abyste se ujistili, ХОe problУЉm jiХО nenУ znУЁm:
-
- <http://www.scummvm.org/compatibility>
-
-ProsУme, nenahlaХЁujte chyby ve hrУЁch, kterУЉ nejsou vТ seznamu vТ sekci 'Supported Games' nebo seznamu kompatibility uvedeny jako dokonФitelnУЉ. My тvУme-, ХОe tyto hry majУ chyby.
-
-ZahrХte, prosУm, nУЁsledujУcУ informace:
- - Verzi ScummVM (PROSУME, vyzkouХЁejte nejnovФjХЁУ sestavenУ git/Daily)
- - Podrobnosti o chybФ, vФetnФ postupu na jejУ znovu opakovУЁnУ
- - Jazyk hry (angliФtina, nФmФina, ...)
- - Verze hry (s ХeФУ, z diskety, ...)
- - Platforma a kompilУЁtor (Win32, Linux, FreeBSD, ...)
- - Pokud moХОno, pХiloХОte uloХОenou hru
- - Pokud se tato chyba objevila pouze nedУЁvno, poznamenejte si poslednУ verzi bez chyby a prvnУ verzi sТ touto chybou. Takto ji mХЏХОeme rychle spravit tУm, ХОe se podУvУЁme na provedenУЉ zmФny.
-
-Nakonec prosУme, abyste kaХОdou chybu nahlaХЁovali samostatnФ; neohlaХЁujte nФkolik chyb vТ jednom hlУЁХЁenУ. (Jinak bude obtУХОnУЉ sledovat stav kaХОdУЉ jednotlivУЉ chyby).
-
-
-3.0) PodporovanУЉ hry:
----- ----------------
-VТ tuto chvУli je o nУЁsledujУcУch hrУЁch znУЁmo, ХОe fungujУ a mФly by bУНt hratelnУЉ aХО dokonce.
-PodrobnФjХЁУ seznam kompatibility podporovanУНch her mХЏХОete nalУЉzt na adrese:
-
- <http://www.scummvm.org/compatibility/>)
-
-
-Hry od LucasArts (SCUMM):
- Maniac Mansion [maniac]
- Zak McKracken and the Alien Mindbenders [zak]
- Indiana Jones and the Last Crusade [indy3]
- Loom [loom]
- Passport to Adventure [pass]
- The Secret of Monkey Island [monkey]
- Monkey Island 2: LeChuck's Revenge [monkey2]
- Indiana Jones and the Fate of Atlantis [atlantis]
- Day of the Tentacle [tentacle]
- Sam & Max Hit the Road [samnmax]
- Full Throttle [ft]
- The Dig [dig]
- The Curse of Monkey Island [comi]
-
-Hry od Activision (MADE):
- Leather Goddesses of Phobos 2 [lgop2]
- The Manhole [manhole]
- Return to Zork [rtz]
- Rodney's Funscreen [rodney]
-
-Hry od Adventuresoft/Horrorsoft (AGOS):
- Elvira - Mistress of the Dark [elvira1]
- Elvira II - The Jaws of Cerberus [elvira2]
- Personal Nightmare [pn]
- Simon the Sorcerer 1 [simon1]
- Simon the Sorcerer 2 [simon2]
- Simon the Sorcerer's Puzzle Pack
- - Demon In My Pocket [dimp]
- Simon the Sorcerer's Puzzle Pack
- - Jumble [jumble]
- Simon the Sorcerer's Puzzle Pack
- - NoPatience [puzzle]
- Simon the Sorcerer's Puzzle Pack
- - Swampy Adventures [swampy]
- The Feeble Files [feeble]
- Waxworks [waxworks]
-
-Hry od Coktel Vision (GOB):
- Bargon Attack [bargon]
- Fascination [fascination]
- Geisha [geisha]
- Gobliiins [gob1]
- Gobliins 2 [gob2]
- Goblins 3 [gob3]
- Lost in Time [lostintime]
- Once Upon A Time: Little Red Riding Hood [littlered]
- Playtoons: Bambou le sauveur de la jungle [bambou]
- The Bizarre Adventures of Woodruff
- and the Schnibble [woodruff]
- Urban Runner [urban]
- Ween: The Prophecy [ween]
-
-Hry od Revolution Software (RХЏznУЉ):
- Beneath a Steel Sky [sky]
- Broken Sword: The Shadow of the Templars [sword1]
- Broken Sword II: The Smoking Mirror [sword2]
- Lure of the Temptress [lure]
-
-Hry od Sierra (AGI a pХed AGI):
- The Black Cauldron [bc]
- Gold Rush! [goldrush]
- King's Quest I [kq1]
- King's Quest II [kq2]
- King's Quest III [kq3]
- King's Quest IV [kq4]
- Leisure Suit Larry in the Land of the
- Lounge Lizards [lsl1]
- Mixed-Up Mother Goose [mixedup]
- Manhunter 1: New York [mh1]
- Manhunter 2: San Francisco [mh2]
- Police Quest I: In Pursuit of the Death
- Angel [pq1]
- Space Quest I: The Sarien Encounter [sq1]
- Space Quest II: Vohaul's Revenge [sq2]
- Hry od fanouХЁkХЏ [agi-fanmade]
- Mickey's Space Adventure [mickey]
- Troll's Tale [troll]
- Winnie the Pooh in the Hundred Acre Wood [winnie]
-
-Hry od Sierra Entertainment (SCI):
- Castle of Dr. Brain [castlebrain]
- Codename: ICEMAN [iceman]
- Conquests of Camelot [camelot]
- Conquests of the Longbow [longbow]
- EcoQuest: The Search for Cetus [ecoquest]
- EcoQuest 2: Lost Secret of the Rainforest [ecoquest2]
- Freddy Pharkas: Frontier Pharmacist [freddypharkas]
- Hoyle's Book of Games 1 [hoyle1]
- Hoyle's Book of Games 2 [hoyle2]
- Hoyle's Book of Games 3 [hoyle3]
- Hoyle Classic Card Games [hoyle4]
- Jones in the Fast Lane [jones]
- King's Quest I [kq1sci]
- King's Quest IV [kq4sci]
- King's Quest V [kq5]
- King's Quest VI [kq6]
- Laura Bow: The Colonel's Bequest [laurabow]
- Laura Bow 2: The Dagger of Amon Ra [laurabow2]
- Leisure Suit Larry 1 [lsl1sci]
- Leisure Suit Larry 2 [lsl2]
- Leisure Suit Larry 3 [lsl3]
- Leisure Suit Larry 5 [lsl5]
- Leisure Suit Larry 6 [lsl6]
- Mixed-up Fairy Tales [fairytales]
- Mixed-up Mother Goose [mothergoose]
- Pepper's Adventures in Time [pepper]
- Police Quest 1 [pq1sci]
- Police Quest 2 [pq2]
- Police Quest 3 [pq3]
- Quest for Glory 1/Hero's Quest [qfg1]
- Quest for Glory 1 [qfg1vga]
- Quest for Glory 2 [qfg2]
- Quest for Glory 3 [qfg3]
- Slater & Charlie Go Camping [slater]
- Space Quest I [sq1sci]
- Space Quest III [sq3]
- Space Quest IV [sq4]
- Space Quest V [sq5]
- The Island of Dr. Brain [islandbrain]
-
-DalХЁУ hry:
- 3 Skulls of the Toltecs [toltecs]
- Amazon: Guardians of Eden [access]
- Beavis and Butt-head in Virtual Stupidity [bbvs]
- Blue Force [blueforce]
- Broken Sword: The Return of the Templars [sword25]
- Bud Tucker in Double Trouble [tucker]
- Chivalry is Not Dead [chivalry]
- Cruise for a Corpse [cruise]
- DreamWeb [dreamweb]
- Discworld [dw]
- Discworld 2: Missing Presumed ...!? [dw2]
- Dragon History [draci]
- Drascula: The Vampire Strikes Back [drascula]
- Eye of the Beholder [eob]
- Eye of the Beholder II: The Legend of
- Darkmoon [eob2]
- Flight of the Amazon Queen [queen]
- Future Wars [fw]
- Hopkins FBI [hopkins]
- Hugo's House of Horrors [hugo1]
- Hugo 2: Whodunit? [hugo2]
- Hugo 3: Jungle of Doom [hugo3]
- I Have No Mouth, and I Must Scream [ihnm]
- Inherit the Earth: Quest for the Orb [ite]
- Lands of Lore: The Throne of Chaos [lol]
- Mortville Manor [mortevielle]
- Nippon Safes Inc. [nippon]
- Rex Nebular and the Cosmic Gender Bender [nebular]
- Ringworld: Revenge Of The Patriarch [ringworld]
- Return to Ringworld [ringworld2]
- Sfinx [sfinx]
- Soltys [soltys]
- The Journeyman Project: Pegasus Prime [pegasus]
- The Legend of Kyrandia [kyra1]
- The Legend of Kyrandia: The Hand of Fate [kyra2]
- The Legend of Kyrandia: Malcolm's Revenge [kyra3]
- The Lost Files of Sherlock Holmes: The Case
- of the Serrated Scalpel [scalpel]
- The Lost Files of Sherlock Holmes: The Case
- of the Rose Tattoo [rosetattoo]
- The Neverhood [neverhood]
- The 7th Guest [t7g]
- TeenAgent [teenagent]
- Toonstruck [toon]
- Tony Tough and the Night of Roasted Moths [tony]
- Touche: The Adventures of the Fifth
- Musketeer [touche]
- Voyeur [voyeur]
- Zork: Grand Inquisitor [zgi]
- Zork Nemesis: The Forbidden Lands [znemesis]
-
-Hry od Humongous Entertainment (SCUMM):
- Backyard Baseball [baseball]
- Backyard Baseball 2001 [baseball2001]
- Backyard Baseball 2003 [baseball2003]
- Backyard Football [football]
- Backyard Football 2002 [football2002]
- Bear Stormin' [brstorm]
- Big Thinkers First Grade [thinker1]
- Big Thinkers Kindergarten [thinkerk]
- Blue's 123 Time Activities [Blues123Time]
- Blue's ABC Time Activities [BluesABCTime]
- Blue's Art Time Activities [arttime]
- Blue's Birthday Adventure [BluesBirthday]
- Blue's Reading Time Activities [readtime]
- Fatty Bear's Birthday Surprise [fbear]
- Fatty Bear's Fun Pack [fbpack]
- Freddi Fish 1: The Case of the Missing
- Kelp Seeds [freddi]
- Freddi Fish 2: The Case of the Haunted
- Schoolhouse [freddi2]
- Freddi Fish 3: The Case of the Stolen
- Conch Shell [freddi3]
- Freddi Fish 4: The Case of the Hogfish
- Rustlers of Briny Gulch [freddi4]
- Freddi Fish 5: The Case of the Creature
- of Coral Cove [freddicove]
- Freddi Fish and Luther's Maze Madness [maze]
- Freddi Fish and Luther's Water Worries [water]
- Let's Explore the Airport with Buzzy [airport]
- Let's Explore the Farm with Buzzy [farm]
- Let's Explore the Jungle with Buzzy [jungle]
- Pajama Sam: Games to Play on Any Day [pjgames]
- Pajama Sam 1: No Need to Hide When It's
- Dark Outside [pajama]
- Pajama Sam 2: Thunder and Lightning
- Aren't so Frightening [pajama2]
- Pajama Sam 3: You Are What You Eat
- From Your Head to Your Feet [pajama3]
- Pajama Sam's Lost & Found [lost]
- Pajama Sam's Sock Works [socks]
- Putt-Putt Enters the Race [puttrace]
- Putt-Putt Goes to the Moon [puttmoon]
- Putt-Putt Joins the Circus [puttcircus]
- Putt-Putt Joins the Parade [puttputt]
- Putt-Putt Saves the Zoo [puttzoo]
- Putt-Putt Travels Through Time [putttime]
- Putt-Putt and Pep's Balloon-O-Rama [balloon]
- Putt-Putt and Pep's Dog on a Stick [dog]
- Putt-Putt & Fatty Bear's Activity Pack [activity]
- Putt-Putt's Fun Pack [funpack]
- SPY Fox 1: Dry Cereal [spyfox]
- SPY Fox 2: Some Assembly Required [spyfox2]
- SPY Fox 3: Operation Ozone [spyozon]
- SPY Fox in Cheese Chase [chase]
- SPY Fox in Hold the Mustard [mustard]
-
-NУЁsledujУcУ hry by mФly jУt spustit, ale zatУm nejsou УКplnФ hratelnУЉ. Hrajte je pouze na vlastnУ riziko a prosУme, abyste pro tyto hry nenahlaХЁovali chyby.
-Pokud chcete mУt nejnovФjХЁУ zprУЁvy o kompatibilitУЁch her, navХЁtivte naХЁУ strУЁnku a prohlУЉdnФte si tabulku kompatibilit.
-
- Backyard Soccer [soccer]
- Backyard Soccer MLS [soccermls]
- Backyard Soccer 2004 [soccer2004]
- Blue's Treasure Hunt [BluesTreasureHunt]
-
-Hry Composer od Animation Magic:
- Darby the Dragon [darby]
- Gregory and the Hot Air Balloon [gregory]
- Magic Tales: Liam Finds a Story [liam]
- The Princess and the Crab [princess]
- Sleeping Cub's Test of Courage [sleepingcub]
-
-Hry Living Books:
- Aesop's Fables: The Tortoise and the Hare [tortoise]
- Arthur's Birthday [arthurbday]
- Arthur's Teacher Trouble [arthur]
- Dr. Seuss's ABC [seussabc]
- Green Eggs and Ham [greeneggs]
- Harry and the Haunted House [harryhh]
- Just Grandma and Me [grandma]
- Little Monster at School [lilmonster]
- Ruff's Bone [ruff]
- Sheila Rae, the Brave [sheila]
- Stellaluna [stellaluna]
- The Berenstain Bears Get in a Fight [bearfight]
- The Berenstain Bears in the Dark [beardark]
- The New Kid on the Block [newkid]
-
-NУЁsledujУcУ hry jsou odvozeny od jУЁdra SCUMM, ale ScummVM je nepodporuje (zatУm):
-
- Moonbase Commander
-
-NezapomeХte, prosУm, ХОe jУЁdra mohou obsahovat chyby a nezavedenУЉ funkce, kterУЉ nФkdy zabrУЁnУ hru dokonФit. UklУЁdejte Фasto a nahlaste chyby, prosУm (instrukce pro hlУЁХЁenУ chyb jsou vУНХЁe), pokud na takovou chybu narazУte v 'podporovanУЉ' hХe.
-
-
-3.1) Ochrana proti kopУrovУЁnУ:
----- -------------------------
-TУНm ScummVM nepodporuje pirУЁtstvУ. NicmУЉnФ existujУ pХУpady, kdy hernУ spoleФnosti (jako LucasArts) sami ve svУНch hrУЁch poskytujУ 'cracknutУЉ'
-spouХЁtФФe т vТ tФchto pХУpadech datovУЉ soubory obsahujУ skripty pro ochranu proti kopУrovУЁnУ, ale pХevadФФ je obejde (toto mХЏХОe podobnФ provУЁdФt nelegУЁlnФ cracknutУЁ verze, sТ tУm rozdУlem, ХОe zde toto provedl vУНrobce hry. Neexistuje ХОУЁdnУН zpХЏsob, jak mХЏХОeme rozliХЁit legitimnУ a pirУЁtskУЉ datovУЉ soubory, takХОe vТ hrУЁch, o kterУНch vУme, ХОe byla nФkdy prodУЁvУЁna cracknutУЁ verze pХЏvodnУho pХevadФФe bude ScummVM muset vХОdy ochranu pХeskoФit.
-
-VТ nФkterУНch pХУpadech ScummVM pХesto zobrazУ obrazovku ochrany proti kopУrovУЁnУ. Zkuste zadat jakoukoli odpovФФ. Je tu moХОnost, ХОe toto bude fungovat.
-
-ScummVM pХeskakuje ochranu vТ nУЁsledujУcУch hrУЁch:
-
- * Beneath a Steel Sky
- -- potlaФeno sТ laskavУНm svolenУm Revolution Software.
- * Dreamweb
- -- seznam dostupnУНch pХУkazХЏ v terminУЁlech ve hХe je nynУ zobrazen
- kdyХО hrУЁФ pouХОije pХУkaz 'help'
- * Inherit the Earth: Quest for the Orb (Floppy version)
- -- potlaФeno sТ laskavУНm svolenУm Wyrmkeep Entertainment,
- protoХОe byla potlaФena ve vХЁech vydУЁnУch hry na CD.
- * Loom (EGA DOS)
- * Maniac Mansion
- * Monkey Island 2: LeChuck's Revenge
- * Simon the Sorcerer 1 (Floppy version)
- * Simon the Sorcerer 2 (Floppy version)
- -- potlaФeno sТ laskavУНm svolenУm Adventure Soft,
- protoХОe byla potlaФena ve vХЁech vydУЁnУch hry na CD.
- * The Secret of Monkey Island (VGA)
- * Waxworks
- * Zak McKracken and the Alien Mindbenders
-
-
-3.2) DatovУЉ soubory
----- --------------
-Pro pХehlednУН seznam poХОadovanУНch datovУНch souborХЏ u podporovanУНch her navХЁtivte:
-
-<http://wiki.scummvm.org/index.php/Datafiles>
-
-
-3.3) PoznУЁmky ke hrУЁm Multi-CD:
----- --------------------------
-ObecnФ ScummVM moc dobХe nefunguje s hrami na Multi-CD. To je proto, ХОe ScummVM pХedpoklУЁdУЁ, ХОe vХЁechno o hХe mХЏХОe bУНt nalezeno vТ jednУЉ sloХОce. I kdyХО ScummVM mУЁ schopnost poХОУЁdat uХОivatele, aby vymФnil CD, pХЏvodnУ spouХЁtФФ souboru vФtХЁinou nainstaluje malУЉ mnoХОstvУ souborХЏ na pevnУН disk. Pokud tyto soubory nelze najУt na vХЁech CD, ScummVM bude mУt potУХОe.
-
-NaХЁtФstУ mХЏХОe ScummVM hry bez problУЉmХЏ spouХЁtФt pХУmo zТ pevnУЉho disku, pokud vytvoХУte sloХОku se sprУЁvnou kombinacУ souborХЏ. VФtХЁinou, kdyХО se soubor objevУ na vУce, neХО jednom CD mХЏХОete vybrat jeden z nich.
-
-
-3.4) ZnУЁmУЉ ProblУЉmy:
----- ---------------
-Toto vydУЁnУ mУЁ nУЁsledujУcУ znУЁmУЉ problУЉmy. NenУ tХeba je ohlaХЁovat, i kdyХО zУЁplaty pro jejich opravu jsou vУtУЁny. Pokud objevУte chybu, kterУЁ nenУ zde vТ seznamu, ani nenУ vТ seznamu kompatibility na internetovУЉ strУЁnce, prohlУЉdnФte si, prosУm, ФУЁst o hlУЁХЁenУ chyb.
-
- Hry CD Audio:
- - PХi hranУ her, kterУЉ pouХОУvajУ CD Audio (hry FM-TOWNS, Loom CD, atd) mХЏХОe u uХОivatelХЏ Microsoft Windows 2000/XP dochУЁzet kТ nУЁhodnУНm pУЁdХЏm. To je dУky dlouhotrvajУcУ chybФ Windows, kterУЁ mУЁ za nУЁsledek poХЁkozenУЉ soubory
- pХi ФtenУ z CD. Abyste se tomuto vyhnuli, zkopУrujte, prosУm, soubory na pevnУН disk
-
- Verze FM-TOWNS:
- - Verze KandХОi vyХОaduje ROM pУsma FM-TOWNS
-
- Loom:
- - VypnutУ titulkХЏ pomocУ souboru nastavenУ je nevypne spolehlivФ, protoХОe skripty Loom je znovu automaticky zapnou
- - Podpora MIDI ve verzi EGA vyХОaduje aktualizaci Roland LucasArts
- - Verze KandХОi na PC-Engine vyХОaduje rom systУЉmovУЉ karty
-
- The Secret of Monkey Island:
- - Podpora MIDI ve verzi EGA vyХОaduje aktualizaci Roland LucasArts
-
- Beneath a Steel Sky:
- - Verze pro Amiga nejsou podporovУЁny
- - Demoverze zТ diskety nejsou podporovУЁny
- - NenУ chyba: Ve verzi na CD chybУ vТ jistУНch dialozУch ХeФ, to je normУЁlnУ.
-
- Elvira - Mistress of the Dark:
- - Ve verzi pro Atari ST nefunguje hudba
-
- Elvira II - The Jaws of Cerberus:
- - Ve verzi pro Atari ST nefunguje hudba
- - Ve verzi pro PC nefungujУ zvukovУЉ efekty
- - Ve verzi pro Atari ST jsou problУЉmy s paletou
-
- Inherit the Earth: Quest for the Orb:
- - Verze pro Amiga nejsou podporovУЁny
-
- Lure of the Temptress:
- - ХНУЁdnУЁ podpora Roland MT-32
- - Podpora zvuku nenУ dokonФena a neznУ jako v pХЏvodnУ hХe
-
- Simon the Sorcerer 1:
- - VТ anglickУНch a nФmeckУНch verzУch na CD nejsou titulky dostupnУЉ, protoХОe jim vФtХЁina titulkХЏ chybУ.
-
- Simon the Sorcerer 2:
- - Kombinace ХeФi a titulkХЏ Фasto zpХЏsobУ, ХОe ХeФ je pХeruХЁena brzo, toto je omezenУ pХЏvodnУ hry.
- - Ve verzУch pro Amiga a Macintosh je podporovУЁn pouze vУНchozУ jazyk datovУНch souborХЏ (angliФtina).
-
- Simon the Sorcerer's Puzzle Pack:
- - ХНУЁdnУЁ podpora pro zobrazovУЁnУ, zadУЁvУЁnУ, uklУЁdУЁnУ, Фi naФУtУЁnУ nejvyХЁХЁУch skУГre.
- - ХНУЁdnУЁ podpora pro zobrazovУЁnУ nУЁzvХЏ poloХОek, kdyХО na nФ najedete myХЁУ ve Swampy Adventures.
-
- The Feeble Files:
- - Titulky jsou Фasto nedokonФenУЉ. VТ pХЏvodnУ hХe byly vХОdy zakУЁzУЁny.
-
- The Legend of Kyrandia:
- - Ve verzУch na disketФ pro Mac nenУ ХОУЁdnУЁ hudba ani zvukovУЉ efekty.
- - CD Macintosh pouХОУvУЁ zahrnutou hudbu a zvukovУЉ efekty z DOS.
-
- Hry Humongous Entertainment:
- - Pouze pХЏvodnУ rozhranУ pro uloХОenУ a naФtenУ mohou bУНt pouХОity.
- - ХНУЁdnУЁ podpora pro hru vУce hrУЁФХЏ nebo tisknutУ obrУЁzkХЏ
-
-
-3.5) PoznУЁmky k Beneath a Steel Sky:
----- -------------------------------
-Od ScummVM 0.8.0 potХebujete dodateФnУН soubor 'SKY.CPT', abyste mohli Beneath a Steel Sky spustit.
-
-Tento soubor je dostupnУН na strУЁnce 'Downloads' domovskУЉ strУЁnky ScummVM.
-MХЏХОete ho umУstit buФ do sloХОky obsahujУcУ ostatnУ datovУЉ soubory (SKY.DNR, SKY.DSK), na VaХЁi dodateФnou cestu, nebo do sloХОky. Kde se nachУЁzУ spouХЁtФcУ soubor ScummVM.
-
-
-3.6) PoznУЁmky ke hrУЁm Broken Sword:
----- ------------------------------
-Pokyny pro hry Broken Sword jsou pro verze od Sold-Out Software, kde kaХОdУЁ hra je na dvou CD, protoХОe tyto verze byly nejdostupnФjХЁУ vТ dobФ, kdy je ScummVM zaФal podporovat. DoufУЁme, ХОe jsou dostateФnФ obecnУЉ pro pouХОitУ i vТ jinУНch vydУЁnУch her.
-
-
-3.6.1) Broken Sword:
------- -------------
-Pro tuto hru budete potХebovat vХЁechny soubory ze seskupenУ sloХОek na obou CD. Pro verze Windows a Macintosh budete takУЉ potХebovat soubory speech.clu ze sloХОek speech, ale protoХОe soubory nejsou stejnУЉ, budete je muset pХejmenovat na speech1.clu a speech2.clu z CD 1 a 2 vТ tomto poХadУ. Verze na PlayStation vyХОaduje speech.tab, speech.dat, speech.lis, a speech.inf.
-
-DУЁle verze pro Windows a Macintosh vyХОadujУ podsloХОku music se vХЁemi soubory z podsloХОek music na obou CD. NФkterУЉ zТ tФchto souborХЏ se objevujУ na obou CD, ale vТ tФchto pХУpadech jsou buФ stejnУЉ, nebo, vТ jednom pХУpadФ, je tУЉmФХ stejnУН, ХОe to nemУЁ ХОУЁdnУН vУНznam. Verze pro PlayStation vyХОaduje tunes.dat a tunes.tab.
-
-
-3.6.2) Broken Sword II:
------- ----------------
-Pro tuto hru budete potХebovat vХЁechny soubory ze seskupenУ sloХОek na obou CD. (Abych pravdu Хekl, pУЁr zТ nich nemusУ bУНt nezbytnФ nutnУЉ, ale ty, o kterУНch nemУЁm jistotu, jsou velmi malУЉ.)
-Je takУЉ tХeba pХejmenovat soubory speech.clu a music.clu na speech1.clu, speech2.clu, music1.clu a music2.clu, aby ScummVM mohl zjistit, kterУЉ jsou z CD 1 a kterУЉ z CD 2. VХЁechny ostatnУ soubory, kterУЉ jsou umУstФny vТ seskupenУ sloХОek, jsou stejnУЉ. PouХОijte kterУЉkoli soubory chcete.
-
-KromФ toho budete potХebovat soubory cd.inf a, pХУpadnФ, startup.inf ze sloХОky sword2 na CD 1.
-
-
-3.6.3) Videa zТ her Broken Sword:
------- -------------------------
-Videa pro hry Broken Sword majУ vТ sobФ trochu historie (viz dalХЁУ oddУl, pokud jste zvФdavУ), ale obecnФ jedinУЉ, co potХebujete udФlat, je zkopУrovat soubory .SMK ze sloХОek "SMACKS" nebo "SMACKSHI" na CD do stejnУЉ sloХОky jako ostatnУ datovУЉ soubory hry. (Broken Sword mУЁ takУЉ sloХОku "SMACKSLO" se stejnУНmi videi, ale ty jsouТ niХОХЁУ kvality.) MХЏХОete je umУstit do podsloХОky sТ nУЁzvem "video", pokud VУЁm to pХijde hezФУ.
-
-Ve verzУch pro PlayStation, mХЏХОete pХЏvodnУ videa vypsat z disku. KaХОdУН soubor, kterУН mУЁ pХУponu "STR", byste mФli vypsat jako *Фist* sektory z disku (vХЁech 2352 bajtХЏ na sektor). MХЏХОete takУЉ mУst toho pouХОУt pХeformУЁtovanУЁ videa, kterУЁ jsou zmУnФna nУХОe, ale to nebude fungovat pro vХЁechny videa v Broken Sword II. Pro vУce informacУ si prohlУЉdnФte:
-
- <http://wiki.scummvm.org/index.php/HOWTO-PlayStation_Videos>
-
-NФkterУЁ vydУЁnУ hry, a takУЉ verze pro PlayStation, Smacker videa nemajУ. Revolution Software nУЁm laskavФ dovolilo poskytovat pХeformУЁtovanУЁ videa ke staХОenУ na naХЁУ strУЁnce:
-
- <http://www.scummvm.org/downloads.php>
-
-Tato videa jsou poskytovУЁna ve formУЁtu DXA se zvukem ve formУЁtu FLAC. Jejich kvalita se rovnУЁ originУЁlu dУky pouХОitУ bezztrУЁtovУЉ komprese. ZobrazenУ tФchto videУ vyХОaduje, aby verze ScummVM byla sestavena sТ podporou FLAC i zlib.
-
-Pro systУЉmy, kterУЉ jsou pХУliХЁ pomalУЉ, aby zvlУЁdli dekУГdovat formУЁt FLAC byl zvuk videУ takУЉ poskytnut oddФlenФ ve formУЁtu OGG Vorbis audio. Toto vyХОaduje, aby verze ScummVM byla sestavena sТ podporou libVorbis a zlib.
-
-Pro Broken Sword takУЉ poskytujeme pХУdavek pro titulky. JednoduХЁe ho rozbalte a nУЁsledujte pokyny v souboru readme.txt. BalУФek vТ souФasnosti nefunguje ve videУch na PlayStation. (Broken Sword II jiХО titulky mУЁ; nenУ tХeba dalХЁУ prУЁce pro jejich pХidУЁnУ.)
-
-
-3.6.4) Videa her Broken Sword ve zpФtnУЉm pohledu:
------- ------------------------------------------
-PХЏvodnУ vydУЁnУ her Broken Sword pouХОУvalo formУЁt SmackerтЂ od RAD Game Tools. ProtoХОe spoleФnost RAD nebyla ochotna nУЁm otevХУt starХЁУ zastaralУЉ verze tohoto formУЁtu a poХОУЁdala, abychom neprovУЁdФli jeho zpФtnou analУНzu, museli jsme nalУЉzt jinУЉ ХeХЁenУ.
-
-V Broken Sword II bylo moХОnУЉ pХehrУЁt ХeФ, aniХО by se muselo pХehrУЁvat video. To zХЏstalo jako nouzovУЉ ХeХЁenУ aХО do ScummVM 1.0.0, ale pro vХЁechny stabilnУ verze to nikdy nebylo jedinУЉ ХeХЁenУ.
-
-Ve ScummVM 0.6.0 jsme pouХОУvali MPEG, coХО zajistilo rozumnУН kompromis mezi velikostУ a kvalitou. Ve ScummVM 0.10.0 bylo toto nahrazeno DXA
-(pХЏvodnФ pХidУЁno pro "The Feeble Files" od AdventureSoft). To nУЁm dalo moХОnost zajistit videa ve stejnУЉ kvalitФ jako pХЏvodnУ, za cenu vФtХЁУ velikosti.
-
-Nakonec na zaФУЁtku roku 2006 byl formУЁt Smacker zpФtnФ analyzovУЁn pro projekt FFmpeg. DУky jejich tvrdУЉ prУЁci ScummVM 1.0.0 nynУ podporuje pХЏvodnУ videa. ZУЁroveХ byla ukonФena podpora MPEG. ZТ technickУЉho hlediska je toto dobХe, protoХОe pХehrУЁvУЁnУ videУ MPEG bylo velmi sloХОitУЉ a stejnФ nevypadaly tak dobХe jako verze ve formУЁtu DXA a Smacker.
-
-
-3.7) PoznУЁmky k Day of the Tentacle:
----- -------------------------------
-
-Na jednom mУstФ ve hХe narazУte na poФУtaФ umoХОХujУcУ si zahrУЁt pХЏvodnУ Maniac Mansion jako bonus. ScummVM toto podporuje, ale je tХeba upozornit na pУЁr vФcУ:
-
-ScummVM prohledУЁ vУЁХЁ soubor s nastavenУm hledajУc hru nachУЁzejУcУ se v podsloХОce 'Maniac' ve sloХОce hry Day of the Tentacle. Pokud jste zkopУrovali datovУЉ soubory z CD verze, tato struktura by jiХО mФla bУНt
-vytvoХena, navУc ale budete muset hru pХidat takУЉ do ScummVM.
-
-Pro nУЁvrat do Day of the Tentacle, stisknФte F5 a zvolte "NУЁvrat do spouХЁtФФe".
-
-Teoreticky toto znamenУЁ, ХОe je moХОnУЉ spustit jakoukoli hru jako bonus. Vskutku tomu tak je. Existuje "tajnУЁ" volba nastavenУ, "easter_egg", kterУЁ mФnУ ID spouХЁtФnУЉ hry. BuФte ale opatrnУ, protoХОe ne vХЁechny hry podporujУ
-nУЁvrat do spouХЁtФФe, a nedoporuФuje se nastavovat spuХЁtФnУ samotnУЉ hry Day of the Tentacle jako bonus.
-
-
-3.8) PoznУЁmky k Discworld II:
----- ------------------------
-
-Pro tuto hru potХebujete vХЁechny soubory z podsloХОky DW2 na obou CD.
-DУЁle je tХeba zkopУrovat soubor SAMPLE.BNK.
-
-Je tХeba pХejmenovat soubory ENGLISH.SMP, ENGLISH.IDX a ENGLISH.TXT na CD1 na ENGLISH1.SMP, ENGLISH1.IDX a ENGLISH1.txt.
-To samУЉ provУЉst se soubory z CD2 a pХejmenovat je na ENGLISH2.SMP, ENGLISH2.IDX a ENGLISH2.TXT.
-
-
-3.9) PoznУЁmky k DraФУ Historie:
----- --------------------------
-ExistujУ 4 jazykovУЉ varianty tУЉto hry: ФeskУЁ, anglickУЁ, polskУЁ a nФmeckУЁ. KaХОdУЁ je umУstФna vТ oddФlenУЉm archivu. JedinУЁ oficiУЁlnУ verze je ФeskУЁ, a anglickУЁ, polskУЁ a nФmeckУЁ byly vХОdycky nedokonФenУЉ prУЁce a nikdy nebyly oficiУЁlnФ vydУЁny. I kdyХО texty byly zcela pХeloХОeny, je znУЁmo, ХОe nФkterУЉ zТ nich obsahujУ pХeklepy.
-
-Pro tuto hru existuje nepovinnУН ФeskУН dabing. ZТ dХЏvodu velikosti si ho mХЏХОete dodateФnФ stУЁhnout a pak ho rozbalit do adresУЁХe hry. MХЏХОete takУЉ ФeskУН dabing poslouchat se vХЁemi jazykovУНmi varianty hry, zatУmco Фtete titulky.
-
-VХЁechny hernУ soubory a nУЁvody mХЏХОou bУНt staХОeny z:
-
-<http://www.ucw.cz/draci-historie/index-en.html>
-
-
-3.10) PoznУЁmky k Flight of the Amazon Queen:
------ --------------------------------------
-Abyste mohli pouХОУt tu verzi, kterУЁ nenУ volnФ ХЁiХitelnУЁ (z pХЏvodnУho CD), musУte mУt soubor 'queen.tbl' (dostupnУН ze strУЁnky 'Downloads' naХЁУ domovskУЉ strУЁnky) a umУstit ho buФ do sloХОky obsahujУcУ soubor hry 'queen.1',
-na VaХЁi dodateФnou cestu, nebo do sloХОky. Kde se nachУЁzУ spouХЁtФcУ soubor ScummVM.
-
-TakУЉ mХЏХОete pouХОУt nУЁstroj 'compress_queen' zТ balУФku nУЁstrojХЏ pro 'znovu sestavenУ' VaХЁeho datovУЉho souboru FOTAQ pro zahrnutУ tabulky pro tuto konkrУЉtnУ verzi, ФУmХО odstranУte zУЁvislost na soubor 'queen.tbl' pХi spuХЁtФnУ. Tento nУЁstroj VУЁm takУЉ umoХОХuje komprimovat ХeФ a zvukovУЉ efekty do formУЁtu MP3, OGG nebo FLAC.
-
-
-3.11) PoznУЁmky ke Gobliiins:
------ ----------------------
-CD verze sУЉrie Gobliiins obsahuje jednu velkou zvukovou stopu, kterou je tХeba vyjmout (viz oddУl o pouХОitУ komprimovanУНch zvukovУНch souborХЏ) a zkopУrovat ji do hernУ sloХОky, pokud chcete ve hХe hudbu, aniХО byste museli CD mУt stУЁle v jednotce. VТ tУЉto stopФ je takУЉ ХeФ a jejУ hlasitost se tedy takУЉ mФnУ podle hlasitosti hudby.
-
-
-3.12) PoznУЁmky k Inherit the Earth: Quest for the Orb:
------ ------------------------------------------------
-Abyste mohli spustit verzi pro Mac OS X od Wyrmkeep musУte data zkopУrovat zТ CD na VУЁХЁ pevnУН disk. Pokud pouХОУvУЁte PC, pak se podУvejte na:
-
- <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 "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
-
-Ve starУЉ verzi pro Mac OS 9 potХebujete soubory zkopУrovat ve formУЁtu MacBinary, protoХОe by mФli obsahovat jak zdrojovУЉ, tak datovУЉ vidlice. ZkopУrujte vХЁechny soubory 'ITE *'.
-
-
-3.13) PoznУЁmky ke Maniac Mansion na Apple II/NES:
------ -------------------------------------------
-Apple II:
-Je tХeba pХejmenovat obraz disku 1 na maniac1.dsk
-Je tХeba pХejmenovat obraz disku 2 na maniac2.dsk
-
-NES:
-PodporovanУЉ verze jsou BritskУЁ angliФtina (E), FrancouzХЁtina (F), NФmФina (G), ItalХЁtina (I), Х vУЉdХЁtina (SW) a AmerickУЁ angliФtina (U). ScummVM pro spuХЁtФnУ vyХОaduje pouze ФУЁst PRG a ne celУН ROM.
-
-Abyste mohli hru spustit, musУte vyjmout prvnУch 16 bajtХЏ zТ ROM, sТ kterУНm pracujete. JakУНkoli hex editor bude fungovat, pokud mХЏХОete kopУrovat/vklУЁdat. PotУЉ. Co ROM otevХete pomocУ hex editoru, zkopУrujte vХЁechno zТ druhУЉho ХУЁdku (17. bajt) na konec. PotУЉ, co toto provedete, vloХОte ho do novУЉho hex souboru. Pojmenujte ho "Maniac Mansion (XX).prg" kde XX znamenУЁ verzi, se kterou pracujete (E, F, G, I, SW, nebo U). KoneФnУЁ velikost by mФla bУНt pХesnФ 262144 bajtХЏ.
-
-Pokud hru pХidУЁvУЁte ruФnФ, ujistФte se, ХОe platforma je nastavena na NES.
-
-NejbФХОnФjХЁУ chyby, kterУЉ zabraХujУ spuХЁtФnУ hry:
-
- * Х patnУН soubor
- * ROM byl extrahovУЁn pomocУ nУЁstrojХЏ z verze 0.7.0
- * SnaХОУte se do ScummVM vklУЁdat CELУ ROM a ne jenom PRG ФУЁst.
-
-Je takУЉ moХОno extrahovat oddФlenУЉ soubory LFL zТ PRG ФУЁsti. Pro toto pouХОijte nУЁstroj 'extract_mm_nes' zТ balУФku nУЁstrojХЏ.
-
-
-3.14) PoznУЁmky k Mickey's Space Adventure:
------ ------------------------------------
-Abyste mohli Mickey's Space Adventure hrУЁt ve ScummVM, potХebujete spolu sТ datovУНmi soubory hry takУЉ pХЏvodnУ spouХЁtФФ (mickey.exe).
-
-Pro tuto hru ve ScummVM, existuje rozХЁУХenУЁ podpora myХЁi, i kdyХО vТ pХЏvodnУ hХe takovУЁto podpora nebyla. PoloХОky menu mohou bУНt vybrУЁny pomocУ myХЁi a je takУЉ moХОnУЉ se myХЁУ pХesunout do jinУНch mУst. KdyХО se kurzor myХЁi nachУЁzУ na okraji obrazovky, zФervenУЁ, pokud je moХОnУЉ jУt vТ tomto smФru. HrУЁФ pak mХЏХОe jednoduХЁe kliknout na okraje hernУ obrazovky pro zmФnu mУsta, podobnФ jako mnoho adventur, coХО je jednoduХЁХЁУ a pХУmoФaХejХЁУ neХО pohyb pomocУ menu.
-
-
-3.15) Nippon Safes Inc. Amiga notes:
------ ------------------------------
-Pro tuto hru potХebujete disk0, soubory global.table a pointer a it (en, fr, ge pro mezinУЁrodnУ verzi).
-
-DУЁle je tХeba pХejmenovat obraz disku 2 na disk1, obraz disku 3 na disk2, obraz disku 4 na disk3 a obraz disku 5 na disk4.
-
-
-3.16) PoznУЁmky k Simon the Sorcerer 1 a 2:
------ ------------------------------------
-Pokud mУЁte dvojitou verzi Simon the Sorcerer 1 nebo 2 na CD, verzi pro Windows naleznete vТ hlavnУ sloХОce na CD a verzi pro DOS ve sloХОce DOS na CD.
-
-
-3.17) PoznУЁmky k The Curse of Monkey Island:
------ --------------------------------------
-Pro tuto hru budete potХebovat soubory comi.la0, comi.la1 a comi.la2.
-Soubor comi.la0 mХЏХОete nalУЉzt na vХЁech CD hry, ale protoХОe jsou stejnУЉ, mХЏХОete pouХОУt kterУНkoli z nich.
-
-DУЁle potХebujete vytvoХit podsloХОku "resource" obsahujУcУ vХЁechny soubory z тobou- podsloХОek "resource" na dvou CD. NФkterУЉ soubory se objevujУ na obou CD, ale znovu jsou stejnУЉ.
-
-
-3.18) PoznУЁmky k The Feeble Files:
------ ----------------------------
-Amiga/Macintosh:
-MusУte nainstalovat malУН balУФek videУ, kterУЉ chybУ v obou tФchto verzУch tУЉto hry. Jmenuje se "The Feeble Files - Omni TV and epilogue cutscenes for the Amiga and Macintosh versions"
-a lze ho zУskat zde:
-
- <http://www.scummvm.org/games/#feeble>
-
-Windows:
-Pokud mУЁte verzi pro Windows, je tХeba si uvФdomit pУЁr vФcУ.
-
-Mnoho souborХЏ, kterУЉ hra vyХОaduje, je uloХОeno v souboru InstallShield s nУЁzvem data1.cab, kterУН ScummVM nemХЏХОe rozbalit. Budete muset pouХОУt pХЏvodnУ instalУЁtor, nebo i5comp pro rozbalenУ obsahu tohoto souboru. NУЁstroj pro dekomprimaci i5comp mХЏХОe bУНt nalezen pХi hledУЁnУ na internetu.
-
-Abyste mohli pouХОУt soubory sТ ХeФУ ve ScummVM, musУ bУНt pХejmenovУЁny nУЁsledovnФ:
-PХejmenovat voices.wav na CD1 na voices1.wav
-PХejmenovat voices.wav na CD2 na voices2.wav
-PХejmenovat voices.wav na CD3 na voices3.wav
-PХejmenovat voices.wav na CD4 na voices4.wav
-
-3.19) PoznУЁmky k The Legend of Kyrandia:
------ ----------------------------------
-Abyste mohli spustit The Legend of Kyrandia ve ScummVM potХebujete soubor 'kyra.dat'.
-Soubor by mФl bУНt vХОdycky souФУЁstУ oficiУЁlnУch balУФkХЏ ScummVM. V pХУpadФ, ХОe ScummVM
-nahlУЁsУ, ХОe soubor chybУ, mХЏХОete ho najУt na strУЁnce ScummVM v sekci 'Downloads'.
-NezapomeХte, ХОe souФasnУЁ verze ScummVM pro Windows by mФla soubor obsahovat ve spouХЁtФФi a tudУХО ho
-musУte mУt pouze, kdyХО ScummVM soubor nemХЏХОe nalУЉzt.
-
-
-3.20) PoznУЁmky k Troll's Tale:
------ ------------------------
-PХЏvodnУ hra vychУЁzela na zavУЁdФcУm disku PC, proto je nutnУЉ vypsat obsah tohoto disku jako obraz disku a pХejmenovat ho na "troll.img", abyste tuho hru mohli hrУЁt ve ScummVM.
-
-
-3.21) Winnie the Pooh notes:
------ ----------------------
-Je moХОnУЉ importovat uloХОenУЉ hry zТ pХЏvodnУ hry do ScummVM.
-
-Pro tuto hru ve ScummVM, existuje rozХЁУХenУЁ podpora myХЁi, i kdyХО vТ pХЏvodnУ hХe takovУЁto podpora nebyla. PoloХОky menu mohou bУНt vybrУЁny pomocУ myХЁi a je takУЉ moХОnУЉ se myХЁУ pХesunout do jinУНch mУst. KdyХО se kurzor myХЁi nachУЁzУ na okraji obrazovky, zФervenУЁ, pokud je moХОnУЉ jУt vТ tomto smФru. HrУЁФ pak mХЏХОe jednoduХЁe kliknout na okraje hernУ obrazovky pro zmФnu mУsta, podobnФ jako mnoho adventur, coХО je jednoduХЁХЁУ a pХУmoФaХejХЁУ neХО pohyb pomocУ menu.
-
-
-3.22) PoznУЁmky kТ PХedvУdavУЉmu VstupnУmu Dialogu her Sierra AGI:
------ ---------------------------------------------------------
-PХedvУdavУН VstupnУ Dialog je pomХЏcka ScummVM pro spouХЁtФnУ her pouХОУvajУcУ jУЁdro AGI (kterУН je znУЁm, ХОe vyХОaduje vstup zТ pХУkazovУЉ ХУЁdky) na zaХУzenУch sТ omezenou podporou klУЁvesnice. VТ tФchto situacУch, kdy zadУЁvУЁnУ pomocУ emulovanУЉ klУЁvesnice je dosti УКnavnУЉ, mХЏХОou bУНt pХУkazy rychle a snadno zadУЁny pomocУ PХedvУdavУЉho VstupnУho Dialogu.
-
-Abyste zapnuli pХedvУdavУН vstup v hrУЁch AGI, potХebujete zkopУrovat soubor pred.dic do dodateФnУЉ sloХОky ScummVM nebo do sloХОky hry, kterou chcete hrУЁt. Tento slovnУk byl vytvoХen analУНzou vХЁech znУЁmУНch her AGI a obsahuje maximУЁlnУ sadu bФХОnУНch slov.
-
-Pokud je slovnУk zjiХЁtФn, je PХedvУdavУН VstupnУ Dialog zobrazen buФ pХi kliknutУ na oblast pХУkazovУЉho ХУЁdku (kdykoliv je poХОadovУЁn vstup klУЁvesnice, i vТ rУЁmeФcУch dialogovУНch oken), nebo v nФkterУНch verzУch pro jinУЉ systУЉmy stisknutУm urФenУЉ klУЁvesovУЉ zkratky.
-
-PХedvУdavУН VstupnУ Dialog pracuje ve tХech reХОimech, kterУЉ jsou pХepУnУЁny tlaФУtkem (*)Pre/123/Abc. HlavnУ vstupnУ metodou je pХedvУdavУН reХОim
-(Pre), kterУН pХipomУnУЁ "rychlУЉ zadУЁvУЁnУ" vТ mobilnУch telefonech.
-Abeceda je rozdФlena do 9 sad, kterУЉ pХirozenФ odpovУdajУ 9 klУЁvesУЁm ФУselnУЉ klУЁvesnice (0 je mezera). Pro psanУ slova zmУЁФknФte jednou ФУslo sady, kterУЁ obsahuje pУsmeno slova, kterУЉ chcete napsat, pak pokraФujete kТ dalХЁУmu. NapХУklad, pokud chcete napsat pХУkaz 'look', mФli byste zmУЁФknout 5665. Jak postupnФ pУХЁete ФУselnУН kУГd zamУНХЁlenУЉho slova, je slovnУk prohledУЁvУЁn pro znУЁmУЁ slova, kterУЁ se shodujУ sТ VaХЁУm vstupem aХО do tohoto bodu. Jak maФkУЁte vУce klУЁves, slovnУk se pХiblУХОУ ke sprУЁvnУЉmu slovu. To je dХЏvod, proФ vypsanУЉ slovo se mХЏХОe nУЁhle zmФnit mezi stisky klУЁves. NФkdy se ale vyskytnou pХУpady, kdy vУce neХО jedno slovo mУЁ stejnУЉ ФУselnУЉ zastoupenУ. NapХУklad slova 'quit' a 'suit' odpovУdajУ stejnУНm ФУslХЏm, a to 7848. VТ tФchto pХУpadech se rozsvУtУ tlaФУtko dalХЁУ
-(#). Jeho stisknutУm mХЏХОete prochУЁzet seznam slov, kterУЁ sdУlejУ stejnУН kУГd a nakonec pХijmout to sprУЁvnУЉ stisknutУm (0)mezera nebo tlaФУtka Ok.
-
-Druhou vstupnУ metodou (123) je ФУselnУН vstup: KaХОdou klУЁvesu, kterou stisknФte, je doslova zadУЁna jako ФУslo.
-
-TХetУ vstupnУ metodou (Abc) je vstupnУ reХОim Alfa/opakovanУЉho stisknutУ tlaФУtka. Tento reХОim je urФen pro zadУЁvУЁnУ textu bez pomoci od slovnУku pХedvУdavУЉho reХОimu (Pre). Text je zadУЁvУЁn po jednotlivУНch pУsmenech. Pro kaХОdУЉ pУsmeno nejdХУve stisknФte ФУslo sady, kterУЉ obsahuje pУsmeno, kterУЉ chcete, pak pouХОijte tlaФУtko dalХЁУ (#) pro prochУЁzenУ pУsmeny a opakujte sТ dalХЁУm ФУslem. NapХУklad, pro zadУЁnУ slova 'look' musУte stisknout nУЁsledujУcУ: 5##6##6##5#
-
-DialogovУЉ okno je plnФ pouХОitelnУЉ pomocУ myХЁi, ale vТ nФkterУНch verzУch ScummVM pro jinУЉ platformy, je pouХОitУ dialogu pohodlnФjХЁУ pomocУ ФУselnУЉ klУЁvesnice. NФkterУЁ tlaФУtka dialogu mohou bУНt takУЉ pouХОУvУЁna pomocУ ХЁipkovУНch klУЁves a enter.
-
-
-3.23) Titulky a hlasy soubФХОnФ v hrУЁch Sierra SCI:
------ --------------------------------------------
-UrФitУЉ CD verze her Sierra SCI majУ textovУЁ i hlasovУЁ data.
-NФkterУЉ z nich majУ volbu pro pХepУnУЁnУ mezi nimi, ale existujУ pХУpady
-kde nenУ moХОnost povolit oba najednou. Ve ScummVM je moХОnУЉ si uХОУt tento
-kombinovanУН reХОim, kde jsou zvuk i text zobrazeny souФasnФ. Tento reХОim
-mХЏХОe bУНt povolen v nastavenУ zvuku ScummVM, ale kaХОdУЁ hra se chovУЁ jinak
-vzhledem k povolenУ textu a hlasu.
-
-Hry na CD, kde zvuk i titulky lze zobrazit souФasnФ:
- EcoQuest 1 CD
- Freddy Pharkas CD
- King's Quest 6 CD
- Laura Bow 2 CD
- Leisure Suit Larry 6 CD
- Space Quest 4 CD
-
-EcoQuest 1 CD:
- Hlas i text lze zapnout pomocУ volby "Mode" v oknФ nastavenУ,
- nebo pХes nastavenУ zvuku ScummVM.
-
-Freddy Pharkas CD:
- Ve hХe neexistuje moХОnost pro povolenУ hlasu a textu. Pro tuto funkci
- je tХeba pouХОУt nastavenУ zvuku ve ScummVM. NФkterУЉ mluvenУЉ dialogy
- chybУ v textech hry.
-
-King's Quest 6 CD
- Hlas i text lze zapnout pomocУ volby "Mode" v oknФ nastavenУ (kde je ve
- ScummVM pХidУЁna dodateФnУЁ volba "Dual"), nebo pomocУ nastavenУ
- zvuku ve ScummVM.
-
-Laura Bow 2 CD
- Hlas i text lze zapnout pomocУ volby "Mode" v oknФ nastavenУ (kde je ve
- ScummVM pХidУЁna dodateФnУЁ volba "Dual"), nebo pomocУ nastavenУ
- zvuku ve ScummVM.
-
-Leisure Suit Larry 6 CD
- Ve hХe lze povolit buФ hlas, nebo hlas a text. Neexistuje moХОnost pro
- povolenУ textu. Pouze nastavenУ zvuku ve ScummVM lze pouХОУt pro
- zobrazenУ jen titulkХЏ.
-
-Space Quest 4 CD:
- Hlas a text lze povolit pomocУ tlaФУtka "Display Mode" v
- nastavenУ hry, nebo pomocУ nastavenУ zvuku ve ScummVM.
-
-
-3.24) PoznУЁmky ke hrУЁm Zork:
------ ----------------------
-Pro spuХЁtФnУ podporovanУНch her Zork (Zork Nemesis: The Forbidden Lands a Zork: Grand Inquisitor) musУte zkopУrovat nФkterУЁ (dodateФnУЁ) data do odpovУdajУcУch umУstФnУ.
-
-Zork Nemesis: The Forbidden Lands
-
-VХЁechny verze
-
-StУЁhnФte si balУФek pУsem Liberation(tm)
-<https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-2.00.1.tar.gz>
-a rozbalte vХЁechny soubory ttf do vaХЁУ dodateФnУЉ sloХОky ScummVM.
-Nebo si stУЁhnФte balУФek GNU FreeFont TTF
-<https://ftp.gnu.org/gnu/freefont/freefont-ttf.zip> a umУstФte vХЁechny soubory ttf z adresУЁХe sfd do dodateФnУЉ sloХОky ScummVM, i kdyХО je tХeba ХУci, ХОe v souФasnУЉ dobФ
-majУ nФkterУЁ tato pУsma potУХОe pХi vykreslovУЁnУ.
-StУЁhnФte si opravu pro titulky
-<http://www.thezorklibrary.com/installguides/znpatch.zip> a rozbalte adresУЁХ addon pХУmo do koХenovУЉho adresУЁХe hry
-
-Verze z GoG
-
-PouХОijte instalУЁtor GoG, ХОУЁdnУНch dalХЁУch krokХЏ nenУ tХeba
-
-Verze z CD
-
-ZkopУrujte nУЁsledujУcУ z adresУЁХe nemesis na CD1 do koХenovУЉho adresУЁХe hry:
-AdresУЁХ znemmx
-AdresУЁХ znemscr
-nemesis.str
-Z CD1 zkopУrujte adresУЁХ zassets do koХenovУЉho adresУЁХe hry
-Z CD2 zkopУrujte adresУЁХ zassets do koХenovУЉho adresУЁХe hry a nahraФte vХЁechny soubory
-Z CD3 zkopУrujte adresУЁХ zassets do koХenovУЉho adresУЁХe hry a nahraФte vХЁechny soubory
-
-Verze z DVD
-
-ZkopУrujte nУЁsledujУcУ z adresУЁХe nemesis do koХenovУЉho adresУЁХe hry:
-AdresУЁХ znemmx
-AdresУЁХ znemscr
-nemesis.str
-PoznУЁmka: Je tХeba takУЉ pХesunout cursor.zfs z adresУЁХe zassets/global do adresУЁХe znemscr
-ZkopУrujte adresУЁХ disc2 do koХenovУЉho adresУЁХe hry
-ZkopУrujte adresУЁХ disc3 do koХenovУЉho adresУЁХe hry
-ZkopУrujte adresУЁХ zassets do koХenovУЉho adresУЁХe hry
-
-
-Zork: Grand Inquisitor
-
-VХЁechny verze
-
-StУЁhnФte si balУФek pУsem Liberation(tm)
-<https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-2.00.1.tar.gz>
-a rozbalte vХЁechny soubory ttf do vaХЁУ dodateФnУЉ sloХОky ScummVM.
-Nebo si stУЁhnФte balУФek GNU FreeFont TTF
-<https://ftp.gnu.org/gnu/freefont/freefont-ttf.zip> a umУstФte vХЁechny soubory ttf z adresУЁХe sfd do dodateФnУЉ sloХОky ScummVM, i kdyХО je tХeba ХУci, ХОe v souФasnУЉ dobФ
-majУ nФkterУЁ tato pУsma potУХОe pХi vykreslovУЁnУ.
-
-Verze z GoG
-
-PouХОijte instalУЁtor GoG, ХОУЁdnУНch dalХЁУch krokХЏ nenУ tХeba
-
-Verze z CD
-
-ZkopУrujte nУЁsledujУcУ z adresУЁХe zgi na CD1 do koХenovУЉho adresУЁХe hry:
-AdresУЁХ zgi_mx
-cursor.zfs
-death.zfs
-inquis.str
-inquis.zix
-r.svr
-scripts.zfs
-subtitle.zfs
-Z CD1 zkopУrujte adresУЁХ zassets1 do koХenovУЉho adresУЁХe hry
-Z CD2 zkopУrujte adresУЁХ zassets2 do koХenovУЉho adresУЁХe hry
-DoporuФujeme V8m nainstalovat zУЁplatu 1.2
-<http://www.thezorklibrary.com/installguides/Zpatch.exe>,
-ale je moХОnУЉ ХОe pro to budete muset hru nainstalovat normУЁlnУm zpХЏsobem, protoХОe zУЁplata mУЁ vlastnУ instalУЁtor.
-
-Verze z DVD
-
-ZkopУrujte nУЁsledujУcУ z adresУЁХe zgi_e do koХenovУЉho adresУЁХe hry:
-AdresУЁХ addon (oprava hry 1.2)
-AdresУЁХ zgi_mx
-cursor.zfs
-death.zfs
-inquis.str
-inquis.zix
-r.svr
-scripts.zfs
-subtitle.zfs
-ZkopУrujte adresУЁХ eng_mpeg (video soubory MPEG2 ve vysokУЉm rozliХЁenУ) do koХenovУЉho adresУЁХe hry
-ZkopУrujte adresУЁХ zassetsc do koХenovУЉho adresУЁХe hry
-ZkopУrujte adresУЁХ zassetse do koХenovУЉho adresУЁХe hry
-
-
-3.25) PoznУЁmky keТ hrУЁm Commodore64:
------ -----------------------------
-Jak Maniac Mansion tak Zak McKracken mohou bУНt spuХЁtФny, ale Maniac Mansion nenУ jeХЁtФ hratelnУН. JednoduХЁe pojmenujte disky D64 jako
-"maniac1.d64" a "maniac2.d64" nebo "zak1.d64" a "zak2.d64", pak by mФl ScummVM automaticky hru zjistit, pokud ho odkУЁХОete na sprУЁvnou sloХОku.
-
-Nebo mХЏХОete pouХОУt 'extract_mm_c64' zТ balУФku nУЁstrojХЏ pro extrahovУЁnУ datovУНch souborХЏ. Pak ale ScummVM hru ХУЁdnФ automaticky nezjistУ ScummVM, a musУte se ujistit, ХОe platforma je nastavena na Commodore64. DoporuФujeme pouХОУt mnohem jednoduХЁХЁУ postup popsanУН vТ pХedchozУm odstavci.
-
-
-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 "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).
-
-VТ balУФku nУЁstrojХЏ takУЉ poskytujeme nУЁstroj nazvanУН 'extract_scumm_mac', kterУН extrahuje data zТ tФchto datovУНch souborХЏ, ale toto nenУ ani potХeba, ani doporuФeno.
-
-Pro dalХЁУ informace o kopУrovУЁnУ hernУch souborХЏ Macintosh na VУЁХЁ pevnУН disk si prohlУЉdnФte:
-
- <http://wiki.scummvm.org/index.php/HOWTO-Mac_Games>
-
-
-4.0) PodporovanУЉ Platformy:
----- ----------------------
-ScummVM byl vytvoХen tak, aby mohl fungovat na mnoha platformУЁch a operaФnУch systУЉmech.
-Odkazy na tyto verze mХЏХОou bУНt nalezeny buФ na strУЁnkУЁch ScummVM nebo vyhledУЁvУЁnУm na internetu. Mnoho dУkХЏ naХЁim programУЁtorХЏm za jejich УКsilУ. Pokud mУЁte verzi ScummVM pro jinou platformu/systУЉm a chcete ho odevzdat do hlavnУho УКloХОiХЁtФ, nevУЁhejte nУЁs kontaktovat!
-
-PodporovanУЉ platformy zahrnujУ (mimo jinУЉ):
-
- UNIX (Linux, Solaris, IRIX, *BSD, ...)
- Windows
- Windows CE
- Windows Mobile (vФetnФ SmartphonХЏ a PocketPCs)
- Mac OS X
- AmigaOS
- Android
- BeOS
- Dreamcast
- GP2x
- iPhone (vФetnФ iPod Touch a iPad)
- Maemo (Nokia Internet tablet N810)
- Nintendo 64
- Nintendo DS
- Nintendo GameCube
- Nintendo Wii
- OS/2
- PlayStation 2
- PlayStation Portable
- Symbian
- WebOS
-
-Verze pro Dreamcast nepodporuje The Curse of Monkey Island, ani The Dig. Verze pro Nintendo DS nepodporuje Full Throttle, The Dig, nebo The Curse of Monkey Island.
-Pro dalХЁУ omezenУ vТ zУЁvislosti na platformФ se, prosУm, podУvejte na naХЁУ Wiki:
- <http://wiki.scummvm.org/index.php/Platforms>
-
-Ve verzi pro Macintosh je stisknutУ pravУЉho tlaФУtka myХЁi emulovУЁno pomocУ Cmd-kliknutУ (to je, ХОe stisknete tlaФУtko myХЁi pХi drХОenУ klУЁvesy
-Command/Apple/Vrtule).
-
-TakУЉ existujУ neoficiУЁlnУ verze pro rХЏznУЉ platformy, vФetnФ PlayStation 3, Xbox, a Xbox 360. NezapomeХte, ХОe my jsme tyto verze nevytvoХili, takХОe je nemХЏХОeme ani schvУЁlit ani podporovat. PouХОУvejte na vlastnУ riziko!
-
-
-5.0) SpuХЁtФnУ ScummVM:
----- -----------------
-VХЁimnФte si prosУm, ХОe ScummVM bude uloХОenУЉ hry standardnФ uklУЁdat do sloХОky zТ kterУЉ je spuХЁtФn, takХОe byste se mФli vyhnout jeho spouХЁtФnУ zТ vУce umУstФnУ. DalХЁУ informace, vФetnФ jak urФit sloХОku pro uloХОenУЉ hry pro zamezenУ tohoto problУЉmu, najdete vТ oddУlu 6.0.
-
-ScummVM mХЏХОe bУНt takУЉ spuХЁtФn pХУmo pomocУ spouХЁtФcУho souboru. VТ tomto pХУpadФ bude aktivovУЁn zabudovanУН spouХЁtФФ. OdsuФ mХЏХОete pХidat hry
-(kliknФte na 'PХidat hru'), nebo spustit ty, co uХО jsou nastaveny.
-Hry mohou bУНt takУЉ pХidУЁny ve velkУЉm mnoХОstvУ. StisknutУm shift + 'PХidat
-Hru' (VХЁimnФte si, ХОe se tlaФУtko zmФnУ na 'HromadnУЉ PХidУЁnУ'), mХЏХОete zvolit sloХОku, vТ kterУЉ zaФУt, a ScummVM se potУЉ pokusУ zjistit hry ve vХЁech podsloХОkУЁch tУЉto sloХОky.
-
-ScummVM mХЏХОe takУЉ hru spustit pХУmo pomocУ argumentХЏ pХУkazovУЉ ХУЁdky -- viz dalХЁУ ФУЁst.
-
-
-5.1) MoХОnosti pХУkazovУЉho ХУЁdku:
----- ---------------------------
-
- PouХОitУ: scummvm [MOХНNOSTI]... [HRA]
-
- [HRA] KrУЁtkУЉ jmУЉno hry pro naФtenУ. NapХУklad 'monkey'pro Monkey Island. To mХЏХОe bУНt buФ id hry, nebo uХОivatelem urФenУН cУl.
- -v, --version ZobrazУ informace o verzi ScummVM a ukonФУ se
- -h, --help ZobrazУ struФnou nУЁpovФdu a ukonФУ se
- -z, --list-games ZobrazУ seznam podporovanУНch her a ukonФУ se
- -t, --list-targets ZobrazУ seznam nastavenУНch cУlХЏ a ukonФУ se
- --list-saves=CУL ZobrazУ seznam uloХО. her pro urФenou hru (CУL)
- --console PovolУ okno konzole (vУНchozУ: zapnuto) (Pouze pro Windows)
- -c, --config=NastavenУ PouХОije jinУН soubor s nastavenУm
- -p, --path=CESTA Cesta, kde je hra nainstalovУЁna
- -x, --save-slot[=ФУSLO] Pozice uloХОenУЉ hry pro naФtenУ (vУНchozУ: automatickУЁ)
- -f, --fullscreen Vynutit reХОim celУЉ obrazovky
- -F, --no-fullscreen Vynutit reХОim do okna
- -g, --gfx-mode=REХНIM Vybere reХОim obrazu (viz takУЉ ФУЁst 5.3)
- --gui-theme=VZHLED Vybere vzhled rozhranУ (vУНchozУ, modernУ, klasickУН)
- --themepath=CESTA Cesta kde jsou vzhledy rozhranУ uloХОeny
- --list-themes ZobrazУ seznam vХЁech pouХОitelnУНch vzhledХЏ
- -e, --music-driver=REХНIM Vybere ovladaФ hudby (viz takУЉ ФУЁst 7.0)
- --list-audio-devices ZobrazУ seznam vХЁech dostupnУНch zvukovУНch zaХУzenУ
- -q, --language=JAZYK Vybere jazyk hry (viz takУЉ ФУЁst 5.2)
- -m, --music-volume=Ф. NastavУ hlasitost hudby, 0-255 (vУНchozУ: 192)
- -s, --sfx-volume=Ф. NastavУ hlasitost zvukХЏ, 0-255 (vУНchozУ: 192)
- -r, --speech-volume=Ф. NastavУ hlasitost hlasХЏ, 0-255 (vУНchozУ: 192)
- --midi-gain=Ф. NastavУ zvУНХЁenУ pro pХehrУЁvУЁnУ MIDI, 0-1000 (vУНchozУ: 100) (podporovУЁno pouze nФkterУНmi ovladaФi MIDI)
- -n, --subtitles Zapne titulky (pouХОijte vТ hrУЁch s ХeФУ)
- -b, --boot-param=Ф. PХedУЁ ФУslo zavУЁdФjУcУmu skriptu (parametr zavedenУ)
- -d, --debuglevel=Ф. NastavУ УКroveХ podrobnostУ ladФnУ
- --debugflags=PХУZNAKY PovolУ urФitУЉ pХУznaky ladФnУ jУЁdra (oddФlenУЉ ФУЁrkami)
- -u, --dump-scripts PovolУ vУНpis skriptu, pokud sloХОka s nУЁzvem 'dumps' existuje vТ souФasnУЉ sloХОce
- --cdrom=ФУSLO Jednotka CD zТ kterУЉ pХehrУЁvat CD audio (vУНchozУ: 0 = prvnУ jednotka)
- --joystick[=ФУSLO] PovolУ vstup z joysticku (vУНchozУ: 0 = prvnУ joystick)
- --platform=SLOVO UrФУ platformu hry (povolenУЉ hodnoty: 2gs, 3do, acorn, amiga, atari, c64, fmtowns, mac, nes, pc, pce, segacd, windows)
- --savepath=CESTA Cesta, kde jsou umУstФny uloХОenУЉ hry
- --extrapath=CESTA DodateФnУЁ cesta pro dalХЁУ data hry
- --soundfont=SOUBOR Vybere SoundFont pro pХehrУЁvУЁnУ MIDI (PodporovУЁno pouze nФkterУНmi ovladaФi MIDI)
- --multi-midi PovolУ kombinaci AdLib a pХirozenУЉho MIDI
- --native-mt32 PravУН Roland MT-32 (zakУЁХОe emulaci GM)
- --enable-gs PovolУ reХОim Roland GS pro pХehrУЁvУЁnУ MIDI
- --output-rate=FREKVENCE VУНstupnУ vzorkovacУ kmitoФet v Hz (napХ. 22050)
- --opl-driver=OVLADAФ Vybere emulУЁtor AdLib (OPL) (db, mame)
- --aspect-ratio PovolУ korekci pomФru stran
- --render-mode=REХНIM PovolУ dodateФnУЉ reХОimy vykreslenУ (hercGreen, hercAmber,
- cga, ega, vga, amiga, fmtowns, pc9821, pc9801, 2gs,
- atari, macintosh)
-
- --alt-intro PouХОije alternativnУ intro pro CD verze Beneath a Steel Sky a Flight of the Amazon Queen
- --copy-protection PovolУ ochranu proti kopУrovУЁnУ vТ hrУЁch, kdyХО ji ScummVM standardnФ zakazuje.
- --talkspeed=ФУSLO NastavУ zdrХОenУ mluvenУ v hrУЁch SCUMM, nebo rychlost mluvenУ vТ jinУНch hrУЁch (vУНchozУ: 60)
- --demo-mode SpustУ reХОim dema v Maniac Mansion (KlasickУЁ verze)
- --tempo=NUM NastavУ rychlost hudby (v procentech, 50-200) pro hry SCUMM (vУНchozУ: 100)
-
-
-VУНznam vХЁech dlouhУНch moХОnostУ (to jsou ty, kterУЉ zaФУnajУ dvojitou pomlФkou) mХЏХОe bУНt pХevrУЁcen, kdyХО pХed nФ pХidУЁte "no-". NapХУklad,
---no-aspect-ratio vypne korekci pomФru stran. To je uХОiteФnУЉ, kdyХО chcete potlaФit nastavenУ v souboru.
-
-KrУЁtkУЉ jmУЉno hry ('cУl hry'), kterУН vidУte na konci pХУkazovУЉho ХУЁdku, urФuje, kterУЁ hra je spuХЁtФna. BuФ odpovУdУЁ libovolnУЉmu cУli urФenУЉho uХОivatelem (ze souboru sТ nastavenУm), nebo zabudovanУЉmu id hry. KrУЁtkУН seznam zabudovanУНch id mХЏХОe bУНt nalezen v ФУЁsti list 3.0.
-
-PХУklady:
- * Win32:
- SpuХЁtФnУ Monkey Island, celУЁ obrazovka, zТ pevnУЉho disku:
- C:\Games\LucasArts\scummvm.exe -f -pC:\Games\LucasArts\monkey\ monkey
- SpuХЁtФnУ Full Throttle z CD, celУЁ obrazovka a se zapnutУНmi titulky:
- C:\Games\LucasArts\scummvm.exe -f -n -pD:\resource\ ft
-
- * Unix:
- SpuХЁtФnУ Monkey Island, celУЁ obrazovka, zТ pevnУЉho disku:
-
- /path/to/scummvm -f -p/games/LucasArts/monkey/ monkey
- SpuХЁtФnУ Full Throttle z CD, celУЁ obrazovka a se zapnutУНmi titulky:
- /path/to/scummvm -f -n -p/cdrom/resource/ ft
-
-
-5.2) Volby jazyka:
----- -------------
-ScummVM obsahuje volby jazyka pro Maniac Mansion, Zak McKracken,
-The Dig, The Curse of Monkey Island, Beneath a Steel Sky a
-Broken Sword.
-
-NezapomeХte, ХОe kromФ Beneath a Steel Sky, Broken Sword, mnohajazykovУЉ verze her Goblins a Nippon Safes Inc., pouХОitУ tУЉto moХОnosti *nezmФnУ* jazyk hry (kterУН je vФtХЁinou pevnФ zakУГdovУЁn), ale spУХЁe je pouХОita pro vybrУЁnУ sprУЁvnУЉho pУsma (napХ. pro nФmeckou verzi obsahujУcУ pХehlУЁsky).
-
-VУНjimky jsou The Dig a The Curse of Monkey Island -- neanglickУЉ
-Verze mohou bУНt nastaveny na 'English'. NicmУЉnФ toto ovlivХuje pouze titulky; ХeФ ve hХe zХЏstane stejnУЁ.
-
-Maniac Mansion a Zak McKracken
- en - AngliФtina (vУНchozУ)
- de - NФmФina
- fr - FrancouzХЁtina
- it - ItalХЁtina
- es - Х panФlХЁtina
-
-The Dig
- jp - JaponХЁtina
- zh - ФУnХЁtina
- kr - KorejХЁtina
-
-The Curse of Monkey Island
- en - AngliФtina (vУНchozУ)
- de - NФmФina
- fr - FrancouzХЁtina
- it - ItalХЁtina
- pt - PortugalХЁtina
- es - Х panФlХЁtina
- jp - JaponХЁtina
- zh - ФУnХЁtina
- kr - KorejХЁtina
-
-Beneath a Steel Sky
- gb - AngliФtina (VelkУЁ BritУЁnie) (vУНchozУ)
- en - AngliФtina (USA)
- de - NФmФina
- fr - FrancouzХЁtina
- it - ItalХЁtina
- pt - PortugalХЁtina
- es - Х panФlХЁtina
- se - Х vУЉdХЁtina
-
-Broken Sword
- en - AngliФtina (vУНchozУ)
- de - NФmФina
- fr - FrancouzХЁtina
- it - ItalХЁtina
- pt - PortugalХЁtina
- es - Х panФlХЁtina
- cz - ФeХЁtina
-
-
-5.3) GrafickУЉ filtry:
----- ----------------
-ScummVM nabУzУ nФkolik filtrХЏ vyhlazujУcУch hrany jako pokus o zlepХЁenУ obrazovУЉ kvality. Jsou to stejnУЉ filtry, kterУЉ pouХОУvУЁ i mnoho jinУНch emulУЁtorХЏ, jako MAME. Tyto filtry vezmou pХЏvodnУ grafiku hry a zvФtХЁУ ji o urФitou pevnou hodnotu (vФtХЁinou 2x nebo 3x) neХО ji VУЁm zobrazУ. TakХОe napХУklad, pokud hra pХЏvodnФ pracovala vТ rozliХЁenУ 320x200 (typickУЉ pro vФtХЁinu her SCUMM), pak pouХОitУm filtru sТ faktorem zvФtХЁenУ 2x, ve skuteФnosti dostanete rozliХЁenУ 640x400. PodobnФ sТ filtrem 3x dostanete 960x600.
-
-Jsou to:
- 1x - Bez filtrovУЁnУ, bez zvФtХЁenУ. NejrychlejХЁУ.
- 2x - Bez filtrovУЁnУ, zvФtХЁenУ 2x (vУНchozУ pro hry 640x480).
- 3x - Bez filtrovУЁnУ, zvФtХЁenУ 3x.
- 2xsai - Filtr 2xSAI, zvФtХЁenУ 2x.
- super2xsai т VylepХЁenУЉ filtrovУЁnУ 2xSAI, zvФtХЁenУ 2x.
- supereagle т MУЉnФ rozostХenУН neХО 2xSAI, ale pomalejХЁУ. ZvФtХЁenУ 2x.
- advmame2x - NespolУЉhУЁ na rozostХenУ jako 2xSAI, rychlУЉ. ZvФtХЁenУ 2x.
- advmame3x - NespolУЉhУЁ na rozostХenУ jako 2xSAI, rychlУЉ. ZvФtХЁenУ 3x.
- hq2x - Velmi hezkУЁ vysokУЁ kvalita, ale pomalУН. ZvФtХЁenУ 2x.
- hq3x - Velmi hezkУЁ vysokУЁ kvalita, ale pomalУН. ZvФtХЁenУ 3x.
- tv2x - Filtr proklУЁdУЁnУ, snaХОУ se emulovat TV. ZvФtХЁenУ 2x.
- dotmatrix - Efekt bodovУЉ matice. ZvФtХЁenУ 2x.
-
-Abyste filtr vybrali, zvolte ho ve spouХЁtФФi, nebo pХedejte scummvm jeho jmУЉno pomocУ moХОnosti '-g', napХУklad:
-
- scummvm -gadvmame2x monkey2
-
-PoznУЁmka #1: Ne vХЁechny jУЁdra podporujУ vХЁechny (nebo dokonce ХОУЁdnУЉ) zТ filtrХЏ vypsanУНch vУНХЁe; nФkterУЉ mohou podporovat i dalХЁУ. Filtry vypsanУЉ vУНХЁe jsou ty podporovanУЉ standardnУm jУЁdrem SDL.
-
-PoznУЁmka #2: Filtry mohou bУНt velmi pomalУЉ, kdyХО je ScummVM sestaven vТ nastavenУ pro ladФnУ bez optimalizacУ. PouХОitУ jakУЉkoliv formy vyhlazenУ hran/lineУЁrnУho filtrovУЁnУ bude mУt vХОdycky dopad na rychlost.
-
-PoznУЁmka #3: Verze FM-TOWNS hry Zak McKracken mУЁ pХЏvodnУ rozliХЁenУ 320x240, coХО znamenУЁ, ХОe filtry vТ tУЉto hХe budou zvФtХЁovat na 640x480
-nebo 960x720. ObdobnФ hry, kterУЉ majУ pХЏvodnУ rozliХЁenУ 640x480 (jako
-Curse of Monkey Island nebo Broken Sword) budou zvФtХЁeny na 1280x960 a
-1920x1440.
-
-
-5.4) GlobУЁlnУ menu:
----- --------------
-GlobУЁlnУ Menu je obecnУЉ menu, kterУЉ je dostupnУЉ vХЁem jУЁdrХЏm her stisknutУm Ctrl-F5. ZТ tohoto menu jsou dostupnУЉ nУЁsledujУcУ tlaФУtka: PokraФovat, Volby, O programu, NУЁvrat do SpouХЁtФФe, a UkonФit. VУНbФrem
-'Volby' bude zobrazeno dialogovУЉ okno, kde mХЏХОou bУНt upravena zУЁkladnУ nastavenУ zvuku, jako hladiny hlasitosti. VУНbФrem 'NУЁvrat do SpouХЁtФФe' souФasnou hru ukonФУ a uХОivatele navrУЁtУ do spouХЁtФФe ScummVM, kde mХЏХОe bУНt vybrУЁna dalХЁУ hra ke hranУ.
-
-PoznУЁmka: NУЁvrat do SpouХЁtФФe nenУ podporovУЁn vХЁemi jУЁdry a tlaФУtko nebude vТ GlobУЁlnУm Menu funkФnУ, pokud nenУ podporovУЁno.
-
-JУЁdra, kterУЁ vТ souФasnosti podporujУ nУЁvrat do spouХЁtФФe, jsou:
-
- AGI
- AGOS
- CINE
- COMPOSER
- CRUISE
- DRACI
- DRASCULA
- GOB
- GROOVIE
- HUGO
- KYRA
- LURE
- MADE
- MOHAWK
- PARALLACTION
- QUEEN
- SAGA
- SCI
- SCUMM
- SKY
- SWORD1
- SWORD2
- TEENAGENT
- TOUCHE
- TSAGE
- TUCKER
- ZVISION
-
-
-5.5) KlУЁvesovУЉ zkratky:
----- ------------------
-ScummVM podporuje rХЏznУЉ zkratky ve hХe. LiХЁУ se mezi rХЏznУНmi hrami SCUMM a jinУНmi hrami.
-
- SpoleФnУЉ:
- Ctrl-F5 - ZobrazУ GlobУЁlnУ Menu
- Cmd-q - UkonФit (Mac OS X)
- Ctrl-q - UkonФit (dalХЁУ unixy vФetnФ Linux)
- Ctrl-z - UkonФit (dalХЁУ platformy)
- Ctrl-u - ZeslabУ vХЁechny zvuky
- Ctrl-m - PХepУnat zachycenУ myХЁi
- Ctrl-Alt 1-8 - PХepУnat mezi grafickУНmi filtry
- Ctrl-Alt + a - - ZvФtХЁit/ZmenХЁit faktor zvФtХЁenУ
- Ctrl-Alt a - PХepУnat korekci pomФru stran. VФtХЁina her pouХОУvУЁ rozliХЁenУ 320x200 pixelХЏ, coХО mХЏХОe na vФtХЁinФ novФjХЁУch monitorХЏ vypadat splУЁcle. Korekce pomФru stran obraz roztУЁhne, aby mУsto toho pouХОil
- 320x240, nebo jeho nУЁsobky
- Alt-Enter - PХepУnУЁ celou obrazovku/do okna
- Alt-s - VytvoХit snУmek obrazovky (pouze jУЁdro SDL)
- Ctrl-F7 - OtevХУt virtuУЁlnУ klУЁvesnici (pokud povolena)
- MХЏХОe bУНt takУЉ spuХЁtФna dlouhУНm stiskem
- prostХednУho tlaФУtka nebo koleФka myХЁi.
-
- SCUMM:
- Alt-x - UkonФit
- Ctrl 0-9 a Alt 0-9 - NahrУЁt a uloХОit stav hry
- Ctrl-d - Spustit ladФnУ
- Ctrl-f - Zapnout rychlУН reХОim
- Ctrl-g - PХepnout do velmi VELMI rychlУЉho reХОimu
- Ctrl-t - PХepУnat mezi 'Pouze ХeФ',
- 'ХeФ a Titulky' a 'Pouze titulky'
- Tilda (~) - Zobrazit/skrУНt konzoli ladФnУ
- [ a ] - Hlasitost hudby, zvУНХЁit/snУХОit
- - a + - Rychlost textu, pomalejХЁУ/rychlejХЁУ
- F5 - ZobrazУ rУЁmeФek pro uloХОenУ/naФtenУ
- Alt-F5 - ZobrazУ pХЏvodnУ rУЁmeФek pro uloХОenУ/naФtenУ, pokud hra nФjakУН mУЁ. Zde mХЏХОete hru naФУst i uloХОit, nicmУЉnФ pro tento УКФel nenУ urФen a vТ nФkterУНch hrУЁch mХЏХОe zpХЏsobit pУЁd ScummVM.
- i - ZobrazУ IQ body (Indiana Jones and the Last Crusade a Indiana Jones and the Fate of Atlantis)
- MezernУk - PozastavenУ
- TeФka (.) - VТ nФkterУНch hrУЁch pХeskoФУ souФasnУН ХУЁdek textu
- Enter - Simulovat stisknutУ levУЉho tlaФУtka myХЁi
- Tab - Simulovat stisknutУ pravУЉho tlaФУtka myХЁi
-
- Beneath a Steel Sky:
- Ctrl-d - SpustУ ladФnУ
- Ctrl-f - Zapnout rychlУН reХОim
- Ctrl-g - PХepnout do velmi VELMI rychlУЉho reХОimu
- F5 - ZobrazУ rУЁmeФek pro uloХОenУ/naФtenУ
- Escape - PХeskoФУ УКvod hry
- TeФka (.) - PХeskoФУ souФasnУН ХУЁdek textu
-
- Broken Sword:
- F5 nebo Escape - ZobrazУ rУЁmeФek pro uloХОenУ/naФtenУ
-
- Broken Sword II:
- Ctrl-d - Spustit ladФnУ
- Ctrl-f - Zapnout rychlУН reХОim
- p - PozastavenУ
-
- DraФУ Historie:
- F5 - ZobrazУ GlobУЁlnУ Menu
- LevУЉ klinutУ - JУt, zkoumat
- PravУЉ klinutУ - PouХОУt, mluvit
- Posun myХЁi nahoru, i - InventУЁХ
- Posun myХЁi dolХЏ, m - Mapa
- Escape - PХeskoФУ УКvod, odejde z mapy/inventУЁХe
- JakУЉkoliv kliknutУ - PХeskoФУ souФasnФ dabovanou vФtu
- q - ZapnutУ/vypnutУ rychlУЉho chozenУ
-
- Flight of the Amazon Queen:
- Ctrl-d - Spustit ladФnУ
- Ctrl-f - Zapnout rychlУН reХОim
- F1 - PouХОУt DenУk (uklУЁdУЁnУ/naФУtУЁnУ)
- F11 - RychlУЉ naФtenУ
- F12 - RychlУЉ uklУЁdУЁnУ
- Escape - PХeskoФУ video
- MezernУk - PХeskoФУ souФasnУН ХУЁdek textu
-
- Future Wars:
- F1 - Prozkoumat
- F2 - VzУt
- F3 - InventУЁХ
- F4 - PouХОУt
- F5 - Aktivovat
- F6 - Mluvit
- F9 - Menu "Aktivovat"
- F10 - Menu "PouХОУt"
- Escape - Zobrazit menu pХУkazХЏ
-
- Nippon Safes:
- Ctrl-d - Spustit ladФnУ
- l - NaФУst hru
- s - UloХОit hru
-
- Simon the Sorcerer 1 a 2:
- Ctrl 0-9 a Alt 0-9 - NaФУst a uloХОit stav hry
- Ctrl-d - Spustit ladФnУ
- Ctrl-f - Zapnout rychlУН reХОim
- F1 - F3 - Rychlost textu, rychlejХЁУ - pomalejХЁУ
- F10 - ZobrazУ vХЁechny postavy a objekty sТ kterУНmi mХЏХОete nФco dФlat
- Escape - PХeskoФit videa
- - a + - Hlasitost hudby, snУХОit/zvУНХЁit
- m - Hudba vypnout/zapnout
- s - ZvukovУЉ efekty zapnout/vypnout
- b - Zvuky pozadУ zapnout/vypnout [Pouze Simon the Sorcerer 2]
- Pause - PozastavenУ
- t - PХepУnat mezi ХeФУ a kombinacУ ХeФi a titulkХЏ [Simon the Sorcerer 1 CD (jinУЉ neХО angliФtina a nФmФina) a Simon the Sorcerer 2 CD (vХЁechny jazyky)]
- v - PХepУnat mezi titulky a kombinacУ ХeФi a titulkХЏ [Pouze Simon the Sorcerer 2 CD]
-
- Simon the Sorcerer's Puzzle Pack:
- Ctrl-d - Spustit ladФnУ
- Ctrl-f - Zapnout rychlУН reХОim
- F12 - Zapnout/vypnout reХОim rychle rychlosti ve Swampy Adventures
- - a + - Hlasitost hudby, snУХОit/zvУНХЁit
- m - Hudba vypnout/zapnout
- s - ZvukovУЉ efekty zapnout/vypnout
- Pause - PozastavenУ
-
- The Feeble Files:
- Ctrl-d - Spustit ladФnУ
- Ctrl-f - Zapnout rychlУН reХОim
- F7 - VymФnit postavy
- F9 - Zapnout/vypnout jmУЉna hitboxХЏ
- s - ZvukovУЉ efekty zapnout/vypnout
- Pause - PozastavenУ
- t - PХepУnat mezi ХeФУ a kombinacУ ХeФi a titulkХЏ
- v - PХepУnat mezi titulky a kombinacУ ХeФi a titulkХЏ
-
- The Legend of Kyrandia:
- Ctrl 0-9 a Alt 0-9 - NaФУst a uloХОit stav hry
-
- Ctrl-d - Spustit ladФnУ
-
- TeenAgent
- F5 - ZobrazУ GlobУЁlnУ Menu
-
- Touche: The Adventures of the Fifth Musketeer:
- Ctrl-f - Zapnout rychlУН reХОim
- F5 - Zobrazit moХОnosti
- F9 - Zapnout reХОim rychlУЉ chХЏze
- F10 - Vypnout reХОim rychlУЉ chХЏze
- Escape - UkonФit
- MezernУk - PХeskoФУ souФasnУН ХУЁdek textu
- t - PХepnout mezi 'Pouze ХeФ',
- 'ХeФ a Text' a 'Pouze Text'
-
- Zork: Grand Inquisitor:
- Ctrl-s - UloХОit
- Ctrl-r - NaФУst
- Ctrl-q - UkonФit
- Ctrl-p - NastavenУ
- F1 - NУЁpovФda
- F5 - InventУЁХ
- F6 - Kniha kouzel
- F7 - SkУГre
- F8 - Zahodit souФasnУН objekt/zapomenout kouzlo
- F9 - Vyjmout minci (musУte mУt mФХЁec)
- Space - PХeskoФit videa
-
- Zork Nemesis: The Forbidden Lands:
- Ctrl-s - UloХОit
- Ctrl-r - NaФУst
- Ctrl-q - UkonФit
- Ctrl-p - NastavenУ
- Space - PХeskoФit videa
-
-NezapomeХte, ХОe pouХОУvУЁnУ Ctrl-f nebo Ctrl-g nenУ doporuФeno: hry mohou spadnout, kdyХО bФХОУ rychlostУ vyХЁХЁУ neХО jejich normУЁlnУ, protoХОe skripty ztratУ synchronizaci.
-
-PoznУЁmka pro uХОivatele WinCE: KvХЏli omezenУЉmu vstupu zТ klУЁvesnice ve vФtХЁinФ zaХУzenУ je malУЉ mnoХОstvУ klУЁvesovУНch zkratek podporovУЁno pomocУ znovu mapovУЁnУ a/nebo ФinnostУ panelХЏ. ProsУm pХeФtФte si soubor README-WinCE.txt.
-
-
-6.0) UloХОenУЉ hry:
----- ------------
-UloХОenУЉ hry jsou na nФkterУНch platformУЁch standardnФ umУstФny do souФasnУЉ sloХОky a vТ jinУНch do pХednastavenУЉ sloХОky. To mХЏХОete urФit vТ souboru sТ nastavenУm pomocУ parametru savepath. PodУvejte se na vzorovУН soubor sТ nastavenУm dУЁle vТ tomto souboru.
-
-Platformy, kterУЉ vТ souФasnosti majУ jinУЉ vУНchozУ sloХОky jsou:
- Mac OS X:
- $HOME/Documents/ScummVM Savegames/
-
- JinУЉ unixy:
- ХУdУme se specifikacemi zУЁkladnУho adresУЁХe XDG. To znamenУЁ, ХОe nastavenУ lze nalУЉzt v:
- $XDG_DATA_HOME/scummvm/saves/
-
- Pokud XDG_DATA_HOME nenУ nastaven nebo je prУЁzdnУН, bude, podle pravidel specifikace, pouХОito '~/.local/share' jako hodnota pro XDG_DATA_HOME.
-
- Pokud byla ve vaХЁem systУЉmu nainstalovУЁna dХУvФjХЁУ verze ScummVM, bude ponechУЁno pХЏvodnУ vУНchozУ umУstФnУ '~/.scummvm'.
- Program toto zjistУ nalezenУm sloХОky '~/.scummvm'ТД v cestФ.
-
- Windows Vista/7:
- \Users\uХОjmУЉno\AppData\Roaming\ScummVM\Saved games\
-
- Windows 2000/XP:
- \Documents and Settings\uХОjmУЉno\Application Data\ScummVM\Saved games\
-
- Windows NT4:
- <windir>\Profiles\uХОjmУЉno\Application Data\ScummVM\Saved games\
-
-UloХОenУЉ hry jsou ve Windows NT4/2000/XP/Vista/7 uklУЁdУЁny ve skrytУЉ sloХОce,
-do kterУЉ mХЏХОete vstoupit spuХЁtФnУm "%APPDATA%\ScummVM\Saved Games\" nebo
-povolenУm zobrazenУ skrytУНch sloХОek v PrХЏzkumnУku Windows.
-
-PoznУЁmka pro uХОivatele Windows NT4/2000/XP/Vista/7: VУНchozУ umУstФnУ uloХОenУНch her
-bylo ve ScummVM 1.5.0 zmФnФno. DУЁvkovУН soubor pХesunu mХЏХОe bУНt pouХОit pro zkopУrovУЁnУ
-uloХОenУНch her ze starУЉho vУНchozУho umУstФnУ do novУЉho.
-
-6.1) 6.1 AutomatickУЉ uklУЁdУЁnУ:
----- -------------------------
-VТ nФkterУНch hrУЁch, (a to "Beneath a Steel Sky", "Flight of the Amazon
-Queen", vХЁechny hry AGI, a vХЁechny hry SCUMM), bude ScummVM standardnФ automaticky uklУЁdat souФasnУН stav kaХОdУНch pФt minut (upravitelnУЉ pomocУ nastavenУ "autouklУЁdУЁnУ"). Pro jУЁdra AGI a SCUMM, je bude uklУЁdat do pozice 0. V jУЁdru SCUMM mХЏХОe bУНt tento uloХОenУН stav znovu naФten pomocУ Ctrl-0 nebo menu F5.
-
-
-6.2) PХevod uloХОenУНch her:
----- ---------------------
-PouХОitУ uloХОenУНch her zТ pХЏvodnУch verzУ nenУ podporovУЁno vХЁemi jУЁdry. Pouze nУЁsledujУcУ hry mohou pouХОУt pХЏvodnУ verze.
-
- Elvira 1
- - PХidejte 8 bajtХЏ (nУЁzev uloХОenУЉ hry) na zaФУЁtek souboru uloХОenУЉ hry
- - PХejmenujte ho na 'elvira1.xxx'
-
- Elvira 2
- - PХidejte 8 bajtХЏ (nУЁzev uloХОenУЉ hry) na zaФУЁtek souboru uloХОenУЉ hry
- - PХejmenujte ho na 'elvira2-pc.xxx' (verze DOS) nebo 'elvira2.xxx' (JinУЉ verze)
-
- Waxworks
- - PХidejte 8 bajtХЏ (nУЁzev uloХОenУЉ hry) na zaФУЁtek souboru uloХОenУЉ hry
- - PХejmenujte ho na 'waxworks-pc.xxx' (verze DOS) nebo 'waxworks.xxx' (JinУЉ verze)
-
- Simon the Sorcerer 1
- - PХejmenuje soubor uloХОenУЉ hry na 'simon1.xxx'
-
- Simon the Sorcerer 2
- - PХejmenuje soubor uloХОenУЉ hry na 'simon2.xxx'
-
- The Feeble Files
- - PХejmenuje soubor uloХОenУЉ hry na 'feeble.xxx'
-
-Kde 'xxx' je ФУslo pozice uloХОenУЉ hry (tj. 001) ve ScummVM
-
-
-6.3) ZobrazenУ/NaФtenУ uloХОenУНch her z pХУkazovУЉho ХУЁdku:
----- ----------------------------------------------------
-
---list-saves:
-
- Tento pХepУnaФ mХЏХОe bУНt pouХОit kТ zobrazenУ seznamu souФasnУНch uloХОenУНch her urФenУЉ cУlovУЉ hry a jejУ odpovУdajУcУ pozice.
-
- PouХОitУ: --list-saves=[CУL], kde [CУL] je cУlovУЁ hra.
-
- JУЁdra, kterУЁ vТ souФasnosti podporujУ --list-saves jsou:
-
- AGI
- AGOS
- CGE
- CINE
- CRUISE
- DRACI
- GROOVIE
- HUGO
- KYRA
- LURE
- MOHAWK
- PARALLACTION
- QUEEN
- SAGA
- SCI
- SCUMM
- SKY
- SWORD1
- SWORD2
- TEENAGENT
- TINSEL
- TOON
- TOUCHE
- TSAGE
- TUCKER
- ZVISION
-
---save-slot/-x:
-
- Tento pХepУnaФ mХЏХОe bУНt pouХОit kТ naФtenУ uloХОenУЉ hry pХУmo zТ pХУkazovУЉho ХУЁdku.
-
- PouХОitУ: --save-slot[POZICE] nebo -x[POZICE], kde [POZICE] je ФУslo uloХОenУЉ pozice.
-
- JУЁdra, kterУЁ vТ souФasnosti podporujУ --save-slot/-x jsou:
-
- AGI
- CGE
- CINE
- CRUISE
- DRACI
- GROOVIE
- HUGO
- KYRA
- LURE
- MOHAWK
- QUEEN
- SAGA
- SCI
- SCUMM
- SKY
- SWORD1
- SWORD2
- TEENAGENT
- TINSEL
- TOON
- TOUCHE
- TSAGE
- TUCKER
- ZVISION
-
-
-7.0) Hudba a Zvuk:
----- -------------
-Ve vФtХЁinФ operaФnУch systУЉmХЏ a pro vФtХЁinu her bude ScummVM standardnФ pouХОУvat MT-32 nebo emulaci AdLib pro pХehrУЁvУЁnУ hudby. MIDI nemusУ bУНt
-DostupnУЉ ve vХЁech operaФnУch systУЉmech, nebo potХebuje ruФnУ nastavenУ. Pokud chcete MIDI pouХОУt, mУЁte nФkolik rХЏznУНch voleb pro vУНstup, vТ zУЁvislosti na VaХЁem operaФnУm systУЉmu a nastavenУ.
-
- null - PrУЁzdnУН vУНstup. NepХehrУЁvat ХОУЁdnou hudbu.
- adlib - VnitХnУ emulace AdLib
- fluidsynth т Emulace FluidSynth MIDI
- mt32 - VnitХnУ emulace MT-32
- pcjr - VnitХnУ emulace PCjr (pouХОitelnУЉ pouze ve hrУЁch SCUMM)
- pcspk - VnitХnУ emulace reproduktoru PC
- towns - VnitХnУ emulace FM-TOWNS YM2612
- (pouХОitelnУЉ pouze v hrУЁch SCUMM FM-TOWNS)
- alsa - VУНstup pomocУ zaХУzenУ sekvenceru ALSA. Viz nУХОe.
- core - Zvuk CoreAudio, pro uХОivatele Mac OS X.
- coremidi - Zvuk CoreMIDI, pro uХОivatele Mac OS X. PouХОУvejte pouze, pokud mУЁte hardwarovУН syntezУЁtor MIDI.
- seq - PouХОitУ /dev/sequencer pro MIDI v systУЉmu *nix. Viz nУХОe
- timidity - PХipojenУ kТ MIDI serveru TiMidity++. Viz nУХОe.
- windows - Windows MIDI. PouХОije zabudovanУН sekvencer, pro Windows
-
-Abyste vybrali ovladaФ zvuku, zvolte ho ve spouХЁtФФi, nebo pХedejte jeho jmУЉno ScummVM pomocУ moХОnosti '-e', napХУklad:
-
- scummvm -eadlib monkey2
-
-
-7.1) PХehrУЁvУЁnУ zvuku pomocУ emulace AdLib:
----- --------------------------------------
-StandardnФ bude karta AdLib emulovУЁna a ScummVM hudbu pХehrУЁvУЁ jako vzorkovanУЉ vlny. To je vУНchozУ reХОim pro vФtХЁinu her a nabУzУ nejlepХЁУ kompatibilitu mezi stroji a hrami.
-
-
-7.2) PХehrУЁvУЁnУ zvuku pomocУ emulace FluidSynth MIDI:
----- ------------------------------------------------
-Pokud byl ScummVM sestaven s podporou libfluidsynth bude schopen pХehrУЁvat hudbu MIDI pomocУ ovladaФe FluidSynth. Budete muset ale urФit, kterУН SoundFont pouХОУt.
-
-ProtoХОe vУНchozУ hlasitost vУНstupu od FluidSynth mХЏХОe bУНt velmi nУzkУЁ,
-ScummVM standardnФ nastavУ zvУНХЁenУ, aby dostal silnФjХЁУ signУЁl. To mХЏХОe bУНt dУЁle upraveno pouХОitУm moХОnosti pХУkazovУЉho ХУЁdku --midi-gain, nebo nastavenУm "midi_gain" vТ konfiguraФnУm souboru.
-
-NastavenУ mХЏХОe nabУНvat hodnoty od 0 po 1000 a vУНchozУ je 100. (Toto odpovУdУЁ nastavenУ zvУНХЁenУ FluidSynth's 0.0 aХО 10.0, coХО je pravdФpodobnФ mФХeno v decibelech.)
-
-POZNУMKA: PoХОadavky na procesor pro FluidSynth mХЏХОou bУНt vТ nФkterУНch pХУpadech dosti vysokУЉ. Je doporuФeno mУt rychlУЉ CPU.
-
-
-7.3) PХehrУЁvУЁnУ zvuku pomocУ emulace MT-32:
----- --------------------------------------
-NФkterУЉ hry, kterУЉ obsahujУ hudebnУ data MIDI, takУЉ majУ vylepХЁenУЉ stopy urФenУЉ pro zvukovУН modul MT-32. ScummVM mХЏХОe toto zaХУzenУ nynУ emulovat, nicmУЉnФ aby toto zaХУzenУ fungovalo, musУte mУt pХЏvodnУ ROMy MT-32:
-
-MT32_PCM.ROM - IC21 (512KB)
-MT32_CONTROL.ROM - IC26 (32KB) a IC27 (32KB), proklУЁdanУЉ podle bajtu
-
-Tyto ROMy umУstФte do hernУho adresУЁХe, ve VaХЁУ dodateФnУЉ cestФ, nebo vТ adresУЁХi, kde je umУstФn spouХЁtФФ ScummVM.
-
-SТ tУmto ovladaФem nemusУte zadУЁvat --native-mt32, protoХОe je automaticky zapnut.
-
-POZNУMKA: PoХОadavky na procesor pro emulУЁtor jsou velmi vysokУЉ; rychlУЉ
-CPU je velmi doporuФeno.
-
-
-7.4) PХehrУЁvУЁnУ zvuku pomocУ emulace MIDI:
----- -------------------------------------
-NФkterУЉ hry (jako Sam & Max) obsahujУ pouze hudebnУ data MIDI. Toto brУЁnilo, aby hudba vТ tФchto hrУЁch fungovala na platformУЁch, kterУЉ MIDI nepodporujУ, nebo na zvukovУНch kartУЁch, kterУЉ neposkytujУ ovladaФe MIDI (napХ. mnoho zvukovУНch karet nebude vТ Linuxu MIDI pХehrУЁvat). ScummVM nynУ mХЏХОe MIDI emulovat pomocУ vzorkovanУНch vln a AdLib, emulaci MIDI FluidSynth nebo emulace MT-32 pomocУ moХОnostУ -eadlib, -efluidsynth nebo -emt32 vТ tomto poХadУ. NicmУЉnФ pokud mУЁte moХОnost pouХОУt pХirozenУЉ MIDI, doporuФujeme pouХОУt jeden zТ reХОimХЏ MIDI nУХОe pro nejlepХЁУ zvuk.
-
-
-7.5) PХehrУЁvУЁnУ zvuku pomocУ emulace PХirozenУЉho MIDI:
----- -------------------------------------------------
-PouХОijte vhodnou moХОnosti pХУkazovУЉho ХУЁdku -e<reХОim> ze seznamu vУНХЁe pro vybrУЁnУ VaХЁeho upХednostХovanУЉho zaХУzenУ MIDI. NapХУklad pokud chcete pouХОУt ovladaФ Windows MIDI, pouХОijte moХОnost -ewindows.
-
-
-7.5.1) PouХОitУ moХОnostУ MIDI kТ pХizpХЏsobenУ vУНstupu pХirozenУЉ MIDI:
------- ------------------------------------------------------------
-ScummVM podporuje rХЏznУЉ reХОimy MIDI vТ zУЁvislosti na schopnostech VaХЁeho zaХУzenУ MIDI.
-
-Pokud je zadУЁno --native-mt32, ScummVM se kТ VaХЁemu zaХУzenУ bude chovat jako ke skuteФnУЉ MT-32. ProtoХОe mapovУЁnУ instrumentХЏ a vУНhradnУ systУЉmovУЉ pХУkazy MT-32 se liХЁУ od zaХУzenУ General MIDI, tuto moХОnost byste mФli povolit, pouze kdyХО pouХОУvУЁte skuteФnУЉ Roland MT-32, LAPC-I,CM-64, CM-32L, CM-500, nebo zaХУzenУ GS s mapou MT-32.
-
-Pokud je zadУЁno --enable-gs, ScummVM zavede VaХЁe zaХУzenУ kompatibilnУ s GS pomocУ nastavenУ, kterУЁ napodobujУ nastavenУ dozvuku MT-32, (nedostatek) chУГru, citlivost ohУНbanУ tУГnu, atd. Pokud je toto spoleФnФ pouХОito s --native-mt32, ScummVM vybere mapu kompatibilnУ s MT-32 a bicУ soupravu na VaХЁem zaХУzenУ GS. Toto nastavenУ funguje lУЉpe neХО standardnУ emulace GM nebo GS ve hrУЁch, kterУЉ nemajУ vlastnУ mapovУЁnУ instrumentХЏ (Loom a Monkey1). ObФ nastavenУ byste mФli pouХОУt pouze tehdy, pokud mУЁte zaХУzenУ GS, kterУЉ mУЁ mapu MT-32, jako SC-55, SC-88, SC-88 Pro, SC-8820, SC-8850, atd. NezapomeХte, ХОe --enable-gs je automaticky zakУЁzУЁno v DOTT a Samnmax, protoХОe samostatnФ pouХОУvajУ General MIDI.
-
-Pokud nenУ ani jedna zТ moХОnostУ vУНХЁe povolena, ScummVM VaХЁe zaХУzenУ zavede vТ reХОimu General MIDI a pouХОije emulaci GM vТ hrУЁch se zvukovУНm doprovodem MT-32.
-
-NФkterУЉ hry obsahujУ zvukovУЉ efekty pouze v AdLib. Pro tyto hry, byste mФli zadat --multi-midi, abyste zkombinovali hudbu MIDI se zvukovУНmi efekty AdLib.
-
-
-7.6) PХehrУЁvУЁnУ zvuku pomocУ Sekvenceru MIDI: [POUZE UNIX]
----- ----------------------------------------
-Pokud VУЁХЁ ovladaФ podporuje sekvencer, mХЏХОete nastavit promФnnou prostХedУ "SCUMMVM_MIDI" na VaХЁem zaХУzenУ sekvenceru т napХУklad na /dev/sequencer
-
-Pokud mУЁte problУЉm se zvukem vТ tomto nastavenУ, moХОnУЁ budete muset nastavit promФnnou prostХedУ "SCUMMVM_MIDIPORT" na 1 nebo 2. Toto vybere port, kterУН bude pouХОit ve zvolenУЉm sekvenceru. Pak spusХЅte scummvm s parametrem -eseq. To by mФlo fungovat pro nФkolik karet a mХЏХОe nabУzet lepХЁУ vУНkon a kvalitu, neХО emulace AdLib. NicmУЉnФ pro systУЉmy, kde podpora sekvenceru nefunguje, mХЏХОete vХОdycky pХejУt na emulaci AdLib.
-
-
-7.6.1) PХehrУЁvУЁnУ zvuku pomocУ Sekvenceru ALSA: [POUZE UNIX]
------- ----------------------------------------
-Pokud MУЁte nainstalovУЁn ovladaФ ALSA sТ podporou sekvenceru, pak mХЏХОete nastavit promФnnou prostХedУ "SCUMMVM_PORT" nebo promФnnou souboru s nastavenУm "alsa_port" pro urФenУ portu VaХЁeho sekvenceru. Pokud ani jedno nenУ nastaveno, jsou standardnФ vyzkouХЁeny oba porty "65:0" a "17:0".
-
-Zde je krУЁtkУН nУЁvod, jak sekvencer pouХОУt sТ VaХЁУ zvukovou kartou. Ve vХЁech pХУpadech, pro zУskУЁnУ seznamu vХЁech portХЏ sekvenceru, zkuste pХУkaz "aconnect -o -l". To by mФlo mУt vУНstup podobnУН tomuto:
-
-client 14: 'Midi Through' [type=kernel]
- 0 'Midi Through Port-0'
-client 16: 'SBLive! Value [CT4832]' [type=kernel]
- 0 'EMU10K1 MPU-401 (UART)'
-client 17: 'Emu10k1 WaveTable' [type=kernel]
- 0 'Emu10k1 Port 0 '
- 1 'Emu10k1 Port 1 '
- 2 'Emu10k1 Port 2 '
- 3 'Emu10k1 Port 3 '
-client 128: 'TiMidity' [type=user]
- 0 'TiMidity port 0 '
- 1 'TiMidity port 1 '
- 2 'TiMidity port 2 '
- 3 'TiMidity port 3 '
-
-NejdХЏleХОitФjХЁУ ФУЁst zde je, ХОe existujУ ФtyХi vУНstupy WaveTable MIDI umУstФnУЉ na 17:0, 17:1, 17:2 a 17:3, a ФtyХi porty TiMidity umУstФnУЉ na 128:0, 128:1, 128:2 a 128:3.
-
-Pokud na VaХЁУ kartФ mУЁte Фip FM FM, jako tХeba SB16, pak musУte naФУst SoundFonts pomocУ softwaru sbiload. NapХУklad:
-
- sbiload -p 17:0 /etc/std.o3 /etc/drums.o3
-
-Pokud je VaХЁe karta schopnУЁ pouХОУvat WaveTable, musУte naФУst SoundFont sbk nebo sf2 pomocУ softwaru sfxload nebo asfxload. NapХУklad:
-
- sfxload /cesta/k/8mbgmsfx.sf2
-
-Pokud VaХЁe karta neumУ sТ MIDI pracovat, existujУ dvФ moХОnosti: FluidSynth a TiMidity. DoporuФujeme FluidSynth, protoХОe vТ mnoha systУЉmech bude TiMidity 'zaostУЁvat' za hudbou. To je velmi znatelnУЉ vТ hrУЁch pouХОУvajУcУ
-iMUSE, kterУН pouХОУvУЁ rychlУЉ a dynamickУЉ pХechody hudby.
-SpuХЁtФnУm TiMidity jako root mu umoХОnУ nastavit prioritu vТ reУЁlnУЉm Фase, coХО mХЏХОe zaostУЁvУЁnУ snУХОit.
-
-PХУkaz pro TiMidity, aby se stal sekvencerem ALSA:
-
- timidity -iAqqq -B2,8 -Os1S -s 44100 &
-
-(Pokud sТ tУmto nastavenУm dostУЁvУЁte zkreslenУН vУНstup, mХЏХОete zkusit vynechat -B2,8 nebo zmФnit hodnotu.)
-
-PХУkaz pro TiMidity, aby se stal sekvencerem ALSA (pouХОitУm SoundFonts):
-
- fluidsynth -m alsa_seq /cesta/k/8mbgmsfx.sf2
-
-Jakmile je TiMidity nebo FluidSynth spuХЁtФn, pouХОijte pХУkaz 'aconnect -o -l' jak je pospУЁno vУНХЁe vТ tУЉto ФУЁsti.
-
-
-7.6.2) PХehrУЁvУЁnУ zvuku pomocУ Sekvenceru IRIX dmedia: [POUZE UNIX]
------- -----------------------------------------------
-Pokud pouХОУvУЁte IRIX a ovladaФ dmedia s podporou sekvenceru, mХЏХОete nastavit promФnnou prostХedУ "SCUMMVM_MIDIPORT" nebo promФnnou souboru sТ nastavenУm "dmedia_port" pro urФenУ portu VaХЁeho sekvenceru. StandardnФ je pouХОit prvnУ port.
-
-Abyste zУskali seznam nastavenУНch rozhranУ midi ve VaХЁem systУЉmu, spusХЅte pХУkaz "startmidi" bez parametrХЏ. VzorovУН vУНstup:
-
- 2 MIDI interfaces configured:
- Serial Port 2
- Software Synth
-
-VТ tomto pХУpadФ mХЏХОete ScummVM nastavit, aby pouХОil "Software Synth" mУsto standardnУho "Serial Port 2" pХidУЁnУm ХУЁdku
-
- dmedia_port=Software Synth
-
-do VaХЁeho souboru s nastavenУm v ФУЁsti [scummvm], nebo nastavenУm SCUMMVM_PORT=Software Synth ve VaХЁem prostХedУ.
-
-
-7.7) PouХОitУ MIDI serveru TiMidity++:
----- --------------------------------
-Pokud na VaХЁem systУЉmu chybУ jakУНkoliv sekvencer MIDI, ale pХesto chcete lepХЁУ kvalitu MIDI, neХО kterou mХЏХОe nabУdnout standardnУ emulace AdLib, mХЏХОete zkusit MIDI server TiMidity++. ProhlУЉdnФte si <http://timidity.sourceforge.net/> pro staХОenУ a pokyny k instalaci.
-
-NejdХУve musУte spustit daemona:
-
- timidity -ir 7777
-
-NynУ mХЏХОete spustit ScummVM a zkusit vybrat TiMidity jako vУНstup pro hudbu. StandardnФ se pХipojУ k localhost:7777, ale hostitele/port mХЏХОete zmФnit pomocУ promФnnУЉ prostХedУ "TIMIDITY_HOST". MХЏХОete takУЉ urФit
-"ФУslo zaХУzenУ" pouХОitУm promФnnУЉ "SCUMMVM_MIDIPORT".
-
-
-7.8) PouХОitУ komprimovanУНch zvukovУНch souborХЏ
----- ----------------------------------------
-
-7.8.0) PouХОitУ souborХЏ MP3 pro CD audio:
------- ---------------------------------
-PouХОijte LAME nebo jinУН kodУЉr MP3 pro vyjmutУ stop cd audio do souborХЏ.
-Soubory pojmenujte track1.mp3 track2.mp3 atd. ScummVM musУ bУНt sestaven s podporou MAD pro pouХОitУ tУЉto moХОnosti. Soubory budete muset zТ CD vyjmout ve formУЁtu WAV, pak je pХevУЉst do formУЁtu MP3 vТ konstantnУ pХenosovУЉ rychlosti. To mХЏХОe bУНt provedeno pomocУ nУЁsledujУcУho pХУkazovУЉho ХУЁdku:
-
- lame -t -q 0 -b 96 track1.wav track1.mp3
-
-
-7.8.1) PouХОitУ souborХЏ Ogg Vorbis pro CD audio:
------- ----------------------------------------
-PouХОijte oggenc nebo jinУН kodУЉr vorbis kТ pХevedenУ zvukovУНch stop do souborХЏ. Pojmenujte je track1.ogg track2.ogg atd. ScummVM musУ bУНt sestaven s podporou vorbis pro pouХОitУ tУЉto moХОnosti. Soubory budete muset zТ CD vyjmout ve formУЁtu WAV, pak je pХevУЉst do formУЁtu vorbis. To mХЏХОe bУНt provedeno pomocУ nУЁsledujУcУho pХУkazovУЉho ХУЁdku pro oggenc, kde hodnota po q urФuje poХОadovanou kvalitu od 0 do 10:
-
- oggenc -q 5 track1.wav
-
-
-7.8.2) PouХОitУ souborХЏ Flac pro CD audio:
------- ----------------------------------
-PouХОijte flac nebo jinУН kodУЉr flac kТ pХevedenУ zvukovУНch stop do souborХЏ.
-Pojmenujte je track1.flac track2.flac atd. Pokud VУЁХЁ souborovУН systУЉm podporuje pХУpony pouze se tХemi pУsmeny, pojmenujte je track1.fla track2.fla atd. ScummVM musУ bУНt sestaven s podporou flac pro pouХОitУ tУЉto moХОnosti. Soubory budete muset zТ CD vyjmout ve formУЁtu WAV, pak je pХevУЉst do formУЁtu flac. To mХЏХОe bУНt provedeno pomocУ nУЁsledujУcУho pХУkazovУЉho ХУЁdku pro flac:
-
- flac --best track1.wav
-
-NezapomeХte, ХОe kvalita bude vХОdy stejnУЁ, rХЏznУЉ moХОnosti kodУЉru ovlivХujУ dobu kУГdovУЁnУ a vУНslednou velikost souboru.
-
-
-7.8.3) KomprimovУЁnУ MONSTER.SOU pomocУ MP3:
------- ------------------------------------
-PotХebujete LAME a nУЁХЁ nУЁstroj 'compress_scumm_sou' z balУФku
-scummvm-tools, abyste toto mohli provУЉst a ScummVM musУ bУНt sestaven s podporou MAD.
-
- compress_scumm_sou monster.sou
-
-Nakonec dostanete mnohem menХЁУ soubor monster.so3, tento soubor zkopУrujte do VaХЁУ sloХОky hry. Pak mХЏХОete soubor monster.sou odstranit.
-
-
-7.8.4) KomprimovУЁnУ MONSTER.SOU pomocУ Ogg Vorbis:
------- -------------------------------------------
-Tak jako vУНХЁe, ale ScummVM musУ bУНt sestaven s podporou OGG. SpusХЅte:
-
- compress_scumm_sou --vorbis monster.sou
-
-To by mФlo vytvoХit menХЁУ soubor monster.sog file, kterУН byste mФli zkopУrovat do sloХОky hry. KУГdovУЁnУ Ogg mХЏХОe trvat mnohem dУЉle neХО u MP3, takХОe mФjte po ruce dobrou knУХОku.
-
-
-7.8.5) KomprimovУЁnУ MONSTER.SOU pomocУ Flac:
------- -------------------------------------
-Tak jako vУНХЁe, ale ScummVM musУ bУНt sestaven s podporou Flac. SpusХЅte:
-
- compress_scumm_sou --flac monster.sou
-
-To by mФlo vytvoХit menХЁУ soubor monster.sof, kterУН byste mФli zkopУrovat do sloХОky hry. NezapomeХte, ХОe kvalita bude vХОdy stejnУЁ, rХЏznУЉ moХОnosti kodУЉru ovlivХujУ dobu kУГdovУЁnУ a vУНslednou velikost souboru. ZmФna velikosti bloku (-b <hodnota>), mУЁ nejvФtХЁУ vliv na vУНslednou velikost souboru -- 1152 se zdУЁ bУНt dobrУЁ hodnota pro tento druh zvukovУНch souborХЏ. PХeФtФte si dokumentaci kodУЉru pХedtУm, neХО pouХОijete dalХЁУ hodnoty.
-
-
-7.8.6) KomprimovУЁnУ hudby/zvuku/hlasu v hrУЁch AGOS:
------- --------------------------------------------
-Pro tento УКkol pouХОijte nУЁХЁ nУЁstroj 'compress_agos' z balУФku scummvm-tools. MХЏХОete volit mezi nФkolika cУlovУНmi formУЁty, ale nezapomeХte, ХОe je mХЏХОete pouХОУt pouze tehdy, kdyХО ScummVM byl sestaven se zapnutou podporou konkrУЉtnУho dekodУЉru.
-
- compress_agos effects (Pro CD verzi Simon 1 od Acorn)
- compress_agos simon (Pro CD verzi Simon 1 od Acorn)
- compress_agos effects.voc (Pro DOS CD verzi Simon 1)
- compress_agos simon.voc (Pro DOS CD verzi Simon 1)
- compress_agos simon.wav (Pro Windows CD verzi Simon 1)
- compress_agos simon2.voc (Pro DOS CD verzi Simon 2)
- compress_agos simon2.wav (Pro Windows CD verzi Simon 2)
- compress_agos mac (Pro Macintosh verzi Simon 2)
-
- compress_agos voices1.wav (Pro Windows verzi Feeble na 2CD/4CD)
- compress_agos voices2.wav (Pro Windows verzi Feeble na 2CD/4CD)
- compress_agos voices3.wav (Pro Windows verzi Feeble na 4CD)
- compress_agos voices4.wav (Pro Windows verzi Feeble na 4CD)
-
- compress_agos Music (Pro Windows verzi Puzzle Pack)
-
-Pro Ogg Vorbis pХidejte k volbУЁm --vorbis, tj.
-
- compress_agos --vorbis
-
-Pro Flac pХidejte k volbУЁm --flac a dodateФnУЉ parametry, tj.
-
- compress_agos --flac
-
-Nakonec dostanete mnohem menХЁУ soubor *.mp3, *.ogg nebo *.fla, zkopУrujte ho do VaХЁУ sloХОky hry. StarУН soubor mХЏХОete bezpeФnУЉ odebrat.
-
-
-7.8.7) KomprimovУЁnУ ХeФi/hudby v Broken Sword:
------- ---------------------------------------
-NУЁstroj 'compress_sword1' z balУФku scummvm-tools mХЏХОe pХevУЉst hudbu a ХeФ do MP3, Ogg Vorbis a takУЉ Flac. NejsnadnФjХЁУm zpХЏsobem, jak soubory pХevУЉst, je prostУЉ zkopУrovУЁnУ spouХЁtФФe do VaХЁУ sloХОky BS1 (spolu s kodУЉrem lame) a pak ho odsud spustit. Tak bude vХЁechno automaticky pХevedeno na MP3. PotУЉ, mХЏХОete ruФnФ odstranit soubory SPEECH?.CLU a hudebnУ soubory wave.
-
-SpuХЁtФnУm "compress_sword1 --vorbis" soubory zkomprimuje pomocУ Ogg Vorbis mУsto MP3.
-
-SpuХЁtФnУm "compress_sword1 --flac" soubory zkomprimuje pomocУ Flac
-mУsto MP3.
-
-PouХОijte "compress_sword1 --help", abyste dostali УКplnУН seznam moХОnostУ.
-
-
-7.8.8) KomprimovУЁnУ ХeФi/hudby v Broken Sword II:
------- ------------------------------------------
-Pro tento УКkol pouХОijte nУЁХЁ nУЁstroj 'compress_sword2'. MХЏХОete volit mezi nФkolika cУlovУНmi formУЁty, ale nezapomeХte, ХОe je mХЏХОete pouХОУt pouze tehdy, kdyХО ScummVM byl sestaven se zapnutou podporou konkrУЉtnУho dekodУЉru.
-
- compress_sword2 speech1.clu
- compress_sword2 music1.clu
-
-Pro Ogg Vorbis pХidejte --vorbis k moХОnostem, tj.
-
- compress_sword2 --vorbis
-
-Nakonec budete mУt mnohem menХЁУ soubor *.cl3 nebo *.clg, tento soubor zkopУrujte do sloХОky hry. StarУН soubor mХЏХОete bezpeФnУЉ odstranit.
-
-Je moХОnУЉ pouХОУt Flac pro komprimaci pХidУЁnУm moХОnosti by --flac. NicmУЉnФ vУНslednУН soubor *.clf je ve skuteФnosti vФtХЁУ neХО pХЏvodnУ.
-
-NezapomeХte, prosУm, ХОe compress_sword2 bude fungovat pouze se ФtyХmi soubory ХeФi/hudby v Broken Sword II. Nebude fungovat sТ dalХЁУmi soubory *.clu, ani nebude fungovat se soubory ХeФi zТ Broken Sword.
-
-
-7.9) VУНstupnУ vzorkovacУ kmitoФet:
----- -----------------------------
-VУНstupnУ vzorkovacУ kmitoФet ХУkУЁ ScummVM, kolik vzorkХЏ zvuku mУЁ hrУЁt vТ kanУЁlu za sekundu. Je toho hodnФ, co by se dalo ХУct o tomto tУЉmatu, ale vФtХЁina toho je zde nepodstatnУЉ. KrУЁtkУЁ verze je, ХОe vФtХЁinФ her staФУ 22050 Hz, ale vТ nФkterУНch pХУpadech je lepХЁУ 44100 Hz. Na extrУЉmnФ pomalУНch systУЉmech byste radФji mФli pouХОУt 11025 Hz, ale je nepravdФpodobnФ, ХОe byste se sТ tУmto museli zabУНvat.
-
-Abychom to rozvedli, vФtХЁina zvukХЏ, kterУЉ ScummVM musУ pХehrУЁt, byla vzorkovУЁna buФ na 22050 Hz, nebo 11025 Hz. PouХОitУm vyХЁХЁУho kmitoФtu jako kouzlem nezvУНХЁУ kvalitu tФchto zvukХЏ. Proto je 22050 Hz v poХУЁdku.
-
-NФkterУЉ hry pouХОУvajУ CD audio. Pokud pro toto pouХОУvУЁte komprimovanУЉ soubory, jsou pravdФpodobnФ vzorkovanУН na kmitoФtu 44100 Hz, takХОe pro tyto hry je toto pravdФpodobnФ lepХЁУ volba kmitoФtu.
-
-PХi pouХОitУ ovladaФХЏ hudby AdLib, FM Towns, PC Speaker nebo IBM PCjr je
-ScummVM zodpovФdnУН za vytvУЁХenУ vzorkХЏ. VФtХЁinou bude 22050 Hz staФit, ale existuje alespoХ jedna stopa hudby AdLib Beneath a Steel Sky, kterУЁ znУ lУЉpe pХi 44100 Hz.
-
-PouХОitУ kmitoФtХЏ mezi nenУ doporuФeno. Za prvУЉ VaХЁe zvukovУЁ karta ho nemusУ podporovat. Teoreticky by se ScummVM mФl vrУЁtit kТ rozumnУЉmu kmitoФtu, ale nespolУЉhejte na to. DХЏleХОitФjХЁУ je ale to, ХОe ScummVM musУ pХevzorkovat vХЁechny zvuky na jejich vУНstupnУ kmitoФet. To je mnohem snadnФjХЁУ kТ provedenУ, kdyХО vУНstupnУ kmitoФet je nУЁsobkem pХЏvodnУho.
-
-
-8.0) Soubor s nastavenУm:
----- --------------------
-StandardnФ je soubor sТ nastavenУm uloХОen a naФУtУЁn:
-
- Windows Vista/7:
- \Users\jmУЉno uХОivatele\AppData\Roaming\ScummVM\scummvm.ini,
-
- Windows 2000/XP:
- \Documents and Settings\jmУЉno uХО\Application Data\ScummVM\scummvm.ini
-
- Windows NT4:
- <sloХОkawin>\Profiles\jmУЉno uХО\Application Data\ScummVM\scummvm.ini,
-
- Windows 95/98/ME:
- <sloХОkawin>\scummvm.ini,
-
- Pokud ve Windows nainstalovУЁna dХУvФjХЁУ verze ScummVM bude ponechУЁno dХУvФjХЁУ umУstФnУ '<sloХОkawin>\scummvm.ini'.
-
- Unix:
- ХУdУme se specifikacemi zУЁkladnУho adresУЁХe XDG. To znamenУЁ, ХОe naХЁe nastavenУ lze nalУЉzt v:
- $XDG_CONFIG_HOME/scummvm/scummvm.ini
-
- Pokud XDG_CONFIG_HOME nenУ nastaven nebo je prУЁzdnУН, bude, podle pravidel specifikace, pouХОito '~/.config' jako hodnota pro XDG_CONFIG_HOME.
-
- Pokud byla ve vaХЁem systУЉmu nainstalovУЁna dХУvФjХЁУ verze ScummVM, bude ponechУЁno pХЏvodnУ vУНchozУ umУstФnУ '~/.scummvmrc'.
-
- Mac OS X:
- ~/Library/Preferences/ScummVM Preferences
- (zde ~ oznaФuje VaХЁi domovskou sloХОku)
-
- DalХЁУ:
- scummvm.ini vТ souФasnУЉ sloХОce
-
-VzorovУН soubor sТ nastavenУm vypadУЁ takto:
-
- [scummvm]
- gfx_mode=supereagle
- fullscreen=true
- savepath=C:\saves\
-
- [sky]
- path=C:\games\SteelSky\
-
- [germansky]
- gameid=sky
- language=de
- path=C:\games\SteelSky\
- description=Beneath a Steel Sky w/ German subtitles
-
- [germandott]
- gameid=tentacle
- path=C:\german\tentacle\
- description=German version of DOTT
-
- [tentacle]
- path=C:\tentacle\
- subtitles=true
- music_volume=40
- sfx_volume=255
-
- [loomcd]
- cdrom=1
- path=C:\loom\
- talkspeed=5
- savepath=C:\loom\saves\
-
- [monkey2]
- path=C:\amiga_mi2\
- music_driver=windows
-
-8.1) RozpoznУЁvanУЁ klУФovУЁ slova nastavenУ
----- ------------------------------------
-Jsou rozpoznУЁvУЁna nУЁsledujУcУ klУФovУЁ slova:
-
- path ХetФzec Cesta, kde jsou umУstФny datovУЉ soubory hry
- autosave_period ФУslo VteХiny mezi autouklУЁdУЁnУm (vУНchozУ: 300)
- save_slot ФУslo ФУslo uloХОenУЉ, kterУЉ pХi spuХЁtФnУ naФУst.
- savepath ХetФzec Cesta, kde hra bude uklУЁdat uloХОenУЉ hry.
- versioninfo ХetФzec Verze ScummVM, kterУЁ vytvoХila soubor.
- gameid ХetФzec SkuteФnУЉ id hry. UХОiteФnУЉ, pokud mУЁte nФkolik verzУ stejnУЉ hry a chcete pro nФ rХЏznУЉ pХezdУvky. Viz pХУklad.
- description ХetФzec Popis hry jak se zobrazУ ve spouХЁtФФi.
- language ХetФzec UrФУ jazyk (en, us, de, fr, it, pt, es,
- jp, zh, kr, se, gb, hb, cz, ru)
- speech_mute boolean Pokud true, ХeФ je ztlumena
- subtitles boolean Pokud true jsou titulky zapnuty.
- talkspeed ФУslo ZpoХОdФnУ textu v hrУЁch SCUMM, nebo rychlost textu vТ jinУНch hrУЁch.
- fullscreen boolean ReХОim celУЉ obrazovky
- aspect_ratio boolean Povolit korekci pomФru stran
- gfx_mode ХetФzec GrafickУН reХОim (normУЁlnУ, 2x, 3x, 2xsai, super2xsai, supereagle, advmame2x, advmame3x, hq2x, hq3x, tv2x, dotmatrix, opengl_linear, opengl_nearest)
-
- confirm_exit boolean Zeptat se uХОivatele na potvrzenУ pХed ukonФenУm (pouze jУЁdro SDL).
- console boolean Povolit okno konzole (vУНchozУ: zapnuto) (pouze Windows).
- cdrom ФУslo ФУslo jednotky CD-ROM, kterou pouХОУt pro zvuk. Pokud je zУЁpornУЉ, kТ pokusu o pХУstup k CD-ROM nedojde.
- joystick_num ФУslo ФУslo zaХУzenУ joysticku, kterУЉ pouХОУt pro vstup
- music_driver ХetФzec KterУЉ hudebnУ jУЁdro pouХОУt.
- opl_driver ХetФzec KterУН emulУЁtor AdLib (OPL) pouХОУt.
- output_rate ФУslo KterУН vУНstupnУ vzorkovacУ kmitoФet pouХОУt v Hz. RozumnУЉ hodnoty jsou 11025, 22050 a 44100.
- alsa_port ХetФzec KterУН port pouХОУt pro vУНstup pХi pouХОitУ hudebnУho ovladaФe ALSA.
- music_volume ФУslo NastavenУ hlasitosti hudby (0-255)
- multi_midi boolean Pokud true, jsou povoleny smУХЁenУН AdLib a pХЏvodnУ MIDI.
- soundfont ХetФzec KterУН SoundFont pouХОУt pro pХehrУЁvУЁnУ MIDI. (PodporovУЁno pouze nФkterУНmi ovladaФi MIDI.)
- native_mt32 boolean Pokud true, zakУЁХОe emulaci GM a pХedpoklУЁdУЁ, ХОe je dostupnУН pravУН Roland MT-32.
- enable_gs boolean Pokud true, povolУ funkce urФenУЉ pro Roland GS ke zlepХЁenУ emulace GM. Pokud je native_mt32 takУЉ nastaven na true, zaХУzenУ GS zvolУ mapu MT-32 pro pХehrУЁvУЁnУ sprУЁvnУНch instrumentХЏ.
- sfx_volume ФУslo NastavenУ hlasitosti zvuku (0-255)
- tempo ФУslo Rychlost hudby (50-200) (vУНchozУ: 100)
- speech_volume ФУslo NastavenУ hlasitosti ХeФi (0-255)
- midi_gain ФУslo ZvУНХЁenУ MIDI (0-1000) (vУНchozУ: 100) (PodporovУЁno pouze nФkterУНmi ovladaФi MIDI.)
- copy_protection boolean PovolУ ochranu proti kopУrovУЁnУ vТ urФitУНch hrУЁch, kde by ji ScummVM standardnФ zakУЁzal.
- demo_mode boolean Spustit demoverzi v Maniac Mansion
- alt_intro boolean PouХОУt alternativnУ УКvod pro CD verze Beneath a Steel Sky a Flight of the Amazon Queen
- boot_param ФУslo PХedУЁ toto ФУslo zavУЁdФcУmu skriptu
-
-Hry Sierra pouХОУvajУcУ jУЁdro AGI pХidУЁvajУ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
-
- originalsaveload boolean Pokud true, jsou pouХОity pХЏvodnУ obrazovky nahrУЁvУЁnУ/uloХОenУ mУsto vylepХЁenУНch ze ScummVM
- altamigapalette boolean PouХОУt alternativnУ paletu, bФХОnУЉ pro hry Amiga. Toto byl pХЏvodnУ starУН standard
- mousesupport boolean PovolУ podporu myХЁi. UmoХОnУ pouХОУt myХЁ pro pohyb a pro ovlУЁdУЁnУ hernУch nabУdek
-
-Hry Sierra pouХОУvajУcУ jУЁdro SCI pХidУЁvajУ nУЁsledujУcУ nestandardnУ klУФovУЁ slova:
-
- disable_dithering boolean Odstranit artefakty chvФnУ vТ nФkterУНch hrУЁch EGA
- prefer_digitalsfx boolean Pokud true, jsou upХednostХovУЁny digitУЁlnУ zvukovУЉ efekty pХed syntetizovanУНmi
- originalsaveload boolean Pokud true, jsou pouХОity pХЏvodnУ obrazovky nahrУЁvУЁnУ/uloХОenУ mУsto vylepХЁenУНch ze ScummVM
- native_fb01 boolean Pokud true, je ovladaФ hudby pro kartu IBM Music Feature nebo modul syntezУЁtoru Yahama FB-01 FM pouХОit jako vУНstup MIDI
- use_cdaudio boolean PouХОУt zvuky na CD mУsto ve hХe, pokud je dostupnУЉ
- windows_cursors boolean PouХОУt kurzory Windows (menХЁУ a ФernobУlУЉ) mУsto kurzorХЏ z DOS (King's Quest 6)
- silver_cursors boolean PouХОУt alternativnУ sadu stХУbrnУНch kurzorХЏ mУsto standardnУch zlatУНch (Space Quest 4)
-
-Broken Sword II pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova:
-
- gfx_details ФУslo NastavenУ grafickУНch detailХЏ (0-3)
- music_mute boolean Pokud true, hudba je ztlumena
- object_labels boolean Pokud true, popisky objektХЏ jsou povoleny
- reverse_stereo boolean Pokud true, kanУЁly stereo jsou obrУЁceny
- sfx_mute boolean Pokud true, zvukovУЉ efekty jsou ztlumeny
-
-Flight of the Amazon Queen pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova:
-
- music_mute boolean Pokud true, hudba je ztlumena
- sfx_mute boolean Pokud true, zvukovУЉ efekty jsou ztlumeny
-
-Hopkins FBI pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
- enable_gore boolean Pokud true, povolУ nФkterУЉ nepovinnУЉ krvavУЉ scУЉny ve hХe
-
-Jones in the Fast Lane pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
-
- music_mute boolean Pokud true, je pouХОito CD audio mУsto zvukХЏ ve hХe
-
-King's Quest VI Windows pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
-
- windows_cursors boolean Pokud true, jsou pouХОity pХЏvodnУ ФernobУlУЉ kurzory mУsto kurzorХЏ z DOS. Pokud false, jsou ve verzi Windows pouХОity kurzory DOS, zvФtХЁenУЉ, aby se shodovaly se zbytkem zvФtХЁenУЉ grafiky
-
-Lands of Lore: The Throne of Chaos pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova:
-
- smooth_scrolling boolean Pokud true, je posunovУЁnУ pХi zmФnФ zТ jednУЉ obrazovky na druhou plynulejХЁУ
- floating_cursors boolean Pokud true, je kurzor zmФnФn na smФrovou ХЁipku pХi najetУ na okraj obrazovky. HrУЁФ pak mХЏХОe kliknout pro pohyb vТ tomto smФru.
-
-Space Quest IV CD pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
-
- silver_cursors boolean Pokud true, je mУsto pХЏvodnУch zlatУНch kurzorХЏ pouХОita alternativnУ sada stХУbrnУНch
-
-Simon the Sorcerer 1 a 2 pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova:
-
- music_mute boolean Pokud true, hudba je ztlumena
- sfx_mute boolean Pokud true, zvukovУЉ efekty jsou ztlumeny
-
-Soltys pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
- enable_color_blind bool Pokud true, jsou pХЏvodnУ barvy nahrazeny odstУny ХЁedi
-
-The Legend of Kyrandia pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
-
- walkspeed celУЉ ФУslo Rychlost chХЏze (0-4)
-
-The Legend of Kyrandia: The Hand of Fate pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
-
- walkspeed ФУslo Rychlost chХЏze (3 nebo 5, coХО znamenУЁ
- rychle nebo pomalu)
-
-The Legend of Kyrandia: Malcolm's Revenge pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova:
-
- walkspeed ФУslo Rychlost chХЏze (3 nebo 5, coХО znamenУЁ
- rychle nebo pomalu)
- studio_audience boolean Pokud true, je slyХЁet potlesk a smУch kdykoliv Malcolm provede nФco vtipnУЉho
- skip_support boolean Pokud true, hrУЁФ mХЏХОe pХeskakovat text a scУЉny hry
- helium_mode boolean Pokud true, lidУЉ znФjУ tak, jakoby se nadУНchali hУЉlia
-
-The Neverhood pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova:
-
- originalsaveload boolean Pokud true, jsou pouХОity pХЏvodnУ obrazovky pro
- naФУtУЁnУ/uklУЁdУЁnУ mУsto obrazovek ScummVM
- skiphallofrecordsscenes boolean
- Pokud true, umoХОnУ hrУЁФi pХeskoФit
- obrazovky v SУni zУЁznamХЏ
- scalemakingofvideos boolean Pokud true, je zmФnФno rozliХЁenУ dokumentu o
- vytvУЁХenУ hry tak, aby zaplnilo celou obrazovku
-
-The 7th Guest pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
-
- fast_movie_speed boolean Pokud true, jsou videa pХehrУЁvУЁna pХi zvУНХЁenУЉ
- rychlosti, stejnУЉ jako ve verzi pro iOS
- Videa bez zvuku jsou stУЁle pХehrУЁvУЁna pХi
- normУЁlnУ rychlosti, aby nedoХЁlo k desynchronizaci
- hudby
-
-Zork Nemesis: The Forbidden Lands pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
-
- originalsaveload boolean Pokud true, jsou pro obrУЁzky pХi uloХОenУ/naФtenУ her
- pouХОity pХЏvodnУ mУsto vylepХЁenУНch ze ScummVM
- doublefps boolean Pokud true, je hernУ rychlost zvУНХЁena z 30 snУmkХЏ za sekundu na 60
- venusenabled boolean Pokud true, je povolen hernУ systУЉm nУЁpovФdy Venus
- noanimwhileturning boolean Pokud true, jsou pХi otУЁФenУ v panoramatickУЉm reХОimu
- zakУЁzУЁny
-
-Zork: Grand Inquisitor pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo:
-
- originalsaveload boolean Pokud true, jsou pro obrУЁzky pХi uloХОenУ/naФtenУ her
- pouХОity pХЏvodnУ mУsto vylepХЁenУНch ze ScummVM
- doublefps boolean Pokud true, je hernУ rychlost zvУНХЁena z 30 snУmkХЏ za sekundu na 60
- noanimwhileturning boolean Pokud true, jsou pХi otУЁФenУ v panoramatickУЉm reХОimu
- zakУЁzУЁny
- mpegmovies boolean Pokud true, jsou pouХОita videa MPEG ve vysokУЉm rozliХЁenУ z
- DVD verze hry, mУsto videУ AVI v nУzkУЉm rozliХЁenУ
-
-8.2) VlastnУ hernУ volby, kterУЉ mohou bУНt pХepУnУЁny pomoci grafickУЉho rozhranУ
----- -------------------------------------------------------------------------
-Mnoho vlastnУch hernУch voleb vТ pХedchozУ ФУЁsti mХЏХОe bУНt pХepnuto pХes grafickУЉ rozhranУ. Pokud je takovУЁto volba pro urФitou hru dostupnУЁ, objevУ se karta "JУЁdro" pХi pХidУЁvУЁnУ nebo УКpravФ nastavenУ tУЉto hry.
-Pokud vlastnУ moХОnosti nejsou zobrazeny, musУ bУНt konkrУЉtnУ hry spuХЁtФny jednou nebo znovu pХidУЁny do seznamu her spouХЁtФФe ScummVM. Toto aktualizuje nastavenУ kaХОdУЉ poloХОky, ФУmХО umoХОnУ zobrazenУ vlastnУch voleb.
-
-9.0) SestavenУ:
----- ----------
-Pro aktuУЁlnУ pХehled o tom, jak ScummVM sestavit pro rХЏznУЉ platformy, prohlУЉdnФte si, prosУm, naХЁУ Wiki, zvlУЁХЁtФ tuto strУЁnku:
-
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM>
-
-Pokud sestavujete ve Windows, Linux nebo Mac OS X, potХebujete SDL-1.2.2
-Nebo novФjХЁУ (starХЁУ verze mohou fungovat, ale nejsou podporovУЁny) a podporovanУН kompilУЁtor. VФtХЁina kompilУЁtorХЏ, vФetnФ GCC, mingw a novФjХЁУch verzУ Microsoft Visual C++ jsou podporovУЁny. Pokud chcete pouХОУt stopy CD komprimovanУЉ do MP3 nebo soubory .SOU, musУte nainstalovat knihovnu MAD; podobnФ potХebujete vhodnУЉ knihovny pro komprimovanУН zvuk pomocУ Ogg Vorbis a FLAC. Pro komprimovanУЉ uloХОenУЉ stavy je potХeba mУt zlib.
-
-NФkterУЉ ФУЁsti ScummVM, zvlУЁХЁtФ zvФtХЁovaФe, majУ vysoce optimalizovanУЉ verze napsanУЉ v assembleru. Pokud si pХejete tuto moХОnost pouХОУt, potХebuje mУt nainstalovУЁn assembler nasm (viz http://www.nasm.us/). NezapomeХte, ХОe vТ souФasnosti mУЁme pouze verze optimalizovanУЉ pro x86 MMX, a nebudou sestaveny pro jinУЉ procesory.
-
-Na Win9x/NT/XP mХЏХОete urФit USE_WINDBG a pХipojit WinDbg pro prochУЁzenУ ladУcУch zprУЁv (viz <https://technet.microsoft.com/en-us/sysinternals/debugview.aspx)>.
-
- Windows:
- * Dev-C++
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/DevCPP>
- * MinGW
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/MinGW>
- * Visual Studio (MSVC)
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Visual_Studio>
- * Windows CE/Mobile
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Windows_CE>
-
- Linux:
- * GCC
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/GCC>
-
- Mac OS X:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Mac_OS_X>
-
- AmigaOS4:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/AmigaOS>
-
- Apple iPhone:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/iPhone>
-
- Atari/FreeMiNT:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Atari/FreeMiNT>
-
- Bada/Tizen:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Bada/Tizen>
-
- BeOS/ZETA/Haiku:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/BeOS/ZETA/Haiku>
-
- Google Android:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Android>
-
- HP webOS:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/WebOS>
-
- Mac OS:
- * Mac OS X
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Mac_OS_X>
- * Mac OS X 10.2.8
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Mac_OS_X_10.2.8>
- * Mac OS X KХУХОovУЁ kompilace
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Mac_OS_X_Crosscompiling>
-
- Maemo:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Maemo>
-
- Nintendo DS:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Nintendo_DS>
-
- Nintendo Wii a Gamecube:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Wii>
-
- RaspberryPi:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/RPI>
-
- Sega Dreamcast:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Dreamcast>
-
- Sony Playstation:
- * Sony PlayStation 2
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/PlayStation_2>
- * Sony PlayStation 3
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/PlayStation_3#Building_from_source>
- * Sony PlayStation Portable
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/PlayStation_Portable>
-
- Symbian:
- PХeФtФte si prosУm:
- <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Symbian>
-
-
-10.0) PodФkovУЁnУ
------ ----------
-ProsУm pХeФtФte si nУЁХЁ rozsУЁhlУН seznam lidУ, kterУНm chceme podФkovat na
-
-<http://www.scummvm.org/credits/>
-
-
-
-
-------------------------------------------------------------------------
-HodnФ Х tФstУ a Х ХЅastnУЉ AdventurovУЁnУ!
-TУНm ScummVM.
-<http://www.scummvm.org/>
-------------------------------------------------------------------------
+PХEФTIMФ ScummVM +------------------------------------------------------------------------ + +Pro vУce informacУ, seznamy kompatibility, podrobnosti o dotacУch, nejnovФjХЁУ verze, +novinky o vУНvoji a dalХЁУ, prosУm navХЁtivte domovskou strУЁnku ScummVM na: <http://www.scummvm.org/> + + +Obsah: +------ +1.0) Уvod + * 1.1 O ScummVM + * 1.2 RychlУН nУЁvod + * 1.3 NejФastФjХЁУ otУЁzky +2.0) Kontakt + * 2.1 HlУЁХЁenУ chyb +3.0) PodporovanУЉ hry + * 3.1 Ochrana proti kopУrovУЁnУ + * 3.2 DatovУЉ soubory + * 3.3 PoznУЁmky ke hrУЁm Multi-CD + * 3.4 ZnУЁmУЉ problУЉmy + * 3.5 PoznУЁmky k Beneath a Steel Sky + * 3.6 PoznУЁmky ke hrУЁm Broken Sword + * * 3.6.1 Broken Sword + * * 3.6.2 Broken Sword II + * * 3.6.3 Videa zТ her Broken Sword + * * 3.6.4 Videa her Broken Sword ve zpФtnУЉm pohledu + * 3.7 PoznУЁmky k Day of the Tentacle + * 3.8 PoznУЁmky k Discworld II + * 3.9 PoznУЁmky k DraФУ Historie + * 3.10 PoznУЁmky k Flight of the Amazon Queen + * 3.11 PoznУЁmky ke Gobliiins + * 3.12 PoznУЁmky k Inherit the Earth: Quest for the Orb + * 3.13 PoznУЁmky k Maniac Mansion na Apple II/NES + * 3.14 PoznУЁmky k Mickey's Space Adventure + * 3.15 PoznУЁmky k Nippon Safes Inc. na Amiga + * 3.16 PoznУЁmky k Simon the Sorcerer + * 3.17 PoznУЁmky k The Curse of Monkey Island + * 3.18 PoznУЁmky k The Feeble Files + * 3.19 PoznУЁmky k The Legend of Kyrandia + * 3.20 PoznУЁmky k Troll's Tale + * 3.21 PoznУЁmky k Winnie the Pooh + * 3.22 PoznУЁmky k PХedvУdavУЉmu VstupnУmu Dialogu her Sierra AGI + * 3.23 Titulky a hlasy soubФХОnФ v hrУЁch Sierra SCI + * 3.24 PoznУЁmky k hrУЁm Zork + * 3.25 PoznУЁmky ke hrУЁm Commodore64 + * 3.26 PoznУЁmky ke hrУЁm Macintosh +4.0) PodporovanУЉ platformy +5.0) SpuХЁtФnУ ScummVM + * 5.1 MoХОnosti pХУkazovУЉho ХУЁdku + * 5.2 Volby jazyka + * 5.3 GrafickУЉ filtry + * 5.4 GlobУЁlnУ menu + * 5.5 KlУЁvesovУЉ zkratky +6.0) UloХОenУЉ hry + * 6.1 AutomatickУЉ uklУЁdУЁnУ + * 6.2 PХevod uloХОenУНch her + * 6.3 ZobrazenУ/NaФtenУ uloХОenУНch her z pХУkazovУЉho ХУЁdku +7.0) Hudba a zvuk + * 7.1 Emulace AdLib + * 7.2 Emulace FluidSynth MIDI + * 7.3 Emulace MT-32 + * 7.4 Emulace MIDI + * 7.5 PХirozenУЁ podpora MIDI + * * 7.5.1 PouХОitУ voleb MIDI pro pХizpХЏsobenУ vУНstupu pХirozenУЉho MIDI + * 7.6 Podpora nativnУho UNIX, ALSA a sekvenceru dmedia + * * 7.6.1 Sekvencer ALSA [POUZE UNIX] + * * 7.6.2 Sekvencer dmedia IRIX [POUZE UNIX] + * 7.7 Podpora MIDI serveru TiMidity++ + * 7.8 PouХОitУ komprimovanУНch zvukovУНch souborХЏ (MP3, Ogg Vorbis, Flac) + * * 7.8.1 PouХОitУ souborХЏ MP3 pro zvuky z CD + * * 7.8.2 PouХОitУ souborХЏ Ogg Vorbis pro zvuky z CD + * * 7.8.3 PouХОitУ souborХЏ Flac pro zvuky z CD + * * 7.8.4 KomprimovУЁnУ MONSTER.SOU pomocУ MP3 + * * 7.8.5 KomprimovУЁnУ MONSTER.SOU pomocУ Ogg Vorbis + * * 7.8.6 KomprimovУЁnУ MONSTER.SOU pomocУ Flac + * * 7.8.7 KomprimovУЁnУ hudby/zvukХЏ/hlasХЏ v hrУЁch AGOS + * * 7.8.8 KomprimovУЁnУ hlasХЏ/hudby v Broken Sword + * * 7.8.9 KomprimovУЁnУ hlasХЏ/hudby v Broken Sword II + * 7.7 Podpora MIDI serveru TiMidity++ + * 7.8 PouХОitУ komprimovanУНch zvukovУНch souborХЏ (MP3, Ogg Vorbis, Flac) + * 7.9 VУНstupnУ vzorkovacУ kmitoФet +8.0) Soubor sТ nastavenУm + * 8.1 RozpoznУЁvanУЁ klУФovУЁ slova nastavenУ + * 8.2 VlastnУ hernУ volby, kterУЉ mohou bУНt pХepУnУЁny pomoci grafickУЉho rozhranУ +9.0) SestavenУ +10.0) PodФkovУЁnУ + + +1.0) Уvod: +---- ----- + +1.1) O ScummVM: +---- ---------- +ScummVM je program, kterУН VУЁm umoХОХuje spouХЁtФt urФitУЉ klasickУЉ grafickУЉ point-and-click adventury, za pХedpokladu, ХОe jiХО mУЁte jejich datovУЉ soubory. A teФ ta chytrУЁ ФУЁst: ScummVM jenom nahrazuje spouХЁtФФe, kterУЉ jsou dodУЁvУЁny se hrou, coХО VУЁm umoХОХuje hrУЁt hry vТ systУЉmech, pro kterУЉ nikdy nebyly navrХОeny! + +PХЏvodnФ byl navrХОen pro spouХЁtФnУ her SCUMM od LucasArts SCUMM, jako napХ. Maniac Mansion, Monkey Island, Day of the Tentacle nebo Sam and Max. SCUMM znamenУЁ 'NУЁstroj pro VytvУЁХenУ Skriptu pro Maniac Mansion', coХО byla prvnУ hra, pro kterou LucasArts tento systУЉm navrhl. A mnohem pozdФji dal svУЉ jmУЉno ScummVM ('VM' znamenУЁ VirtuУЁlnУ Stroj). + +Postupem Фasu byla pХidУЁna podpora pro spoustu her mimo SCUMM a +ScummVM nynУ takУЉ podporuje mnoho AGI a SCI her od Sierra (napХ. King's Quest 1-6, Space Quest 1-5, ...), Discworld 1 a 2, Simon the Sorcerer 1 and 2, Beneath A Steel Sky, Lure of the Temptress, Broken Sword I a II, Flight of the Amazon Queen, Gobliiins 1-3, sУЉrie The Legend of Kyrandia, mnoho ze SCUMMТ her pro dФti od Humongous Entertainment (vФetnФ her Freddi Fish a Putt Putt) a mnoho dalХЁУch. Na strУЁnce kompatibility mХЏХОete najУt УКplnУН seznam sТ podrobnostmi, kterУЉ adventury jsou podporovУЁny a jak dobХe. ScummVM je neustУЁle zlepХЁovУЁn a proto navХЁtФvujte naХЁe strУЁnky Фasto. + +Mezi systУЉmy, na kterУНch mХЏХОete tyto hrУЁt, jsou bФХОnУЉ stolnУ poФУtaФe (majУcУ Windows, Linux, Mac OS X, ...), hernУ konzole +(Dreamcast, Nintendo DS a Wii, PS2, PSP, ...), chytrУЉ telefony (Android, +iPhone, PocketPC, Symbian ...) a dalХЁУ. + +VТ souФasnosti je ScummVM stУЁle velkou ФУЁstУ ve vУНvoji. NezapomeХte, ХОe i kdyХО se snaХОУme zajistit, aby mnoho her bylo moХОno dokonФit pouze sТ pУЁr vУЁХОnУНmi chybami, pУЁdy programu mohou nastat a my neposkytujeme ХОУЁdnУЉ zУЁruky. PХes to vХЁechno, nФkterУЉ hry byly podporovУЁny po dlouhou dobu +A mФly by fungovat vТ poХУЁdku seТ vХЁemi novФjХЁУmi stabilnУmi verzemi. Jak dobХe bude hra ve ScummVM fungovat mХЏХОete zjistit prohlУЉdnutУm strУЁnky kompatibility. +VlastnФ, pokud budete troХЁiФku hledat, mХЏХОete zjistit, ХОe ScummVM je pouХОУvУЁn i komerФnФ pro znovu vydУЁnУ nФkterУНch podporovanУНch her na modernУch platformУЁch. To ukazuje, ХОe i nФkolik spoleФnostУ je spokojeno sТ kvalitou softwaru a jako moc dobХe mХЏХОe nФkterУЉ hry spouХЁtФt. + +Pokud mУЁte ScummVM rУЁdi, mХЏХОete ho podpoХit dotacУ pomocУ tlaФУtka PayPal na strУЁnce ScummVM. To nУЁm pomХЏХОe zakoupit nУЁstroje potХebnУЉ ke snadnФjХЁУmu a rychlejХЁУmu vУНvoji ScummVM. Pokud nemХЏХОete podpoХit dotacУ, pomozte a pХispФjte zУЁplatou! + +1.2) RychlУН nУЁvod: +---- ------------- +Pro ty netrpФlivУЉ zТ VУЁs je tu nУЁvod, jak ScummVM spustit vТ nФkolika krocУch. + +1. StУЁhnФte si ScummVM z <http://www.scummvm.org/downloads.php> a nainstalujte ho. + +2. Na VaХЁem pevnУЉm disku vytvoХte sloХОku a zkopУrujte datovУЉ soubory zТ pХЏvodnУho mУЉdia do tУЉto sloХОky. Zopakujte pro vХЁechny hry, kterУЉ chcete hrУЁt + +3. SpusХЅte ScummVM, zvolte 'PХidat hru', zvolte adresУЁХ sТ datovУНmi soubory hry (nesnaХОte se volit datovУЉ soubory samotnУЉ!) a stisknФte +'Zvolit'. + +4. MФlo by se objevit dialogovУЉ okno umoХОХujУcУ VУЁm pozmФnit rХЏznУЁ nastavenУ, pokud tak chcete (i kdyХО by mФlo bУНt vТ poХУЁdku vХЁechno nechat ve vУНchozУm nastavenУ). DialogovУЉ okno potvrФte. + +5. VТ seznamu vyberte hru, kterou chcete hrУЁt a stisknФte 'Spustit'. + +VТ budoucnu byste mФli bУНt schopni pХeskoФit na krok 5, pokud nechcete pХidat dalХЁУ hry. + +Rada: Pokud chcete pХidat vУce her najednou, zkuste stisknout a drХОet klУЁvesu shift pХedtУm, neХО kliknete na 'PХidat hru' т tlaФУtko se zmФnУ na 'HromadnУЉ PХidУЁnУ' a pokud ho stisknФte, jste znovu poХОУЁdУЁni o zvolenУ sloХОky, ale tentokrУЁt ScummVM prohledУЁ vХЁechny podsloХОky pro podporovanУЉ hry. + + +1.3) NejФastФjХЁУ otУЁzky +---- ------------------ +Na <http://www.scummvm.org/faq/> jsme pro VУЁs pХipravili seznam nejФastФjХЁУch otУЁzek a jejich odpovФdУ. + + +2.0) Kontakt: +---- -------- +NejjednoduХЁХЁУm zpХЏsobem, jak kontaktovat tУНm ScummVM je pХedloХОenУm hlУЁХЁenУ o chybФ (viz oddУl 2.1) nebo pouХОitУm naХЁich fУГr na <http://forums.scummvm.org>. +MХЏХОete se takУЉ pХipojit a odesУlat a e-maily na korespondenФnУ seznam scummvm-devel, nebo si s nУЁmi popovУdejte na IRC (#scummvm na irc.freenode.net) NeХОУЁdejte nУЁs, prosУm, o podporu nefungujУcУ hry т nejdХУve si pХeФtФte nejФastФjХЁУ otУЁzky na naХЁУ strУЁnce + +2.1) HlУЁХЁenУ chyb: +---- ------------- +Abyste mohli nahlУЁsit chybu, nejdХУve si, prosУme, vytvoХte si УКФet na SourceForge a kliknФte na odkaz "Bug Tracker" na naХЁУ strУЁnce. UjistФte se, prosУm, ХОe se chyba dУЁ znovu zjistit a stУЁle se objevuje vТ nejnovФjХЁУ verzi git/dennУho sestavenУ. TakУЉ na naХЁУ strУЁnce zkontrolujte seznam znУЁmУНch problУЉmХЏ (nУХОe) a seznam kompatibility pro tuto hru, abyste se ujistili, ХОe problУЉm jiХО nenУ znУЁm: + + <http://www.scummvm.org/compatibility> + +ProsУme, nenahlaХЁujte chyby ve hrУЁch, kterУЉ nejsou vТ seznamu vТ sekci 'Supported Games' nebo seznamu kompatibility uvedeny jako dokonФitelnУЉ. My тvУme-, ХОe tyto hry majУ chyby. + +ZahrХte, prosУm, nУЁsledujУcУ informace: + - Verzi ScummVM (PROSУME, vyzkouХЁejte nejnovФjХЁУ sestavenУ git/Daily) + - Podrobnosti o chybФ, vФetnФ postupu na jejУ znovu opakovУЁnУ + - Jazyk hry (angliФtina, nФmФina, ...) + - Verze hry (s ХeФУ, z diskety, ...) + - Platforma a kompilУЁtor (Win32, Linux, FreeBSD, ...) + - Pokud moХОno, pХiloХОte uloХОenou hru + - Pokud se tato chyba objevila pouze nedУЁvno, poznamenejte si poslednУ verzi bez chyby a prvnУ verzi sТ touto chybou. Takto ji mХЏХОeme rychle spravit tУm, ХОe se podУvУЁme na provedenУЉ zmФny. + +Nakonec prosУme, abyste kaХОdou chybu nahlaХЁovali samostatnФ; neohlaХЁujte nФkolik chyb vТ jednom hlУЁХЁenУ. (Jinak bude obtУХОnУЉ sledovat stav kaХОdУЉ jednotlivУЉ chyby). + + +3.0) PodporovanУЉ hry: +---- ---------------- +VТ tuto chvУli je o nУЁsledujУcУch hrУЁch znУЁmo, ХОe fungujУ a mФly by bУНt hratelnУЉ aХО dokonce. +PodrobnФjХЁУ seznam kompatibility podporovanУНch her mХЏХОete nalУЉzt na adrese: + + <http://www.scummvm.org/compatibility/>) + + +Hry od LucasArts (SCUMM): + Maniac Mansion [maniac] + Zak McKracken and the Alien Mindbenders [zak] + Indiana Jones and the Last Crusade [indy3] + Loom [loom] + Passport to Adventure [pass] + The Secret of Monkey Island [monkey] + Monkey Island 2: LeChuck's Revenge [monkey2] + Indiana Jones and the Fate of Atlantis [atlantis] + Day of the Tentacle [tentacle] + Sam & Max Hit the Road [samnmax] + Full Throttle [ft] + The Dig [dig] + The Curse of Monkey Island [comi] + +Hry od Activision (MADE): + Leather Goddesses of Phobos 2 [lgop2] + The Manhole [manhole] + Return to Zork [rtz] + Rodney's Funscreen [rodney] + +Hry od Adventuresoft/Horrorsoft (AGOS): + Elvira - Mistress of the Dark [elvira1] + Elvira II - The Jaws of Cerberus [elvira2] + Personal Nightmare [pn] + Simon the Sorcerer 1 [simon1] + Simon the Sorcerer 2 [simon2] + Simon the Sorcerer's Puzzle Pack + - Demon In My Pocket [dimp] + Simon the Sorcerer's Puzzle Pack + - Jumble [jumble] + Simon the Sorcerer's Puzzle Pack + - NoPatience [puzzle] + Simon the Sorcerer's Puzzle Pack + - Swampy Adventures [swampy] + The Feeble Files [feeble] + Waxworks [waxworks] + +Hry od Coktel Vision (GOB): + Bargon Attack [bargon] + Fascination [fascination] + Geisha [geisha] + Gobliiins [gob1] + Gobliins 2 [gob2] + Goblins 3 [gob3] + Lost in Time [lostintime] + Once Upon A Time: Little Red Riding Hood [littlered] + Playtoons: Bambou le sauveur de la jungle [bambou] + The Bizarre Adventures of Woodruff + and the Schnibble [woodruff] + Urban Runner [urban] + Ween: The Prophecy [ween] + +Hry od Revolution Software (RХЏznУЉ): + Beneath a Steel Sky [sky] + Broken Sword: The Shadow of the Templars [sword1] + Broken Sword II: The Smoking Mirror [sword2] + Lure of the Temptress [lure] + +Hry od Sierra (AGI a pХed AGI): + The Black Cauldron [bc] + Gold Rush! [goldrush] + King's Quest I [kq1] + King's Quest II [kq2] + King's Quest III [kq3] + King's Quest IV [kq4] + Leisure Suit Larry in the Land of the + Lounge Lizards [lsl1] + Mixed-Up Mother Goose [mixedup] + Manhunter 1: New York [mh1] + Manhunter 2: San Francisco [mh2] + Police Quest I: In Pursuit of the Death + Angel [pq1] + Space Quest I: The Sarien Encounter [sq1] + Space Quest II: Vohaul's Revenge [sq2] + Hry od fanouХЁkХЏ [agi-fanmade] + Mickey's Space Adventure [mickey] + Troll's Tale [troll] + Winnie the Pooh in the Hundred Acre Wood [winnie] + +Hry od Sierra Entertainment (SCI): + Castle of Dr. Brain [castlebrain] + Codename: ICEMAN [iceman] + Conquests of Camelot [camelot] + Conquests of the Longbow [longbow] + EcoQuest: The Search for Cetus [ecoquest] + EcoQuest 2: Lost Secret of the Rainforest [ecoquest2] + Freddy Pharkas: Frontier Pharmacist [freddypharkas] + Hoyle's Book of Games 1 [hoyle1] + Hoyle's Book of Games 2 [hoyle2] + Hoyle's Book of Games 3 [hoyle3] + Hoyle Classic Card Games [hoyle4] + Jones in the Fast Lane [jones] + King's Quest I [kq1sci] + King's Quest IV [kq4sci] + King's Quest V [kq5] + King's Quest VI [kq6] + Laura Bow: The Colonel's Bequest [laurabow] + Laura Bow 2: The Dagger of Amon Ra [laurabow2] + Leisure Suit Larry 1 [lsl1sci] + Leisure Suit Larry 2 [lsl2] + Leisure Suit Larry 3 [lsl3] + Leisure Suit Larry 5 [lsl5] + Leisure Suit Larry 6 [lsl6] + Mixed-up Fairy Tales [fairytales] + Mixed-up Mother Goose [mothergoose] + Pepper's Adventures in Time [pepper] + Police Quest 1 [pq1sci] + Police Quest 2 [pq2] + Police Quest 3 [pq3] + Quest for Glory 1/Hero's Quest [qfg1] + Quest for Glory 1 [qfg1vga] + Quest for Glory 2 [qfg2] + Quest for Glory 3 [qfg3] + Slater & Charlie Go Camping [slater] + Space Quest I [sq1sci] + Space Quest III [sq3] + Space Quest IV [sq4] + Space Quest V [sq5] + The Island of Dr. Brain [islandbrain] + +DalХЁУ hry: + 3 Skulls of the Toltecs [toltecs] + Amazon: Guardians of Eden [access] + Beavis and Butt-head in Virtual Stupidity [bbvs] + Blue Force [blueforce] + Broken Sword: The Return of the Templars [sword25] + Bud Tucker in Double Trouble [tucker] + Chivalry is Not Dead [chivalry] + Cruise for a Corpse [cruise] + DreamWeb [dreamweb] + Discworld [dw] + Discworld 2: Missing Presumed ...!? [dw2] + Dragon History [draci] + Drascula: The Vampire Strikes Back [drascula] + Eye of the Beholder [eob] + Eye of the Beholder II: The Legend of + Darkmoon [eob2] + Flight of the Amazon Queen [queen] + Future Wars [fw] + Hopkins FBI [hopkins] + Hugo's House of Horrors [hugo1] + Hugo 2: Whodunit? [hugo2] + Hugo 3: Jungle of Doom [hugo3] + I Have No Mouth, and I Must Scream [ihnm] + Inherit the Earth: Quest for the Orb [ite] + Lands of Lore: The Throne of Chaos [lol] + Mortville Manor [mortevielle] + Myst / Myst: Masterpiece Edition [myst] + Nippon Safes Inc. [nippon] + Rex Nebular and the Cosmic Gender Bender [nebular] + Ringworld: Revenge Of The Patriarch [ringworld] + Return to Ringworld [ringworld2] + Sfinx [sfinx] + Soltys [soltys] + The Journeyman Project: Pegasus Prime [pegasus] + The Labyrinth of Time [lab] + The Legend of Kyrandia [kyra1] + The Legend of Kyrandia: The Hand of Fate [kyra2] + The Legend of Kyrandia: Malcolm's Revenge [kyra3] + The Lost Files of Sherlock Holmes: The Case + of the Serrated Scalpel [scalpel] + The Lost Files of Sherlock Holmes: The Case + of the Rose Tattoo [rosetattoo] + The Neverhood [neverhood] + The 7th Guest [t7g] + TeenAgent [teenagent] + Toonstruck [toon] + Tony Tough and the Night of Roasted Moths [tony] + Touche: The Adventures of the Fifth + Musketeer [touche] + U.F.O.s / Gnap: Der Schurke aus dem All [gnap] + Voyeur [voyeur] + Zork: Grand Inquisitor [zgi] + Zork Nemesis: The Forbidden Lands [znemesis] + +Hry od Humongous Entertainment (SCUMM): + Backyard Baseball [baseball] + Backyard Baseball 2001 [baseball2001] + Backyard Baseball 2003 [baseball2003] + Backyard Football [football] + Backyard Football 2002 [football2002] + Bear Stormin' [brstorm] + Big Thinkers First Grade [thinker1] + Big Thinkers Kindergarten [thinkerk] + Blue's 123 Time Activities [Blues123Time] + Blue's ABC Time Activities [BluesABCTime] + Blue's Art Time Activities [arttime] + Blue's Birthday Adventure [BluesBirthday] + Blue's Reading Time Activities [readtime] + Fatty Bear's Birthday Surprise [fbear] + Fatty Bear's Fun Pack [fbpack] + Freddi Fish 1: The Case of the Missing + Kelp Seeds [freddi] + Freddi Fish 2: The Case of the Haunted + Schoolhouse [freddi2] + Freddi Fish 3: The Case of the Stolen + Conch Shell [freddi3] + Freddi Fish 4: The Case of the Hogfish + Rustlers of Briny Gulch [freddi4] + Freddi Fish 5: The Case of the Creature + of Coral Cove [freddicove] + Freddi Fish and Luther's Maze Madness [maze] + Freddi Fish and Luther's Water Worries [water] + Let's Explore the Airport with Buzzy [airport] + Let's Explore the Farm with Buzzy [farm] + Let's Explore the Jungle with Buzzy [jungle] + Pajama Sam: Games to Play on Any Day [pjgames] + Pajama Sam 1: No Need to Hide When It's + Dark Outside [pajama] + Pajama Sam 2: Thunder and Lightning + Aren't so Frightening [pajama2] + Pajama Sam 3: You Are What You Eat + From Your Head to Your Feet [pajama3] + Pajama Sam's Lost & Found [lost] + Pajama Sam's Sock Works [socks] + Putt-Putt Enters the Race [puttrace] + Putt-Putt Goes to the Moon [puttmoon] + Putt-Putt Joins the Circus [puttcircus] + Putt-Putt Joins the Parade [puttputt] + Putt-Putt Saves the Zoo [puttzoo] + Putt-Putt Travels Through Time [putttime] + Putt-Putt and Pep's Balloon-O-Rama [balloon] + Putt-Putt and Pep's Dog on a Stick [dog] + Putt-Putt & Fatty Bear's Activity Pack [activity] + Putt-Putt's Fun Pack [funpack] + SPY Fox 1: Dry Cereal [spyfox] + SPY Fox 2: Some Assembly Required [spyfox2] + SPY Fox 3: Operation Ozone [spyozon] + SPY Fox in Cheese Chase [chase] + SPY Fox in Hold the Mustard [mustard] + +NУЁsledujУcУ hry by mФly jУt spustit, ale zatУm nejsou УКplnФ hratelnУЉ. Hrajte je pouze na vlastnУ riziko a prosУme, abyste pro tyto hry nenahlaХЁovali chyby. +Pokud chcete mУt nejnovФjХЁУ zprУЁvy o kompatibilitУЁch her, navХЁtivte naХЁУ strУЁnku a prohlУЉdnФte si tabulku kompatibilit. + + Backyard Soccer [soccer] + Backyard Soccer MLS [soccermls] + Backyard Soccer 2004 [soccer2004] + Blue's Treasure Hunt [BluesTreasureHunt] + +Hry Composer od Animation Magic: + Darby the Dragon [darby] + Gregory and the Hot Air Balloon [gregory] + Magic Tales: Liam Finds a Story [liam] + The Princess and the Crab [princess] + Sleeping Cub's Test of Courage [sleepingcub] + +Hry Living Books: + Aesop's Fables: The Tortoise and the Hare [tortoise] + Arthur's Birthday [arthurbday] + Arthur's Teacher Trouble [arthur] + Dr. Seuss's ABC [seussabc] + Green Eggs and Ham [greeneggs] + Harry and the Haunted House [harryhh] + Just Grandma and Me [grandma] + Little Monster at School [lilmonster] + Ruff's Bone [ruff] + Sheila Rae, the Brave [sheila] + Stellaluna [stellaluna] + The Berenstain Bears Get in a Fight [bearfight] + The Berenstain Bears in the Dark [beardark] + The New Kid on the Block [newkid] + +NУЁsledujУcУ hry jsou odvozeny od jУЁdra SCUMM, ale ScummVM je nepodporuje (zatУm): + + Moonbase Commander + +NezapomeХte, prosУm, ХОe jУЁdra mohou obsahovat chyby a nezavedenУЉ funkce, kterУЉ nФkdy zabrУЁnУ hru dokonФit. UklУЁdejte Фasto a nahlaste chyby, prosУm (instrukce pro hlУЁХЁenУ chyb jsou vУНХЁe), pokud na takovou chybu narazУte v 'podporovanУЉ' hХe. + + +3.1) Ochrana proti kopУrovУЁnУ: +---- ------------------------- +TУНm ScummVM nepodporuje pirУЁtstvУ. NicmУЉnФ existujУ pХУpady, kdy hernУ spoleФnosti (jako LucasArts) sami ve svУНch hrУЁch poskytujУ 'cracknutУЉ' +spouХЁtФФe т vТ tФchto pХУpadech datovУЉ soubory obsahujУ skripty pro ochranu proti kopУrovУЁnУ, ale pХevadФФ je obejde (toto mХЏХОe podobnФ provУЁdФt nelegУЁlnФ cracknutУЁ verze, sТ tУm rozdУlem, ХОe zde toto provedl vУНrobce hry. Neexistuje ХОУЁdnУН zpХЏsob, jak mХЏХОeme rozliХЁit legitimnУ a pirУЁtskУЉ datovУЉ soubory, takХОe vТ hrУЁch, o kterУНch vУme, ХОe byla nФkdy prodУЁvУЁna cracknutУЁ verze pХЏvodnУho pХevadФФe bude ScummVM muset vХОdy ochranu pХeskoФit. + +VТ nФkterУНch pХУpadech ScummVM pХesto zobrazУ obrazovku ochrany proti kopУrovУЁnУ. Zkuste zadat jakoukoli odpovФФ. Je tu moХОnost, ХОe toto bude fungovat. + +ScummVM pХeskakuje ochranu vТ nУЁsledujУcУch hrУЁch: + + * Beneath a Steel Sky + -- potlaФeno sТ laskavУНm svolenУm Revolution Software. + * Dreamweb + -- seznam dostupnУНch pХУkazХЏ v terminУЁlech ve hХe je nynУ zobrazen + kdyХО hrУЁФ pouХОije pХУkaz 'help' + * Inherit the Earth: Quest for the Orb (Floppy version) + -- potlaФeno sТ laskavУНm svolenУm Wyrmkeep Entertainment, + protoХОe byla potlaФena ve vХЁech vydУЁnУch hry na CD. + * Loom (EGA DOS) + * Maniac Mansion + * Monkey Island 2: LeChuck's Revenge + * Simon the Sorcerer 1 (Floppy version) + * Simon the Sorcerer 2 (Floppy version) + -- potlaФeno sТ laskavУНm svolenУm Adventure Soft, + protoХОe byla potlaФena ve vХЁech vydУЁnУch hry na CD. + * The Secret of Monkey Island (VGA) + * Waxworks + * Zak McKracken and the Alien Mindbenders + + +3.2) DatovУЉ soubory +---- -------------- +Pro pХehlednУН seznam poХОadovanУНch datovУНch souborХЏ u podporovanУНch her navХЁtivte: + +<http://wiki.scummvm.org/index.php/Datafiles> + + +3.3) PoznУЁmky ke hrУЁm Multi-CD: +---- -------------------------- +ObecnФ ScummVM moc dobХe nefunguje s hrami na Multi-CD. To je proto, ХОe ScummVM pХedpoklУЁdУЁ, ХОe vХЁechno o hХe mХЏХОe bУНt nalezeno vТ jednУЉ sloХОce. I kdyХО ScummVM mУЁ schopnost poХОУЁdat uХОivatele, aby vymФnil CD, pХЏvodnУ spouХЁtФФ souboru vФtХЁinou nainstaluje malУЉ mnoХОstvУ souborХЏ na pevnУН disk. Pokud tyto soubory nelze najУt na vХЁech CD, ScummVM bude mУt potУХОe. + +NaХЁtФstУ mХЏХОe ScummVM hry bez problУЉmХЏ spouХЁtФt pХУmo zТ pevnУЉho disku, pokud vytvoХУte sloХОku se sprУЁvnou kombinacУ souborХЏ. VФtХЁinou, kdyХО se soubor objevУ na vУce, neХО jednom CD mХЏХОete vybrat jeden z nich. + + +3.4) ZnУЁmУЉ ProblУЉmy: +---- --------------- +Toto vydУЁnУ mУЁ nУЁsledujУcУ znУЁmУЉ problУЉmy. NenУ tХeba je ohlaХЁovat, i kdyХО zУЁplaty pro jejich opravu jsou vУtУЁny. Pokud objevУte chybu, kterУЁ nenУ zde vТ seznamu, ani nenУ vТ seznamu kompatibility na internetovУЉ strУЁnce, prohlУЉdnФte si, prosУm, ФУЁst o hlУЁХЁenУ chyb. + + Hry CD Audio: + - PХi hranУ her, kterУЉ pouХОУvajУ CD Audio (hry FM-TOWNS, Loom CD, atd) mХЏХОe u uХОivatelХЏ Microsoft Windows 2000/XP dochУЁzet kТ nУЁhodnУНm pУЁdХЏm. To je dУky dlouhotrvajУcУ chybФ Windows, kterУЁ mУЁ za nУЁsledek poХЁkozenУЉ soubory + pХi ФtenУ z CD. Abyste se tomuto vyhnuli, zkopУrujte, prosУm, soubory na pevnУН disk + + Verze FM-TOWNS: + - Verze KandХОi vyХОaduje ROM pУsma FM-TOWNS + + Loom: + - VypnutУ titulkХЏ pomocУ souboru nastavenУ je nevypne spolehlivФ, protoХОe skripty Loom je znovu automaticky zapnou + - Podpora MIDI ve verzi EGA vyХОaduje aktualizaci Roland LucasArts + - Verze KandХОi na PC-Engine vyХОaduje rom systУЉmovУЉ karty + + The Secret of Monkey Island: + - Podpora MIDI ve verzi EGA vyХОaduje aktualizaci Roland LucasArts + + Beneath a Steel Sky: + - Verze pro Amiga nejsou podporovУЁny + - Demoverze zТ diskety nejsou podporovУЁny + - NenУ chyba: Ve verzi na CD chybУ vТ jistУНch dialozУch ХeФ, to je normУЁlnУ. + + Elvira - Mistress of the Dark: + - Ve verzi pro Atari ST nefunguje hudba + + Elvira II - The Jaws of Cerberus: + - Ve verzi pro Atari ST nefunguje hudba + - Ve verzi pro PC nefungujУ zvukovУЉ efekty + - Ve verzi pro Atari ST jsou problУЉmy s paletou + + Inherit the Earth: Quest for the Orb: + - Verze pro Amiga nejsou podporovУЁny + + Lure of the Temptress: + - ХНУЁdnУЁ podpora Roland MT-32 + - Podpora zvuku nenУ dokonФena a neznУ jako v pХЏvodnУ hХe + + Simon the Sorcerer 1: + - VТ anglickУНch a nФmeckУНch verzУch na CD nejsou titulky dostupnУЉ, protoХОe jim vФtХЁina titulkХЏ chybУ. + + Simon the Sorcerer 2: + - Kombinace ХeФi a titulkХЏ Фasto zpХЏsobУ, ХОe ХeФ je pХeruХЁena brzo, toto je omezenУ pХЏvodnУ hry. + - Ve verzУch pro Amiga a Macintosh je podporovУЁn pouze vУНchozУ jazyk datovУНch souborХЏ (angliФtina). + + Simon the Sorcerer's Puzzle Pack: + - ХНУЁdnУЁ podpora pro zobrazovУЁnУ, zadУЁvУЁnУ, uklУЁdУЁnУ, Фi naФУtУЁnУ nejvyХЁХЁУch skУГre. + - ХНУЁdnУЁ podpora pro zobrazovУЁnУ nУЁzvХЏ poloХОek, kdyХО na nФ najedete myХЁУ ve Swampy Adventures. + + The Feeble Files: + - Titulky jsou Фasto nedokonФenУЉ. VТ pХЏvodnУ hХe byly vХОdy zakУЁzУЁny. + + The Legend of Kyrandia: + - Ve verzУch na disketФ pro Mac nenУ ХОУЁdnУЁ hudba ani zvukovУЉ efekty. + - CD Macintosh pouХОУvУЁ zahrnutou hudbu a zvukovУЉ efekty z DOS. + + Hry Humongous Entertainment: + - Pouze pХЏvodnУ rozhranУ pro uloХОenУ a naФtenУ mohou bУНt pouХОity. + - ХНУЁdnУЁ podpora pro hru vУce hrУЁФХЏ nebo tisknutУ obrУЁzkХЏ + + +3.5) PoznУЁmky k Beneath a Steel Sky: +---- ------------------------------- +Od ScummVM 0.8.0 potХebujete dodateФnУН soubor 'SKY.CPT', abyste mohli Beneath a Steel Sky spustit. + +Tento soubor je dostupnУН na strУЁnce 'Downloads' domovskУЉ strУЁnky ScummVM. +MХЏХОete ho umУstit buФ do sloХОky obsahujУcУ ostatnУ datovУЉ soubory (SKY.DNR, SKY.DSK), na VaХЁi dodateФnou cestu, nebo do sloХОky. Kde se nachУЁzУ spouХЁtФcУ soubor ScummVM. + + +3.6) PoznУЁmky ke hrУЁm Broken Sword: +---- ------------------------------ +Pokyny pro hry Broken Sword jsou pro verze od Sold-Out Software, kde kaХОdУЁ hra je na dvou CD, protoХОe tyto verze byly nejdostupnФjХЁУ vТ dobФ, kdy je ScummVM zaФal podporovat. DoufУЁme, ХОe jsou dostateФnФ obecnУЉ pro pouХОitУ i vТ jinУНch vydУЁnУch her. + + +3.6.1) Broken Sword: +------ ------------- +Pro tuto hru budete potХebovat vХЁechny soubory ze seskupenУ sloХОek na obou CD. Pro verze Windows a Macintosh budete takУЉ potХebovat soubory speech.clu ze sloХОek speech, ale protoХОe soubory nejsou stejnУЉ, budete je muset pХejmenovat na speech1.clu a speech2.clu z CD 1 a 2 vТ tomto poХadУ. Verze na PlayStation vyХОaduje speech.tab, speech.dat, speech.lis, a speech.inf. + +DУЁle verze pro Windows a Macintosh vyХОadujУ podsloХОku music se vХЁemi soubory z podsloХОek music na obou CD. NФkterУЉ zТ tФchto souborХЏ se objevujУ na obou CD, ale vТ tФchto pХУpadech jsou buФ stejnУЉ, nebo, vТ jednom pХУpadФ, je tУЉmФХ stejnУН, ХОe to nemУЁ ХОУЁdnУН vУНznam. Verze pro PlayStation vyХОaduje tunes.dat a tunes.tab. + + +3.6.2) Broken Sword II: +------ ---------------- +Pro tuto hru budete potХebovat vХЁechny soubory ze seskupenУ sloХОek na obou CD. (Abych pravdu Хekl, pУЁr zТ nich nemusУ bУНt nezbytnФ nutnУЉ, ale ty, o kterУНch nemУЁm jistotu, jsou velmi malУЉ.) +Je takУЉ tХeba pХejmenovat soubory speech.clu a music.clu na speech1.clu, speech2.clu, music1.clu a music2.clu, aby ScummVM mohl zjistit, kterУЉ jsou z CD 1 a kterУЉ z CD 2. VХЁechny ostatnУ soubory, kterУЉ jsou umУstФny vТ seskupenУ sloХОek, jsou stejnУЉ. PouХОijte kterУЉkoli soubory chcete. + +KromФ toho budete potХebovat soubory cd.inf a, pХУpadnФ, startup.inf ze sloХОky sword2 na CD 1. + + +3.6.3) Videa zТ her Broken Sword: +------ ------------------------- +Videa pro hry Broken Sword majУ vТ sobФ trochu historie (viz dalХЁУ oddУl, pokud jste zvФdavУ), ale obecnФ jedinУЉ, co potХebujete udФlat, je zkopУrovat soubory .SMK ze sloХОek "SMACKS" nebo "SMACKSHI" na CD do stejnУЉ sloХОky jako ostatnУ datovУЉ soubory hry. (Broken Sword mУЁ takУЉ sloХОku "SMACKSLO" se stejnУНmi videi, ale ty jsouТ niХОХЁУ kvality.) MХЏХОete je umУstit do podsloХОky sТ nУЁzvem "video", pokud VУЁm to pХijde hezФУ. + +Ve verzУch pro PlayStation, mХЏХОete pХЏvodnУ videa vypsat z disku. KaХОdУН soubor, kterУН mУЁ pХУponu "STR", byste mФli vypsat jako *Фist* sektory z disku (vХЁech 2352 bajtХЏ na sektor). MХЏХОete takУЉ mУst toho pouХОУt pХeformУЁtovanУЁ videa, kterУЁ jsou zmУnФna nУХОe, ale to nebude fungovat pro vХЁechny videa v Broken Sword II. Pro vУce informacУ si prohlУЉdnФte: + + <http://wiki.scummvm.org/index.php/HOWTO-PlayStation_Videos> + +NФkterУЁ vydУЁnУ hry, a takУЉ verze pro PlayStation, Smacker videa nemajУ. Revolution Software nУЁm laskavФ dovolilo poskytovat pХeformУЁtovanУЁ videa ke staХОenУ na naХЁУ strУЁnce: + + <http://www.scummvm.org/downloads.php> + +Tato videa jsou poskytovУЁna ve formУЁtu DXA se zvukem ve formУЁtu FLAC. Jejich kvalita se rovnУЁ originУЁlu dУky pouХОitУ bezztrУЁtovУЉ komprese. ZobrazenУ tФchto videУ vyХОaduje, aby verze ScummVM byla sestavena sТ podporou FLAC i zlib. + +Pro systУЉmy, kterУЉ jsou pХУliХЁ pomalУЉ, aby zvlУЁdli dekУГdovat formУЁt FLAC byl zvuk videУ takУЉ poskytnut oddФlenФ ve formУЁtu OGG Vorbis audio. Toto vyХОaduje, aby verze ScummVM byla sestavena sТ podporou libVorbis a zlib. + +Pro Broken Sword takУЉ poskytujeme pХУdavek pro titulky. JednoduХЁe ho rozbalte a nУЁsledujte pokyny v souboru readme.txt. BalУФek vТ souФasnosti nefunguje ve videУch na PlayStation. (Broken Sword II jiХО titulky mУЁ; nenУ tХeba dalХЁУ prУЁce pro jejich pХidУЁnУ.) + + +3.6.4) Videa her Broken Sword ve zpФtnУЉm pohledu: +------ ------------------------------------------ +PХЏvodnУ vydУЁnУ her Broken Sword pouХОУvalo formУЁt SmackerтЂ od RAD Game Tools. ProtoХОe spoleФnost RAD nebyla ochotna nУЁm otevХУt starХЁУ zastaralУЉ verze tohoto formУЁtu a poХОУЁdala, abychom neprovУЁdФli jeho zpФtnou analУНzu, museli jsme nalУЉzt jinУЉ ХeХЁenУ. + +V Broken Sword II bylo moХОnУЉ pХehrУЁt ХeФ, aniХО by se muselo pХehrУЁvat video. To zХЏstalo jako nouzovУЉ ХeХЁenУ aХО do ScummVM 1.0.0, ale pro vХЁechny stabilnУ verze to nikdy nebylo jedinУЉ ХeХЁenУ. + +Ve ScummVM 0.6.0 jsme pouХОУvali MPEG, coХО zajistilo rozumnУН kompromis mezi velikostУ a kvalitou. Ve ScummVM 0.10.0 bylo toto nahrazeno DXA +(pХЏvodnФ pХidУЁno pro "The Feeble Files" od AdventureSoft). To nУЁm dalo moХОnost zajistit videa ve stejnУЉ kvalitФ jako pХЏvodnУ, za cenu vФtХЁУ velikosti. + +Nakonec na zaФУЁtku roku 2006 byl formУЁt Smacker zpФtnФ analyzovУЁn pro projekt FFmpeg. DУky jejich tvrdУЉ prУЁci ScummVM 1.0.0 nynУ podporuje pХЏvodnУ videa. ZУЁroveХ byla ukonФena podpora MPEG. ZТ technickУЉho hlediska je toto dobХe, protoХОe pХehrУЁvУЁnУ videУ MPEG bylo velmi sloХОitУЉ a stejnФ nevypadaly tak dobХe jako verze ve formУЁtu DXA a Smacker. + + +3.7) PoznУЁmky k Day of the Tentacle: +---- ------------------------------- + +Na jednom mУstФ ve hХe narazУte na poФУtaФ umoХОХujУcУ si zahrУЁt pХЏvodnУ Maniac Mansion jako bonus. ScummVM toto podporuje, ale je tХeba upozornit na pУЁr vФcУ: + +ScummVM prohledУЁ vУЁХЁ soubor s nastavenУm hledajУc hru nachУЁzejУcУ se v podsloХОce 'Maniac' ve sloХОce hry Day of the Tentacle. Pokud jste zkopУrovali datovУЉ soubory z CD verze, tato struktura by jiХО mФla bУНt +vytvoХena, navУc ale budete muset hru pХidat takУЉ do ScummVM. + +Pro nУЁvrat do Day of the Tentacle, stisknФte F5 a zvolte "NУЁvrat do spouХЁtФФe". + +Teoreticky toto znamenУЁ, ХОe je moХОnУЉ spustit jakoukoli hru jako bonus. Vskutku tomu tak je. Existuje "tajnУЁ" volba nastavenУ, "easter_egg", kterУЁ mФnУ ID spouХЁtФnУЉ hry. BuФte ale opatrnУ, protoХОe ne vХЁechny hry podporujУ +nУЁvrat do spouХЁtФФe, a nedoporuФuje se nastavovat spuХЁtФnУ samotnУЉ hry Day of the Tentacle jako bonus. + + +3.8) PoznУЁmky k Discworld II: +---- ------------------------ + +Pro tuto hru potХebujete vХЁechny soubory z podsloХОky DW2 na obou CD. +DУЁle je tХeba zkopУrovat soubor SAMPLE.BNK. + +Je tХeba pХejmenovat soubory ENGLISH.SMP, ENGLISH.IDX a ENGLISH.TXT na CD1 na ENGLISH1.SMP, ENGLISH1.IDX a ENGLISH1.txt. +To samУЉ provУЉst se soubory z CD2 a pХejmenovat je na ENGLISH2.SMP, ENGLISH2.IDX a ENGLISH2.TXT. + + +3.9) PoznУЁmky k DraФУ Historie: +---- -------------------------- +ExistujУ 4 jazykovУЉ varianty tУЉto hry: ФeskУЁ, anglickУЁ, polskУЁ a nФmeckУЁ. KaХОdУЁ je umУstФna vТ oddФlenУЉm archivu. JedinУЁ oficiУЁlnУ verze je ФeskУЁ, a anglickУЁ, polskУЁ a nФmeckУЁ byly vХОdycky nedokonФenУЉ prУЁce a nikdy nebyly oficiУЁlnФ vydУЁny. I kdyХО texty byly zcela pХeloХОeny, je znУЁmo, ХОe nФkterУЉ zТ nich obsahujУ pХeklepy. + +Pro tuto hru existuje nepovinnУН ФeskУН dabing. ZТ dХЏvodu velikosti si ho mХЏХОete dodateФnФ stУЁhnout a pak ho rozbalit do adresУЁХe hry. MХЏХОete takУЉ ФeskУН dabing poslouchat se vХЁemi jazykovУНmi varianty hry, zatУmco Фtete titulky. + +VХЁechny hernУ soubory a nУЁvody mХЏХОou bУНt staХОeny z: + +<http://www.ucw.cz/draci-historie/index-en.html> + + +3.10) PoznУЁmky k Flight of the Amazon Queen: +----- -------------------------------------- +Abyste mohli pouХОУt tu verzi, kterУЁ nenУ volnФ ХЁiХitelnУЁ (z pХЏvodnУho CD), musУte mУt soubor 'queen.tbl' (dostupnУН ze strУЁnky 'Downloads' naХЁУ domovskУЉ strУЁnky) a umУstit ho buФ do sloХОky obsahujУcУ soubor hry 'queen.1', +na VaХЁi dodateФnou cestu, nebo do sloХОky. Kde se nachУЁzУ spouХЁtФcУ soubor ScummVM. + +TakУЉ mХЏХОete pouХОУt nУЁstroj 'compress_queen' zТ balУФku nУЁstrojХЏ pro 'znovu sestavenУ' VaХЁeho datovУЉho souboru FOTAQ pro zahrnutУ tabulky pro tuto konkrУЉtnУ verzi, ФУmХО odstranУte zУЁvislost na soubor 'queen.tbl' pХi spuХЁtФnУ. Tento nУЁstroj VУЁm takУЉ umoХОХuje komprimovat ХeФ a zvukovУЉ efekty do formУЁtu MP3, OGG nebo FLAC. + + +3.11) PoznУЁmky ke Gobliiins: +----- ---------------------- +CD verze sУЉrie Gobliiins obsahuje jednu velkou zvukovou stopu, kterou je tХeba vyjmout (viz oddУl o pouХОitУ komprimovanУНch zvukovУНch souborХЏ) a zkopУrovat ji do hernУ sloХОky, pokud chcete ve hХe hudbu, aniХО byste museli CD mУt stУЁle v jednotce. VТ tУЉto stopФ je takУЉ ХeФ a jejУ hlasitost se tedy takУЉ mФnУ podle hlasitosti hudby. + + +3.12) PoznУЁmky k Inherit the Earth: Quest for the Orb: +----- ------------------------------------------------ +Abyste mohli spustit verzi pro Mac OS X od Wyrmkeep musУte data zkopУrovat zТ CD na VУЁХЁ pevnУН disk. Pokud pouХОУvУЁte PC, pak se podУvejte na: + + <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 "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 + +Ve starУЉ verzi pro Mac OS 9 potХebujete soubory zkopУrovat ve formУЁtu MacBinary, protoХОe by mФli obsahovat jak zdrojovУЉ, tak datovУЉ vidlice. ZkopУrujte vХЁechny soubory 'ITE *'. + + +3.13) PoznУЁmky ke Maniac Mansion na Apple II/NES: +----- ------------------------------------------- +Apple II: +Je tХeba pХejmenovat obraz disku 1 na maniac1.dsk +Je tХeba pХejmenovat obraz disku 2 na maniac2.dsk + +NES: +PodporovanУЉ verze jsou BritskУЁ angliФtina (E), FrancouzХЁtina (F), NФmФina (G), ItalХЁtina (I), Х vУЉdХЁtina (SW) a AmerickУЁ angliФtina (U). ScummVM pro spuХЁtФnУ vyХОaduje pouze ФУЁst PRG a ne celУН ROM. + +Abyste mohli hru spustit, musУte vyjmout prvnУch 16 bajtХЏ zТ ROM, sТ kterУНm pracujete. JakУНkoli hex editor bude fungovat, pokud mХЏХОete kopУrovat/vklУЁdat. PotУЉ. Co ROM otevХete pomocУ hex editoru, zkopУrujte vХЁechno zТ druhУЉho ХУЁdku (17. bajt) na konec. PotУЉ, co toto provedete, vloХОte ho do novУЉho hex souboru. Pojmenujte ho "Maniac Mansion (XX).prg" kde XX znamenУЁ verzi, se kterou pracujete (E, F, G, I, SW, nebo U). KoneФnУЁ velikost by mФla bУНt pХesnФ 262144 bajtХЏ. + +Pokud hru pХidУЁvУЁte ruФnФ, ujistФte se, ХОe platforma je nastavena na NES. + +NejbФХОnФjХЁУ chyby, kterУЉ zabraХujУ spuХЁtФnУ hry: + + * Х patnУН soubor + * ROM byl extrahovУЁn pomocУ nУЁstrojХЏ z verze 0.7.0 + * SnaХОУte se do ScummVM vklУЁdat CELУ ROM a ne jenom PRG ФУЁst. + +Je takУЉ moХОno extrahovat oddФlenУЉ soubory LFL zТ PRG ФУЁsti. Pro toto pouХОijte nУЁstroj 'extract_mm_nes' zТ balУФku nУЁstrojХЏ. + + +3.14) PoznУЁmky k Mickey's Space Adventure: +----- ------------------------------------ +Abyste mohli Mickey's Space Adventure hrУЁt ve ScummVM, potХebujete spolu sТ datovУНmi soubory hry takУЉ pХЏvodnУ spouХЁtФФ (mickey.exe). + +Pro tuto hru ve ScummVM, existuje rozХЁУХenУЁ podpora myХЁi, i kdyХО vТ pХЏvodnУ hХe takovУЁto podpora nebyla. PoloХОky menu mohou bУНt vybrУЁny pomocУ myХЁi a je takУЉ moХОnУЉ se myХЁУ pХesunout do jinУНch mУst. KdyХО se kurzor myХЁi nachУЁzУ na okraji obrazovky, zФervenУЁ, pokud je moХОnУЉ jУt vТ tomto smФru. HrУЁФ pak mХЏХОe jednoduХЁe kliknout na okraje hernУ obrazovky pro zmФnu mУsta, podobnФ jako mnoho adventur, coХО je jednoduХЁХЁУ a pХУmoФaХejХЁУ neХО pohyb pomocУ menu. + + +3.15) Nippon Safes Inc. Amiga notes: +----- ------------------------------ +Pro tuto hru potХebujete disk0, soubory global.table a pointer a it (en, fr, ge pro mezinУЁrodnУ verzi). + +DУЁle je tХeba pХejmenovat obraz disku 2 na disk1, obraz disku 3 na disk2, obraz disku 4 na disk3 a obraz disku 5 na disk4. + + +3.16) PoznУЁmky k Simon the Sorcerer 1 a 2: +----- ------------------------------------ +Pokud mУЁte dvojitou verzi Simon the Sorcerer 1 nebo 2 na CD, verzi pro Windows naleznete vТ hlavnУ sloХОce na CD a verzi pro DOS ve sloХОce DOS na CD. + + +3.17) PoznУЁmky k The Curse of Monkey Island: +----- -------------------------------------- +Pro tuto hru budete potХebovat soubory comi.la0, comi.la1 a comi.la2. +Soubor comi.la0 mХЏХОete nalУЉzt na vХЁech CD hry, ale protoХОe jsou stejnУЉ, mХЏХОete pouХОУt kterУНkoli z nich. + +DУЁle potХebujete vytvoХit podsloХОku "resource" obsahujУcУ vХЁechny soubory z тobou- podsloХОek "resource" na dvou CD. NФkterУЉ soubory se objevujУ na obou CD, ale znovu jsou stejnУЉ. + + +3.18) PoznУЁmky k The Feeble Files: +----- ---------------------------- +Amiga/Macintosh: +MusУte nainstalovat malУН balУФek videУ, kterУЉ chybУ v obou tФchto verzУch tУЉto hry. Jmenuje se "The Feeble Files - Omni TV and epilogue cutscenes for the Amiga and Macintosh versions" +a lze ho zУskat zde: + + <http://www.scummvm.org/games/#feeble> + +Windows: +Pokud mУЁte verzi pro Windows, je tХeba si uvФdomit pУЁr vФcУ. + +Mnoho souborХЏ, kterУЉ hra vyХОaduje, je uloХОeno v souboru InstallShield s nУЁzvem data1.cab, kterУН ScummVM nemХЏХОe rozbalit. Budete muset pouХОУt pХЏvodnУ instalУЁtor, nebo i5comp pro rozbalenУ obsahu tohoto souboru. NУЁstroj pro dekomprimaci i5comp mХЏХОe bУНt nalezen pХi hledУЁnУ na internetu. + +Abyste mohli pouХОУt soubory sТ ХeФУ ve ScummVM, musУ bУНt pХejmenovУЁny nУЁsledovnФ: +PХejmenovat voices.wav na CD1 na voices1.wav +PХejmenovat voices.wav na CD2 na voices2.wav +PХejmenovat voices.wav na CD3 na voices3.wav +PХejmenovat voices.wav na CD4 na voices4.wav + +3.19) PoznУЁmky k The Legend of Kyrandia: +----- ---------------------------------- +Abyste mohli spustit The Legend of Kyrandia ve ScummVM potХebujete soubor 'kyra.dat'. +Soubor by mФl bУНt vХОdycky souФУЁstУ oficiУЁlnУch balУФkХЏ ScummVM. V pХУpadФ, ХОe ScummVM +nahlУЁsУ, ХОe soubor chybУ, mХЏХОete ho najУt na strУЁnce ScummVM v sekci 'Downloads'. +NezapomeХte, ХОe souФasnУЁ verze ScummVM pro Windows by mФla soubor obsahovat ve spouХЁtФФi a tudУХО ho +musУte mУt pouze, kdyХО ScummVM soubor nemХЏХОe nalУЉzt. + + +3.20) PoznУЁmky k Troll's Tale: +----- ------------------------ +PХЏvodnУ hra vychУЁzela na zavУЁdФcУm disku PC, proto je nutnУЉ vypsat obsah tohoto disku jako obraz disku a pХejmenovat ho na "troll.img", abyste tuho hru mohli hrУЁt ve ScummVM. + + +3.21) Winnie the Pooh notes: +----- ---------------------- +Je moХОnУЉ importovat uloХОenУЉ hry zТ pХЏvodnУ hry do ScummVM. + +Pro tuto hru ve ScummVM, existuje rozХЁУХenУЁ podpora myХЁi, i kdyХО vТ pХЏvodnУ hХe takovУЁto podpora nebyla. PoloХОky menu mohou bУНt vybrУЁny pomocУ myХЁi a je takУЉ moХОnУЉ se myХЁУ pХesunout do jinУНch mУst. KdyХО se kurzor myХЁi nachУЁzУ na okraji obrazovky, zФervenУЁ, pokud je moХОnУЉ jУt vТ tomto smФru. HrУЁФ pak mХЏХОe jednoduХЁe kliknout na okraje hernУ obrazovky pro zmФnu mУsta, podobnФ jako mnoho adventur, coХО je jednoduХЁХЁУ a pХУmoФaХejХЁУ neХО pohyb pomocУ menu. + + +3.22) PoznУЁmky kТ PХedvУdavУЉmu VstupnУmu Dialogu her Sierra AGI: +----- --------------------------------------------------------- +PХedvУdavУН VstupnУ Dialog je pomХЏcka ScummVM pro spouХЁtФnУ her pouХОУvajУcУ jУЁdro AGI (kterУН je znУЁm, ХОe vyХОaduje vstup zТ pХУkazovУЉ ХУЁdky) na zaХУzenУch sТ omezenou podporou klУЁvesnice. VТ tФchto situacУch, kdy zadУЁvУЁnУ pomocУ emulovanУЉ klУЁvesnice je dosti УКnavnУЉ, mХЏХОou bУНt pХУkazy rychle a snadno zadУЁny pomocУ PХedvУdavУЉho VstupnУho Dialogu. + +Abyste zapnuli pХedvУdavУН vstup v hrУЁch AGI, potХebujete zkopУrovat soubor pred.dic do dodateФnУЉ sloХОky ScummVM nebo do sloХОky hry, kterou chcete hrУЁt. Tento slovnУk byl vytvoХen analУНzou vХЁech znУЁmУНch her AGI a obsahuje maximУЁlnУ sadu bФХОnУНch slov. + +Pokud je slovnУk zjiХЁtФn, je PХedvУdavУН VstupnУ Dialog zobrazen buФ pХi kliknutУ na oblast pХУkazovУЉho ХУЁdku (kdykoliv je poХОadovУЁn vstup klУЁvesnice, i vТ rУЁmeФcУch dialogovУНch oken), nebo v nФkterУНch verzУch pro jinУЉ systУЉmy stisknutУm urФenУЉ klУЁvesovУЉ zkratky. + +PХedvУdavУН VstupnУ Dialog pracuje ve tХech reХОimech, kterУЉ jsou pХepУnУЁny tlaФУtkem (*)Pre/123/Abc. HlavnУ vstupnУ metodou je pХedvУdavУН reХОim +(Pre), kterУН pХipomУnУЁ "rychlУЉ zadУЁvУЁnУ" vТ mobilnУch telefonech. +Abeceda je rozdФlena do 9 sad, kterУЉ pХirozenФ odpovУdajУ 9 klУЁvesУЁm ФУselnУЉ klУЁvesnice (0 je mezera). Pro psanУ slova zmУЁФknФte jednou ФУslo sady, kterУЁ obsahuje pУsmeno slova, kterУЉ chcete napsat, pak pokraФujete kТ dalХЁУmu. NapХУklad, pokud chcete napsat pХУkaz 'look', mФli byste zmУЁФknout 5665. Jak postupnФ pУХЁete ФУselnУН kУГd zamУНХЁlenУЉho slova, je slovnУk prohledУЁvУЁn pro znУЁmУЁ slova, kterУЁ se shodujУ sТ VaХЁУm vstupem aХО do tohoto bodu. Jak maФkУЁte vУce klУЁves, slovnУk se pХiblУХОУ ke sprУЁvnУЉmu slovu. To je dХЏvod, proФ vypsanУЉ slovo se mХЏХОe nУЁhle zmФnit mezi stisky klУЁves. NФkdy se ale vyskytnou pХУpady, kdy vУce neХО jedno slovo mУЁ stejnУЉ ФУselnУЉ zastoupenУ. NapХУklad slova 'quit' a 'suit' odpovУdajУ stejnУНm ФУslХЏm, a to 7848. VТ tФchto pХУpadech se rozsvУtУ tlaФУtko dalХЁУ +(#). Jeho stisknutУm mХЏХОete prochУЁzet seznam slov, kterУЁ sdУlejУ stejnУН kУГd a nakonec pХijmout to sprУЁvnУЉ stisknutУm (0)mezera nebo tlaФУtka Ok. + +Druhou vstupnУ metodou (123) je ФУselnУН vstup: KaХОdou klУЁvesu, kterou stisknФte, je doslova zadУЁna jako ФУslo. + +TХetУ vstupnУ metodou (Abc) je vstupnУ reХОim Alfa/opakovanУЉho stisknutУ tlaФУtka. Tento reХОim je urФen pro zadУЁvУЁnУ textu bez pomoci od slovnУku pХedvУdavУЉho reХОimu (Pre). Text je zadУЁvУЁn po jednotlivУНch pУsmenech. Pro kaХОdУЉ pУsmeno nejdХУve stisknФte ФУslo sady, kterУЉ obsahuje pУsmeno, kterУЉ chcete, pak pouХОijte tlaФУtko dalХЁУ (#) pro prochУЁzenУ pУsmeny a opakujte sТ dalХЁУm ФУslem. NapХУklad, pro zadУЁnУ slova 'look' musУte stisknout nУЁsledujУcУ: 5##6##6##5# + +DialogovУЉ okno je plnФ pouХОitelnУЉ pomocУ myХЁi, ale vТ nФkterУНch verzУch ScummVM pro jinУЉ platformy, je pouХОitУ dialogu pohodlnФjХЁУ pomocУ ФУselnУЉ klУЁvesnice. NФkterУЁ tlaФУtka dialogu mohou bУНt takУЉ pouХОУvУЁna pomocУ ХЁipkovУНch klУЁves a enter. + + +3.23) Titulky a hlasy soubФХОnФ v hrУЁch Sierra SCI: +----- -------------------------------------------- +UrФitУЉ CD verze her Sierra SCI majУ textovУЁ i hlasovУЁ data. +NФkterУЉ z nich majУ volbu pro pХepУnУЁnУ mezi nimi, ale existujУ pХУpady +kde nenУ moХОnost povolit oba najednou. Ve ScummVM je moХОnУЉ si uХОУt tento +kombinovanУН reХОim, kde jsou zvuk i text zobrazeny souФasnФ. Tento reХОim +mХЏХОe bУНt povolen v nastavenУ zvuku ScummVM, ale kaХОdУЁ hra se chovУЁ jinak +vzhledem k povolenУ textu a hlasu. + +Hry na CD, kde zvuk i titulky lze zobrazit souФasnФ: + EcoQuest 1 CD + Freddy Pharkas CD + King's Quest 6 CD + Laura Bow 2 CD + Leisure Suit Larry 6 CD + Space Quest 4 CD + +EcoQuest 1 CD: + Hlas i text lze zapnout pomocУ volby "Mode" v oknФ nastavenУ, + nebo pХes nastavenУ zvuku ScummVM. + +Freddy Pharkas CD: + Ve hХe neexistuje moХОnost pro povolenУ hlasu a textu. Pro tuto funkci + je tХeba pouХОУt nastavenУ zvuku ve ScummVM. NФkterУЉ mluvenУЉ dialogy + chybУ v textech hry. + +King's Quest 6 CD + Hlas i text lze zapnout pomocУ volby "Mode" v oknФ nastavenУ (kde je ve + ScummVM pХidУЁna dodateФnУЁ volba "Dual"), nebo pomocУ nastavenУ + zvuku ve ScummVM. + +Laura Bow 2 CD + Hlas i text lze zapnout pomocУ volby "Mode" v oknФ nastavenУ (kde je ve + ScummVM pХidУЁna dodateФnУЁ volba "Dual"), nebo pomocУ nastavenУ + zvuku ve ScummVM. + +Leisure Suit Larry 6 CD + Ve hХe lze povolit buФ hlas, nebo hlas a text. Neexistuje moХОnost pro + povolenУ textu. Pouze nastavenУ zvuku ve ScummVM lze pouХОУt pro + zobrazenУ jen titulkХЏ. + +Space Quest 4 CD: + Hlas a text lze povolit pomocУ tlaФУtka "Display Mode" v + nastavenУ hry, nebo pomocУ nastavenУ zvuku ve ScummVM. + + +3.24) PoznУЁmky ke hrУЁm Zork: +----- ---------------------- +Pro spuХЁtФnУ podporovanУНch her Zork (Zork Nemesis: The Forbidden Lands a Zork: Grand Inquisitor) musУte zkopУrovat nФkterУЁ (dodateФnУЁ) data do odpovУdajУcУch umУstФnУ. + +Zork Nemesis: The Forbidden Lands + +VХЁechny verze + +StУЁhnФte si balУФek pУsem Liberation(tm) +<https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-2.00.1.tar.gz> +a rozbalte vХЁechny soubory ttf do vaХЁУ dodateФnУЉ sloХОky ScummVM. +Nebo si stУЁhnФte balУФek GNU FreeFont TTF +<https://ftp.gnu.org/gnu/freefont/freefont-ttf.zip> a umУstФte vХЁechny soubory ttf z adresУЁХe sfd do dodateФnУЉ sloХОky ScummVM, i kdyХО je tХeba ХУci, ХОe v souФasnУЉ dobФ +majУ nФkterУЁ tato pУsma potУХОe pХi vykreslovУЁnУ. +StУЁhnФte si opravu pro titulky +<http://www.thezorklibrary.com/installguides/znpatch.zip> a rozbalte adresУЁХ addon pХУmo do koХenovУЉho adresУЁХe hry + +Verze z GoG + +PouХОijte instalУЁtor GoG, ХОУЁdnУНch dalХЁУch krokХЏ nenУ tХeba + +Verze z CD + +ZkopУrujte nУЁsledujУcУ z adresУЁХe nemesis na CD1 do koХenovУЉho adresУЁХe hry: +AdresУЁХ znemmx +AdresУЁХ znemscr +nemesis.str +Z CD1 zkopУrujte adresУЁХ zassets do koХenovУЉho adresУЁХe hry +Z CD2 zkopУrujte adresУЁХ zassets do koХenovУЉho adresУЁХe hry a nahraФte vХЁechny soubory +Z CD3 zkopУrujte adresУЁХ zassets do koХenovУЉho adresУЁХe hry a nahraФte vХЁechny soubory + +Verze z DVD + +ZkopУrujte nУЁsledujУcУ z adresУЁХe nemesis do koХenovУЉho adresУЁХe hry: +AdresУЁХ znemmx +AdresУЁХ znemscr +nemesis.str +PoznУЁmka: Je tХeba takУЉ pХesunout cursor.zfs z adresУЁХe zassets/global do adresУЁХe znemscr +ZkopУrujte adresУЁХ disc2 do koХenovУЉho adresУЁХe hry +ZkopУrujte adresУЁХ disc3 do koХenovУЉho adresУЁХe hry +ZkopУrujte adresУЁХ zassets do koХenovУЉho adresУЁХe hry + + +Zork: Grand Inquisitor + +VХЁechny verze + +StУЁhnФte si balУФek pУsem Liberation(tm) +<https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-2.00.1.tar.gz> +a rozbalte vХЁechny soubory ttf do vaХЁУ dodateФnУЉ sloХОky ScummVM. +Nebo si stУЁhnФte balУФek GNU FreeFont TTF +<https://ftp.gnu.org/gnu/freefont/freefont-ttf.zip> a umУstФte vХЁechny soubory ttf z adresУЁХe sfd do dodateФnУЉ sloХОky ScummVM, i kdyХО je tХeba ХУci, ХОe v souФasnУЉ dobФ +majУ nФkterУЁ tato pУsma potУХОe pХi vykreslovУЁnУ. + +Verze z GoG + +PouХОijte instalУЁtor GoG, ХОУЁdnУНch dalХЁУch krokХЏ nenУ tХeba + +Verze z CD + +ZkopУrujte nУЁsledujУcУ z adresУЁХe zgi na CD1 do koХenovУЉho adresУЁХe hry: +AdresУЁХ zgi_mx +cursor.zfs +death.zfs +inquis.str +inquis.zix +r.svr +scripts.zfs +subtitle.zfs +Z CD1 zkopУrujte adresУЁХ zassets1 do koХenovУЉho adresУЁХe hry +Z CD2 zkopУrujte adresУЁХ zassets2 do koХenovУЉho adresУЁХe hry +DoporuФujeme V8m nainstalovat zУЁplatu 1.2 +<http://www.thezorklibrary.com/installguides/Zpatch.exe>, +ale je moХОnУЉ ХОe pro to budete muset hru nainstalovat normУЁlnУm zpХЏsobem, protoХОe zУЁplata mУЁ vlastnУ instalУЁtor. + +Verze z DVD + +ZkopУrujte nУЁsledujУcУ z adresУЁХe zgi_e do koХenovУЉho adresУЁХe hry: +AdresУЁХ addon (oprava hry 1.2) +AdresУЁХ zgi_mx +cursor.zfs +death.zfs +inquis.str +inquis.zix +r.svr +scripts.zfs +subtitle.zfs +ZkopУrujte adresУЁХ eng_mpeg (video soubory MPEG2 ve vysokУЉm rozliХЁenУ) do koХenovУЉho adresУЁХe hry +ZkopУrujte adresУЁХ zassetsc do koХenovУЉho adresУЁХe hry +ZkopУrujte adresУЁХ zassetse do koХenovУЉho adresУЁХe hry + + +3.25) PoznУЁmky keТ hrУЁm Commodore64: +----- ----------------------------- +Jak Maniac Mansion tak Zak McKracken mohou bУНt spuХЁtФny, ale Maniac Mansion nenУ jeХЁtФ hratelnУН. JednoduХЁe pojmenujte disky D64 jako +"maniac1.d64" a "maniac2.d64" nebo "zak1.d64" a "zak2.d64", pak by mФl ScummVM automaticky hru zjistit, pokud ho odkУЁХОete na sprУЁvnou sloХОku. + +Nebo mХЏХОete pouХОУt 'extract_mm_c64' zТ balУФku nУЁstrojХЏ pro extrahovУЁnУ datovУНch souborХЏ. Pak ale ScummVM hru ХУЁdnФ automaticky nezjistУ ScummVM, a musУte se ujistit, ХОe platforma je nastavena na Commodore64. DoporuФujeme pouХОУt mnohem jednoduХЁХЁУ postup popsanУН vТ pХedchozУm odstavci. + + +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 "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). + +VТ balУФku nУЁstrojХЏ takУЉ poskytujeme nУЁstroj nazvanУН 'extract_scumm_mac', kterУН extrahuje data zТ tФchto datovУНch souborХЏ, ale toto nenУ ani potХeba, ani doporuФeno. + +Pro dalХЁУ informace o kopУrovУЁnУ hernУch souborХЏ Macintosh na VУЁХЁ pevnУН disk si prohlУЉdnФte: + + <http://wiki.scummvm.org/index.php/HOWTO-Mac_Games> + + +4.0) PodporovanУЉ Platformy: +---- ---------------------- +ScummVM byl vytvoХen tak, aby mohl fungovat na mnoha platformУЁch a operaФnУch systУЉmech. +Odkazy na tyto verze mХЏХОou bУНt nalezeny buФ na strУЁnkУЁch ScummVM nebo vyhledУЁvУЁnУm na internetu. Mnoho dУkХЏ naХЁim programУЁtorХЏm za jejich УКsilУ. Pokud mУЁte verzi ScummVM pro jinou platformu/systУЉm a chcete ho odevzdat do hlavnУho УКloХОiХЁtФ, nevУЁhejte nУЁs kontaktovat! + +PodporovanУЉ platformy zahrnujУ (mimo jinУЉ): + + UNIX (Linux, Solaris, IRIX, *BSD, ...) + Windows + Windows CE + Windows Mobile (vФetnФ SmartphonХЏ a PocketPCs) + Mac OS X + AmigaOS + Android + BeOS + Dreamcast + GP2x + iPhone (vФetnФ iPod Touch a iPad) + Maemo (Nokia Internet tablet N810) + Nintendo 64 + Nintendo DS + Nintendo GameCube + Nintendo Wii + OS/2 + PlayStation 2 + PlayStation Portable + Symbian + WebOS + +Verze pro Dreamcast nepodporuje The Curse of Monkey Island, ani The Dig. Verze pro Nintendo DS nepodporuje Full Throttle, The Dig, nebo The Curse of Monkey Island. +Pro dalХЁУ omezenУ vТ zУЁvislosti na platformФ se, prosУm, podУvejte na naХЁУ Wiki: + <http://wiki.scummvm.org/index.php/Platforms> + +Ve verzi pro Macintosh je stisknutУ pravУЉho tlaФУtka myХЁi emulovУЁno pomocУ Cmd-kliknutУ (to je, ХОe stisknete tlaФУtko myХЁi pХi drХОenУ klУЁvesy +Command/Apple/Vrtule). + +TakУЉ existujУ neoficiУЁlnУ verze pro rХЏznУЉ platformy, vФetnФ PlayStation 3, Xbox, a Xbox 360. NezapomeХte, ХОe my jsme tyto verze nevytvoХili, takХОe je nemХЏХОeme ani schvУЁlit ani podporovat. PouХОУvejte na vlastnУ riziko! + + +5.0) SpuХЁtФnУ ScummVM: +---- ----------------- +VХЁimnФte si prosУm, ХОe ScummVM bude uloХОenУЉ hry standardnФ uklУЁdat do sloХОky zТ kterУЉ je spuХЁtФn, takХОe byste se mФli vyhnout jeho spouХЁtФnУ zТ vУce umУstФnУ. DalХЁУ informace, vФetnФ jak urФit sloХОku pro uloХОenУЉ hry pro zamezenУ tohoto problУЉmu, najdete vТ oddУlu 6.0. + +ScummVM mХЏХОe bУНt takУЉ spuХЁtФn pХУmo pomocУ spouХЁtФcУho souboru. VТ tomto pХУpadФ bude aktivovУЁn zabudovanУН spouХЁtФФ. OdsuФ mХЏХОete pХidat hry +(kliknФte na 'PХidat hru'), nebo spustit ty, co uХО jsou nastaveny. +Hry mohou bУНt takУЉ pХidУЁny ve velkУЉm mnoХОstvУ. StisknutУm shift + 'PХidat +Hru' (VХЁimnФte si, ХОe se tlaФУtko zmФnУ na 'HromadnУЉ PХidУЁnУ'), mХЏХОete zvolit sloХОku, vТ kterУЉ zaФУt, a ScummVM se potУЉ pokusУ zjistit hry ve vХЁech podsloХОkУЁch tУЉto sloХОky. + +ScummVM mХЏХОe takУЉ hru spustit pХУmo pomocУ argumentХЏ pХУkazovУЉ ХУЁdky -- viz dalХЁУ ФУЁst. + + +5.1) MoХОnosti pХУkazovУЉho ХУЁdku: +---- --------------------------- + + PouХОitУ: scummvm [MOХНNOSTI]... [HRA] + + [HRA] KrУЁtkУЉ jmУЉno hry pro naФtenУ. NapХУklad 'monkey'pro Monkey Island. To mХЏХОe bУНt buФ id hry, nebo uХОivatelem urФenУН cУl. + -v, --version ZobrazУ informace o verzi ScummVM a ukonФУ se + -h, --help ZobrazУ struФnou nУЁpovФdu a ukonФУ se + -z, --list-games ZobrazУ seznam podporovanУНch her a ukonФУ se + -t, --list-targets ZobrazУ seznam nastavenУНch cУlХЏ a ukonФУ se + --list-saves=CУL ZobrazУ seznam uloХО. her pro urФenou hru (CУL) + --console PovolУ okno konzole (vУНchozУ: zapnuto) (Pouze pro Windows) + -c, --config=NastavenУ PouХОije jinУН soubor s nastavenУm + -p, --path=CESTA Cesta, kde je hra nainstalovУЁna + -x, --save-slot[=ФУSLO] Pozice uloХОenУЉ hry pro naФtenУ (vУНchozУ: automatickУЁ) + -f, --fullscreen Vynutit reХОim celУЉ obrazovky + -F, --no-fullscreen Vynutit reХОim do okna + -g, --gfx-mode=REХНIM Vybere reХОim obrazu (viz takУЉ ФУЁst 5.3) + --gui-theme=VZHLED Vybere vzhled rozhranУ (vУНchozУ, modernУ, klasickУН) + --themepath=CESTA Cesta kde jsou vzhledy rozhranУ uloХОeny + --list-themes ZobrazУ seznam vХЁech pouХОitelnУНch vzhledХЏ + -e, --music-driver=REХНIM Vybere ovladaФ hudby (viz takУЉ ФУЁst 7.0) + --list-audio-devices ZobrazУ seznam vХЁech dostupnУНch zvukovУНch zaХУzenУ + -q, --language=JAZYK Vybere jazyk hry (viz takУЉ ФУЁst 5.2) + -m, --music-volume=Ф. NastavУ hlasitost hudby, 0-255 (vУНchozУ: 192) + -s, --sfx-volume=Ф. NastavУ hlasitost zvukХЏ, 0-255 (vУНchozУ: 192) + -r, --speech-volume=Ф. NastavУ hlasitost hlasХЏ, 0-255 (vУНchozУ: 192) + --midi-gain=Ф. NastavУ zvУНХЁenУ pro pХehrУЁvУЁnУ MIDI, 0-1000 (vУНchozУ: 100) (podporovУЁno pouze nФkterУНmi ovladaФi MIDI) + -n, --subtitles Zapne titulky (pouХОijte vТ hrУЁch s ХeФУ) + -b, --boot-param=Ф. PХedУЁ ФУslo zavУЁdФjУcУmu skriptu (parametr zavedenУ) + -d, --debuglevel=Ф. NastavУ УКroveХ podrobnostУ ladФnУ + --debugflags=PХУZNAKY PovolУ urФitУЉ pХУznaky ladФnУ jУЁdra (oddФlenУЉ ФУЁrkami) + -u, --dump-scripts PovolУ vУНpis skriptu, pokud sloХОka s nУЁzvem 'dumps' existuje vТ souФasnУЉ sloХОce + --cdrom=ФУSLO Jednotka CD zТ kterУЉ pХehrУЁvat CD audio (vУНchozУ: 0 = prvnУ jednotka) + --joystick[=ФУSLO] PovolУ vstup z joysticku (vУНchozУ: 0 = prvnУ joystick) + --platform=SLOVO UrФУ platformu hry (povolenУЉ hodnoty: 2gs, 3do, acorn, amiga, atari, c64, fmtowns, mac, nes, pc, pce, segacd, windows) + --savepath=CESTA Cesta, kde jsou umУstФny uloХОenУЉ hry + --extrapath=CESTA DodateФnУЁ cesta pro dalХЁУ data hry + --soundfont=SOUBOR Vybere SoundFont pro pХehrУЁvУЁnУ MIDI (PodporovУЁno pouze nФkterУНmi ovladaФi MIDI) + --multi-midi PovolУ kombinaci AdLib a pХirozenУЉho MIDI + --native-mt32 PravУН Roland MT-32 (zakУЁХОe emulaci GM) + --enable-gs PovolУ reХОim Roland GS pro pХehrУЁvУЁnУ MIDI + --output-rate=FREKVENCE VУНstupnУ vzorkovacУ kmitoФet v Hz (napХ. 22050) + --opl-driver=OVLADAФ Vybere emulУЁtor AdLib (OPL) (db, mame) + --aspect-ratio PovolУ korekci pomФru stran + --render-mode=REХНIM PovolУ dodateФnУЉ reХОimy vykreslenУ (hercGreen, hercAmber, + cga, ega, vga, amiga, fmtowns, pc9821, pc9801, 2gs, + atari, macintosh) + + --alt-intro PouХОije alternativnУ intro pro CD verze Beneath a Steel Sky a Flight of the Amazon Queen + --copy-protection PovolУ ochranu proti kopУrovУЁnУ vТ hrУЁch, kdyХО ji ScummVM standardnФ zakazuje. + --talkspeed=ФУSLO NastavУ zdrХОenУ mluvenУ v hrУЁch SCUMM, nebo rychlost mluvenУ vТ jinУНch hrУЁch (vУНchozУ: 60) + --demo-mode SpustУ reХОim dema v Maniac Mansion (KlasickУЁ verze) + --tempo=NUM NastavУ rychlost hudby (v procentech, 50-200) pro hry SCUMM (vУНchozУ: 100) + + +VУНznam vХЁech dlouhУНch moХОnostУ (to jsou ty, kterУЉ zaФУnajУ dvojitou pomlФkou) mХЏХОe bУНt pХevrУЁcen, kdyХО pХed nФ pХidУЁte "no-". NapХУklad, +--no-aspect-ratio vypne korekci pomФru stran. To je uХОiteФnУЉ, kdyХО chcete potlaФit nastavenУ v souboru. + +KrУЁtkУЉ jmУЉno hry ('cУl hry'), kterУН vidУte na konci pХУkazovУЉho ХУЁdku, urФuje, kterУЁ hra je spuХЁtФna. BuФ odpovУdУЁ libovolnУЉmu cУli urФenУЉho uХОivatelem (ze souboru sТ nastavenУm), nebo zabudovanУЉmu id hry. KrУЁtkУН seznam zabudovanУНch id mХЏХОe bУНt nalezen v ФУЁsti list 3.0. + +PХУklady: + * Win32: + SpuХЁtФnУ Monkey Island, celУЁ obrazovka, zТ pevnУЉho disku: + C:\Games\LucasArts\scummvm.exe -f -pC:\Games\LucasArts\monkey\ monkey + SpuХЁtФnУ Full Throttle z CD, celУЁ obrazovka a se zapnutУНmi titulky: + C:\Games\LucasArts\scummvm.exe -f -n -pD:\resource\ ft + + * Unix: + SpuХЁtФnУ Monkey Island, celУЁ obrazovka, zТ pevnУЉho disku: + + /path/to/scummvm -f -p/games/LucasArts/monkey/ monkey + SpuХЁtФnУ Full Throttle z CD, celУЁ obrazovka a se zapnutУНmi titulky: + /path/to/scummvm -f -n -p/cdrom/resource/ ft + + +5.2) Volby jazyka: +---- ------------- +ScummVM obsahuje volby jazyka pro Maniac Mansion, Zak McKracken, +The Dig, The Curse of Monkey Island, Beneath a Steel Sky a +Broken Sword. + +NezapomeХte, ХОe kromФ Beneath a Steel Sky, Broken Sword, mnohajazykovУЉ verze her Goblins a Nippon Safes Inc., pouХОitУ tУЉto moХОnosti *nezmФnУ* jazyk hry (kterУН je vФtХЁinou pevnФ zakУГdovУЁn), ale spУХЁe je pouХОita pro vybrУЁnУ sprУЁvnУЉho pУsma (napХ. pro nФmeckou verzi obsahujУcУ pХehlУЁsky). + +VУНjimky jsou The Dig a The Curse of Monkey Island -- neanglickУЉ +Verze mohou bУНt nastaveny na 'English'. NicmУЉnФ toto ovlivХuje pouze titulky; ХeФ ve hХe zХЏstane stejnУЁ. + +Maniac Mansion a Zak McKracken + en - AngliФtina (vУНchozУ) + de - NФmФina + fr - FrancouzХЁtina + it - ItalХЁtina + es - Х panФlХЁtina + +The Dig + jp - JaponХЁtina + zh - ФУnХЁtina + kr - KorejХЁtina + +The Curse of Monkey Island + en - AngliФtina (vУНchozУ) + de - NФmФina + fr - FrancouzХЁtina + it - ItalХЁtina + pt - PortugalХЁtina + es - Х panФlХЁtina + jp - JaponХЁtina + zh - ФУnХЁtina + kr - KorejХЁtina + +Beneath a Steel Sky + gb - AngliФtina (VelkУЁ BritУЁnie) (vУНchozУ) + en - AngliФtina (USA) + de - NФmФina + fr - FrancouzХЁtina + it - ItalХЁtina + pt - PortugalХЁtina + es - Х panФlХЁtina + se - Х vУЉdХЁtina + +Broken Sword + en - AngliФtina (vУНchozУ) + de - NФmФina + fr - FrancouzХЁtina + it - ItalХЁtina + pt - PortugalХЁtina + es - Х panФlХЁtina + cz - ФeХЁtina + + +5.3) GrafickУЉ filtry: +---- ---------------- +ScummVM nabУzУ nФkolik filtrХЏ vyhlazujУcУch hrany jako pokus o zlepХЁenУ obrazovУЉ kvality. Jsou to stejnУЉ filtry, kterУЉ pouХОУvУЁ i mnoho jinУНch emulУЁtorХЏ, jako MAME. Tyto filtry vezmou pХЏvodnУ grafiku hry a zvФtХЁУ ji o urФitou pevnou hodnotu (vФtХЁinou 2x nebo 3x) neХО ji VУЁm zobrazУ. TakХОe napХУklad, pokud hra pХЏvodnФ pracovala vТ rozliХЁenУ 320x200 (typickУЉ pro vФtХЁinu her SCUMM), pak pouХОitУm filtru sТ faktorem zvФtХЁenУ 2x, ve skuteФnosti dostanete rozliХЁenУ 640x400. PodobnФ sТ filtrem 3x dostanete 960x600. + +Jsou to: + 1x - Bez filtrovУЁnУ, bez zvФtХЁenУ. NejrychlejХЁУ. + 2x - Bez filtrovУЁnУ, zvФtХЁenУ 2x (vУНchozУ pro hry 640x480). + 3x - Bez filtrovУЁnУ, zvФtХЁenУ 3x. + 2xsai - Filtr 2xSAI, zvФtХЁenУ 2x. + super2xsai т VylepХЁenУЉ filtrovУЁnУ 2xSAI, zvФtХЁenУ 2x. + supereagle т MУЉnФ rozostХenУН neХО 2xSAI, ale pomalejХЁУ. ZvФtХЁenУ 2x. + advmame2x - NespolУЉhУЁ na rozostХenУ jako 2xSAI, rychlУЉ. ZvФtХЁenУ 2x. + advmame3x - NespolУЉhУЁ na rozostХenУ jako 2xSAI, rychlУЉ. ZvФtХЁenУ 3x. + hq2x - Velmi hezkУЁ vysokУЁ kvalita, ale pomalУН. ZvФtХЁenУ 2x. + hq3x - Velmi hezkУЁ vysokУЁ kvalita, ale pomalУН. ZvФtХЁenУ 3x. + tv2x - Filtr proklУЁdУЁnУ, snaХОУ se emulovat TV. ZvФtХЁenУ 2x. + dotmatrix - Efekt bodovУЉ matice. ZvФtХЁenУ 2x. + +Abyste filtr vybrali, zvolte ho ve spouХЁtФФi, nebo pХedejte scummvm jeho jmУЉno pomocУ moХОnosti '-g', napХУklad: + + scummvm -gadvmame2x monkey2 + +PoznУЁmka #1: Ne vХЁechny jУЁdra podporujУ vХЁechny (nebo dokonce ХОУЁdnУЉ) zТ filtrХЏ vypsanУНch vУНХЁe; nФkterУЉ mohou podporovat i dalХЁУ. Filtry vypsanУЉ vУНХЁe jsou ty podporovanУЉ standardnУm jУЁdrem SDL. + +PoznУЁmka #2: Filtry mohou bУНt velmi pomalУЉ, kdyХО je ScummVM sestaven vТ nastavenУ pro ladФnУ bez optimalizacУ. PouХОitУ jakУЉkoliv formy vyhlazenУ hran/lineУЁrnУho filtrovУЁnУ bude mУt vХОdycky dopad na rychlost. + +PoznУЁmka #3: Verze FM-TOWNS hry Zak McKracken mУЁ pХЏvodnУ rozliХЁenУ 320x240, coХО znamenУЁ, ХОe filtry vТ tУЉto hХe budou zvФtХЁovat na 640x480 +nebo 960x720. ObdobnФ hry, kterУЉ majУ pХЏvodnУ rozliХЁenУ 640x480 (jako +Curse of Monkey Island nebo Broken Sword) budou zvФtХЁeny na 1280x960 a +1920x1440. + + +5.4) GlobУЁlnУ menu: +---- -------------- +GlobУЁlnУ Menu je obecnУЉ menu, kterУЉ je dostupnУЉ vХЁem jУЁdrХЏm her stisknutУm Ctrl-F5. ZТ tohoto menu jsou dostupnУЉ nУЁsledujУcУ tlaФУtka: PokraФovat, Volby, O programu, NУЁvrat do SpouХЁtФФe, a UkonФit. VУНbФrem +'Volby' bude zobrazeno dialogovУЉ okno, kde mХЏХОou bУНt upravena zУЁkladnУ nastavenУ zvuku, jako hladiny hlasitosti. VУНbФrem 'NУЁvrat do SpouХЁtФФe' souФasnou hru ukonФУ a uХОivatele navrУЁtУ do spouХЁtФФe ScummVM, kde mХЏХОe bУНt vybrУЁna dalХЁУ hra ke hranУ. + +PoznУЁmka: NУЁvrat do SpouХЁtФФe nenУ podporovУЁn vХЁemi jУЁdry a tlaФУtko nebude vТ GlobУЁlnУm Menu funkФnУ, pokud nenУ podporovУЁno. + +JУЁdra, kterУЁ vТ souФasnosti podporujУ nУЁvrat do spouХЁtФФe, jsou: + + AGI + AGOS + CINE + COMPOSER + CRUISE + DRACI + DRASCULA + GOB + GROOVIE + HUGO + KYRA + LURE + MADE + MOHAWK + PARALLACTION + QUEEN + SAGA + SCI + SCUMM + SKY + SWORD1 + SWORD2 + TEENAGENT + TOUCHE + TSAGE + TUCKER + ZVISION + + +5.5) KlУЁvesovУЉ zkratky: +---- ------------------ +ScummVM podporuje rХЏznУЉ zkratky ve hХe. LiХЁУ se mezi rХЏznУНmi hrami SCUMM a jinУНmi hrami. + + SpoleФnУЉ: + Ctrl-F5 - ZobrazУ GlobУЁlnУ Menu + Cmd-q - UkonФit (Mac OS X) + Ctrl-q - UkonФit (dalХЁУ unixy vФetnФ Linux) + Ctrl-z - UkonФit (dalХЁУ platformy) + Ctrl-u - ZeslabУ vХЁechny zvuky + Ctrl-m - PХepУnat zachycenУ myХЁi + Ctrl-Alt 1-8 - PХepУnat mezi grafickУНmi filtry + Ctrl-Alt + a - - ZvФtХЁit/ZmenХЁit faktor zvФtХЁenУ + Ctrl-Alt a - PХepУnat korekci pomФru stran. VФtХЁina her pouХОУvУЁ rozliХЁenУ 320x200 pixelХЏ, coХО mХЏХОe na vФtХЁinФ novФjХЁУch monitorХЏ vypadat splУЁcle. Korekce pomФru stran obraz roztУЁhne, aby mУsto toho pouХОil + 320x240, nebo jeho nУЁsobky + Alt-Enter - PХepУnУЁ celou obrazovku/do okna + Alt-s - VytvoХit snУmek obrazovky (pouze jУЁdro SDL) + Ctrl-F7 - OtevХУt virtuУЁlnУ klУЁvesnici (pokud povolena) + MХЏХОe bУНt takУЉ spuХЁtФna dlouhУНm stiskem + prostХednУho tlaФУtka nebo koleФka myХЁi. + + SCUMM: + Alt-x - UkonФit + Ctrl 0-9 a Alt 0-9 - NahrУЁt a uloХОit stav hry + Ctrl-d - Spustit ladФnУ + Ctrl-f - Zapnout rychlУН reХОim + Ctrl-g - PХepnout do velmi VELMI rychlУЉho reХОimu + Ctrl-t - PХepУnat mezi 'Pouze ХeФ', + 'ХeФ a Titulky' a 'Pouze titulky' + Tilda (~) - Zobrazit/skrУНt konzoli ladФnУ + [ a ] - Hlasitost hudby, zvУНХЁit/snУХОit + - a + - Rychlost textu, pomalejХЁУ/rychlejХЁУ + F5 - ZobrazУ rУЁmeФek pro uloХОenУ/naФtenУ + Alt-F5 - ZobrazУ pХЏvodnУ rУЁmeФek pro uloХОenУ/naФtenУ, pokud hra nФjakУН mУЁ. Zde mХЏХОete hru naФУst i uloХОit, nicmУЉnФ pro tento УКФel nenУ urФen a vТ nФkterУНch hrУЁch mХЏХОe zpХЏsobit pУЁd ScummVM. + i - ZobrazУ IQ body (Indiana Jones and the Last Crusade a Indiana Jones and the Fate of Atlantis) + MezernУk - PozastavenУ + TeФka (.) - VТ nФkterУНch hrУЁch pХeskoФУ souФasnУН ХУЁdek textu + Enter - Simulovat stisknutУ levУЉho tlaФУtka myХЁi + Tab - Simulovat stisknutУ pravУЉho tlaФУtka myХЁi + + Beneath a Steel Sky: + Ctrl-d - SpustУ ladФnУ + Ctrl-f - Zapnout rychlУН reХОim + Ctrl-g - PХepnout do velmi VELMI rychlУЉho reХОimu + F5 - ZobrazУ rУЁmeФek pro uloХОenУ/naФtenУ + Escape - PХeskoФУ УКvod hry + TeФka (.) - PХeskoФУ souФasnУН ХУЁdek textu + + Broken Sword: + F5 nebo Escape - ZobrazУ rУЁmeФek pro uloХОenУ/naФtenУ + + Broken Sword II: + Ctrl-d - Spustit ladФnУ + Ctrl-f - Zapnout rychlУН reХОim + p - PozastavenУ + + DraФУ Historie: + F5 - ZobrazУ GlobУЁlnУ Menu + LevУЉ klinutУ - JУt, zkoumat + PravУЉ klinutУ - PouХОУt, mluvit + Posun myХЁi nahoru, i - InventУЁХ + Posun myХЁi dolХЏ, m - Mapa + Escape - PХeskoФУ УКvod, odejde z mapy/inventУЁХe + JakУЉkoliv kliknutУ - PХeskoФУ souФasnФ dabovanou vФtu + q - ZapnutУ/vypnutУ rychlУЉho chozenУ + + Flight of the Amazon Queen: + Ctrl-d - Spustit ladФnУ + Ctrl-f - Zapnout rychlУН reХОim + F1 - PouХОУt DenУk (uklУЁdУЁnУ/naФУtУЁnУ) + F11 - RychlУЉ naФtenУ + F12 - RychlУЉ uklУЁdУЁnУ + Escape - PХeskoФУ video + MezernУk - PХeskoФУ souФasnУН ХУЁdek textu + + Future Wars: + F1 - Prozkoumat + F2 - VzУt + F3 - InventУЁХ + F4 - PouХОУt + F5 - Aktivovat + F6 - Mluvit + F9 - Menu "Aktivovat" + F10 - Menu "PouХОУt" + Escape - Zobrazit menu pХУkazХЏ + + Nippon Safes: + Ctrl-d - Spustit ladФnУ + l - NaФУst hru + s - UloХОit hru + + Simon the Sorcerer 1 a 2: + Ctrl 0-9 a Alt 0-9 - NaФУst a uloХОit stav hry + Ctrl-d - Spustit ladФnУ + Ctrl-f - Zapnout rychlУН reХОim + F1 - F3 - Rychlost textu, rychlejХЁУ - pomalejХЁУ + F10 - ZobrazУ vХЁechny postavy a objekty sТ kterУНmi mХЏХОete nФco dФlat + Escape - PХeskoФit videa + - a + - Hlasitost hudby, snУХОit/zvУНХЁit + m - Hudba vypnout/zapnout + s - ZvukovУЉ efekty zapnout/vypnout + b - Zvuky pozadУ zapnout/vypnout [Pouze Simon the Sorcerer 2] + Pause - PozastavenУ + t - PХepУnat mezi ХeФУ a kombinacУ ХeФi a titulkХЏ [Simon the Sorcerer 1 CD (jinУЉ neХО angliФtina a nФmФina) a Simon the Sorcerer 2 CD (vХЁechny jazyky)] + v - PХepУnat mezi titulky a kombinacУ ХeФi a titulkХЏ [Pouze Simon the Sorcerer 2 CD] + + Simon the Sorcerer's Puzzle Pack: + Ctrl-d - Spustit ladФnУ + Ctrl-f - Zapnout rychlУН reХОim + F12 - Zapnout/vypnout reХОim rychle rychlosti ve Swampy Adventures + - a + - Hlasitost hudby, snУХОit/zvУНХЁit + m - Hudba vypnout/zapnout + s - ZvukovУЉ efekty zapnout/vypnout + Pause - PozastavenУ + + The Feeble Files: + Ctrl-d - Spustit ladФnУ + Ctrl-f - Zapnout rychlУН reХОim + F7 - VymФnit postavy + F9 - Zapnout/vypnout jmУЉna hitboxХЏ + s - ZvukovУЉ efekty zapnout/vypnout + Pause - PozastavenУ + t - PХepУnat mezi ХeФУ a kombinacУ ХeФi a titulkХЏ + v - PХepУnat mezi titulky a kombinacУ ХeФi a titulkХЏ + + The Legend of Kyrandia: + Ctrl 0-9 a Alt 0-9 - NaФУst a uloХОit stav hry + + Ctrl-d - Spustit ladФnУ + + TeenAgent + F5 - ZobrazУ GlobУЁlnУ Menu + + Touche: The Adventures of the Fifth Musketeer: + Ctrl-f - Zapnout rychlУН reХОim + F5 - Zobrazit moХОnosti + F9 - Zapnout reХОim rychlУЉ chХЏze + F10 - Vypnout reХОim rychlУЉ chХЏze + Escape - UkonФit + MezernУk - PХeskoФУ souФasnУН ХУЁdek textu + t - PХepnout mezi 'Pouze ХeФ', + 'ХeФ a Text' a 'Pouze Text' + + Zork: Grand Inquisitor: + Ctrl-s - UloХОit + Ctrl-r - NaФУst + Ctrl-q - UkonФit + Ctrl-p - NastavenУ + F1 - NУЁpovФda + F5 - InventУЁХ + F6 - Kniha kouzel + F7 - SkУГre + F8 - Zahodit souФasnУН objekt/zapomenout kouzlo + F9 - Vyjmout minci (musУte mУt mФХЁec) + Space - PХeskoФit videa + + Zork Nemesis: The Forbidden Lands: + Ctrl-s - UloХОit + Ctrl-r - NaФУst + Ctrl-q - UkonФit + Ctrl-p - NastavenУ + Space - PХeskoФit videa + +NezapomeХte, ХОe pouХОУvУЁnУ Ctrl-f nebo Ctrl-g nenУ doporuФeno: hry mohou spadnout, kdyХО bФХОУ rychlostУ vyХЁХЁУ neХО jejich normУЁlnУ, protoХОe skripty ztratУ synchronizaci. + +PoznУЁmka pro uХОivatele WinCE: KvХЏli omezenУЉmu vstupu zТ klУЁvesnice ve vФtХЁinФ zaХУzenУ je malУЉ mnoХОstvУ klУЁvesovУНch zkratek podporovУЁno pomocУ znovu mapovУЁnУ a/nebo ФinnostУ panelХЏ. ProsУm pХeФtФte si soubor README-WinCE.txt. + + +6.0) UloХОenУЉ hry: +---- ------------ +UloХОenУЉ hry jsou na nФkterУНch platformУЁch standardnФ umУstФny do souФasnУЉ sloХОky a vТ jinУНch do pХednastavenУЉ sloХОky. To mХЏХОete urФit vТ souboru sТ nastavenУm pomocУ parametru savepath. PodУvejte se na vzorovУН soubor sТ nastavenУm dУЁle vТ tomto souboru. + +Platformy, kterУЉ vТ souФasnosti majУ jinУЉ vУНchozУ sloХОky jsou: + Mac OS X: + $HOME/Documents/ScummVM Savegames/ + + JinУЉ unixy: + ХУdУme se specifikacemi zУЁkladnУho adresУЁХe XDG. To znamenУЁ, ХОe nastavenУ lze nalУЉzt v: + $XDG_DATA_HOME/scummvm/saves/ + + Pokud XDG_DATA_HOME nenУ nastaven nebo je prУЁzdnУН, bude, podle pravidel specifikace, pouХОito '~/.local/share' jako hodnota pro XDG_DATA_HOME. + + Pokud byla ve vaХЁem systУЉmu nainstalovУЁna dХУvФjХЁУ verze ScummVM, bude ponechУЁno pХЏvodnУ vУНchozУ umУstФnУ '~/.scummvm'. + Program toto zjistУ nalezenУm sloХОky '~/.scummvm'ТД v cestФ. + + Windows Vista/7: + \Users\uХОjmУЉno\AppData\Roaming\ScummVM\Saved games\ + + Windows 2000/XP: + \Documents and Settings\uХОjmУЉno\Application Data\ScummVM\Saved games\ + + Windows NT4: + <windir>\Profiles\uХОjmУЉno\Application Data\ScummVM\Saved games\ + +UloХОenУЉ hry jsou ve Windows NT4/2000/XP/Vista/7 uklУЁdУЁny ve skrytУЉ sloХОce, +do kterУЉ mХЏХОete vstoupit spuХЁtФnУm "%APPDATA%\ScummVM\Saved Games\" nebo +povolenУm zobrazenУ skrytУНch sloХОek v PrХЏzkumnУku Windows. + +PoznУЁmka pro uХОivatele Windows NT4/2000/XP/Vista/7: VУНchozУ umУstФnУ uloХОenУНch her +bylo ve ScummVM 1.5.0 zmФnФno. DУЁvkovУН soubor pХesunu mХЏХОe bУНt pouХОit pro zkopУrovУЁnУ +uloХОenУНch her ze starУЉho vУНchozУho umУstФnУ do novУЉho. + +6.1) 6.1 AutomatickУЉ uklУЁdУЁnУ: +---- ------------------------- +VТ nФkterУНch hrУЁch, (a to "Beneath a Steel Sky", "Flight of the Amazon +Queen", vХЁechny hry AGI, a vХЁechny hry SCUMM), bude ScummVM standardnФ automaticky uklУЁdat souФasnУН stav kaХОdУНch pФt minut (upravitelnУЉ pomocУ nastavenУ "autouklУЁdУЁnУ"). Pro jУЁdra AGI a SCUMM, je bude uklУЁdat do pozice 0. V jУЁdru SCUMM mХЏХОe bУНt tento uloХОenУН stav znovu naФten pomocУ Ctrl-0 nebo menu F5. + + +6.2) PХevod uloХОenУНch her: +---- --------------------- +PouХОitУ uloХОenУНch her zТ pХЏvodnУch verzУ nenУ podporovУЁno vХЁemi jУЁdry. Pouze nУЁsledujУcУ hry mohou pouХОУt pХЏvodnУ verze. + + Elvira 1 + - PХidejte 8 bajtХЏ (nУЁzev uloХОenУЉ hry) na zaФУЁtek souboru uloХОenУЉ hry + - PХejmenujte ho na 'elvira1.xxx' + + Elvira 2 + - PХidejte 8 bajtХЏ (nУЁzev uloХОenУЉ hry) na zaФУЁtek souboru uloХОenУЉ hry + - PХejmenujte ho na 'elvira2-pc.xxx' (verze DOS) nebo 'elvira2.xxx' (JinУЉ verze) + + Waxworks + - PХidejte 8 bajtХЏ (nУЁzev uloХОenУЉ hry) na zaФУЁtek souboru uloХОenУЉ hry + - PХejmenujte ho na 'waxworks-pc.xxx' (verze DOS) nebo 'waxworks.xxx' (JinУЉ verze) + + Simon the Sorcerer 1 + - PХejmenuje soubor uloХОenУЉ hry na 'simon1.xxx' + + Simon the Sorcerer 2 + - PХejmenuje soubor uloХОenУЉ hry na 'simon2.xxx' + + The Feeble Files + - PХejmenuje soubor uloХОenУЉ hry na 'feeble.xxx' + +Kde 'xxx' je ФУslo pozice uloХОenУЉ hry (tj. 001) ve ScummVM + + +6.3) ZobrazenУ/NaФtenУ uloХОenУНch her z pХУkazovУЉho ХУЁdku: +---- ---------------------------------------------------- + +--list-saves: + + Tento pХepУnaФ mХЏХОe bУНt pouХОit kТ zobrazenУ seznamu souФasnУНch uloХОenУНch her urФenУЉ cУlovУЉ hry a jejУ odpovУdajУcУ pozice. + + PouХОitУ: --list-saves=[CУL], kde [CУL] je cУlovУЁ hra. + + JУЁdra, kterУЁ vТ souФasnosti podporujУ --list-saves jsou: + + AGI + AGOS + CGE + CINE + CRUISE + DRACI + GROOVIE + HUGO + KYRA + LURE + MOHAWK + PARALLACTION + QUEEN + SAGA + SCI + SCUMM + SKY + SWORD1 + SWORD2 + TEENAGENT + TINSEL + TOON + TOUCHE + TSAGE + TUCKER + ZVISION + +--save-slot/-x: + + Tento pХepУnaФ mХЏХОe bУНt pouХОit kТ naФtenУ uloХОenУЉ hry pХУmo zТ pХУkazovУЉho ХУЁdku. + + PouХОitУ: --save-slot[POZICE] nebo -x[POZICE], kde [POZICE] je ФУslo uloХОenУЉ pozice. + + JУЁdra, kterУЁ vТ souФasnosti podporujУ --save-slot/-x jsou: + + AGI + CGE + CINE + CRUISE + DRACI + GROOVIE + HUGO + KYRA + LURE + MOHAWK + QUEEN + SAGA + SCI + SCUMM + SKY + SWORD1 + SWORD2 + TEENAGENT + TINSEL + TOON + TOUCHE + TSAGE + TUCKER + ZVISION + + +7.0) Hudba a Zvuk: +---- ------------- +Ve vФtХЁinФ operaФnУch systУЉmХЏ a pro vФtХЁinu her bude ScummVM standardnФ pouХОУvat MT-32 nebo emulaci AdLib pro pХehrУЁvУЁnУ hudby. MIDI nemusУ bУНt +DostupnУЉ ve vХЁech operaФnУch systУЉmech, nebo potХebuje ruФnУ nastavenУ. Pokud chcete MIDI pouХОУt, mУЁte nФkolik rХЏznУНch voleb pro vУНstup, vТ zУЁvislosti na VaХЁem operaФnУm systУЉmu a nastavenУ. + + null - PrУЁzdnУН vУНstup. NepХehrУЁvat ХОУЁdnou hudbu. + adlib - VnitХnУ emulace AdLib + fluidsynth т Emulace FluidSynth MIDI + mt32 - VnitХnУ emulace MT-32 + pcjr - VnitХnУ emulace PCjr (pouХОitelnУЉ pouze ve hrУЁch SCUMM) + pcspk - VnitХnУ emulace reproduktoru PC + towns - VnitХnУ emulace FM-TOWNS YM2612 + (pouХОitelnУЉ pouze v hrУЁch SCUMM FM-TOWNS) + alsa - VУНstup pomocУ zaХУzenУ sekvenceru ALSA. Viz nУХОe. + core - Zvuk CoreAudio, pro uХОivatele Mac OS X. + coremidi - Zvuk CoreMIDI, pro uХОivatele Mac OS X. PouХОУvejte pouze, pokud mУЁte hardwarovУН syntezУЁtor MIDI. + seq - PouХОitУ /dev/sequencer pro MIDI v systУЉmu *nix. Viz nУХОe + timidity - PХipojenУ kТ MIDI serveru TiMidity++. Viz nУХОe. + windows - Windows MIDI. PouХОije zabudovanУН sekvencer, pro Windows + +Abyste vybrali ovladaФ zvuku, zvolte ho ve spouХЁtФФi, nebo pХedejte jeho jmУЉno ScummVM pomocУ moХОnosti '-e', napХУklad: + + scummvm -eadlib monkey2 + + +7.1) PХehrУЁvУЁnУ zvuku pomocУ emulace AdLib: +---- -------------------------------------- +StandardnФ bude karta AdLib emulovУЁna a ScummVM hudbu pХehrУЁvУЁ jako vzorkovanУЉ vlny. To je vУНchozУ reХОim pro vФtХЁinu her a nabУzУ nejlepХЁУ kompatibilitu mezi stroji a hrami. + + +7.2) PХehrУЁvУЁnУ zvuku pomocУ emulace FluidSynth MIDI: +---- ------------------------------------------------ +Pokud byl ScummVM sestaven s podporou libfluidsynth bude schopen pХehrУЁvat hudbu MIDI pomocУ ovladaФe FluidSynth. Budete muset ale urФit, kterУН SoundFont pouХОУt. + +ProtoХОe vУНchozУ hlasitost vУНstupu od FluidSynth mХЏХОe bУНt velmi nУzkУЁ, +ScummVM standardnФ nastavУ zvУНХЁenУ, aby dostal silnФjХЁУ signУЁl. To mХЏХОe bУНt dУЁle upraveno pouХОitУm moХОnosti pХУkazovУЉho ХУЁdku --midi-gain, nebo nastavenУm "midi_gain" vТ konfiguraФnУm souboru. + +NastavenУ mХЏХОe nabУНvat hodnoty od 0 po 1000 a vУНchozУ je 100. (Toto odpovУdУЁ nastavenУ zvУНХЁenУ FluidSynth's 0.0 aХО 10.0, coХО je pravdФpodobnФ mФХeno v decibelech.) + +POZNУMKA: PoХОadavky na procesor pro FluidSynth mХЏХОou bУНt vТ nФkterУНch pХУpadech dosti vysokУЉ. Je doporuФeno mУt rychlУЉ CPU. + + +7.3) PХehrУЁvУЁnУ zvuku pomocУ emulace MT-32: +---- -------------------------------------- +NФkterУЉ hry, kterУЉ obsahujУ hudebnУ data MIDI, takУЉ majУ vylepХЁenУЉ stopy urФenУЉ pro zvukovУН modul MT-32. ScummVM mХЏХОe toto zaХУzenУ nynУ emulovat, nicmУЉnФ aby toto zaХУzenУ fungovalo, musУte mУt pХЏvodnУ ROMy MT-32: + +MT32_PCM.ROM - IC21 (512KB) +MT32_CONTROL.ROM - IC26 (32KB) a IC27 (32KB), proklУЁdanУЉ podle bajtu + +Tyto ROMy umУstФte do hernУho adresУЁХe, ve VaХЁУ dodateФnУЉ cestФ, nebo vТ adresУЁХi, kde je umУstФn spouХЁtФФ ScummVM. + +SТ tУmto ovladaФem nemusУte zadУЁvat --native-mt32, protoХОe je automaticky zapnut. + +POZNУMKA: PoХОadavky na procesor pro emulУЁtor jsou velmi vysokУЉ; rychlУЉ +CPU je velmi doporuФeno. + + +7.4) PХehrУЁvУЁnУ zvuku pomocУ emulace MIDI: +---- ------------------------------------- +NФkterУЉ hry (jako Sam & Max) obsahujУ pouze hudebnУ data MIDI. Toto brУЁnilo, aby hudba vТ tФchto hrУЁch fungovala na platformУЁch, kterУЉ MIDI nepodporujУ, nebo na zvukovУНch kartУЁch, kterУЉ neposkytujУ ovladaФe MIDI (napХ. mnoho zvukovУНch karet nebude vТ Linuxu MIDI pХehrУЁvat). ScummVM nynУ mХЏХОe MIDI emulovat pomocУ vzorkovanУНch vln a AdLib, emulaci MIDI FluidSynth nebo emulace MT-32 pomocУ moХОnostУ -eadlib, -efluidsynth nebo -emt32 vТ tomto poХadУ. NicmУЉnФ pokud mУЁte moХОnost pouХОУt pХirozenУЉ MIDI, doporuФujeme pouХОУt jeden zТ reХОimХЏ MIDI nУХОe pro nejlepХЁУ zvuk. + + +7.5) PХehrУЁvУЁnУ zvuku pomocУ emulace PХirozenУЉho MIDI: +---- ------------------------------------------------- +PouХОijte vhodnou moХОnosti pХУkazovУЉho ХУЁdku -e<reХОim> ze seznamu vУНХЁe pro vybrУЁnУ VaХЁeho upХednostХovanУЉho zaХУzenУ MIDI. NapХУklad pokud chcete pouХОУt ovladaФ Windows MIDI, pouХОijte moХОnost -ewindows. + + +7.5.1) PouХОitУ moХОnostУ MIDI kТ pХizpХЏsobenУ vУНstupu pХirozenУЉ MIDI: +------ ------------------------------------------------------------ +ScummVM podporuje rХЏznУЉ reХОimy MIDI vТ zУЁvislosti na schopnostech VaХЁeho zaХУzenУ MIDI. + +Pokud je zadУЁno --native-mt32, ScummVM se kТ VaХЁemu zaХУzenУ bude chovat jako ke skuteФnУЉ MT-32. ProtoХОe mapovУЁnУ instrumentХЏ a vУНhradnУ systУЉmovУЉ pХУkazy MT-32 se liХЁУ od zaХУzenУ General MIDI, tuto moХОnost byste mФli povolit, pouze kdyХО pouХОУvУЁte skuteФnУЉ Roland MT-32, LAPC-I,CM-64, CM-32L, CM-500, nebo zaХУzenУ GS s mapou MT-32. + +Pokud je zadУЁno --enable-gs, ScummVM zavede VaХЁe zaХУzenУ kompatibilnУ s GS pomocУ nastavenУ, kterУЁ napodobujУ nastavenУ dozvuku MT-32, (nedostatek) chУГru, citlivost ohУНbanУ tУГnu, atd. Pokud je toto spoleФnФ pouХОito s --native-mt32, ScummVM vybere mapu kompatibilnУ s MT-32 a bicУ soupravu na VaХЁem zaХУzenУ GS. Toto nastavenУ funguje lУЉpe neХО standardnУ emulace GM nebo GS ve hrУЁch, kterУЉ nemajУ vlastnУ mapovУЁnУ instrumentХЏ (Loom a Monkey1). ObФ nastavenУ byste mФli pouХОУt pouze tehdy, pokud mУЁte zaХУzenУ GS, kterУЉ mУЁ mapu MT-32, jako SC-55, SC-88, SC-88 Pro, SC-8820, SC-8850, atd. NezapomeХte, ХОe --enable-gs je automaticky zakУЁzУЁno v DOTT a Samnmax, protoХОe samostatnФ pouХОУvajУ General MIDI. + +Pokud nenУ ani jedna zТ moХОnostУ vУНХЁe povolena, ScummVM VaХЁe zaХУzenУ zavede vТ reХОimu General MIDI a pouХОije emulaci GM vТ hrУЁch se zvukovУНm doprovodem MT-32. + +NФkterУЉ hry obsahujУ zvukovУЉ efekty pouze v AdLib. Pro tyto hry, byste mФli zadat --multi-midi, abyste zkombinovali hudbu MIDI se zvukovУНmi efekty AdLib. + + +7.6) PХehrУЁvУЁnУ zvuku pomocУ Sekvenceru MIDI: [POUZE UNIX] +---- ---------------------------------------- +Pokud VУЁХЁ ovladaФ podporuje sekvencer, mХЏХОete nastavit promФnnou prostХedУ "SCUMMVM_MIDI" na VaХЁem zaХУzenУ sekvenceru т napХУklad na /dev/sequencer + +Pokud mУЁte problУЉm se zvukem vТ tomto nastavenУ, moХОnУЁ budete muset nastavit promФnnou prostХedУ "SCUMMVM_MIDIPORT" na 1 nebo 2. Toto vybere port, kterУН bude pouХОit ve zvolenУЉm sekvenceru. Pak spusХЅte scummvm s parametrem -eseq. To by mФlo fungovat pro nФkolik karet a mХЏХОe nabУzet lepХЁУ vУНkon a kvalitu, neХО emulace AdLib. NicmУЉnФ pro systУЉmy, kde podpora sekvenceru nefunguje, mХЏХОete vХОdycky pХejУt na emulaci AdLib. + + +7.6.1) PХehrУЁvУЁnУ zvuku pomocУ Sekvenceru ALSA: [POUZE UNIX] +------ ---------------------------------------- +Pokud MУЁte nainstalovУЁn ovladaФ ALSA sТ podporou sekvenceru, pak mХЏХОete nastavit promФnnou prostХedУ "SCUMMVM_PORT" nebo promФnnou souboru s nastavenУm "alsa_port" pro urФenУ portu VaХЁeho sekvenceru. Pokud ani jedno nenУ nastaveno, jsou standardnФ vyzkouХЁeny oba porty "65:0" a "17:0". + +Zde je krУЁtkУН nУЁvod, jak sekvencer pouХОУt sТ VaХЁУ zvukovou kartou. Ve vХЁech pХУpadech, pro zУskУЁnУ seznamu vХЁech portХЏ sekvenceru, zkuste pХУkaz "aconnect -o -l". To by mФlo mУt vУНstup podobnУН tomuto: + +client 14: 'Midi Through' [type=kernel] + 0 'Midi Through Port-0' +client 16: 'SBLive! Value [CT4832]' [type=kernel] + 0 'EMU10K1 MPU-401 (UART)' +client 17: 'Emu10k1 WaveTable' [type=kernel] + 0 'Emu10k1 Port 0 ' + 1 'Emu10k1 Port 1 ' + 2 'Emu10k1 Port 2 ' + 3 'Emu10k1 Port 3 ' +client 128: 'TiMidity' [type=user] + 0 'TiMidity port 0 ' + 1 'TiMidity port 1 ' + 2 'TiMidity port 2 ' + 3 'TiMidity port 3 ' + +NejdХЏleХОitФjХЁУ ФУЁst zde je, ХОe existujУ ФtyХi vУНstupy WaveTable MIDI umУstФnУЉ na 17:0, 17:1, 17:2 a 17:3, a ФtyХi porty TiMidity umУstФnУЉ na 128:0, 128:1, 128:2 a 128:3. + +Pokud na VaХЁУ kartФ mУЁte Фip FM FM, jako tХeba SB16, pak musУte naФУst SoundFonts pomocУ softwaru sbiload. NapХУklad: + + sbiload -p 17:0 /etc/std.o3 /etc/drums.o3 + +Pokud je VaХЁe karta schopnУЁ pouХОУvat WaveTable, musУte naФУst SoundFont sbk nebo sf2 pomocУ softwaru sfxload nebo asfxload. NapХУklad: + + sfxload /cesta/k/8mbgmsfx.sf2 + +Pokud VaХЁe karta neumУ sТ MIDI pracovat, existujУ dvФ moХОnosti: FluidSynth a TiMidity. DoporuФujeme FluidSynth, protoХОe vТ mnoha systУЉmech bude TiMidity 'zaostУЁvat' za hudbou. To je velmi znatelnУЉ vТ hrУЁch pouХОУvajУcУ +iMUSE, kterУН pouХОУvУЁ rychlУЉ a dynamickУЉ pХechody hudby. +SpuХЁtФnУm TiMidity jako root mu umoХОnУ nastavit prioritu vТ reУЁlnУЉm Фase, coХО mХЏХОe zaostУЁvУЁnУ snУХОit. + +PХУkaz pro TiMidity, aby se stal sekvencerem ALSA: + + timidity -iAqqq -B2,8 -Os1S -s 44100 & + +(Pokud sТ tУmto nastavenУm dostУЁvУЁte zkreslenУН vУНstup, mХЏХОete zkusit vynechat -B2,8 nebo zmФnit hodnotu.) + +PХУkaz pro TiMidity, aby se stal sekvencerem ALSA (pouХОitУm SoundFonts): + + fluidsynth -m alsa_seq /cesta/k/8mbgmsfx.sf2 + +Jakmile je TiMidity nebo FluidSynth spuХЁtФn, pouХОijte pХУkaz 'aconnect -o -l' jak je pospУЁno vУНХЁe vТ tУЉto ФУЁsti. + + +7.6.2) PХehrУЁvУЁnУ zvuku pomocУ Sekvenceru IRIX dmedia: [POUZE UNIX] +------ ----------------------------------------------- +Pokud pouХОУvУЁte IRIX a ovladaФ dmedia s podporou sekvenceru, mХЏХОete nastavit promФnnou prostХedУ "SCUMMVM_MIDIPORT" nebo promФnnou souboru sТ nastavenУm "dmedia_port" pro urФenУ portu VaХЁeho sekvenceru. StandardnФ je pouХОit prvnУ port. + +Abyste zУskali seznam nastavenУНch rozhranУ midi ve VaХЁem systУЉmu, spusХЅte pХУkaz "startmidi" bez parametrХЏ. VzorovУН vУНstup: + + 2 MIDI interfaces configured: + Serial Port 2 + Software Synth + +VТ tomto pХУpadФ mХЏХОete ScummVM nastavit, aby pouХОil "Software Synth" mУsto standardnУho "Serial Port 2" pХidУЁnУm ХУЁdku + + dmedia_port=Software Synth + +do VaХЁeho souboru s nastavenУm v ФУЁsti [scummvm], nebo nastavenУm SCUMMVM_PORT=Software Synth ve VaХЁem prostХedУ. + + +7.7) PouХОitУ MIDI serveru TiMidity++: +---- -------------------------------- +Pokud na VaХЁem systУЉmu chybУ jakУНkoliv sekvencer MIDI, ale pХesto chcete lepХЁУ kvalitu MIDI, neХО kterou mХЏХОe nabУdnout standardnУ emulace AdLib, mХЏХОete zkusit MIDI server TiMidity++. ProhlУЉdnФte si <http://timidity.sourceforge.net/> pro staХОenУ a pokyny k instalaci. + +NejdХУve musУte spustit daemona: + + timidity -ir 7777 + +NynУ mХЏХОete spustit ScummVM a zkusit vybrat TiMidity jako vУНstup pro hudbu. StandardnФ se pХipojУ k localhost:7777, ale hostitele/port mХЏХОete zmФnit pomocУ promФnnУЉ prostХedУ "TIMIDITY_HOST". MХЏХОete takУЉ urФit +"ФУslo zaХУzenУ" pouХОitУm promФnnУЉ "SCUMMVM_MIDIPORT". + + +7.8) PouХОitУ komprimovanУНch zvukovУНch souborХЏ +---- ---------------------------------------- + +7.8.0) PouХОitУ souborХЏ MP3 pro CD audio: +------ --------------------------------- +PouХОijte LAME nebo jinУН kodУЉr MP3 pro vyjmutУ stop cd audio do souborХЏ. +Soubory pojmenujte track1.mp3 track2.mp3 atd. ScummVM musУ bУНt sestaven s podporou MAD pro pouХОitУ tУЉto moХОnosti. Soubory budete muset zТ CD vyjmout ve formУЁtu WAV, pak je pХevУЉst do formУЁtu MP3 vТ konstantnУ pХenosovУЉ rychlosti. To mХЏХОe bУНt provedeno pomocУ nУЁsledujУcУho pХУkazovУЉho ХУЁdku: + + lame -t -q 0 -b 96 track1.wav track1.mp3 + + +7.8.1) PouХОitУ souborХЏ Ogg Vorbis pro CD audio: +------ ---------------------------------------- +PouХОijte oggenc nebo jinУН kodУЉr vorbis kТ pХevedenУ zvukovУНch stop do souborХЏ. Pojmenujte je track1.ogg track2.ogg atd. ScummVM musУ bУНt sestaven s podporou vorbis pro pouХОitУ tУЉto moХОnosti. Soubory budete muset zТ CD vyjmout ve formУЁtu WAV, pak je pХevУЉst do formУЁtu vorbis. To mХЏХОe bУНt provedeno pomocУ nУЁsledujУcУho pХУkazovУЉho ХУЁdku pro oggenc, kde hodnota po q urФuje poХОadovanou kvalitu od 0 do 10: + + oggenc -q 5 track1.wav + + +7.8.2) PouХОitУ souborХЏ Flac pro CD audio: +------ ---------------------------------- +PouХОijte flac nebo jinУН kodУЉr flac kТ pХevedenУ zvukovУНch stop do souborХЏ. +Pojmenujte je track1.flac track2.flac atd. Pokud VУЁХЁ souborovУН systУЉm podporuje pХУpony pouze se tХemi pУsmeny, pojmenujte je track1.fla track2.fla atd. ScummVM musУ bУНt sestaven s podporou flac pro pouХОitУ tУЉto moХОnosti. Soubory budete muset zТ CD vyjmout ve formУЁtu WAV, pak je pХevУЉst do formУЁtu flac. To mХЏХОe bУНt provedeno pomocУ nУЁsledujУcУho pХУkazovУЉho ХУЁdku pro flac: + + flac --best track1.wav + +NezapomeХte, ХОe kvalita bude vХОdy stejnУЁ, rХЏznУЉ moХОnosti kodУЉru ovlivХujУ dobu kУГdovУЁnУ a vУНslednou velikost souboru. + + +7.8.3) KomprimovУЁnУ MONSTER.SOU pomocУ MP3: +------ ------------------------------------ +PotХebujete LAME a nУЁХЁ nУЁstroj 'compress_scumm_sou' z balУФku +scummvm-tools, abyste toto mohli provУЉst a ScummVM musУ bУНt sestaven s podporou MAD. + + compress_scumm_sou monster.sou + +Nakonec dostanete mnohem menХЁУ soubor monster.so3, tento soubor zkopУrujte do VaХЁУ sloХОky hry. Pak mХЏХОete soubor monster.sou odstranit. + + +7.8.4) KomprimovУЁnУ MONSTER.SOU pomocУ Ogg Vorbis: +------ ------------------------------------------- +Tak jako vУНХЁe, ale ScummVM musУ bУНt sestaven s podporou OGG. SpusХЅte: + + compress_scumm_sou --vorbis monster.sou + +To by mФlo vytvoХit menХЁУ soubor monster.sog file, kterУН byste mФli zkopУrovat do sloХОky hry. KУГdovУЁnУ Ogg mХЏХОe trvat mnohem dУЉle neХО u MP3, takХОe mФjte po ruce dobrou knУХОku. + + +7.8.5) KomprimovУЁnУ MONSTER.SOU pomocУ Flac: +------ ------------------------------------- +Tak jako vУНХЁe, ale ScummVM musУ bУНt sestaven s podporou Flac. SpusХЅte: + + compress_scumm_sou --flac monster.sou + +To by mФlo vytvoХit menХЁУ soubor monster.sof, kterУН byste mФli zkopУrovat do sloХОky hry. NezapomeХte, ХОe kvalita bude vХОdy stejnУЁ, rХЏznУЉ moХОnosti kodУЉru ovlivХujУ dobu kУГdovУЁnУ a vУНslednou velikost souboru. ZmФna velikosti bloku (-b <hodnota>), mУЁ nejvФtХЁУ vliv na vУНslednou velikost souboru -- 1152 se zdУЁ bУНt dobrУЁ hodnota pro tento druh zvukovУНch souborХЏ. PХeФtФte si dokumentaci kodУЉru pХedtУm, neХО pouХОijete dalХЁУ hodnoty. + + +7.8.6) KomprimovУЁnУ hudby/zvuku/hlasu v hrУЁch AGOS: +------ -------------------------------------------- +Pro tento УКkol pouХОijte nУЁХЁ nУЁstroj 'compress_agos' z balУФku scummvm-tools. MХЏХОete volit mezi nФkolika cУlovУНmi formУЁty, ale nezapomeХte, ХОe je mХЏХОete pouХОУt pouze tehdy, kdyХО ScummVM byl sestaven se zapnutou podporou konkrУЉtnУho dekodУЉru. + + compress_agos effects (Pro CD verzi Simon 1 od Acorn) + compress_agos simon (Pro CD verzi Simon 1 od Acorn) + compress_agos effects.voc (Pro DOS CD verzi Simon 1) + compress_agos simon.voc (Pro DOS CD verzi Simon 1) + compress_agos simon.wav (Pro Windows CD verzi Simon 1) + compress_agos simon2.voc (Pro DOS CD verzi Simon 2) + compress_agos simon2.wav (Pro Windows CD verzi Simon 2) + compress_agos mac (Pro Macintosh verzi Simon 2) + + compress_agos voices1.wav (Pro Windows verzi Feeble na 2CD/4CD) + compress_agos voices2.wav (Pro Windows verzi Feeble na 2CD/4CD) + compress_agos voices3.wav (Pro Windows verzi Feeble na 4CD) + compress_agos voices4.wav (Pro Windows verzi Feeble na 4CD) + + compress_agos Music (Pro Windows verzi Puzzle Pack) + +Pro Ogg Vorbis pХidejte k volbУЁm --vorbis, tj. + + compress_agos --vorbis + +Pro Flac pХidejte k volbУЁm --flac a dodateФnУЉ parametry, tj. + + compress_agos --flac + +Nakonec dostanete mnohem menХЁУ soubor *.mp3, *.ogg nebo *.fla, zkopУrujte ho do VaХЁУ sloХОky hry. StarУН soubor mХЏХОete bezpeФnУЉ odebrat. + + +7.8.7) KomprimovУЁnУ ХeФi/hudby v Broken Sword: +------ --------------------------------------- +NУЁstroj 'compress_sword1' z balУФku scummvm-tools mХЏХОe pХevУЉst hudbu a ХeФ do MP3, Ogg Vorbis a takУЉ Flac. NejsnadnФjХЁУm zpХЏsobem, jak soubory pХevУЉst, je prostУЉ zkopУrovУЁnУ spouХЁtФФe do VaХЁУ sloХОky BS1 (spolu s kodУЉrem lame) a pak ho odsud spustit. Tak bude vХЁechno automaticky pХevedeno na MP3. PotУЉ, mХЏХОete ruФnФ odstranit soubory SPEECH?.CLU a hudebnУ soubory wave. + +SpuХЁtФnУm "compress_sword1 --vorbis" soubory zkomprimuje pomocУ Ogg Vorbis mУsto MP3. + +SpuХЁtФnУm "compress_sword1 --flac" soubory zkomprimuje pomocУ Flac +mУsto MP3. + +PouХОijte "compress_sword1 --help", abyste dostali УКplnУН seznam moХОnostУ. + + +7.8.8) KomprimovУЁnУ ХeФi/hudby v Broken Sword II: +------ ------------------------------------------ +Pro tento УКkol pouХОijte nУЁХЁ nУЁstroj 'compress_sword2'. MХЏХОete volit mezi nФkolika cУlovУНmi formУЁty, ale nezapomeХte, ХОe je mХЏХОete pouХОУt pouze tehdy, kdyХО ScummVM byl sestaven se zapnutou podporou konkrУЉtnУho dekodУЉru. + + compress_sword2 speech1.clu + compress_sword2 music1.clu + +Pro Ogg Vorbis pХidejte --vorbis k moХОnostem, tj. + + compress_sword2 --vorbis + +Nakonec budete mУt mnohem menХЁУ soubor *.cl3 nebo *.clg, tento soubor zkopУrujte do sloХОky hry. StarУН soubor mХЏХОete bezpeФnУЉ odstranit. + +Je moХОnУЉ pouХОУt Flac pro komprimaci pХidУЁnУm moХОnosti by --flac. NicmУЉnФ vУНslednУН soubor *.clf je ve skuteФnosti vФtХЁУ neХО pХЏvodnУ. + +NezapomeХte, prosУm, ХОe compress_sword2 bude fungovat pouze se ФtyХmi soubory ХeФi/hudby v Broken Sword II. Nebude fungovat sТ dalХЁУmi soubory *.clu, ani nebude fungovat se soubory ХeФi zТ Broken Sword. + + +7.9) VУНstupnУ vzorkovacУ kmitoФet: +---- ----------------------------- +VУНstupnУ vzorkovacУ kmitoФet ХУkУЁ ScummVM, kolik vzorkХЏ zvuku mУЁ hrУЁt vТ kanУЁlu za sekundu. Je toho hodnФ, co by se dalo ХУct o tomto tУЉmatu, ale vФtХЁina toho je zde nepodstatnУЉ. KrУЁtkУЁ verze je, ХОe vФtХЁinФ her staФУ 22050 Hz, ale vТ nФkterУНch pХУpadech je lepХЁУ 44100 Hz. Na extrУЉmnФ pomalУНch systУЉmech byste radФji mФli pouХОУt 11025 Hz, ale je nepravdФpodobnФ, ХОe byste se sТ tУmto museli zabУНvat. + +Abychom to rozvedli, vФtХЁina zvukХЏ, kterУЉ ScummVM musУ pХehrУЁt, byla vzorkovУЁna buФ na 22050 Hz, nebo 11025 Hz. PouХОitУm vyХЁХЁУho kmitoФtu jako kouzlem nezvУНХЁУ kvalitu tФchto zvukХЏ. Proto je 22050 Hz v poХУЁdku. + +NФkterУЉ hry pouХОУvajУ CD audio. Pokud pro toto pouХОУvУЁte komprimovanУЉ soubory, jsou pravdФpodobnФ vzorkovanУН na kmitoФtu 44100 Hz, takХОe pro tyto hry je toto pravdФpodobnФ lepХЁУ volba kmitoФtu. + +PХi pouХОitУ ovladaФХЏ hudby AdLib, FM Towns, PC Speaker nebo IBM PCjr je +ScummVM zodpovФdnУН za vytvУЁХenУ vzorkХЏ. VФtХЁinou bude 22050 Hz staФit, ale existuje alespoХ jedna stopa hudby AdLib Beneath a Steel Sky, kterУЁ znУ lУЉpe pХi 44100 Hz. + +PouХОitУ kmitoФtХЏ mezi nenУ doporuФeno. Za prvУЉ VaХЁe zvukovУЁ karta ho nemusУ podporovat. Teoreticky by se ScummVM mФl vrУЁtit kТ rozumnУЉmu kmitoФtu, ale nespolУЉhejte na to. DХЏleХОitФjХЁУ je ale to, ХОe ScummVM musУ pХevzorkovat vХЁechny zvuky na jejich vУНstupnУ kmitoФet. To je mnohem snadnФjХЁУ kТ provedenУ, kdyХО vУНstupnУ kmitoФet je nУЁsobkem pХЏvodnУho. + + +8.0) Soubor s nastavenУm: +---- -------------------- +StandardnФ je soubor sТ nastavenУm uloХОen a naФУtУЁn: + + Windows Vista/7: + \Users\jmУЉno uХОivatele\AppData\Roaming\ScummVM\scummvm.ini, + + Windows 2000/XP: + \Documents and Settings\jmУЉno uХО\Application Data\ScummVM\scummvm.ini + + Windows NT4: + <sloХОkawin>\Profiles\jmУЉno uХО\Application Data\ScummVM\scummvm.ini, + + Windows 95/98/ME: + <sloХОkawin>\scummvm.ini, + + Pokud ve Windows nainstalovУЁna dХУvФjХЁУ verze ScummVM bude ponechУЁno dХУvФjХЁУ umУstФnУ '<sloХОkawin>\scummvm.ini'. + + Unix: + ХУdУme se specifikacemi zУЁkladnУho adresУЁХe XDG. To znamenУЁ, ХОe naХЁe nastavenУ lze nalУЉzt v: + $XDG_CONFIG_HOME/scummvm/scummvm.ini + + Pokud XDG_CONFIG_HOME nenУ nastaven nebo je prУЁzdnУН, bude, podle pravidel specifikace, pouХОito '~/.config' jako hodnota pro XDG_CONFIG_HOME. + + Pokud byla ve vaХЁem systУЉmu nainstalovУЁna dХУvФjХЁУ verze ScummVM, bude ponechУЁno pХЏvodnУ vУНchozУ umУstФnУ '~/.scummvmrc'. + + Mac OS X: + ~/Library/Preferences/ScummVM Preferences + (zde ~ oznaФuje VaХЁi domovskou sloХОku) + + DalХЁУ: + scummvm.ini vТ souФasnУЉ sloХОce + +VzorovУН soubor sТ nastavenУm vypadУЁ takto: + + [scummvm] + gfx_mode=supereagle + fullscreen=true + savepath=C:\saves\ + + [sky] + path=C:\games\SteelSky\ + + [germansky] + gameid=sky + language=de + path=C:\games\SteelSky\ + description=Beneath a Steel Sky w/ German subtitles + + [germandott] + gameid=tentacle + path=C:\german\tentacle\ + description=German version of DOTT + + [tentacle] + path=C:\tentacle\ + subtitles=true + music_volume=40 + sfx_volume=255 + + [loomcd] + cdrom=1 + path=C:\loom\ + talkspeed=5 + savepath=C:\loom\saves\ + + [monkey2] + path=C:\amiga_mi2\ + music_driver=windows + +8.1) RozpoznУЁvanУЁ klУФovУЁ slova nastavenУ +---- ------------------------------------ +Jsou rozpoznУЁvУЁna nУЁsledujУcУ klУФovУЁ slova: + + path ХetФzec Cesta, kde jsou umУstФny datovУЉ soubory hry + autosave_period ФУslo VteХiny mezi autouklУЁdУЁnУm (vУНchozУ: 300) + save_slot ФУslo ФУslo uloХОenУЉ, kterУЉ pХi spuХЁtФnУ naФУst. + savepath ХetФzec Cesta, kde hra bude uklУЁdat uloХОenУЉ hry. + versioninfo ХetФzec Verze ScummVM, kterУЁ vytvoХila soubor. + gameid ХetФzec SkuteФnУЉ id hry. UХОiteФnУЉ, pokud mУЁte nФkolik verzУ stejnУЉ hry a chcete pro nФ rХЏznУЉ pХezdУvky. Viz pХУklad. + description ХetФzec Popis hry jak se zobrazУ ve spouХЁtФФi. + language ХetФzec UrФУ jazyk (en, us, de, fr, it, pt, es, + jp, zh, kr, se, gb, hb, cz, ru) + speech_mute boolean Pokud true, ХeФ je ztlumena + subtitles boolean Pokud true jsou titulky zapnuty. + talkspeed ФУslo ZpoХОdФnУ textu v hrУЁch SCUMM, nebo rychlost textu vТ jinУНch hrУЁch. + fullscreen boolean ReХОim celУЉ obrazovky + aspect_ratio boolean Povolit korekci pomФru stran + gfx_mode ХetФzec GrafickУН reХОim (normУЁlnУ, 2x, 3x, 2xsai, super2xsai, supereagle, advmame2x, advmame3x, hq2x, hq3x, tv2x, dotmatrix, opengl_linear, opengl_nearest) + + confirm_exit boolean Zeptat se uХОivatele na potvrzenУ pХed ukonФenУm (pouze jУЁdro SDL). + console boolean Povolit okno konzole (vУНchozУ: zapnuto) (pouze Windows). + cdrom ФУslo ФУslo jednotky CD-ROM, kterou pouХОУt pro zvuk. Pokud je zУЁpornУЉ, kТ pokusu o pХУstup k CD-ROM nedojde. + joystick_num ФУslo ФУslo zaХУzenУ joysticku, kterУЉ pouХОУt pro vstup + music_driver ХetФzec KterУЉ hudebnУ jУЁdro pouХОУt. + opl_driver ХetФzec KterУН emulУЁtor AdLib (OPL) pouХОУt. + output_rate ФУslo KterУН vУНstupnУ vzorkovacУ kmitoФet pouХОУt v Hz. RozumnУЉ hodnoty jsou 11025, 22050 a 44100. + alsa_port ХetФzec KterУН port pouХОУt pro vУНstup pХi pouХОitУ hudebnУho ovladaФe ALSA. + music_volume ФУslo NastavenУ hlasitosti hudby (0-255) + multi_midi boolean Pokud true, jsou povoleny smУХЁenУН AdLib a pХЏvodnУ MIDI. + soundfont ХetФzec KterУН SoundFont pouХОУt pro pХehrУЁvУЁnУ MIDI. (PodporovУЁno pouze nФkterУНmi ovladaФi MIDI.) + native_mt32 boolean Pokud true, zakУЁХОe emulaci GM a pХedpoklУЁdУЁ, ХОe je dostupnУН pravУН Roland MT-32. + enable_gs boolean Pokud true, povolУ funkce urФenУЉ pro Roland GS ke zlepХЁenУ emulace GM. Pokud je native_mt32 takУЉ nastaven na true, zaХУzenУ GS zvolУ mapu MT-32 pro pХehrУЁvУЁnУ sprУЁvnУНch instrumentХЏ. + sfx_volume ФУslo NastavenУ hlasitosti zvuku (0-255) + tempo ФУslo Rychlost hudby (50-200) (vУНchozУ: 100) + speech_volume ФУslo NastavenУ hlasitosti ХeФi (0-255) + midi_gain ФУslo ZvУНХЁenУ MIDI (0-1000) (vУНchozУ: 100) (PodporovУЁno pouze nФkterУНmi ovladaФi MIDI.) + copy_protection boolean PovolУ ochranu proti kopУrovУЁnУ vТ urФitУНch hrУЁch, kde by ji ScummVM standardnФ zakУЁzal. + demo_mode boolean Spustit demoverzi v Maniac Mansion + alt_intro boolean PouХОУt alternativnУ УКvod pro CD verze Beneath a Steel Sky a Flight of the Amazon Queen + boot_param ФУslo PХedУЁ toto ФУslo zavУЁdФcУmu skriptu + +Hry Sierra pouХОУvajУcУ jУЁdro AGI pХidУЁvajУ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + + originalsaveload boolean Pokud true, jsou pouХОity pХЏvodnУ obrazovky nahrУЁvУЁnУ/uloХОenУ mУsto vylepХЁenУНch ze ScummVM + altamigapalette boolean PouХОУt alternativnУ paletu, bФХОnУЉ pro hry Amiga. Toto byl pХЏvodnУ starУН standard + mousesupport boolean PovolУ podporu myХЁi. UmoХОnУ pouХОУt myХЁ pro pohyb a pro ovlУЁdУЁnУ hernУch nabУdek + +Hry Sierra pouХОУvajУcУ jУЁdro SCI pХidУЁvajУ nУЁsledujУcУ nestandardnУ klУФovУЁ slova: + + disable_dithering boolean Odstranit artefakty chvФnУ vТ nФkterУНch hrУЁch EGA + prefer_digitalsfx boolean Pokud true, jsou upХednostХovУЁny digitУЁlnУ zvukovУЉ efekty pХed syntetizovanУНmi + originalsaveload boolean Pokud true, jsou pouХОity pХЏvodnУ obrazovky nahrУЁvУЁnУ/uloХОenУ mУsto vylepХЁenУНch ze ScummVM + native_fb01 boolean Pokud true, je ovladaФ hudby pro kartu IBM Music Feature nebo modul syntezУЁtoru Yahama FB-01 FM pouХОit jako vУНstup MIDI + use_cdaudio boolean PouХОУt zvuky na CD mУsto ve hХe, pokud je dostupnУЉ + windows_cursors boolean PouХОУt kurzory Windows (menХЁУ a ФernobУlУЉ) mУsto kurzorХЏ z DOS (King's Quest 6) + silver_cursors boolean PouХОУt alternativnУ sadu stХУbrnУНch kurzorХЏ mУsto standardnУch zlatУНch (Space Quest 4) + +Broken Sword II pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova: + + gfx_details ФУslo NastavenУ grafickУНch detailХЏ (0-3) + music_mute boolean Pokud true, hudba je ztlumena + object_labels boolean Pokud true, popisky objektХЏ jsou povoleny + reverse_stereo boolean Pokud true, kanУЁly stereo jsou obrУЁceny + sfx_mute boolean Pokud true, zvukovУЉ efekty jsou ztlumeny + +Flight of the Amazon Queen pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova: + + music_mute boolean Pokud true, hudba je ztlumena + sfx_mute boolean Pokud true, zvukovУЉ efekty jsou ztlumeny + +Hopkins FBI pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + enable_gore boolean Pokud true, povolУ nФkterУЉ nepovinnУЉ krvavУЉ scУЉny ve hХe + +Jones in the Fast Lane pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + + music_mute boolean Pokud true, je pouХОito CD audio mУsto zvukХЏ ve hХe + +King's Quest VI Windows pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + + windows_cursors boolean Pokud true, jsou pouХОity pХЏvodnУ ФernobУlУЉ kurzory mУsto kurzorХЏ z DOS. Pokud false, jsou ve verzi Windows pouХОity kurzory DOS, zvФtХЁenУЉ, aby se shodovaly se zbytkem zvФtХЁenУЉ grafiky + +Lands of Lore: The Throne of Chaos pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova: + + smooth_scrolling boolean Pokud true, je posunovУЁnУ pХi zmФnФ zТ jednУЉ obrazovky na druhou plynulejХЁУ + floating_cursors boolean Pokud true, je kurzor zmФnФn na smФrovou ХЁipku pХi najetУ na okraj obrazovky. HrУЁФ pak mХЏХОe kliknout pro pohyb vТ tomto smФru. + +Space Quest IV CD pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + + silver_cursors boolean Pokud true, je mУsto pХЏvodnУch zlatУНch kurzorХЏ pouХОita alternativnУ sada stХУbrnУНch + +Simon the Sorcerer 1 a 2 pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova: + + music_mute boolean Pokud true, hudba je ztlumena + sfx_mute boolean Pokud true, zvukovУЉ efekty jsou ztlumeny + +Soltys pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + enable_color_blind bool Pokud true, jsou pХЏvodnУ barvy nahrazeny odstУny ХЁedi + +The Legend of Kyrandia pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + + walkspeed celУЉ ФУslo Rychlost chХЏze (0-4) + +The Legend of Kyrandia: The Hand of Fate pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + + walkspeed ФУslo Rychlost chХЏze (3 nebo 5, coХО znamenУЁ + rychle nebo pomalu) + +The Legend of Kyrandia: Malcolm's Revenge pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova: + + walkspeed ФУslo Rychlost chХЏze (3 nebo 5, coХО znamenУЁ + rychle nebo pomalu) + studio_audience boolean Pokud true, je slyХЁet potlesk a smУch kdykoliv Malcolm provede nФco vtipnУЉho + skip_support boolean Pokud true, hrУЁФ mХЏХОe pХeskakovat text a scУЉny hry + helium_mode boolean Pokud true, lidУЉ znФjУ tak, jakoby se nadУНchali hУЉlia + +The Neverhood pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЁ slova: + + originalsaveload boolean Pokud true, jsou pouХОity pХЏvodnУ obrazovky pro + naФУtУЁnУ/uklУЁdУЁnУ mУsto obrazovek ScummVM + skiphallofrecordsscenes boolean + Pokud true, umoХОnУ hrУЁФi pХeskoФit + obrazovky v SУni zУЁznamХЏ + scalemakingofvideos boolean Pokud true, je zmФnФno rozliХЁenУ dokumentu o + vytvУЁХenУ hry tak, aby zaplnilo celou obrazovku + +The 7th Guest pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + + fast_movie_speed boolean Pokud true, jsou videa pХehrУЁvУЁna pХi zvУНХЁenУЉ + rychlosti, stejnУЉ jako ve verzi pro iOS + Videa bez zvuku jsou stУЁle pХehrУЁvУЁna pХi + normУЁlnУ rychlosti, aby nedoХЁlo k desynchronizaci + hudby + +Zork Nemesis: The Forbidden Lands pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + + originalsaveload boolean Pokud true, jsou pro obrУЁzky pХi uloХОenУ/naФtenУ her + pouХОity pХЏvodnУ mУsto vylepХЁenУНch ze ScummVM + doublefps boolean Pokud true, je hernУ rychlost zvУНХЁena z 30 snУmkХЏ za sekundu na 60 + venusenabled boolean Pokud true, je povolen hernУ systУЉm nУЁpovФdy Venus + noanimwhileturning boolean Pokud true, jsou pХi otУЁФenУ v panoramatickУЉm reХОimu + zakУЁzУЁny + +Zork: Grand Inquisitor pХidУЁvУЁ nУЁsledujУcУ nestandardnУ klУФovУЉ slovo: + + originalsaveload boolean Pokud true, jsou pro obrУЁzky pХi uloХОenУ/naФtenУ her + pouХОity pХЏvodnУ mУsto vylepХЁenУНch ze ScummVM + doublefps boolean Pokud true, je hernУ rychlost zvУНХЁena z 30 snУmkХЏ za sekundu na 60 + noanimwhileturning boolean Pokud true, jsou pХi otУЁФenУ v panoramatickУЉm reХОimu + zakУЁzУЁny + mpegmovies boolean Pokud true, jsou pouХОita videa MPEG ve vysokУЉm rozliХЁenУ z + DVD verze hry, mУsto videУ AVI v nУzkУЉm rozliХЁenУ + +8.2) VlastnУ hernУ volby, kterУЉ mohou bУНt pХepУnУЁny pomoci grafickУЉho rozhranУ +---- ------------------------------------------------------------------------- +Mnoho vlastnУch hernУch voleb vТ pХedchozУ ФУЁsti mХЏХОe bУНt pХepnuto pХes grafickУЉ rozhranУ. Pokud je takovУЁto volba pro urФitou hru dostupnУЁ, objevУ se karta "JУЁdro" pХi pХidУЁvУЁnУ nebo УКpravФ nastavenУ tУЉto hry. +Pokud vlastnУ moХОnosti nejsou zobrazeny, musУ bУНt konkrУЉtnУ hry spuХЁtФny jednou nebo znovu pХidУЁny do seznamu her spouХЁtФФe ScummVM. Toto aktualizuje nastavenУ kaХОdУЉ poloХОky, ФУmХО umoХОnУ zobrazenУ vlastnУch voleb. + +9.0) SestavenУ: +---- ---------- +Pro aktuУЁlnУ pХehled o tom, jak ScummVM sestavit pro rХЏznУЉ platformy, prohlУЉdnФte si, prosУm, naХЁУ Wiki, zvlУЁХЁtФ tuto strУЁnku: + + <http://wiki.scummvm.org/index.php/Compiling_ScummVM> + +Pokud sestavujete ve Windows, Linux nebo Mac OS X, potХebujete SDL-1.2.2 +Nebo novФjХЁУ (starХЁУ verze mohou fungovat, ale nejsou podporovУЁny) a podporovanУН kompilУЁtor. VФtХЁina kompilУЁtorХЏ, vФetnФ GCC, mingw a novФjХЁУch verzУ Microsoft Visual C++ jsou podporovУЁny. Pokud chcete pouХОУt stopy CD komprimovanУЉ do MP3 nebo soubory .SOU, musУte nainstalovat knihovnu MAD; podobnФ potХebujete vhodnУЉ knihovny pro komprimovanУН zvuk pomocУ Ogg Vorbis a FLAC. Pro komprimovanУЉ uloХОenУЉ stavy je potХeba mУt zlib. + +NФkterУЉ ФУЁsti ScummVM, zvlУЁХЁtФ zvФtХЁovaФe, majУ vysoce optimalizovanУЉ verze napsanУЉ v assembleru. Pokud si pХejete tuto moХОnost pouХОУt, potХebuje mУt nainstalovУЁn assembler nasm (viz http://www.nasm.us/). NezapomeХte, ХОe vТ souФasnosti mУЁme pouze verze optimalizovanУЉ pro x86 MMX, a nebudou sestaveny pro jinУЉ procesory. + +Na Win9x/NT/XP mХЏХОete urФit USE_WINDBG a pХipojit WinDbg pro prochУЁzenУ ladУcУch zprУЁv (viz <https://technet.microsoft.com/en-us/sysinternals/debugview.aspx)>. + + Windows: + * Dev-C++ + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/DevCPP> + * MinGW + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/MinGW> + * Visual Studio (MSVC) + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Visual_Studio> + * Windows CE/Mobile + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Windows_CE> + + Linux: + * GCC + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/GCC> + + Mac OS X: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Mac_OS_X> + + AmigaOS4: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/AmigaOS> + + Apple iPhone: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/iPhone> + + Atari/FreeMiNT: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Atari/FreeMiNT> + + Bada/Tizen: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Bada/Tizen> + + BeOS/ZETA/Haiku: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/BeOS/ZETA/Haiku> + + Google Android: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Android> + + HP webOS: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/WebOS> + + Mac OS: + * Mac OS X + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Mac_OS_X> + * Mac OS X 10.2.8 + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Mac_OS_X_10.2.8> + * Mac OS X KХУХОovУЁ kompilace + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Mac_OS_X_Crosscompiling> + + Maemo: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Maemo> + + Nintendo DS: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Nintendo_DS> + + Nintendo Wii a Gamecube: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Wii> + + RaspberryPi: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/RPI> + + Sega Dreamcast: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Dreamcast> + + Sony Playstation: + * Sony PlayStation 2 + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/PlayStation_2> + * Sony PlayStation 3 + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/PlayStation_3#Building_from_source> + * Sony PlayStation Portable + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/PlayStation_Portable> + + Symbian: + PХeФtФte si prosУm: + <http://wiki.scummvm.org/index.php/Compiling_ScummVM/Symbian> + + +10.0) PodФkovУЁnУ +----- ---------- +ProsУm pХeФtФte si nУЁХЁ rozsУЁhlУН seznam lidУ, kterУНm chceme podФkovat na + +<http://www.scummvm.org/credits/> + + + + +------------------------------------------------------------------------ +HodnФ Х tФstУ a Х ХЅastnУЉ AdventurovУЁnУ! +TУНm ScummVM. +<http://www.scummvm.org/> +------------------------------------------------------------------------ diff --git a/doc/de/NEUES b/doc/de/NEUES index a15895da1e..69c88d377c 100644 --- a/doc/de/NEUES +++ b/doc/de/NEUES @@ -2,11 +2,17 @@ Umfangreichere Informationen УМber die Уnderungen des aktuellen experimentellen Programmcodes finden Sie auf Englisch unter: https://github.com/scummvm/scummvm/commits/ -1.9.0 (DD.MM.YYYY) +1.10.0 (DD.MM.YYYY) + + +1.9.0 (17.10.2016) Neue Spiele: - UnterstУМtzung fУМr Myst hinzugefУМgt. - UnterstУМtzung fУМr Myst: Masterpiece Edition hinzugefУМgt. - UnterstУМtzung fУМr U.F.O.s./Gnap: Der Schurke aus dem All hinzugefУМgt. + - UnterstУМtzung fУМr Hi-Res Adventure #0: Mission Asteroid hinzugefУМgt. + - UnterstУМtzung fУМr Hi-Res Adventure #1: Mystery House hinzugefУМgt. + - UnterstУМtzung fУМr Hi-Res Adventure #2: The Wizard and the Princess hinzugefУМgt. Allgemein: - Probleme mit dem MS ADPCM-Decoder behoben. @@ -55,6 +61,7 @@ Programmcodes finden Sie auf Englisch unter: Sherlock: - Fehler behoben, der einen Absturz in "The Case of the Serrated Scalpel" verursachen konnte. + - Problem mit Item-Hotspots in "The Case of the Serrated Scalpel" behoben. - Fehler behoben, der in "The Case of the Rose Tattoo" dazu fУМhrt, dass sich das Spiel aufhУЄngt. Amiga-Portierung: diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index 08006fe1b7..5a0f79721e 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -1333,7 +1333,7 @@ void Cast::doCast(int param1) { for (int idx = 0; idx < 5 && !_vm->shouldQuit() && !_vm->_events->isKeyMousePressed(); ++idx) _vm->_events->pollEventsAndWait(); - + if (_vm->_events->isKeyMousePressed()) break; @@ -1682,7 +1682,7 @@ void River::updateObstacles() { void River::riverSetPhysX() { int xAmt = (_vm->_scrollCol * 16) + _vm->_scrollX; - + for (RiverStruct *cur = _topList; cur <= _botList; ++cur) { cur->_xp = xAmt - (_screenVertX - cur->_riverX); } diff --git a/engines/access/amazon/amazon_room.h b/engines/access/amazon/amazon_room.h index 6396f80199..003178ea15 100644 --- a/engines/access/amazon/amazon_room.h +++ b/engines/access/amazon/amazon_room.h @@ -61,7 +61,7 @@ public: virtual ~AmazonRoom(); virtual void init4Quads(); - + virtual void roomMenu(); }; diff --git a/engines/access/animation.h b/engines/access/animation.h index 72621c4d11..49417ec5fc 100644 --- a/engines/access/animation.h +++ b/engines/access/animation.h @@ -49,7 +49,7 @@ public: ~AnimationManager(); void freeAnimationData(); void loadAnimations(Resource *res); - + Animation *findAnimation(int animId); Animation *setAnimation(int animId); diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp index 37f4c7082e..577746f7b4 100644 --- a/engines/access/asurface.cpp +++ b/engines/access/asurface.cpp @@ -173,7 +173,7 @@ void BaseSurface::copyTo(BaseSurface *dest) { if (dest->empty()) dest->create(this->w, this->h); - dest->blitFrom(*this); + dest->blitFrom(*this); } void BaseSurface::saveBlock(const Common::Rect &bounds) { diff --git a/engines/access/debugger.cpp b/engines/access/debugger.cpp index 48c7290249..308733ece2 100644 --- a/engines/access/debugger.cpp +++ b/engines/access/debugger.cpp @@ -94,7 +94,7 @@ bool Debugger::Cmd_LoadScene(int argc, const char **argv) { debugPrintf("Unused Room Number\n"); return true; } - + _vm->_player->_roomNumber = newRoom; _vm->_room->_function = FN_CLEAR1; diff --git a/engines/access/decompress.cpp b/engines/access/decompress.cpp index 3de376c193..6d5b613fe2 100644 --- a/engines/access/decompress.cpp +++ b/engines/access/decompress.cpp @@ -31,7 +31,7 @@ namespace Access { void LzwDecompressor::decompress(byte *source, byte *dest) { _source = source; - + byte litByte = 0; uint16 oldCode = 0; uint16 copyLength, maxCodeValue, code, nextCode, lastCode; diff --git a/engines/access/events.cpp b/engines/access/events.cpp index 21ff0d0928..3d3b97e028 100644 --- a/engines/access/events.cpp +++ b/engines/access/events.cpp @@ -65,9 +65,9 @@ void EventsManager::setNormalCursor(CursorType cursorId) { void EventsManager::setCursor(CursorType cursorId) { if (cursorId == _cursorId) - return; + return; _cursorId = cursorId; - + if (cursorId == CURSOR_INVENTORY) { // Set the cursor CursorMan.replaceCursor(_invCursor.getPixels(), _invCursor.w, _invCursor.h, @@ -209,9 +209,9 @@ void EventsManager::keyControl(Common::KeyCode keycode, bool isKeyDown) { } return; } - + _keyCode = keycode; - + switch (keycode) { case Common::KEYCODE_UP: case Common::KEYCODE_KP8: diff --git a/engines/access/files.h b/engines/access/files.h index 61fccc2431..151890f338 100644 --- a/engines/access/files.h +++ b/engines/access/files.h @@ -77,7 +77,7 @@ private: * Handles setting up the resource with a stream for the located resource */ void handleFile(Resource *res); - + /** * Handles loading a screen surface and palette with decoded resource */ diff --git a/engines/access/inventory.h b/engines/access/inventory.h index 1d88bf4555..e91ca2484e 100644 --- a/engines/access/inventory.h +++ b/engines/access/inventory.h @@ -119,7 +119,7 @@ public: int _startTravelItem; public: InventoryManager(AccessEngine *vm); - + int &operator[](int idx); int useItem(); diff --git a/engines/access/player.cpp b/engines/access/player.cpp index 0162491aee..ccef0d6740 100644 --- a/engines/access/player.cpp +++ b/engines/access/player.cpp @@ -142,7 +142,7 @@ void Player::loadTexPalette() { int size = texPal->_size; assert(size == 768); _manPal1 = new byte[size]; - memcpy(_manPal1, texPal->data(), size); + memcpy(_manPal1, texPal->data(), size); } void Player::loadSprites(const Common::String &name) { diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp index 2d29ad0718..7da9dfc429 100644 --- a/engines/access/screen.cpp +++ b/engines/access/screen.cpp @@ -300,10 +300,10 @@ void Screen::cyclePaletteBackwards() { _vm->_timers[6]._flag++; byte *pStart = &_rawPalette[_cycleStart * 3]; byte *pEnd = &_rawPalette[_endCycle * 3]; - + for (int idx = _startCycle; idx < _endCycle; ++idx) { g_system->getPaletteManager()->setPalette(pStart, idx, 1); - + pStart += 3; if (pStart == pEnd) pStart = &_rawPalette[_cycleStart * 3]; diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index 38313640f1..2cebc3e3c6 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -840,7 +840,7 @@ void Scripts::cmdTexChoice() { _vm->_fonts._charSet._lo = 1; _vm->_fonts._charSet._hi = 8; _vm->_fonts._charFor._hi = 255; - + if (_vm->getGameID() == GType_MartianMemorandum) { _vm->_fonts._charFor._lo = 247; _vm->_screen->_maxChars = 23; @@ -912,7 +912,7 @@ void Scripts::cmdTexChoice() { _vm->_events->debounceLeft(); int x = _vm->_events->_mousePos.x; for (int i = 0; i < BTN_COUNT; i++) { - if (((_vm->getGameID() == GType_MartianMemorandum) && (x >= BTN_RANGES_v1[i][0]) && (x < BTN_RANGES_v1[i][1])) + if (((_vm->getGameID() == GType_MartianMemorandum) && (x >= BTN_RANGES_v1[i][0]) && (x < BTN_RANGES_v1[i][1])) || ((_vm->getGameID() == GType_Amazon) && (x >= BTN_RANGES_v2[i][0]) && (x < BTN_RANGES_v2[i][1]))) { choice = i; @@ -1049,7 +1049,7 @@ void Scripts::cmdDispAbout() { if (btnSelected == 2) _vm->_useItem = -1; else - _vm->_useItem = _vm->_travelBox->_tempListIdx[boxX]; + _vm->_useItem = _vm->_travelBox->_tempListIdx[boxX]; } void Scripts::cmdPushLocation() { diff --git a/engines/access/scripts.h b/engines/access/scripts.h index 4cfedf3b3f..ad9cb8661e 100644 --- a/engines/access/scripts.h +++ b/engines/access/scripts.h @@ -73,12 +73,12 @@ protected: void cmdAnim(); void cmdSetFlag(); void cmdCheckFlag(); - + /** * Jump to another script */ void cmdGoto(); - + void cmdAddScore(); void cmdSetInventory(); void cmdCheckInventory(); @@ -162,7 +162,7 @@ public: void freeScriptData(); void searchForSequence(); - + int executeScript(); void findNull(); diff --git a/engines/access/sound.cpp b/engines/access/sound.cpp index cf52bc58c5..baa14ce21e 100644 --- a/engines/access/sound.cpp +++ b/engines/access/sound.cpp @@ -155,7 +155,7 @@ void SoundManager::playSound(Resource *res, int priority, bool loop, int soundIn error("Unknown format"); if (loop) { - _queue.push_back(QueuedSound(new Audio::LoopingAudioStream(audioStream, 0, + _queue.push_back(QueuedSound(new Audio::LoopingAudioStream(audioStream, 0, DisposeAfterUse::NO), soundIndex)); } else { _queue.push_back(QueuedSound(audioStream, soundIndex)); diff --git a/engines/access/video.cpp b/engines/access/video.cpp index 22842a5855..54231a9efe 100644 --- a/engines/access/video.cpp +++ b/engines/access/video.cpp @@ -97,7 +97,7 @@ void VideoPlayer::setVideo(BaseSurface *vidSurface, const Common::Point &pt, con void VideoPlayer::setVideo(BaseSurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate) { // Open up video stream _videoData = _vm->_files->loadFile(videoFile); - + setVideo(vidSurface, pt, rate); } diff --git a/engines/adl/configure.engine b/engines/adl/configure.engine index 844e2b8e6a..944b043af8 100644 --- a/engines/adl/configure.engine +++ b/engines/adl/configure.engine @@ -1,3 +1,3 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine adl "ADL" no +add_engine adl "ADL" yes diff --git a/engines/adl/detection.cpp b/engines/adl/detection.cpp index 2d568b28d7..1cfeb9a859 100644 --- a/engines/adl/detection.cpp +++ b/engines/adl/detection.cpp @@ -93,7 +93,7 @@ static const AdlGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformApple2, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO2(GAMEOPTION_COLOR_DEFAULT_OFF, GAMEOPTION_SCANLINES) }, GAME_TYPE_HIRES1 @@ -107,7 +107,7 @@ static const AdlGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformApple2, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO2(GAMEOPTION_COLOR_DEFAULT_OFF, GAMEOPTION_SCANLINES) }, GAME_TYPE_HIRES1 @@ -121,7 +121,7 @@ static const AdlGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformApple2, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO2(GAMEOPTION_COLOR_DEFAULT_ON, GAMEOPTION_SCANLINES) }, GAME_TYPE_HIRES2 @@ -135,7 +135,7 @@ static const AdlGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformApple2, - ADGF_TESTING, + ADGF_NO_FLAGS, GUIO2(GAMEOPTION_COLOR_DEFAULT_ON, GAMEOPTION_SCANLINES) }, GAME_TYPE_HIRES0 diff --git a/engines/adl/disk.h b/engines/adl/disk.h index 653d76ff10..4c0df834fa 100644 --- a/engines/adl/disk.h +++ b/engines/adl/disk.h @@ -135,7 +135,7 @@ private: enum FileType { kFileTypeText = 0, kFileTypeAppleSoft = 2, - kFileTypeBinary = 4 + kFileTypeBinary = 4 }; enum { diff --git a/engines/agi/agi.h b/engines/agi/agi.h index 79d05c4b1d..b8c30e9d5c 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -978,7 +978,7 @@ public: void inGameTimerUpdate(); private: - uint32 _lastUsedPlayTimeInCycles; // 20 per second + uint32 _lastUsedPlayTimeInCycles; // 40 per second uint32 _lastUsedPlayTimeInSeconds; // actual seconds uint32 _passedPlayTimeCycles; // increased by 1 every time we passed a cycle diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 19aca6f2c4..4148306de2 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -353,7 +353,7 @@ int AgiEngine::playGame() { if (appleIIgsDelayOverwrite->gameId == getGameID()) break; // game found appleIIgsDelayOverwrite++; - } + } } do { @@ -413,7 +413,27 @@ int AgiEngine::playGame() { } } + // Increment the delay value by one, so that we wait for at least 1 cycle + // In Original AGI 1 cycle was 50 milliseconds, so 20 frames per second + // So TIME_DELAY 1 resulted in around 20 frames per second + // 2 resulted in around 10 frames per second + // 0 however resulted in no limits at all, so the game ran as fast as possible + // We obviously do not want the game to run as fast as possible, so we will use 40 frames per second instead. + timeDelay = timeDelay * 2; + if (!timeDelay) + timeDelay = 1; + + // Our cycle counter runs at 25 milliseconds. + // So time delay has to be 1 for the originally unlimited speed - for our 40 fps + // 2 for 20 frames per second + // 4 for 10 frames per second + // and so on. + if (_passedPlayTimeCycles >= timeDelay) { + // code to check for executed cycles + // TimeDate time; + // g_system->getTimeAndDate(time); + // warning("cycle %d", time.tm_sec); inGameTimerResetPassedCycles(); interpretCycle(); diff --git a/engines/agi/global.cpp b/engines/agi/global.cpp index 6f83f02a4e..bd7e4e490f 100644 --- a/engines/agi/global.cpp +++ b/engines/agi/global.cpp @@ -247,7 +247,7 @@ void AgiEngine::setVarSecondsTrigger(byte newSeconds) { // This is also called in the main loop, because the game needs to be sync'd to 20 cycles per second void AgiEngine::inGameTimerUpdate() { uint32 curPlayTimeMilliseconds = inGameTimerGet(); - uint32 curPlayTimeCycles = curPlayTimeMilliseconds / 50; + uint32 curPlayTimeCycles = curPlayTimeMilliseconds / 25; if (curPlayTimeCycles == _lastUsedPlayTimeInCycles) { // No difference, skip updating diff --git a/engines/agi/mouse_cursor.h b/engines/agi/mouse_cursor.h index c086359b0f..f8dc21dc4c 100644 --- a/engines/agi/mouse_cursor.h +++ b/engines/agi/mouse_cursor.h @@ -192,7 +192,7 @@ static const byte MOUSECURSOR_MACINTOSH_BUSY[] = { 1,2,2,2,2,1,2,2,2,1, 1,2,2,2,2,1,2,2,2,1, 1,2,2,2,2,1,2,2,2,1, - 1,2,2,1,1,1,2,2,2,1, + 1,2,2,1,1,1,2,2,2,1, 1,2,2,2,2,2,2,2,2,1, 1,2,2,2,2,2,2,2,2,1, 0,1,2,2,2,2,2,2,1,0, diff --git a/engines/agi/systemui.cpp b/engines/agi/systemui.cpp index 1f26267ad6..c7ca7cd5d4 100644 --- a/engines/agi/systemui.cpp +++ b/engines/agi/systemui.cpp @@ -975,7 +975,7 @@ void SystemUI::askForVerificationKeyPress(uint16 newKey) { if (executeButton) { if (_askForVerificationMouseActiveButtonNr >= 0) { SystemUIButtonEntry *button = &_buttonArray[_askForVerificationMouseActiveButtonNr]; - + if (button->active) { if (!button->isDefault) { // Not default button? -> that's cancel diff --git a/engines/agi/systemui.h b/engines/agi/systemui.h index 283de8794c..1f6e2988bf 100644 --- a/engines/agi/systemui.h +++ b/engines/agi/systemui.h @@ -69,7 +69,7 @@ public: bool quitDialog(); private: - + public: const char *getInventoryTextNothing(); diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp index d11ff201ea..3a7158a203 100644 --- a/engines/agos/midi.cpp +++ b/engines/agos/midi.cpp @@ -179,7 +179,7 @@ int MidiPlayer::open(int gameType, bool isDemo) { //setTimerRate(_driver->getBaseTempo()); return 0; } - + case kMusicModeMilesAudio: { switch (musicType) { case MT_ADLIB: { diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index 1ba0f56353..6ec8931108 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -1317,7 +1317,7 @@ bool AGOSEngine_Elvira2::loadGame(const Common::String &filename, bool restartMo if (getGameType() == GType_WW && getPlatform() == Common::kPlatformDOS && derefItem(item->parent) == NULL) item->parent = 0; - + parent_item = derefItem(parent); setItemParent(item, parent_item); diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index d6f63a8584..2eaddc50f2 100644 --- a/engines/director/frame.cpp +++ b/engines/director/frame.cpp @@ -22,6 +22,7 @@ #include "common/system.h" #include "graphics/font.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" #include "image/bmp.h" @@ -606,16 +607,14 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID) { int height = _sprites[spriteID]->_height; int width = _sprites[spriteID]->_width; - const char *fontName; + Graphics::MacFont macFont(textCast->fontId, textCast->fontSize); if (_vm->_currentScore->_fontMap.contains(textCast->fontId)) { - fontName = _vm->_currentScore->_fontMap[textCast->fontId].c_str(); - } else if ((fontName = _vm->_wm->getFontName(textCast->fontId, textCast->fontSize)) == NULL) { - warning("Unknown font id %d, falling back to default", textCast->fontId); - fontName = _vm->_wm->getFontName(0, 12); + // Override + macFont.setName(_vm->_currentScore->_fontMap[textCast->fontId]); } - const Graphics::Font *font = _vm->_wm->getFont(fontName, Graphics::FontManager::kBigGUIFont); + const Graphics::Font *font = _vm->_wm->_fontMan->getFont(macFont); font->drawString(&surface, text, x, y, width, 0); diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index f92e030c88..aef81fad8a 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -1624,7 +1624,7 @@ yyparse () #endif #endif { - + int yystate; int yyn; int yyresult; diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index d268be4aec..5c0eeedf7e 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -34,7 +34,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -52,7 +52,7 @@ typedef uint64_t flex_uint64_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -168,7 +168,7 @@ extern FILE *yyin, *yyout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -225,7 +225,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -764,7 +764,7 @@ extern int yywrap (void ); #endif static void yyunput (int c,char *buf_ptr ); - + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -888,7 +888,7 @@ YY_DECL register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; - + #line 69 "engines/director/lingo/lingo-lex.l" @@ -1641,7 +1641,7 @@ static int yy_get_next_buffer (void) { register yy_state_type yy_current_state; register char *yy_cp; - + yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); @@ -1696,7 +1696,7 @@ static int yy_get_next_buffer (void) static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; - + yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ @@ -1739,7 +1739,7 @@ static int yy_get_next_buffer (void) { int c; - + *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) @@ -1808,12 +1808,12 @@ static int yy_get_next_buffer (void) /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { - + if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = @@ -1826,11 +1826,11 @@ static int yy_get_next_buffer (void) /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - + /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); @@ -1870,13 +1870,13 @@ static void yy_load_buffer_state (void) /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1899,11 +1899,11 @@ static void yy_load_buffer_state (void) /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() - * + * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { - + if ( ! b ) return; @@ -1919,7 +1919,7 @@ static void yy_load_buffer_state (void) #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ - + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -1928,7 +1928,7 @@ extern int isatty (int ); { int oerrno = errno; - + yy_flush_buffer(b ); b->yy_input_file = file; @@ -1944,13 +1944,13 @@ extern int isatty (int ); } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { @@ -1979,7 +1979,7 @@ extern int isatty (int ); * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { @@ -2009,7 +2009,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ void yypop_buffer_state (void) { @@ -2033,7 +2033,7 @@ void yypop_buffer_state (void) static void yyensure_buffer_stack (void) { yy_size_t num_to_alloc; - + if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this @@ -2046,9 +2046,9 @@ static void yyensure_buffer_stack (void) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -2076,13 +2076,13 @@ static void yyensure_buffer_stack (void) /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. + * + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -2111,14 +2111,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { - + return yy_scan_bytes(yystr,strlen(yystr) ); } @@ -2126,7 +2126,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) @@ -2134,7 +2134,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len YY_BUFFER_STATE b; char *buf; yy_size_t n, i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); @@ -2188,16 +2188,16 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ int yyget_lineno (void) { - + return yylineno; } /** Get the input stream. - * + * */ FILE *yyget_in (void) { @@ -2205,7 +2205,7 @@ FILE *yyget_in (void) } /** Get the output stream. - * + * */ FILE *yyget_out (void) { @@ -2213,7 +2213,7 @@ FILE *yyget_out (void) } /** Get the length of the current token. - * + * */ yy_size_t yyget_leng (void) { @@ -2221,7 +2221,7 @@ yy_size_t yyget_leng (void) } /** Get the current token. - * + * */ char *yyget_text (void) @@ -2231,18 +2231,18 @@ char *yyget_text (void) /** Set the current line number. * @param line_number - * + * */ void yyset_lineno (int line_number ) { - + yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. - * + * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) @@ -2296,7 +2296,7 @@ static int yy_init_globals (void) /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { - + /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); diff --git a/engines/dm/detection.cpp b/engines/dm/detection.cpp index 8ac2aa552c..a8f44acdba 100644 --- a/engines/dm/detection.cpp +++ b/engines/dm/detection.cpp @@ -43,7 +43,7 @@ static const PlainGameDescriptor DMGames[] = { static const DMADGameDescription gameDescriptions[] = { { - {"dm", "Amiga 2.0v English", + {"dm", "Amiga v2.0 English", { {"graphics.dat", 0, "c2205f6225bde728417de29394f97d55", 411960}, {"Dungeon.dat", 0, "43a213da8eda413541dd12f90ce202f6", 25006}, @@ -57,7 +57,7 @@ static const DMADGameDescription gameDescriptions[] = { { kDMSavePlatformAcceptAny} }, { - {"dm", "Atari ???v English", + {"dm", "Atari v??? English", { {"graphics.dat", 0, "6ffff2a17e2df0effa9a12fb4b1bf6b6", 271911}, {"Dungeon.dat", 0, "be9468b460515741babec9a70501e2e9", 33286}, @@ -70,19 +70,31 @@ static const DMADGameDescription gameDescriptions[] = { { kDMSaveFormatAmigaPC98FmTowns, kDMSaveFormatEndOfList}, { kDMSavePlatformAcceptAny } }, - - { + { + // Added by Strangerke + {"dm", "Amiga Demo v2.0 English", + { + {"graphics.dat", 0, "3932c8359bb36c24291b09e915114d38", 192421}, + {"DemoDun.dat", 0, "78848e1a2d3d5a11e5954deb8c7b772b", 1209}, + AD_LISTEND + }, + Common::EN_ANY, Common::kPlatformAmiga, ADGF_DEMO, GUIO1(GUIO_NONE), + }, + kDMSaveTargetDM21, kDMSaveFormatAmigaPC98FmTowns, kDMSavePlatformAtariSt, + { kDMSaveTargetDM21, kDMSaveTargetEndOfList}, + { kDMSaveFormatAmigaPC98FmTowns, kDMSaveFormatEndOfList}, + { kDMSavePlatformAcceptAny } + }, + { AD_TABLE_END_MARKER, kDMSaveTargetNone, kDMSaveFormatNone, kDMSavePlatformNone, {kDMSaveTargetNone}, {kDMSaveFormatNone}, {kDMSavePlatformNone} } }; - static const ADExtraGuiOptionsMap optionsList[] = { AD_EXTRA_GUI_OPTIONS_TERMINATOR }; - class DMMetaEngine : public AdvancedMetaEngine { public: DMMetaEngine() : AdvancedMetaEngine(DM::gameDescriptions, sizeof(DMADGameDescription), DMGames, optionsList) { diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index cfed9eb894..25d741f376 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -68,6 +68,11 @@ #include "dm/sounds.h" namespace DM { + +bool DMEngine::isDemo() const { + return (bool)(_gameVersion->_desc.flags & ADGF_DEMO); +} + Direction DMEngine::turnDirRight(int16 dir) { Direction result = (Direction)((dir + 1) & 3); return result; diff --git a/engines/dm/dm.h b/engines/dm/dm.h index 6549db13b5..9056a744fb 100644 --- a/engines/dm/dm.h +++ b/engines/dm/dm.h @@ -211,7 +211,7 @@ public: // Note: F0026_MAIN_GetBoundedValue<T> has been replaced by CLIP<T> -#define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) +#define CALL_MEMBER_FN(object, ptrToMember) ((object).*(ptrToMember)) struct SaveGameHeader { byte _version; @@ -243,6 +243,8 @@ public: virtual Common::Error loadGameState(int slot); virtual bool canLoadGameStateCurrently(); + bool isDemo() const; + GUI::Debugger *getDebugger() { return _console; } void delay(uint16 verticalBlank); // @ F0022_MAIN_Delay diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp index 5746ee03c2..417f3e31e7 100644 --- a/engines/dm/dungeonman.cpp +++ b/engines/dm/dungeonman.cpp @@ -477,7 +477,14 @@ DungeonMan::~DungeonMan() { void DungeonMan::decompressDungeonFile() { Common::File f; - f.open("Dungeon.dat"); + if (_vm->isDemo()) + f.open("DemoDun.dat"); + else + f.open("Dungeon.dat"); + + if (!f.isOpen()) + error("Unable to open Dungeon.dat file"); + if (f.readUint16BE() == 0x8104) { // if dungeon is compressed _rawDunFileDataSize = f.readUint32BE(); delete[] _rawDunFileData; diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index 39ae3da50f..46d90366cd 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -63,7 +63,7 @@ DoorFrames::DoorFrames(Frame f1, Frame f2_1, Frame f2_2, Frame f2_3, _rightHorizontal[1] = f4_2; _rightHorizontal[2] = f4_3; } - + DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) { _bitmapScreen = nullptr; _bitmaps = nullptr; @@ -898,7 +898,7 @@ void DisplayMan::fillBoxBitmap(byte *destBitmap, Box &box, Color color, int16 by void DisplayMan::blitBoxFilledWithMaskedBitmap(byte *src, byte *dest, byte *mask, byte *tmp, Box& box, int16 lastUnitIndex, int16 firstUnitIndex, int16 destByteWidth, Color transparent, int16 xPos, int16 yPos, int16 destHeight, int16 height2) { - + // FIXME: does not produce the same effect as the original byte nextUnitIndex = firstUnitIndex; diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp index b1d9766912..cf748ffa41 100644 --- a/engines/dm/group.cpp +++ b/engines/dm/group.cpp @@ -1832,6 +1832,9 @@ Thing GroupMan::groupGetGenerated(CreatureType creatureType, int16 healthMultipl } bool GroupMan::isSquareACorridorTeleporterPitOrDoor(int16 mapX, int16 mapY) { + if (_vm->isDemo()) + return false; + int16 squareType = Square(_vm->_dungeonMan->getSquare(mapX, mapY)).getType(); return ((squareType == kDMElementTypeCorridor) || (squareType == kDMElementTypeTeleporter) diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp index 111280c958..8bc3770226 100644 --- a/engines/dm/loadsave.cpp +++ b/engines/dm/loadsave.cpp @@ -393,7 +393,7 @@ bool DMEngine::writeCompleteSaveFile(int16 saveSlot, Common::String& saveDescrip file->flush(); file->finalize(); delete file; - + return true; } diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp index 3fb477cbbc..7c7dc19606 100644 --- a/engines/dm/movesens.cpp +++ b/engines/dm/movesens.cpp @@ -904,8 +904,6 @@ bool MovesensMan::isObjectInPartyPossession(int16 objectType) { } void MovesensMan::triggerEffect(Sensor *sensor, SensorEffect effect, int16 mapX, int16 mapY, uint16 cell) { - bool leaderHandObjectProcessed = false; - static const TimelineEventType squareTypeToEventTypeArray[7] = { // @ G0059_auc_Graphic562_SquareTypeToEventType kDMEventTypeWall, kDMEventTypeCorridor, diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp index b459c4539b..3b1ac7cb60 100644 --- a/engines/drascula/actors.cpp +++ b/engines/drascula/actors.cpp @@ -398,7 +398,7 @@ void DrasculaEngine::increaseFrameNum() { curHeight = (int)newHeight; curWidth = (int)newWidth; } - + // Fix bug #5903 DRASCULA-IT: Crash/graphic glitch at castle towers // Chapter 5 Room 45 is the castle tower part // Fixing the character's coordinate(0,0) in the tower section to prevent out of window coordinates and crash diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 6bfb2e1823..8634b6c586 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -217,7 +217,7 @@ 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; @@ -329,7 +329,7 @@ bool DrasculaEngine::textFitsCentered(char *text, int x) { //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. @@ -349,15 +349,15 @@ bool DrasculaEngine::textFitsCentered(char *text, int x) { void DrasculaEngine::centerText(const char *message, int textX, int textY) { char msg[200]; 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 @@ -424,7 +424,7 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) { 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; diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index e99898da5a..a1d7d615ea 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -255,7 +255,7 @@ 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 @@ -267,7 +267,7 @@ bool DrasculaEngine::loadGame(int slot) { loadPic(97, extraSurface); loadPic(99, backSurface); } - + loadMetaData(in, slot, true); Graphics::skipThumbnail(*in); @@ -300,7 +300,7 @@ 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]. @@ -309,10 +309,10 @@ bool DrasculaEngine::loadGame(int slot) { 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) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index cc329b206b..7ac2cc6406 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -379,10 +379,10 @@ void DrasculaEngine::talk(const char *said, const char *filename) { int y_mask_talk = 170; int face; - + // Fix bug #5903 DRASCULA-IT: Crash/graphic glitch at castle towers // Chapter 5 Room 45 is the castle tower part - // We use this variable as a condition below because at the castle towers we don't want to draw out the head + // We use this variable as a condition below because at the castle towers we don't want to draw out the head bool notTowers = !((currentChapter == 5) && (_roomNumber == 45)); if (currentChapter == 6) { @@ -488,7 +488,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { centerText(said, 160, 25); } } - + updateScreen(); updateEvents(); diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 9bd1319a07..2818397ced 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -62,6 +62,8 @@ namespace Fullpipe { #define PIC_CSR_DEFAULT_INV 4892 #define PIC_CSR_ITN 4893 #define PIC_CSR_ITN_INV 4894 +#define PIC_CSR_ITN_GREEN 5330 +#define PIC_CSR_ITN_RED 5329 #define PIC_CSR_GOFAR_L 4895 #define PIC_CSR_GOFAR_R 4896 #define PIC_CSR_ARCADE1 4901 @@ -75,19 +77,11 @@ namespace Fullpipe { #define PIC_CSR_ARCADE7 4909 #define PIC_CSR_ARCADE7_D 4910 #define PIC_CSR_ARCADE8 4911 -#define PIC_CSR_DEFAULT 4891 -#define PIC_CSR_DEFAULT_INV 4892 #define PIC_CSR_GOD 4900 -#define PIC_CSR_GOFAR_L 4895 -#define PIC_CSR_GOFAR_R 4896 #define PIC_CSR_GOL 4897 #define PIC_CSR_GOR 4898 #define PIC_CSR_GOU 4899 #define PIC_CSR_HELPERBGR 5331 -#define PIC_CSR_ITN 4893 -#define PIC_CSR_ITN_GREEN 5330 -#define PIC_CSR_ITN_INV 4894 -#define PIC_CSR_ITN_RED 5329 #define PIC_CSR_LIFT 5176 #define PIC_CSR_MAP 5339 #define PIC_HLP_BGR 3562 @@ -462,7 +456,6 @@ namespace Fullpipe { #define MV_SC4_COIN_default 1029 #define MV_SPK4_PLAY 3276 #define MV_SPR_LOWER 543 -#define PIC_MAP_P03 5279 #define PIC_SC4_BOTTLE 568 #define PIC_SC4_BOTTLE2 2936 #define PIC_SC4_DOWNTRUBA 619 @@ -1137,7 +1130,6 @@ namespace Fullpipe { #define ST_WTR24_FLOWLOWER 1843 // Scene 25 -#define ANI_BEARDED_CMN 3420 #define ANI_BOARD25 1898 #define ANI_DROP_25 3499 #define ANI_INV_BOARD 1872 diff --git a/engines/fullpipe/detection.cpp b/engines/fullpipe/detection.cpp index af2b0cab3a..16895b539f 100644 --- a/engines/fullpipe/detection.cpp +++ b/engines/fullpipe/detection.cpp @@ -88,7 +88,7 @@ public: } virtual bool hasFeature(MetaEngineFeature f) const; - virtual int getMaximumSaveSlot() const { return 8; } + virtual int getMaximumSaveSlot() const { return 99; } virtual SaveStateList listSaves(const char *target) const; virtual void removeSaveState(const char *target, int slot) const; virtual SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const; diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 11d8852988..2250a5d4d1 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -57,6 +57,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) DebugMan.addDebugChannel(kDebugEvents, "events", "Event handling"); DebugMan.addDebugChannel(kDebugInventory, "inventory", "Inventory"); DebugMan.addDebugChannel(kDebugSceneLogic, "scenelogic", "Scene Logic"); + DebugMan.addDebugChannel(kDebugInteractions, "interactions", "Interactions"); // Setup mixer if (!_mixer->isReady()) { @@ -307,6 +308,9 @@ Common::Error FullpipeEngine::run() { int time1 = g_fp->_system->getMillis(); + // Center mouse + _system->warpMouse(400, 300); + while (_gameContinue) { updateEvents(); @@ -584,8 +588,10 @@ void FullpipeEngine::disableSaves(ExCommand *ex) { } // Original was makeing a save on every room entering - //if (_currentScene) - // _gameLoader->writeSavegame(_currentScene, "savetmp.sav"); + if (_currentScene) { + _gameLoader->saveScenePicAniInfos(_currentScene->_sceneId); + // _gameLoader->writeSavegame(_currentScene, "savetmp.sav"); + } } } diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 1b6e222d22..d8f438b3da 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -57,7 +57,8 @@ enum { kDebugEvents = 1 << 5, kDebugBehavior = 1 << 6, kDebugInventory = 1 << 7, - kDebugSceneLogic = 1 << 8 + kDebugSceneLogic = 1 << 8, + kDebugInteractions = 1 << 9 }; class BehaviorManager; diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index accba788f9..8f6ec5dd72 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -128,6 +128,8 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject if (cinter->_messageQueue) cinter->_messageQueue->calcDuration(subj); + debugC(5, kDebugInteractions, "Interaction: %s", transCyrillic((byte *)cinter->_actionName)); + PicAniInfo aniInfo; obj->getPicAniInfo(&aniInfo); @@ -259,7 +261,7 @@ LABEL_38: if (!(inter->_flags & 0x10000)) { ex = new ExCommand(obj->_id, 34, 0x80, 0, 0, 0, 1, 0, 0, 0); ex->_param = obj->_odelay; - ex->_field_14 = 0x100; + ex->_field_14 = 0x80; ex->_messageNum = 0; ex->_excFlags = 3; mq->addExCommandToEnd(ex); diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h index cb1eac002a..40df9035e9 100644 --- a/engines/fullpipe/interaction.h +++ b/engines/fullpipe/interaction.h @@ -49,7 +49,7 @@ class Interaction : public CObject { MessageQueue *_messageQueue; int _sceneId; int _field_28; - int _flags; + uint _flags; char *_actionName; public: diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp index ec01597244..b4338a237a 100644 --- a/engines/fullpipe/messagehandlers.cpp +++ b/engines/fullpipe/messagehandlers.cpp @@ -197,6 +197,15 @@ int global_messageHandler1(ExCommand *cmd) { g_fp->openHelp(); cmd->_messageKind = 0; break; + case '8': + { + int num = 32; + for (uint i = 0; i < g_fp->_gameLoader->_sc2array[num]._picAniInfosCount; i++) { + debug("pic %d, %d:", num, i); + g_fp->_gameLoader->_sc2array[num]._picAniInfos[i]->print(); + } + } + break; default: break; } diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index b73eaab5c7..05e83fca06 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -1224,6 +1224,8 @@ void ModalMainMenu::enableDebugMenuButton() { area->picObjL = _scene->getPictureObjectById(area->picIdL, 0); area->picObjL->_flags &= 0xFFFB; _areas.push_back(area); + + g_fp->_mainMenu_debugEnabled = true; } void ModalMainMenu::setSliderPos() { diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 51f5ae7869..e5eb9721f4 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -38,7 +38,31 @@ bool MotionController::load(MfcArchive &file) { } void MotionController::enableLinks(const char *linkName, bool enable) { - warning("STUB: MotionController::enableLinks()"); + if (_objtype != kObjTypeMctlCompound) + return; + + MctlCompound *obj = (MctlCompound *)this; + + for (uint i = 0; i < obj->getMotionControllerCount(); i++) { + MotionController *con = obj->getMotionController(i); + + if (con->_objtype == kObjTypeMovGraph) { + MovGraph *gr = (MovGraph *)con; + + for (ObList::iterator l = gr->_links.begin(); l != gr->_links.end(); ++l) { + assert(((CObject *)*l)->_objtype == kObjTypeMovGraphLink); + + MovGraphLink *lnk = (MovGraphLink *)*l; + + if (!strcmp(lnk->_name, linkName)) { + if (enable) + lnk->_flags |= 0x20000000; + else + lnk->_flags &= 0xDFFFFFFF; + } + } + } + } } MovGraphLink *MotionController::getLinkByName(const char *name) { @@ -2735,16 +2759,16 @@ MovGraphLink *MctlGraph::getNearestLink(int x, int y) { double n1y = lnk->_graphSrc->_y; double n2x = lnk->_graphDst->_x; double n2y = lnk->_graphDst->_y; - double n1dx = n1x - x; + double n1dx = x - n1x; double n1dy = n1y - y; double dst1 = sqrt(n1dy * n1dy + n1dx * n1dx); double coeff1 = ((n1y - n2y) * n1dy + (n2x - n1x) * n1dx) / lnk->_length / dst1; double dst3 = coeff1 * dst1; double dst2 = sqrt(1.0 - coeff1 * coeff1) * dst1; - if (coeff1 * dst1 < 0.0) { + if (dst3 < 0.0) { dst3 = 0.0; - dst2 = sqrt(n1dy * n1dy + n1dx * n1dx); + dst2 = sqrt((n1x - x) * (n1x - x) + (n1y - y) * (n1y - y)); } if (dst3 > lnk->_length) { dst3 = lnk->_length; @@ -3055,13 +3079,13 @@ void ReactPolygonal::getBBox(Common::Rect *rect) { if (rect->left > _points[i]->x) rect->left = _points[i]->x; - if (rect->top < _points[i]->y) + if (rect->top > _points[i]->y) rect->top = _points[i]->y; if (rect->right < _points[i]->x) rect->right = _points[i]->x; - if (rect->bottom > _points[i]->y) + if (rect->bottom < _points[i]->y) rect->bottom = _points[i]->y; } diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 93b57c7aaa..5b225143ad 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -222,7 +222,7 @@ class MovGraphLink : public CObject { MovGraphNode *_graphDst; DWordArray _dwordArray1; DWordArray _dwordArray2; - int _flags; + uint32 _flags; int _field_38; int _field_3C; double _length; diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 9f0ccf18de..12ad6105d3 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -62,6 +62,7 @@ struct PicAniInfo { bool load(MfcArchive &file); void save(MfcArchive &file); + void print(); PicAniInfo() { memset(this, 0, sizeof(PicAniInfo)); } }; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index d37f5dba39..5ac25c82f8 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -199,7 +199,7 @@ Vars::Vars() { scene11_swingOldAngle = 1.0; scene11_swingSpeed = 1.0; scene11_swingAngleDiff = 1.0; - scene11_swingInertia = 0.0; + scene11_swingInertia = 0.01; scene11_swingCounter = 0; scene11_swingCounterPrevTurn = 0; scene11_swingDirection = 0; @@ -445,7 +445,7 @@ Vars::Vars() { scene37_rings.clear(); scene37_lastDudeX = -1; - scene37_cursorIsLocked = 0; + scene37_pipeIsOpen = 0; scene37_plusMinus1 = 0; scene37_plusMinus2 = 0; scene37_plusMinus3 = 0; diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index fc593a6088..918fb72b37 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -636,7 +636,7 @@ public: Common::Array<Ring *> scene37_rings; int scene37_lastDudeX; - bool scene37_cursorIsLocked; + bool scene37_pipeIsOpen; StaticANIObject *scene37_plusMinus1; StaticANIObject *scene37_plusMinus2; StaticANIObject *scene37_plusMinus3; diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp index 9b483a0b3e..5fab4b5862 100644 --- a/engines/fullpipe/scenes/scene06.cpp +++ b/engines/fullpipe/scenes/scene06.cpp @@ -474,15 +474,11 @@ void sceneHandler06_catchBall() { } void sceneHandler06_checkBallTarget(int par) { - uint32 pixel; - if (g_vars->scene06_ballY <= 475) { - if (g_vars->scene06_mumsy->getPixelAtPos(g_vars->scene06_ballX, g_vars->scene06_ballY, &pixel)) { - if (pixel) { - chainObjQueue(g_vars->scene06_mumsy, QU_MOM_JUMPBK, 0); + if (g_vars->scene06_mumsy->isPixelHitAtPos(g_vars->scene06_ballX, g_vars->scene06_ballY)) { + chainObjQueue(g_vars->scene06_mumsy, QU_MOM_JUMPBK, 0); - sceneHandler06_catchBall(); - } + sceneHandler06_catchBall(); } } else { sceneHandler06_fallBall(); diff --git a/engines/fullpipe/scenes/scene10.cpp b/engines/fullpipe/scenes/scene10.cpp index 47328967d0..990a8f2525 100644 --- a/engines/fullpipe/scenes/scene10.cpp +++ b/engines/fullpipe/scenes/scene10.cpp @@ -65,7 +65,7 @@ int scene10_updateCursor() { if (g_fp->_objectIdAtCursor == ANI_PACHKA || g_fp->_objectIdAtCursor == ANI_GUM) { if (g_fp->_cursorId == PIC_CSR_ITN) { if (g_vars->scene10_hasGum) - g_fp->_cursorId = (sceneHandler10_inflaterIsBlind() != 0) ? PIC_CSR_ITN_RED : PIC_CSR_ITN_GREEN; + g_fp->_cursorId = (sceneHandler10_inflaterIsBlind() != 0) ? PIC_CSR_ITN_GREEN : PIC_CSR_ITN_RED; else g_fp->_cursorId = PIC_CSR_DEFAULT; } diff --git a/engines/fullpipe/scenes/scene11.cpp b/engines/fullpipe/scenes/scene11.cpp index 6866dcf821..8c3de9e11e 100644 --- a/engines/fullpipe/scenes/scene11.cpp +++ b/engines/fullpipe/scenes/scene11.cpp @@ -114,7 +114,7 @@ void scene11_initScene(Scene *sc) { g_vars->scene11_swingOldAngle = 0.0; g_vars->scene11_swingSpeed = 0.0; g_vars->scene11_swingAngleDiff = 0.0; - g_vars->scene11_swingInertia = 1.28; //1.9849218750000000; + g_vars->scene11_swingInertia = 0.01; //1.9849218750000000; g_vars->scene11_swingCounter = 0; g_vars->scene11_swingCounterPrevTurn = 0; g_vars->scene11_swingDirection = 0; @@ -232,6 +232,8 @@ int sceneHandler11_updateScreenCallback() { } void sceneHandler11_manToSwing() { + debugC(1, kDebugSceneLogic, "sceneHandler11_manToSwing()"); + g_vars->scene11_arcadeIsOn = true; getCurrSceneSc2MotionController()->deactivate(); @@ -240,7 +242,7 @@ void sceneHandler11_manToSwing() { g_fp->_aniMan2->hide(); g_vars->scene11_swingCounter = 0; - g_vars->scene11_swingInertia = 1.28; //1.9849218; + g_vars->scene11_swingInertia = 0.01; //1.9849218; g_vars->scene11_dudeOnSwing->_flags &= 0xFFFB; g_vars->scene11_dudeOnSwing = g_fp->_currentScene->getStaticANIObject1ById(ANI_MAN11, -1); @@ -334,11 +336,14 @@ void sceneHandler11_jumpFromSwing() { } void sceneHandler11_swing0() { + debugC(1, kDebugSceneLogic, "sceneHandler11_swing0()"); + + int phase = g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex; g_vars->scene11_dudeOnSwing->_statics = g_vars->scene11_dudeOnSwing->getStaticsById(ST_MAN11_EMPTY); g_vars->scene11_dudeOnSwing->_movement = 0; g_vars->scene11_dudeOnSwing->show1(690, 215, MV_MAN11_SWING_0, 0); g_vars->scene11_dudeOnSwing->startAnim(MV_MAN11_SWING_0, 0, -1); - g_vars->scene11_dudeOnSwing->_movement->setDynamicPhaseIndex(g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex); + g_vars->scene11_dudeOnSwing->_movement->setDynamicPhaseIndex(phase); g_vars->scene11_swingDirection = 0; g_vars->scene11_swingMaxAngle = 45; @@ -346,11 +351,14 @@ void sceneHandler11_swing0() { } void sceneHandler11_swing1() { + debugC(1, kDebugSceneLogic, "sceneHandler11_swing1()"); + + int phase = g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex; g_vars->scene11_dudeOnSwing->_statics = g_vars->scene11_dudeOnSwing->getStaticsById(ST_MAN11_EMPTY); g_vars->scene11_dudeOnSwing->_movement = 0; g_vars->scene11_dudeOnSwing->show1(690, 215, MV_MAN11_SWING_1, 0); g_vars->scene11_dudeOnSwing->startAnim(MV_MAN11_SWING_1, 0, -1); - g_vars->scene11_dudeOnSwing->_movement->setDynamicPhaseIndex(g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex); + g_vars->scene11_dudeOnSwing->_movement->setDynamicPhaseIndex(phase); g_vars->scene11_swingDirection = 1; g_vars->scene11_swingMaxAngle = 42; @@ -358,11 +366,14 @@ void sceneHandler11_swing1() { } void sceneHandler11_swing2() { + debugC(1, kDebugSceneLogic, "sceneHandler11_swing2()"); + + int phase = g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex; g_vars->scene11_dudeOnSwing->_statics = g_vars->scene11_dudeOnSwing->getStaticsById(ST_MAN11_EMPTY); g_vars->scene11_dudeOnSwing->_movement = 0; g_vars->scene11_dudeOnSwing->show1(690, 215, MV_MAN11_SWING_2, 0); g_vars->scene11_dudeOnSwing->startAnim(MV_MAN11_SWING_2, 0, -1); - g_vars->scene11_dudeOnSwing->_movement->setDynamicPhaseIndex(g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex); + g_vars->scene11_dudeOnSwing->_movement->setDynamicPhaseIndex(phase); g_vars->scene11_swingDirection = 2; g_vars->scene11_swingMaxAngle = 48; @@ -370,6 +381,7 @@ void sceneHandler11_swing2() { } void sceneHandler11_emptySwing() { + int phase = g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex; if (g_vars->scene11_swingDirection) sceneHandler11_swing0(); @@ -379,7 +391,7 @@ void sceneHandler11_emptySwing() { g_vars->scene11_dudeOnSwing->show1(-1, -1, -1, 0); g_vars->scene11_dudeOnSwing->changeStatics2(ST_KCH_EMPTY); g_vars->scene11_dudeOnSwing->startAnim(MV_KCH_MOVE2, 0, -1); - g_vars->scene11_dudeOnSwing->_movement->setDynamicPhaseIndex(g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex); + g_vars->scene11_dudeOnSwing->_movement->setDynamicPhaseIndex(phase); g_vars->scene11_swingInertia = 0.03; //1.9881250; } @@ -531,7 +543,7 @@ void sceneHandler11_setSwingDirection() { else if (g_vars->scene11_swingDirection == 1) g_vars->scene11_swingDirectionPrevTurn = 2; else - g_vars->scene11_swingDirectionPrevTurn = (g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex <= 45) + 1; + g_vars->scene11_swingDirectionPrevTurn = (g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex <= 45 ? 1 : 0) + 1; } void sceneHandler11_swingieSit() { @@ -629,123 +641,95 @@ int sceneHandler11(ExCommand *cmd) { case 33: { int res = 0; - int x, y; - - if (!g_fp->_aniMan2) - goto LABEL_27; - x = g_fp->_aniMan2->_ox; - y = g_fp->_aniMan2->_oy; + if (g_fp->_aniMan2) { + int x, y; + x = g_fp->_aniMan2->_ox; + y = g_fp->_aniMan2->_oy; - g_vars->scene11_dudeX = x; - g_vars->scene11_dudeY = y; + g_vars->scene11_dudeX = x; + g_vars->scene11_dudeY = y; - if (g_vars->scene11_scrollIsEnabled) { - if (x > g_fp->_sceneRect.right - 200) - g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 300; - goto LABEL_26; - } + if (g_vars->scene11_scrollIsEnabled) { + if (x > g_fp->_sceneRect.right - 200) + g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 200; + } else if (g_vars->scene11_scrollIsMaximized) { + g_fp->_currentScene->_x = g_fp->_sceneWidth - x; - if (g_vars->scene11_scrollIsMaximized) { - g_fp->_currentScene->_x = g_fp->_sceneWidth - x; + if (g_vars->scene11_dudeX < 910) + g_vars->scene11_scrollIsMaximized = false; + } else { + if (x < g_fp->_sceneRect.left + 200) + g_fp->_currentScene->_x = x - g_fp->_sceneRect.left - 300; + else if (x > g_fp->_sceneRect.right - 200) + g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 300; - if (g_vars->scene11_dudeX < 910) - g_vars->scene11_scrollIsMaximized = false; + if (y < g_fp->_sceneRect.top + 200) + g_fp->_currentScene->_y = y - g_fp->_sceneRect.top - 300; + if (y > g_fp->_sceneRect.bottom - 300) + g_fp->_currentScene->_y = y - g_fp->_sceneRect.bottom + 300; - LABEL_26: + if (x >= 940) + g_vars->scene11_scrollIsMaximized = true; + } res = 1; - LABEL_27: - if (g_vars->scene11_swingieStands) { - if (g_fp->_sceneRect.left >= 534 && g_vars->scene11_swingieScreenEdge < 534) - sceneHandler11_swingieSit(); + } - g_vars->scene11_swingieScreenEdge = g_fp->_sceneRect.left; - } + if (g_vars->scene11_swingieStands) { + if (g_fp->_sceneRect.left >= 534 && g_vars->scene11_swingieScreenEdge < 534) + sceneHandler11_swingieSit(); - if (!g_vars->scene11_arcadeIsOn) - goto LABEL_50; + g_vars->scene11_swingieScreenEdge = g_fp->_sceneRect.left; + } - if (g_vars->scene11_swingCounterPrevTurn <= 0 || g_vars->scene11_swingCounter - g_vars->scene11_swingCounterPrevTurn <= 72) { - } else { + if (g_vars->scene11_arcadeIsOn) { + if (g_vars->scene11_swingCounterPrevTurn > 0 && g_vars->scene11_swingCounter - g_vars->scene11_swingCounterPrevTurn > 72) { sceneHandler11_swing0(); g_vars->scene11_swingDirectionPrevTurn = 0; g_vars->scene11_swingCounterPrevTurn = 0; } + } - if (!g_vars->scene11_arcadeIsOn) - goto LABEL_50; - - if (g_vars->scene11_swingDirection == g_vars->scene11_swingDirectionPrevTurn || g_vars->scene11_swingCounterPrevTurn <= 0 || g_vars->scene11_swingCounter - g_vars->scene11_swingCounterPrevTurn <= 2) { - LABEL_49: - if (g_vars->scene11_arcadeIsOn) { - g_fp->_behaviorManager->updateBehaviors(); - g_fp->startSceneTrack(); - return res; - } - LABEL_50: - if (g_vars->scene11_swingIsSwinging - || (0.0 == g_vars->scene11_swingSpeed - && g_vars->scene11_dudeOnSwing->_movement != 0 - && g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex == 45 - && (g_vars->scene11_dudeOnSwing->changeStatics2(ST_KCH_STATIC), !g_vars->scene11_arcadeIsOn) - && g_vars->scene11_swingIsSwinging)) { - if (!g_vars->scene11_swingie->_movement) { - if ((g_vars->scene11_boots->_flags & 4) && g_vars->scene11_boots->_statics->_staticsId == ST_BTS11_2) { - sceneHandler11_swingieJumpDown(); - - g_fp->_behaviorManager->updateBehaviors(); - g_fp->startSceneTrack(); - return res; - } - g_vars->scene11_swingie->startAnim(MV_SWR_SWING, 0, -1); - } + if (g_vars->scene11_arcadeIsOn) { + if (g_vars->scene11_swingDirection != g_vars->scene11_swingDirectionPrevTurn + && g_vars->scene11_swingCounterPrevTurn > 0 && g_vars->scene11_swingCounter - g_vars->scene11_swingCounterPrevTurn > 2) { + + if (g_vars->scene11_swingDirectionPrevTurn == 1) { + if (g_vars->scene11_swingDirection == 0) + sceneHandler11_swing1(); + else + sceneHandler11_swing0(); + } else if (g_vars->scene11_swingDirectionPrevTurn == 2) { + if (g_vars->scene11_swingDirection == 0) + sceneHandler11_swing2(); + else + sceneHandler11_swing0(); } - g_fp->_behaviorManager->updateBehaviors(); - g_fp->startSceneTrack(); - return res; - } - if (g_vars->scene11_swingDirectionPrevTurn == 1) { - if (!g_vars->scene11_swingDirection) - sceneHandler11_swing1(); - else - sceneHandler11_swing0(); - } else if (g_vars->scene11_swingDirectionPrevTurn == 2) { - if (!g_vars->scene11_swingDirection) - sceneHandler11_swing2(); - else - sceneHandler11_swing0(); + g_vars->scene11_swingCounterPrevTurn = g_vars->scene11_swingCounter; } + } - g_vars->scene11_swingCounterPrevTurn = g_vars->scene11_swingCounter; - goto LABEL_49; + if (!g_vars->scene11_arcadeIsOn && !g_vars->scene11_swingIsSwinging) { + if (g_vars->scene11_swingSpeed == 0.0 + && g_vars->scene11_dudeOnSwing->_movement && g_vars->scene11_dudeOnSwing->_movement->_currDynamicPhaseIndex == 45) { + g_vars->scene11_dudeOnSwing->changeStatics2(ST_KCH_STATIC); + } } - if (x >= g_fp->_sceneRect.left + 200) { - if (x <= g_fp->_sceneRect.right - 200) { - LABEL_18: - if (y < g_fp->_sceneRect.top + 200) { - g_fp->_currentScene->_y = y - g_fp->_sceneRect.top - 300; - y = g_vars->scene11_dudeY; - x = g_vars->scene11_dudeX; - } - if (y > g_fp->_sceneRect.bottom - 300) { - g_fp->_currentScene->_y = y - g_fp->_sceneRect.bottom + 300; - x = g_vars->scene11_dudeX; - } - if (x >= 940) - g_vars->scene11_scrollIsMaximized = true; - goto LABEL_26; + + if (!g_vars->scene11_arcadeIsOn && g_vars->scene11_swingIsSwinging) { + if (!g_vars->scene11_swingie->_movement) { + if ((g_vars->scene11_boots->_flags & 4) && g_vars->scene11_boots->_statics->_staticsId == ST_BTS11_2) + sceneHandler11_swingieJumpDown(); + else + g_vars->scene11_swingie->startAnim(MV_SWR_SWING, 0, -1); } - g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 300; - } else { - g_fp->_currentScene->_x = x - g_fp->_sceneRect.left - 300; } - y = g_vars->scene11_dudeY; - x = g_vars->scene11_dudeX; - goto LABEL_18; - } - break; + g_fp->_behaviorManager->updateBehaviors(); + g_fp->startSceneTrack(); + return res; + } case 29: if (g_vars->scene11_swingIsSwinging) { @@ -753,14 +737,16 @@ int sceneHandler11(ExCommand *cmd) { && cmd->_param == ANI_INV_BOOT) sceneHandler11_putBoot(); } else { - if (g_vars->scene11_arcadeIsOn) { - sceneHandler11_setSwingDirection(); + if (!g_vars->scene11_arcadeIsOn) + goto LABEL_69; - g_vars->scene11_swingCounterPrevTurn = g_vars->scene11_swingCounter; - } + sceneHandler11_setSwingDirection(); + + g_vars->scene11_swingCounterPrevTurn = g_vars->scene11_swingCounter; } if (!g_vars->scene11_arcadeIsOn) { + LABEL_69: StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY); if (!ani || !canInteractAny(g_fp->_aniMan, ani, cmd->_param)) { diff --git a/engines/fullpipe/scenes/scene13.cpp b/engines/fullpipe/scenes/scene13.cpp index 9908b9a7c9..12fe1dd35d 100644 --- a/engines/fullpipe/scenes/scene13.cpp +++ b/engines/fullpipe/scenes/scene13.cpp @@ -36,6 +36,10 @@ namespace Fullpipe { +void scene13_whirlgigCallback(int *phase) { + // Do nothing +} + void scene13_initScene(Scene *sc) { g_vars->scene13_whirlgig = sc->getStaticANIObject1ById(ANI_WHIRLGIG_13, -1); g_vars->scene13_guard = sc->getStaticANIObject1ById(ANI_STOROZH, -1); @@ -63,7 +67,7 @@ void scene13_initScene(Scene *sc) { lnk->_flags &= 0xDFFFFFFF; g_vars->scene13_whirlgig->stopAnim_maybe(); - g_vars->scene13_whirlgig->_callback2 = 0; + g_vars->scene13_whirlgig->_callback2 = scene13_whirlgigCallback; g_vars->scene13_whirlgig->startAnim(MV_WHR13_SPIN, 0, -1); if (g_vars->scene13_whirlgig->_movement) @@ -155,7 +159,7 @@ void sceneHandler13_closeFast() { } void sceneHandler13_stopWhirlgig() { - g_vars->scene13_whirlgig->_callback2 = 0; + g_vars->scene13_whirlgig->_callback2 = scene13_whirlgigCallback; g_fp->stopAllSoundInstances(SND_13_018); g_fp->playSound(SND_13_033, 0); diff --git a/engines/fullpipe/scenes/scene14.cpp b/engines/fullpipe/scenes/scene14.cpp index f6841a8bbe..977f3d95ac 100644 --- a/engines/fullpipe/scenes/scene14.cpp +++ b/engines/fullpipe/scenes/scene14.cpp @@ -306,7 +306,7 @@ void sceneHandler14_endArcade() { void sceneHandler14_winArcade() { if (g_vars->scene14_arcadeIsOn) { if (g_vars->scene14_dudeIsKicking) { - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); g_vars->scene14_dudeIsKicking = false; } @@ -424,7 +424,7 @@ void sceneHandler14_dudeDecline() { g_vars->scene14_mouseCursorPos.y = g_fp->_mouseVirtY; g_fp->_aniMan->_callback2 = sceneHandler14_declineCallback; - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); g_fp->_aniMan->startAnim(MV_MAN14_DECLINE, 0, -1); g_vars->scene14_dudeIsKicking = true; @@ -481,7 +481,7 @@ bool sceneHandler14_arcadeProcessClick(ExCommand *cmd) { void sceneHandler14_grandmaThrow() { g_vars->scene14_grandma->changeStatics2(ST_GMA_SIT); - MessageQueue *mq = new MessageQueue; + MessageQueue *mq = new MessageQueue(0); ExCommand *ex = new ExCommand(ANI_GRANDMA, 2, 30, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 2; @@ -521,7 +521,7 @@ void sceneHandler14_passToGrandma() { void sceneHandler14_grandmaJumpThrow() { g_vars->scene14_grandma->changeStatics2(ST_GMA_SIT); - MessageQueue *mq = new MessageQueue; + MessageQueue *mq = new MessageQueue(0); ExCommand *ex = new ExCommand(ANI_GRANDMA, 2, 30, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 2; @@ -547,7 +547,7 @@ void sceneHandler14_dudeFall() { if (!g_fp->_aniMan->_movement || g_fp->_aniMan->_movement->_id != MV_MAN14_FALL) { sceneHandler14_clearCallback(); - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); g_fp->_aniMan->startAnim(MV_MAN14_FALL, 0, -1); g_vars->scene14_flyingBall->stopAnim_maybe(); g_vars->scene14_flyingBall->hide(); @@ -558,7 +558,7 @@ void sceneHandler14_dudeFall() { } void sceneHandler14_grandmaStepForward() { - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); g_fp->_aniMan->startAnim(MV_MAN14_STEPFW, 0, -1); g_vars->scene14_dude2X -= 71; @@ -622,17 +622,18 @@ void sceneHandler14_arcadeLogic() { } void sceneHandler14_animateBall() { - int x = g_vars->scene14_ballDeltaX + g_vars->scene14_ballX; - int y = g_vars->scene14_ballDeltaY + g_vars->scene14_ballY; - g_vars->scene14_ballX += g_vars->scene14_ballDeltaX; g_vars->scene14_ballY += g_vars->scene14_ballDeltaY; + int x = g_vars->scene14_ballX; + int y = g_vars->scene14_ballY; + g_vars->scene14_ballDeltaY++; - if (g_vars->scene14_ballDeltaY - 1 + g_vars->scene14_ballY > 517) { - if (x <= g_vars->scene14_dudeX - 16 ) { - if ( g_vars->scene14_ballDeltaX >= 0 || x >= g_vars->scene14_grandmaX + 65 || x <= g_vars->scene14_grandmaX - 135 || y <= g_vars->scene14_grandmaY - 102 ) { + if (g_vars->scene14_ballY <= 517) { + if (x <= g_vars->scene14_dudeX - 16) { + if (g_vars->scene14_ballDeltaX >= 0 || x >= g_vars->scene14_grandmaX + 65 + || x <= g_vars->scene14_grandmaX - 135 || y <= g_vars->scene14_grandmaY - 102) { if (g_vars->scene14_flyingBall->_movement) g_vars->scene14_flyingBall->_movement->setOXY(x, y); else @@ -810,9 +811,7 @@ int sceneHandler14(ExCommand *cmd) { case 29: if (g_vars->scene14_arcadeIsOn) { - uint32 pixel; - - if (g_vars->scene14_dudeCanKick && g_fp->_aniMan->getPixelAtPos(cmd->_sceneClickX, cmd->_sceneClickY, &pixel) && !g_fp->_aniMan->_movement) { + if (g_vars->scene14_dudeCanKick && g_fp->_aniMan->isPixelHitAtPos(cmd->_sceneClickX, cmd->_sceneClickY) && !g_fp->_aniMan->_movement) { sceneHandler14_dudeDecline(); break; } @@ -832,7 +831,7 @@ int sceneHandler14(ExCommand *cmd) { if (!pic || !canInteractAny(g_fp->_aniMan, pic, cmd->_param)) { if ((g_fp->_sceneRect.right - cmd->_sceneClickX < 47 && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1) - || (cmd->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0)) { + || (cmd->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0)) { g_fp->processArcade(cmd); sceneHandler14_arcadeProcessClick(cmd); break; diff --git a/engines/fullpipe/scenes/scene16.cpp b/engines/fullpipe/scenes/scene16.cpp index 52daef3b8a..b7a63dff46 100644 --- a/engines/fullpipe/scenes/scene16.cpp +++ b/engines/fullpipe/scenes/scene16.cpp @@ -65,7 +65,7 @@ void scene16_initScene(Scene *sc) { idx++; - if (idx >= 2) + if (idx > 1) idx = 0; } @@ -76,7 +76,7 @@ void scene16_initScene(Scene *sc) { idx++; - if (idx >= 2) + if (idx > 1) idx = 0; } } else { @@ -460,7 +460,7 @@ int sceneHandler16(ExCommand *cmd) { if (g_vars->scene16_placeIsOccupied) { g_vars->scene16_walkingCount++; - if (g_vars->scene16_walkingCount < 280) { + if (g_vars->scene16_walkingCount >= 280) { sceneHandler16_putOnWheel(); g_vars->scene16_walkingCount = 0; diff --git a/engines/fullpipe/scenes/scene25.cpp b/engines/fullpipe/scenes/scene25.cpp index 9bc8f412f1..ec3184a5f4 100644 --- a/engines/fullpipe/scenes/scene25.cpp +++ b/engines/fullpipe/scenes/scene25.cpp @@ -101,9 +101,9 @@ int scene25_updateCursor() { if (g_fp->_objectIdAtCursor == ANI_WATER25) { if ((g_vars->scene25_boardIsSelectable && (!inv || inv == ANI_INV_BOARD)) || (g_vars->scene25_dudeIsOnBoard && (inv == ANI_INV_LOPAT || !inv))) - g_fp->_cursorId = (g_fp->_cursorId != PIC_CSR_DEFAULT) ? PIC_CSR_ITN : PIC_CSR_ITN_INV; // FIXME check + g_fp->_cursorId = (g_fp->_cursorId != PIC_CSR_DEFAULT) ? PIC_CSR_ITN_INV : PIC_CSR_ITN; } else if (g_fp->_objectIdAtCursor == ANI_BOARD25 && (!inv || inv == ANI_INV_SWAB || inv == ANI_INV_BROOM || inv == ANI_INV_LOPAT)) { - g_fp->_cursorId = (g_fp->_cursorId != PIC_CSR_DEFAULT) ? PIC_CSR_ITN : PIC_CSR_ITN_INV; + g_fp->_cursorId = (g_fp->_cursorId != PIC_CSR_DEFAULT) ? PIC_CSR_ITN_INV : PIC_CSR_ITN; } } @@ -365,7 +365,7 @@ void sceneHandler25_tryRow(int obj) { g_fp->_aniMan->getPicAniInfo(&info); g_fp->_aniMan->_messageQueueId = 0; - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); int x = g_fp->_aniMan->_ox; int y = g_fp->_aniMan->_oy; @@ -377,12 +377,12 @@ void sceneHandler25_tryRow(int obj) { if (x == 788 && y == 468) { if (g_vars->scene25_board->_statics->_staticsId == ST_BRD25_RIGHT2) { if (obj == ANI_INV_BROOM) { - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); qid = QU_SC25_TRYBROOM; } if (obj == ANI_INV_LOPAT) { - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); qid = QU_SC25_TRYSPADE; } @@ -396,18 +396,18 @@ void sceneHandler25_tryRow(int obj) { } if (obj == ANI_INV_SWAB) { - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); chainQueue(QU_SC25_TRYSWAB, 1); } else if (!obj) { - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); chainObjQueue(g_fp->_aniMan, QU_SC25_TRYHAND, 1); g_fp->playSound(SND_25_028, 0); } - } else if (g_vars->scene25_board->_statics->_staticsId == (ST_MAN_RIGHT|0x4000) && !obj) { - g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); + } else if (g_vars->scene25_board->_statics->_staticsId == (ST_BRD25_RIGHT2 | 0x4000) && !obj) { + g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000); chainQueue(QU_SC25_TRUBATOBOARD, 1); @@ -645,7 +645,7 @@ int sceneHandler25(ExCommand *cmd) { if ((picId == PIC_SC25_LADDERUP || picId == PIC_SC25_LADDERDOWN) && sceneHandler25_isOnLadder(cmd)) cmd->_messageKind = 0; - break; + return 0; } StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY); @@ -656,23 +656,31 @@ int sceneHandler25(ExCommand *cmd) { if (!(g_fp->_aniMan->_flags & 0x100)) { if (ani->_id == ANI_WATER25) { if (g_vars->scene25_dudeIsOnBoard) { - if (cmd->_param == ANI_INV_LOPAT) + if (cmd->_param == ANI_INV_LOPAT) { sceneHandler25_rowShovel(); + return 0; + } - if (!cmd->_param) + if (!cmd->_param) { sceneHandler25_rowHand(); + return 0; + } } else { - if (cmd->_param == ANI_INV_BOARD) + if (cmd->_param == ANI_INV_BOARD) { sceneHandler25_putBoard(); + return 0; + } - if (!cmd->_param) + if (!cmd->_param) { sceneHandler25_tryWater(); + return 0; + } } } else if (ani->_id == ANI_BOARD25) { sceneHandler25_tryRow(cmd->_param); - break; + return 0; } - break; + return 0; } } } @@ -682,37 +690,37 @@ int sceneHandler25(ExCommand *cmd) { cmd->_messageKind = 0; if (!g_fp->_aniMan->isIdle() || (g_fp->_aniMan->_flags & 0x100)) - break; + return 0; if (g_vars->scene25_dudeIsOnBoard) { if (picId == PIC_SC25_RTRUBA && !cmd->_param) { sceneHandler25_enterTruba(); - break; + return 0; } } else { if (picId != PIC_SC25_RTRUBA) { if (picId == PIC_SC25_LADDERUP && !cmd->_param) sceneHandler25_ladderUp(); - break; + return 0; } if (!cmd->_param) { sceneHandler25_backToPipe(); - break; + return 0; } } if (g_vars->scene25_dudeIsOnBoard) { if (picId != PIC_SC25_LADDERUP || cmd->_param) - break; + return 0; sceneHandler25_toLadder(); - break; + return 0; } if (picId == PIC_SC25_LADDERUP && !cmd->_param) sceneHandler25_ladderUp(); - break; + return 0; } } diff --git a/engines/fullpipe/scenes/scene26.cpp b/engines/fullpipe/scenes/scene26.cpp index d183ee9da8..9706bd5927 100644 --- a/engines/fullpipe/scenes/scene26.cpp +++ b/engines/fullpipe/scenes/scene26.cpp @@ -94,17 +94,17 @@ void sceneHandler26_showChi() { } void sceneHandler26_updatePool() { - if (g_fp->getObjectState(sO_Valve1_26) == g_fp->getObjectEnumState(sO_Valve1_26, sO_Valve1_26)) + if (g_fp->getObjectState(sO_Valve1_26) == g_fp->getObjectEnumState(sO_Valve1_26, sO_Opened)) g_fp->setObjectState(sO_Pool, g_fp->getObjectEnumState(sO_Pool, sO_Overfull)); else if (g_fp->getObjectState(sO_Pool) == g_fp->getObjectEnumState(sO_Pool, sO_Overfull)) g_fp->setObjectState(sO_Pool, g_fp->getObjectEnumState(sO_Pool, sO_Full)); - if (g_fp->getObjectState(sO_Valve2_26) == g_fp->getObjectEnumState(sO_Valve2_26, sO_Valve1_26)) { + if (g_fp->getObjectState(sO_Valve2_26) == g_fp->getObjectEnumState(sO_Valve2_26, sO_Opened)) { if (g_fp->getObjectState(sO_Pool) >= g_fp->getObjectEnumState(sO_Pool, sO_Full)) g_fp->setObjectState(sO_Pool, g_fp->getObjectEnumState(sO_Pool, sO_HalfFull)); } - if (g_fp->getObjectState(sO_Valve3_26) == g_fp->getObjectEnumState(sO_Valve3_26, sO_Valve1_26)) { + if (g_fp->getObjectState(sO_Valve3_26) == g_fp->getObjectEnumState(sO_Valve3_26, sO_Opened)) { if (g_fp->getObjectState(sO_Pool) >= g_fp->getObjectEnumState(sO_Pool, sO_HalfFull)) g_fp->setObjectState(sO_Pool, g_fp->getObjectEnumState(sO_Pool, sO_Empty)); } @@ -241,7 +241,7 @@ void sceneHandler26_animateVents(StaticANIObject *ani) { } if (qId) { - MessageQueue *mq = g_fp->_currentScene->getMessageQueueById(qId); + MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(qId), 0, 0); mq->setFlags(mq->getFlags() | 1); mq->chain(0); @@ -249,7 +249,7 @@ void sceneHandler26_animateVents(StaticANIObject *ani) { } void sceneHandler26_clickVent(StaticANIObject *ani, ExCommand *cmd) { - if (ani->_odelay || g_fp->getObjectState(sO_Hatch_26) == g_fp->getObjectEnumState(sO_Hatch_26, sO_Opened)) { + if (ani->_odelay || g_fp->getObjectState(sO_Hatch_26) != g_fp->getObjectEnumState(sO_Hatch_26, sO_Opened)) { if (g_fp->_aniMan->isIdle() && !(g_fp->_aniMan->_flags & 0x100)) { g_vars->scene26_activeVent = ani; diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp index 17bf3916de..a6ddbab5e3 100644 --- a/engines/fullpipe/scenes/scene27.cpp +++ b/engines/fullpipe/scenes/scene27.cpp @@ -53,9 +53,6 @@ void scene27_initScene(Scene *sc) { g_vars->scene27_maid = sc->getStaticANIObject1ById(ANI_MAID, -1); g_vars->scene27_batHandler = sc->getStaticANIObject1ById(ANI_BITAHANDLER, -1); - for (uint i = 0; i < g_vars->scene27_balls.size(); i++) - delete g_vars->scene27_balls[i]; - g_vars->scene27_balls.clear(); g_vars->scene27_bats.clear(); g_vars->scene27_var07.clear(); diff --git a/engines/fullpipe/scenes/scene28.cpp b/engines/fullpipe/scenes/scene28.cpp index b9cdf7ae1c..8d829d7b98 100644 --- a/engines/fullpipe/scenes/scene28.cpp +++ b/engines/fullpipe/scenes/scene28.cpp @@ -172,12 +172,12 @@ void sceneHandler28_turnOn2() { if (g_vars->scene28_fliesArePresent) { g_fp->_floaters->genFlies(g_fp->_currentScene, 1013, 329, 60, 4); - g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val15 = 30; + g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val13 = 30; g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->countdown = g_fp->_rnd->getRandomNumber(12) + 12; g_fp->_floaters->genFlies(g_fp->_currentScene, 1074, 311, 60, 4); - g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val15 = 30; + g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val13 = 30; g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->countdown = g_fp->_rnd->getRandomNumber(12) + 12; } diff --git a/engines/fullpipe/scenes/scene37.cpp b/engines/fullpipe/scenes/scene37.cpp index 0e5685f4a9..ba181642df 100644 --- a/engines/fullpipe/scenes/scene37.cpp +++ b/engines/fullpipe/scenes/scene37.cpp @@ -52,6 +52,11 @@ void scene37_initScene(Scene *sc) { Ring *ring; StaticANIObject *ani; + for (uint i = 0; i < g_vars->scene37_rings.size(); i++) + delete g_vars->scene37_rings[i]; + + g_vars->scene37_rings.clear(); + g_vars->scene37_lastDudeX = -1; ring = new Ring(); @@ -96,7 +101,7 @@ void scene37_initScene(Scene *sc) { g_fp->_currentScene = sc; - g_vars->scene37_cursorIsLocked = false; + g_vars->scene37_pipeIsOpen = false; g_vars->scene37_plusMinus1 = sc->getStaticANIObject1ById(ANI_PLUSMINUS, 1); @@ -149,7 +154,7 @@ int scene37_updateCursor() { g_fp->updateCursorCommon(); if (g_fp->_cursorId == PIC_CSR_ITN && g_fp->_objectIdAtCursor == PIC_SC37_MASK) { - if (g_vars->scene37_cursorIsLocked) + if (g_vars->scene37_pipeIsOpen) g_fp->_cursorId = PIC_CSR_GOL; } @@ -175,20 +180,29 @@ void sceneHandler37_updateRing(int ringNum) { } } - g_vars->scene37_cursorIsLocked = true; + g_vars->scene37_pipeIsOpen = true; + + for (uint i = 0; i < g_vars->scene37_rings.size(); i++) { + for (int j = 0; j < g_vars->scene37_rings[i]->numSubRings; j++) { + ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[i]->subRings[j]); - for (uint j = 0; j < g_vars->scene37_rings.size(); j++) { - for (int i = 0; i < g_vars->scene37_rings[ringNum]->numSubRings; i++) { - ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[j]->subRings[i]); + debugC(2, kDebugSceneLogic, "ring[%d][%d]: mov: %d st: %d", i, j, (ani->_movement ? ani->_movement->_id : 0), ani->_statics->_staticsId); - if ((ani->_movement && ani->_movement->_id != MV_RNG_CLOSE) || ani->_statics->_staticsId != ST_RNG_CLOSED2) - g_vars->scene37_cursorIsLocked = false; + if (ani->_movement) { + if (ani->_movement->_id == MV_RNG_CLOSE) + g_vars->scene37_pipeIsOpen = false; + } else { + if (ani->_statics->_staticsId == ST_RNG_CLOSED2) + g_vars->scene37_pipeIsOpen = false; + } } } + debugC(1, kDebugSceneLogic, "Pipe is: %s", g_vars->scene37_pipeIsOpen ? "open" : "closed"); + int state; - if (g_vars->scene37_cursorIsLocked) + if (g_vars->scene37_pipeIsOpen) state = g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsOpened); else state = g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsClosed); diff --git a/engines/fullpipe/statesaver.cpp b/engines/fullpipe/statesaver.cpp index 509376790d..e582d4b438 100644 --- a/engines/fullpipe/statesaver.cpp +++ b/engines/fullpipe/statesaver.cpp @@ -181,6 +181,13 @@ void PicAniInfo::save(MfcArchive &file) { file.writeUint32LE(someDynamicPhaseIndex); } +void PicAniInfo::print() { + debug("type: %d objectId: %d field_6: %d field_8: %d", type, objectId, field_6, field_8); + debug("sceneId: %d field_E: %d ox: %d oy: %d priority: %d", sceneId, field_E, ox, oy, priority); + debug("staticsId: %d movementId: %d dynamicPhaseIndex: %d flags: %x field_24: %d someDynamicPhaseIndex: %d", + staticsId, movementId, dynamicPhaseIndex, flags, field_24, someDynamicPhaseIndex); +} + void GameVar::save(MfcArchive &file) { file.writePascalString(_varName); file.writeUint32LE(_varType); diff --git a/engines/gnap/configure.engine b/engines/gnap/configure.engine index f3742ef0d2..8723ef501b 100644 --- a/engines/gnap/configure.engine +++ b/engines/gnap/configure.engine @@ -1,3 +1,3 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine gnap "UFOs" no "" "" "highres" +add_engine gnap "UFOs" yes "" "" "highres" diff --git a/engines/gnap/detection.cpp b/engines/gnap/detection.cpp index b1e9818d29..d19d420ff8 100644 --- a/engines/gnap/detection.cpp +++ b/engines/gnap/detection.cpp @@ -43,7 +43,7 @@ static const ADGameDescription gameDescriptions[] = { {"stock_n.dat", 0, "46819043d019a2f36b727cc2bdd6980f", 12515823}, AD_LISTEND }, - Common::EN_ANY, Common::kPlatformWindows, ADGF_TESTING, GUIO0() + Common::EN_ANY, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO0() }, { "gnap", "", @@ -51,7 +51,7 @@ static const ADGameDescription gameDescriptions[] = { {"stock_n.dat", 0, "46819043d019a2f36b727cc2bdd6980f", 13497301}, AD_LISTEND }, - Common::EN_ANY, Common::kPlatformWindows, ADGF_TESTING, GUIO0() + Common::EN_ANY, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO0() }, { "gnap", "", @@ -59,7 +59,7 @@ static const ADGameDescription gameDescriptions[] = { {"stock_n.dat", 0, "46819043d019a2f36b727cc2bdd6980f", 12995485}, AD_LISTEND }, - Common::RU_RUS, Common::kPlatformWindows, ADGF_TESTING, GUIO0() + Common::RU_RUS, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO0() }, { "gnap", "Fargus", @@ -67,7 +67,7 @@ static const ADGameDescription gameDescriptions[] = { {"stock_n.dat", 0, "46819043d019a2f36b727cc2bdd6980f", 12847726}, AD_LISTEND }, - Common::RU_RUS, Common::kPlatformWindows, ADGF_TESTING, GUIO0() + Common::RU_RUS, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO0() }, AD_TABLE_END_MARKER diff --git a/engines/gnap/fontdata.h b/engines/gnap/fontdata.h index 61128211fc..0631d1d214 100644 --- a/engines/gnap/fontdata.h +++ b/engines/gnap/fontdata.h @@ -32,7 +32,7 @@ struct FONT_CHAR_INFO { FONT_CHAR_INFO(byte width, uint16 offset) : _width(width), _offset(offset) {} }; -/* +/* ** Font data for DejaVu Sans 9pt */ diff --git a/engines/gnap/gamesys.h b/engines/gnap/gamesys.h index b9752bde06..789789e5e7 100644 --- a/engines/gnap/gamesys.h +++ b/engines/gnap/gamesys.h @@ -168,7 +168,7 @@ public: int32 _gameSysClock, _lastUpdateClock; bool _animationsDone; - + Graphics::Surface *_backgroundSurface; Graphics::Surface *_frontSurface; diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 47fdaacf7a..eaeb64a64d 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -1681,7 +1681,7 @@ void Script::o2_copyscreentobg() { // TODO: Parameter if (val) warning("o2_copyscreentobg: Param is %d", val); - + Graphics::Surface *screen = _vm->_system->lockScreen(); _vm->_graphicsMan->_background.copyFrom(screen->getSubArea(Common::Rect(0, 80, 640, 320))); _vm->_system->unlockScreen(); diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 4f0a0da777..11a64114b5 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -379,7 +379,7 @@ void LabEngine::decIncInv(uint16 *curInv, bool decreaseFl) { newInv = 1; interfaceOff(); - + while (newInv && (newInv <= _numInv)) { if (_conditions->in(newInv) && !_inventory[newInv]._bitmapName.empty()) { _nextFileName = getInvName(newInv); diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp index 0a603f7691..62e1f75202 100644 --- a/engines/lab/eventman.cpp +++ b/engines/lab/eventman.cpp @@ -151,7 +151,7 @@ IntuiMessage *EventManager::getMsg() { message._msgClass = kMessageButtonUp; message._code = lastButtonHit->_buttonId; message._qualifier = _keyPressed.flags; - + return &message; } else return nullptr; diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index 68e6e63c1d..58b7e253f1 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -267,7 +267,7 @@ void LabEngine::doActions(const ActionList &actionList) { // Puts a file into memory _graphics->loadPict(action->_messages[0]); break; - + case kActionLoadBitmap: error("Unused opcode kActionLoadBitmap has been called"); diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp index 9cb35d1088..44d3caaf43 100644 --- a/engines/lab/resource.cpp +++ b/engines/lab/resource.cpp @@ -147,7 +147,7 @@ void Resource::readViews(uint16 roomNum) { Common::String Resource::translateFileName(const Common::String filename) { Common::String upperFilename; - // The DOS and Windows version aren't looking for the right file, + // The DOS and Windows version aren't looking for the right file, if (!filename.compareToIgnoreCase("P:ZigInt/BLK") && (_vm->getPlatform() != Common::kPlatformAmiga)) upperFilename = "P:ZigInt/ZIGINT.BLK"; else diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 7c3cb39931..577384f99a 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -397,7 +397,7 @@ void LabEngine::processMonitor(const Common::String &ntext, TextFont *monitorFon // Exit button return; } - + if (mouseX <= _utils->vgaScaleX(59)) { // Back button if (isInteractive) { diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 9e0a6e9f00..3b7c3a244b 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -33,6 +33,7 @@ #include "common/debug-channels.h" #include "common/debug.h" #include "image/bmp.h" +#include "graphics/macgui/macfontmanager.h" #include "macventure/gui.h" #include "macventure/dialog.h" @@ -266,7 +267,7 @@ const WindowData &Gui::getWindowData(WindowReference reference) { } const Graphics::Font &Gui::getCurrentFont() { - return *_wm.getFont("Chicago-12", Graphics::FontManager::kBigGUIFont); + return *_wm._fontMan->getFont(Graphics::MacFont(Graphics::kMacFontChicago, 12)); } void Gui::bringToFront(WindowReference winID) { diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index bae59f05cc..3452f44480 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -51,7 +51,7 @@ ScreenEffects::ScreenEffects(Screen *screen) : _screen(screen) { vfxHeight = 0; _fxPalette = new byte[768]; - + _blendedPaletteStatus._active = false; _blendedPaletteStatus._palette = _blendedPaletteStatus._newPalette = nullptr; _blendedPaletteStatus._colorCount = 0; diff --git a/engines/mads/camera.cpp b/engines/mads/camera.cpp index c9b2f1429e..eb5942842a 100644 --- a/engines/mads/camera.cpp +++ b/engines/mads/camera.cpp @@ -148,7 +148,7 @@ bool Camera::camPan(int16 *picture_view, int16 *player_loc, int display_size, in if (_direction < 0) newTarget -= _distOffCenter; - else + else newTarget += _distOffCenter; newTarget = MAX(0, newTarget); diff --git a/engines/mads/conversations.cpp b/engines/mads/conversations.cpp index 469aaedb81..e5c90768da 100644 --- a/engines/mads/conversations.cpp +++ b/engines/mads/conversations.cpp @@ -72,7 +72,7 @@ void GameConversations::load(int id) { _conversations[slotIndex]._convId = id; // Load the conversation data - Common::String cnvFilename = Common::String::format("CONV%03d.CNV", id); + Common::String cnvFilename = Common::String::format("CONV%03d.CNV", id); _conversations[slotIndex]._data.load(cnvFilename); // Load the conversation's CND data @@ -371,7 +371,7 @@ void GameConversations::update(bool flag) { _personSpeaking = 0; executeEntry(_verbId); generateMessage(_runningConv->_cnd._messageList1, _runningConv->_cnd._messageList3); - + if (_heroTrigger && _popupVisible) { _vm->_game->_scene._action._activeAction._verbId = _verbId; _vm->_game->_trigger = _heroTrigger; @@ -438,7 +438,7 @@ void GameConversations::generateMessage(Common::Array<int> &messageList, Common: // Create the new text dialog _dialog = new TextDialog(_vm, FONT_INTERFACE, - Common::Point(_popupX[_personSpeaking], _popupY[_personSpeaking]), + Common::Point(_popupX[_personSpeaking], _popupY[_personSpeaking]), portrait, _popupMaxLen[_personSpeaking]); // Add in the lines @@ -785,7 +785,7 @@ void ConversationConditionals::load(const Common::String &filename) { // **** Section: Imports ************************************************* int streamNum = 1; - + _importVariables.resize(importsCount); if (importsCount > 0) { convFile = convFileUnpacked.getItemStream(streamNum++); @@ -848,7 +848,7 @@ void DialogScript::load(Common::SeekableReadStream &s, uint startingOffset) { instructionOffsets[startingOffset + s.pos()] = size(); push_back(ScriptEntry()); ScriptEntry &se = (*this)[size() - 1]; - + // Load the instruction se.load(s); } diff --git a/engines/mads/conversations.h b/engines/mads/conversations.h index 7b7d3485ef..57e89964a5 100644 --- a/engines/mads/conversations.h +++ b/engines/mads/conversations.h @@ -172,7 +172,7 @@ struct ScriptEntry { DialogCommand _command; Conditional _conditionals[3]; - + // Extra parameters for different opcodes int _index; Common::Array<int> _entries; @@ -338,7 +338,7 @@ private: int _personSpeaking; TextDialog *_dialog; bool _dialogAltFlag; - + /** * Returns the record for the specified conversation, if it's loaded */ @@ -435,7 +435,7 @@ public: * Set the hero trigger */ void setHeroTrigger(int val); - + /** * Set the interlocutor trigger */ @@ -473,7 +473,7 @@ public: void exportValue(int val); void reset(int id); - + /** * Handles updating the conversation display */ diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h index 8a0cc3575d..d44b5f2022 100644 --- a/engines/mads/nebular/menu_nebular.h +++ b/engines/mads/nebular/menu_nebular.h @@ -35,7 +35,7 @@ class MADSEngine; namespace Nebular { -enum MADSGameAction { +enum MADSGameAction { START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT, SETS, EVOLVE }; diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp index 5f71c99a94..15dd44a4af 100644 --- a/engines/mads/nebular/sound_nebular.cpp +++ b/engines/mads/nebular/sound_nebular.cpp @@ -194,7 +194,7 @@ ASound::ASound(Audio::Mixer *mixer, OPL::OPL *opl, const Common::String &filenam _channelData[i]._freqBase = 0; _channelData[i]._field6 = 0; } - + for (int i = 0; i < ADLIB_CHANNEL_COUNT; ++i) _channels[i]._owner = this; diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp index 0940e79562..f1fe7eaf59 100644 --- a/engines/mads/player.cpp +++ b/engines/mads/player.cpp @@ -320,11 +320,11 @@ void Player::activateTrigger() { _commandsAllowed |= _enableAtTarget; _enableAtTarget = false; - + if (_walkTrigger) { game._trigger = _walkTrigger; game._triggerMode = SEQUENCE_TRIGGER_DAEMON; - + if (game._triggerMode != SEQUENCE_TRIGGER_DAEMON) { action._activeAction = _walkTriggerAction; } diff --git a/engines/mads/screen.h b/engines/mads/screen.h index eeb15453f8..15436942fe 100644 --- a/engines/mads/screen.h +++ b/engines/mads/screen.h @@ -254,7 +254,7 @@ public: /** * Return the current drawing/clip area */ - const Common::Rect getClipBounds() const { + 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); } diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 204f71fe43..adde5fc67c 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -339,7 +339,7 @@ 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 - create(*_vm->_screen, Common::Rect(0, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH, + create(*_vm->_screen, Common::Rect(0, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT)); _surface.create(MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT); diff --git a/engines/mohawk/POTFILES b/engines/mohawk/POTFILES index 036059da6a..ced02735c7 100644 --- a/engines/mohawk/POTFILES +++ b/engines/mohawk/POTFILES @@ -2,3 +2,4 @@ engines/mohawk/detection.cpp engines/mohawk/dialogs.cpp engines/mohawk/myst.cpp engines/mohawk/riven.cpp +engines/mohawk/mohawk.cpp diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h index f481472bae..2636cc4434 100644 --- a/engines/mohawk/detection_tables.h +++ b/engines/mohawk/detection_tables.h @@ -40,7 +40,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "ae3258c9c90128d274aa6a790b3ad181"), Common::EN_ANY, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -58,7 +58,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("DEMO.DAT", "c39303dd53fb5c4e7f3c23231c606cd0"), Common::EN_ANY, Common::kPlatformWindows, - ADGF_DEMO | ADGF_TESTING, + ADGF_DEMO | ADGF_NO_FLAGS, GUI_OPTIONS_MYST_DEMO }, GType_MYST, @@ -76,7 +76,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "4beb3366ed3f3b9bfb6e81a14a43bdcc"), Common::DE_DEU, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -94,7 +94,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "e0937cca1ab125e48e30dc3cd5046ddf"), Common::DE_DEU, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -112,7 +112,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "f7e7d7ca69934f1351b5acd4fe4d44c2"), Common::ES_ESP, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -130,7 +130,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "a5795ce1751fc42525e4f9a1859181d5"), Common::IT_ITA, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -148,7 +148,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "032c88e3b7e8db4ca475e7b7db9a66bb"), Common::JA_JPN, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -166,7 +166,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "d631d42567a941c67c78f2e491f4ea58"), Common::FR_FRA, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -184,7 +184,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MAKING.DAT", "f6387e8f0f7b8a3e42c95294315d6a0e"), Common::EN_ANY, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_MAKING_OF }, GType_MAKINGOF, @@ -202,7 +202,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MAKING.DAT", "03ff62607e64419ab2b6ebf7b7bcdf63"), Common::JA_JPN, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_MAKING_OF }, GType_MAKINGOF, @@ -220,7 +220,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "c4cae9f143b5947262e6cb2397e1617e"), Common::EN_ANY, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, @@ -238,7 +238,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "f88e0ace66dbca78eebdaaa1d3314ceb"), Common::DE_DEU, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, @@ -256,7 +256,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "aea81633b2d2ae498f09072fb87263b6"), Common::FR_FRA, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, @@ -274,7 +274,7 @@ static const MohawkGameDescription gameDescriptions[] = { AD_ENTRY1("MYST.DAT", "4a05771b60f4a69869838d01e85c9e80"), Common::PL_POL, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, @@ -2754,7 +2754,7 @@ static const MohawkGameDescription fallbackDescs[] = { AD_ENTRY1(0, 0), Common::UNK_LANG, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST }, GType_MYST, @@ -2769,7 +2769,7 @@ static const MohawkGameDescription fallbackDescs[] = { AD_ENTRY1(0, 0), Common::UNK_LANG, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_MAKING_OF }, GType_MAKINGOF, @@ -2784,7 +2784,7 @@ static const MohawkGameDescription fallbackDescs[] = { AD_ENTRY1(0, 0), Common::UNK_LANG, Common::kPlatformWindows, - ADGF_TESTING, + ADGF_NO_FLAGS, GUI_OPTIONS_MYST_ME }, GType_MYST, diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h index 99db641948..443f2fb67e 100644 --- a/engines/mohawk/dialogs.h +++ b/engines/mohawk/dialogs.h @@ -81,7 +81,7 @@ public: virtual void open() override; virtual void reflowLayout() override; virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override; - + int getLoadSlot() const {return _loadSlot;} private: @@ -92,7 +92,7 @@ private: GUI::SaveLoadChooser *_loadDialog; GUI::SaveLoadChooser *_saveDialog; - + int _loadSlot; void save(); diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 579e3792b3..6ee18d1576 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -3889,7 +3889,7 @@ bool LBMiniGameItem::togglePlaying(bool playing, bool restart) { // Go back to the menu if requested, otherwise go to the requested page if (returnToMenu) _vm->addNotifyEvent(NotifyEvent(kLBNotifyGoToControls, 1)); - else + else _vm->addNotifyEvent(NotifyEvent(kLBNotifyChangePage, destPage)); return false; diff --git a/engines/mohawk/mohawk.cpp b/engines/mohawk/mohawk.cpp index b38409f9f1..40290d4e4c 100644 --- a/engines/mohawk/mohawk.cpp +++ b/engines/mohawk/mohawk.cpp @@ -24,6 +24,7 @@ #include "common/error.h" #include "common/system.h" #include "common/textconsole.h" +#include "common/translation.h" #include "mohawk/mohawk.h" #include "mohawk/cursors.h" @@ -57,7 +58,7 @@ MohawkEngine::~MohawkEngine() { Common::Error MohawkEngine::run() { _video = new VideoManager(this); - _pauseDialog = new PauseDialog(this, "The game is paused. Press any key to continue."); + _pauseDialog = new PauseDialog(this, _("The game is paused. Press any key to continue.")); return Common::kNoError; } diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp index ffab55fa1f..f9ba6a42fa 100644 --- a/engines/mohawk/myst_stacks/myst.cpp +++ b/engines/mohawk/myst_stacks/myst.cpp @@ -3609,7 +3609,7 @@ void Myst::gullsFly2_run() { VideoHandle handle = _vm->_video->playMovie(_vm->wrapMovieFilename(gulls[video], kMystStack)); if (!handle) error("Failed to open gulls movie"); - + handle->moveTo(424, 0); _gullsNextTime = time + _vm->_rnd->getRandomNumber(16667) + 13334; } diff --git a/engines/mohawk/riven_sound.h b/engines/mohawk/riven_sound.h index f673d1ee3f..c79ccc3e3a 100644 --- a/engines/mohawk/riven_sound.h +++ b/engines/mohawk/riven_sound.h @@ -70,7 +70,7 @@ public: /** * Play an effect sound - * + * * @param id Sound ID in the stack * @param volume Playback volume, between 0 and 255 * @param playOnDraw Start playing when the current card is drawn instead of immediatly diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index d0edab9def..e2b09b6afd 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -346,7 +346,7 @@ private: // Utility functions for managing entries VideoEntryPtr open(uint16 id); VideoEntryPtr open(const Common::String &fileName); - + VideoList::iterator findEntry(VideoEntryPtr ptr); void removeEntry(VideoEntryPtr ptr); diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index b20ed3f8be..8737c8b954 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -675,7 +675,7 @@ bool Console::cmdRegisters(int argc, const char **argv) { bool Console::parseResourceNumber36(const char *userParameter, uint16 &resourceNumber, uint32 &resourceTuple) { int userParameterLen = strlen(userParameter); - + if (userParameterLen != 10) { debugPrintf("Audio36/Sync36 resource numbers must be specified as RRRNNVVCCS\n"); debugPrintf("where RRR is the resource number/map\n"); @@ -760,7 +760,7 @@ void Console::cmdDiskDumpWorker(ResourceType resourceType, int resourceNumber, u ResourceId resourceId; Resource *resource = NULL; char outFileName[50]; - + switch (resourceType) { case kResourceTypeAudio36: case kResourceTypeSync36: { @@ -877,7 +877,7 @@ bool Console::cmdList(int argc, const char **argv) { currentMap = map; displayCount = 0; } - + if (displayCount % 3 == 0) debugPrintf(" "); @@ -2075,10 +2075,6 @@ bool Console::cmdPrintSegmentTable(int argc, const char **argv) { debugPrintf("A SCI32 arrays (%d)", (*(ArrayTable *)mobj).entries_used); break; - case SEG_TYPE_STRING: - debugPrintf("T SCI32 strings (%d)", (*(StringTable *)mobj).entries_used); - break; - case SEG_TYPE_BITMAP: debugPrintf("T SCI32 bitmaps (%d)", (*(BitmapTable *)mobj).entries_used); break; @@ -2179,7 +2175,7 @@ bool Console::segmentInfo(int nr) { for (uint i = 0; i < lt.size(); i++) if (lt.isValidEntry(i)) { debugPrintf(" [%04x]: ", i); - printList(<[i]); + printList(lt[i]); } } break; @@ -2210,9 +2206,6 @@ bool Console::segmentInfo(int nr) { break; #ifdef ENABLE_SCI32 - case SEG_TYPE_STRING: - debugPrintf("SCI32 strings\n"); - break; case SEG_TYPE_ARRAY: debugPrintf("SCI32 arrays\n"); break; @@ -2786,16 +2779,8 @@ bool Console::cmdViewReference(int argc, const char **argv) { switch (type) { case 0: break; - case SIG_TYPE_LIST: { - List *list = _engine->_gamestate->_segMan->lookupList(reg); - - debugPrintf("list\n"); - - if (list) - printList(list); - else - debugPrintf("Invalid list.\n"); - } + case SIG_TYPE_LIST: + printList(reg); break; case SIG_TYPE_NODE: debugPrintf("list node\n"); @@ -2808,22 +2793,12 @@ bool Console::cmdViewReference(int argc, const char **argv) { case SIG_TYPE_REFERENCE: { switch (_engine->_gamestate->_segMan->getSegmentType(reg.getSegment())) { #ifdef ENABLE_SCI32 - case SEG_TYPE_STRING: { - debugPrintf("SCI32 string\n"); - const SciString *str = _engine->_gamestate->_segMan->lookupString(reg); - Common::hexdump((const byte *) str->getRawData(), str->getSize(), 16, 0); - break; - } case SEG_TYPE_ARRAY: { - debugPrintf("SCI32 array:\n"); - const SciArray<reg_t> *array = _engine->_gamestate->_segMan->lookupArray(reg); - hexDumpReg(array->getRawData(), array->getSize(), 4, 0, true); + printArray(reg); break; } case SEG_TYPE_BITMAP: { - debugPrintf("SCI32 bitmap:\n"); - const SciBitmap *bitmap = _engine->_gamestate->_segMan->lookupBitmap(reg); - Common::hexdump((const byte *) bitmap->getRawData(), bitmap->getRawSize(), 16, 0); + printBitmap(reg); break; } #endif @@ -2919,7 +2894,7 @@ bool Console::cmdScriptObjects(int argc, const char **argv) { debugPrintf("<script number> may be * to show objects inside all loaded scripts\n"); return true; } - + if (strcmp(argv[1], "*") == 0) { // get said-strings of all currently loaded scripts curScriptNr = -1; @@ -2941,7 +2916,7 @@ bool Console::cmdScriptStrings(int argc, const char **argv) { debugPrintf("<script number> may be * to show strings inside all loaded scripts\n"); return true; } - + if (strcmp(argv[1], "*") == 0) { // get strings of all currently loaded scripts curScriptNr = -1; @@ -2963,7 +2938,7 @@ bool Console::cmdScriptSaid(int argc, const char **argv) { debugPrintf("<script number> may be * to show said-strings inside all loaded scripts\n"); return true; } - + if (strcmp(argv[1], "*") == 0) { // get said-strings of all currently loaded scripts curScriptNr = -1; @@ -3778,7 +3753,7 @@ bool Console::cmdBreakpointKernel(int argc, const char **argv) { bool Console::cmdBreakpointFunction(int argc, const char **argv) { if (argc != 3) { debugPrintf("Sets a breakpoint on the execution of the specified exported function.\n"); - debugPrintf("Usage: %s <script number> <export number\n", argv[0]); + debugPrintf("Usage: %s <script number> <export number>\n", argv[0]); return true; } @@ -4373,8 +4348,28 @@ void Console::printBasicVarInfo(reg_t variable) { debugPrintf(" IS INVALID!"); } -void Console::printList(List *list) { - reg_t pos = list->first; +void Console::printList(reg_t reg) { + SegmentObj *mobj = _engine->_gamestate->_segMan->getSegment(reg.getSegment(), SEG_TYPE_LISTS); + + if (!mobj) { + debugPrintf("list:\nCould not find list segment.\n"); + return; + } + + ListTable *table = static_cast<ListTable *>(mobj); + + if (!table->isValidEntry(reg.getOffset())) { + debugPrintf("list:\nAddress does not contain a valid list.\n"); + return; + } + + const List &list = table->at(reg.getOffset()); + debugPrintf("list:\n"); + printList(list); +} + +void Console::printList(const List &list) { + reg_t pos = list.first; reg_t my_prev = NULL_REG; debugPrintf("\t<\n"); @@ -4384,8 +4379,7 @@ void Console::printList(List *list) { NodeTable *nt = (NodeTable *)_engine->_gamestate->_segMan->getSegment(pos.getSegment(), SEG_TYPE_NODES); if (!nt || !nt->isValidEntry(pos.getOffset())) { - debugPrintf(" WARNING: %04x:%04x: Doesn't contain list node!\n", - PRINT_REG(pos)); + debugPrintf(" WARNING: %04x:%04x: Doesn't contain list node!\n", PRINT_REG(pos)); return; } @@ -4394,16 +4388,15 @@ void Console::printList(List *list) { debugPrintf("\t%04x:%04x : %04x:%04x -> %04x:%04x\n", PRINT_REG(pos), PRINT_REG(node->key), PRINT_REG(node->value)); if (my_prev != node->pred) - debugPrintf(" WARNING: current node gives %04x:%04x as predecessor!\n", - PRINT_REG(node->pred)); + debugPrintf(" WARNING: current node gives %04x:%04x as predecessor!\n", PRINT_REG(node->pred)); my_prev = pos; pos = node->succ; } - if (my_prev != list->last) + if (my_prev != list.last) debugPrintf(" WARNING: Last node was expected to be %04x:%04x, was %04x:%04x!\n", - PRINT_REG(list->last), PRINT_REG(my_prev)); + PRINT_REG(list.last), PRINT_REG(my_prev)); debugPrintf("\t>\n"); } @@ -4447,6 +4440,89 @@ int Console::printNode(reg_t addr) { return 0; } +#ifdef ENABLE_SCI32 +void Console::printArray(reg_t reg) { + SegmentObj *mobj = _engine->_gamestate->_segMan->getSegment(reg.getSegment(), SEG_TYPE_ARRAY); + + if (!mobj) { + debugPrintf("SCI32 array:\nCould not find array segment.\n"); + return; + } + + ArrayTable *table = static_cast<ArrayTable *>(mobj); + + if (!table->isValidEntry(reg.getOffset())) { + debugPrintf("SCI32 array:\nAddress does not contain a valid array.\n"); + return; + } + + const SciArray &array = table->at(reg.getOffset()); + + const char *arrayType; + switch (array.getType()) { + case kArrayTypeID: + arrayType = "reg_t"; + break; + case kArrayTypeByte: + arrayType = "byte"; + break; + case kArrayTypeInt16: + arrayType = "int16 (as reg_t)"; + break; + case kArrayTypeString: + arrayType = "string"; + break; + default: + arrayType = "invalid"; + break; + } + debugPrintf("SCI32 %s array (%u entries):\n", arrayType, array.size()); + switch (array.getType()) { + case kArrayTypeInt16: + case kArrayTypeID: { + hexDumpReg((const reg_t *)array.getRawData(), array.size(), 4, 0, true); + break; + } + case kArrayTypeByte: + case kArrayTypeString: { + Common::hexdump((const byte *)array.getRawData(), array.size(), 16, 0); + break; + } + default: + break; + } +} + +void Console::printBitmap(reg_t reg) { + SegmentObj *mobj = _engine->_gamestate->_segMan->getSegment(reg.getSegment(), SEG_TYPE_BITMAP); + + if (!mobj) { + debugPrintf("SCI32 bitmap:\nCould not find bitmap segment.\n"); + return; + } + + BitmapTable *table = static_cast<BitmapTable *>(mobj); + + if (!table->isValidEntry(reg.getOffset())) { + debugPrintf("SCI32 bitmap:\nAddress does not contain a valid bitmap.\n"); + return; + } + + const SciBitmap &bitmap = table->at(reg.getOffset()); + + debugPrintf("SCI32 bitmap (%dx%d; res %dx%d; origin %dx%d; skip color %u; %s; %s):\n", + bitmap.getWidth(), bitmap.getHeight(), + bitmap.getXResolution(), bitmap.getYResolution(), + bitmap.getOrigin().x, bitmap.getOrigin().y, + bitmap.getSkipColor(), + bitmap.getRemap() ? "remap" : "no remap", + bitmap.getShouldGC() ? "GC" : "no GC"); + + Common::hexdump((const byte *) bitmap.getRawData(), bitmap.getRawSize(), 16, 0); +} + +#endif + int Console::printObject(reg_t pos) { EngineState *s = _engine->_gamestate; // for the several defines in this function const Object *obj = s->_segMan->getObject(pos); diff --git a/engines/sci/console.h b/engines/sci/console.h index cf85def950..0b87a4408b 100644 --- a/engines/sci/console.h +++ b/engines/sci/console.h @@ -41,7 +41,11 @@ public: Console(SciEngine *engine); virtual ~Console(); - int printObject(reg_t pos); +#ifdef ENABLE_SCI32 + void printArray(reg_t reg); + void printBitmap(reg_t reg); +#endif + int printObject(reg_t reg); private: virtual void preEnter(); @@ -169,7 +173,8 @@ private: void printBasicVarInfo(reg_t variable); bool segmentInfo(int nr); - void printList(List *list); + void printList(reg_t addr); + void printList(const List &list); int printNode(reg_t addr); void hexDumpReg(const reg_t *data, int len, int regsPerLine = 4, int startOffset = 0, bool isArray = false); void printOffsets(int scriptNr, uint16 showType); diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index ad2b0f31a5..83f1d30916 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -772,8 +772,7 @@ SaveStateList SciMetaEngine::listSaves(const char *target) const { SaveStateDescriptor descriptor(slotNr, meta.name); if (slotNr == 0) { - // ScummVM auto-save slot, not used by SCI - // SCI does not support auto-saving, but slot 0 is reserved for auto-saving in ScummVM. + // ScummVM auto-save slot descriptor.setWriteProtectedFlag(true); } else { descriptor.setWriteProtectedFlag(false); @@ -795,9 +794,8 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName); SaveStateDescriptor descriptor(slotNr, ""); - // Do not allow save slot 0 (used for auto-saving) to be deleted or - // overwritten. SCI does not support auto-saving, but slot 0 is reserved for auto-saving in ScummVM. if (slotNr == 0) { + // ScummVM auto-save slot descriptor.setWriteProtectedFlag(true); descriptor.setDeletableFlag(false); } else { @@ -807,7 +805,7 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl if (in) { SavegameMetadata meta; - + if (!get_savegame_metadata(in, &meta)) { // invalid delete in; diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index fafbf60d5a..22d2b6f308 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -866,7 +866,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.000", 0, "b996fa1e57389a1e179a00a0049de1f4", 8110}, {"ressci.000", 0, "a19fc3604c6e5407abcf03d59ee87217", 168522221}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_GK2 }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_GK2 }, // Gabriel Knight 2 - English DOS (from jvprat) // Executable scanning reports "2.100.002", VERSION file reports "1.1" @@ -884,7 +884,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.006", 0, "ce9359037277b7d7976da185c2fa0aad", 2977}, {"ressci.006", 0, "8e44e03890205a7be12f45aaba9644b4", 60659424}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_GK2 }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_GK2 }, // Gabriel Knight 2 - French DOS (6-CDs Sierra Originals reedition) // Executable scanning reports "2.100.002", VERSION file reports "1.0" @@ -902,7 +902,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.006", 0, "11b2e722170b8c93fdaa5428e2c7676f", 3001}, {"ressci.006", 0, "4037d941aec39d2e654e20960429aefc", 60568486}, AD_LISTEND}, - Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_GK2 }, + Common::FR_FRA, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_GK2 }, // Gabriel Knight 2 - English Macintosh // NOTE: This only contains disc 1 files (as well as the persistent file: @@ -914,7 +914,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"Data4", 0, "8b843c62eb53136a855d6e0087e3cb0d", 5889553}, {"Data5", 0, "f9fcf9ab2eb13b2125c33a1cda03a093", 14349984}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_GK2_MAC }, + Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_CD | ADGF_UNSTABLE, GUIO_GK2_MAC }, #endif // ENABLE_SCI32 @@ -2580,7 +2580,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.map", 0, "0c0804434ea62278dd15032b1947426c", 8872}, {"resource.000", 0, "9a9f4870504444cda863dd14d077a680", 18520872}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LSL6HIRES }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL6HIRES }, // Larry 6 - German DOS CD - HIRES (provided by richiefs in bug report #2670691) // SCI interpreter version 2.100.002 @@ -2588,7 +2588,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.map", 0, "badfdf446ffed569a310d2c63a249421", 8896}, {"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18534274}, AD_LISTEND}, - Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LSL6HIRES }, + Common::DE_DEU, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL6HIRES }, // Larry 6 - French DOS CD - HIRES (provided by richiefs in bug report #2670691) // SCI interpreter version 2.100.002 @@ -2596,7 +2596,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.map", 0, "d184e9aa4f2d4b5670ddb3669db82cda", 8896}, {"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18538987}, AD_LISTEND}, - Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LSL6HIRES }, + Common::FR_FRA, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL6HIRES }, #define GUIO_LSL7_DEMO GUIO5(GUIO_NOSPEECH, \ GUIO_NOASPECT, \ @@ -2624,7 +2624,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.000", 0, "eae93e1b1d1ccc58b4691c371281c95d", 8188}, {"ressci.000", 0, "89353723488219e25589165d73ed663e", 66965678}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LSL7 }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL7 }, // Larry 7 - German DOS (from Tobis87) // SCI interpreter version 3.000.000 @@ -2632,7 +2632,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.000", 0, "c11e6bfcfc2f2d05da47e5a7df3e9b1a", 8188}, {"ressci.000", 0, "a8c6817bb94f332ff498a71c8b47f893", 66971724}, AD_LISTEND}, - Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LSL7 }, + Common::DE_DEU, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL7 }, // Larry 7 - French DOS (provided by richiefs in bug report #2670691) // SCI interpreter version 3.000.000 @@ -2640,7 +2640,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.000", 0, "4407849fd52fe3efb0c30fba60cd5cd4", 8206}, {"ressci.000", 0, "dc37c3055fffbefb494ff22b145d377b", 66964472}, AD_LISTEND}, - Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LSL7 }, + Common::FR_FRA, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL7 }, // Larry 7 - Italian DOS CD (from glorifindel) // SCI interpreter version 3.000.000 @@ -2648,7 +2648,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.000", 0, "9852a97141f789413f29bf956052acdb", 8212}, {"ressci.000", 0, "440b9fed89590abb4e4386ed6f948ee2", 67140181}, AD_LISTEND}, - Common::IT_ITA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LSL7 }, + Common::IT_ITA, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL7 }, // Larry 7 - Spanish DOS (from the Leisure Suit Larry Collection) // Executable scanning reports "3.000.000", VERSION file reports "1.0s" @@ -2656,7 +2656,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.000", 0, "8f3d603e1acc834a5d598b30cdfc93f3", 8188}, {"ressci.000", 0, "32792f9bc1bf3633a88b382bb3f6e40d", 67071418}, AD_LISTEND}, - Common::ES_ESP, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LSL7 }, + Common::ES_ESP, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LSL7 }, #endif #define GUIO_LIGHTHOUSE_DEMO GUIO5(GUIO_NOSPEECH, \ @@ -2696,7 +2696,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.002", 0, "c68db5333f152fea6ca2dfc75cad8b34", 7573}, {"ressci.002", 0, "175468431a979b9f317c294ce3bc1430", 94628315}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LIGHTHOUSE }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LIGHTHOUSE }, // Lighthouse - Japanese DOS (from m_kiewitz) // Executable scanning reports "3.000.000", VERSION file reports "1.0C" @@ -2706,7 +2706,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.002", 0, "723fc742c623d8933e5753a264324cb0", 7657}, {"ressci.002", 0, "175468431a979b9f317c294ce3bc1430", 94627469}, AD_LISTEND}, - Common::JA_JPN, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LIGHTHOUSE }, + Common::JA_JPN, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LIGHTHOUSE }, // Lighthouse - Spanish DOS (from jvprat) // Executable scanning reports "3.000.000", VERSION file reports "1.1" @@ -2716,7 +2716,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.002", 0, "e7dc85884a2417e2eff9de0c63dd65fa", 7630}, {"ressci.002", 0, "3c8d627c555b0e3e4f1d9955bc0f0df4", 94631127}, AD_LISTEND}, - Common::ES_ESP, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_LIGHTHOUSE }, + Common::ES_ESP, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_LIGHTHOUSE }, #endif // ENABLE_SCI3_GAMES #endif // ENABLE_SCI32 @@ -2850,7 +2850,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.map", 0, "5159a1578c4306bfe070a3e4d8c2e1d3", 4741}, {"resource.000", 0, "1926925c95d82f0999590e93b02887c5", 15150768}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_MOTHERGOOSEHIRES }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_MOTHERGOOSEHIRES }, // Mixed-Up Mother Goose Deluxe - Multilingual Windows CD (English/French/German/Spanish) // Executable scanning reports "2.100.002" @@ -2858,7 +2858,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.000", 0, "ef611af561898dcfea87846919ebf3eb", 4969}, {"ressci.000", 0, "227685bc59d90821978d330713e44a7a", 17205800}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_MOTHERGOOSEHIRES }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_MOTHERGOOSEHIRES }, #endif // ENABLE_SCI32 // Ms. Astro Chicken - English DOS @@ -2904,7 +2904,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.007", 0, "aa8175cfc93242af6f5e65bdceaafc0d", 7972}, //{"ressci.007", 0, "3aae6559aa1df273bc542d5ac6330d75", 25859038}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, // Phantasmagoria - English DOS (from jvprat) // Executable scanning reports "2.100.002", VERSION file reports "1.100.000UK" @@ -2924,7 +2924,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.007", 0, "afbd16ea77869a720afa1c5371de107d", 7972}, //{"ressci.007", 0, "3aae6559aa1df273bc542d5ac6330d75", 25859038}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, // Phantasmagoria - German DOS/Windows // Windows executable scanning reports "unknown" - "Sep 19 1995 09:39:48" @@ -2947,7 +2947,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.007", 0, "06309b8043aecb85bd507b15d16cb544", 7984}, //{"ressci.007", 0, "3aae6559aa1df273bc542d5ac6330d75", 26898681}, AD_LISTEND}, - Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, + Common::DE_DEU, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, // Phantasmagoria - French DOS // Supplied by Kervala in bug #6574 @@ -2966,7 +2966,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"ressci.006", 0, "3aae6559aa1df273bc542d5ac6330d75", 85415107}, {"resmap.007", 0, "5633960bc106c39ca91d2d8fce18fd2d", 7984}, AD_LISTEND}, - Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, + Common::FR_FRA, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, // Phantasmagoria - English DOS Demo // Executable scanning reports "2.100.002" @@ -2985,7 +2985,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"ressci.000", 0, "cd5967f9b9586e3380645961c0765be3", 116822037}, {"resmap.000", 0, "3cafc1c6a53945c1f3babbfd6380c64c", 16468}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_PHANTASMAGORIA }, // Phantasmagoria - English Macintosh // NOTE: This only contains disc 1 files (as well as the two persistent files: @@ -3001,7 +3001,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { // Data8-12 are empty {"Data13", 0, "6d2c450fca19a69b5af74ed5b03c0a17", 14923328}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_PHANTASMAGORIA_MAC }, + Common::EN_ANY, Common::kPlatformMacintosh, ADGF_CD | ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_PHANTASMAGORIA_MAC }, #ifdef ENABLE_SCI3_GAMES @@ -3368,7 +3368,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.000", 0, "1c2563fee189885e29d9348f37306d94", 12175}, {"ressci.000", 0, "b2e1826ca81ce2e7e764587f5a14eee9", 127149181}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO_PQSWAT }, + Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO_PQSWAT }, // Police Quest: SWAT - English Windows (from the Police Quest Collection) // Executable scanning reports "2.100.002", VERSION file reports "1.0c" @@ -3383,7 +3383,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resmap.004", 0, "4228038906f041623e65789500b22285", 6835}, {"ressci.004", 0, "b7e619e6ecf62fe65d5116a3a422e5f0", 46223872}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_PQSWAT }, + Common::EN_ANY, Common::kPlatformWindows, ADGF_CD | ADGF_UNSTABLE, GUIO_PQSWAT }, #endif // ENABLE_SCI32 // Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy (supplied by merkur in bug report #2718784) diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp index 8cecd8c82c..d46d68d9df 100644 --- a/engines/sci/engine/file.cpp +++ b/engines/sci/engine/file.cpp @@ -311,43 +311,65 @@ static bool _savegame_sort_byDate(const SavegameDesc &l, const SavegameDesc &r) return (l.time > r.time); } -// Create a sorted array containing all found savedgames -void listSavegames(Common::Array<SavegameDesc> &saves) { +bool fillSavegameDesc(const Common::String &filename, SavegameDesc *desc) { Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + Common::SeekableReadStream *in; + if ((in = saveFileMan->openForLoading(filename)) == nullptr) { + return false; + } + + SavegameMetadata meta; + if (!get_savegame_metadata(in, &meta) || meta.name.empty()) { + // invalid + delete in; + return false; + } + delete in; + + const int id = strtol(filename.end() - 3, NULL, 10); + desc->id = id; + desc->date = meta.saveDate; + // We need to fix date in here, because we save DDMMYYYY instead of + // YYYYMMDD, so sorting wouldn't work + desc->date = ((desc->date & 0xFFFF) << 16) | ((desc->date & 0xFF0000) >> 8) | ((desc->date & 0xFF000000) >> 24); + desc->time = meta.saveTime; + desc->version = meta.version; + desc->gameVersion = meta.gameVersion; +#ifdef ENABLE_SCI32 + if (g_sci->getGameId() == GID_SHIVERS) { + desc->lowScore = meta.lowScore; + desc->highScore = meta.highScore; + } else if (g_sci->getGameId() == GID_MOTHERGOOSEHIRES) { + desc->avatarId = meta.avatarId; + } +#endif + + if (meta.name.lastChar() == '\n') + meta.name.deleteLastChar(); + + Common::strlcpy(desc->name, meta.name.c_str(), SCI_MAX_SAVENAME_LENGTH); - // Load all saves + return desc; +} + +// Create an array containing all found savedgames, sorted by creation date +void listSavegames(Common::Array<SavegameDesc> &saves) { + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); Common::StringArray saveNames = saveFileMan->listSavefiles(g_sci->getSavegamePattern()); for (Common::StringArray::const_iterator iter = saveNames.begin(); iter != saveNames.end(); ++iter) { - Common::String filename = *iter; - Common::SeekableReadStream *in; - if ((in = saveFileMan->openForLoading(filename))) { - SavegameMetadata meta; - if (!get_savegame_metadata(in, &meta) || meta.name.empty()) { - // invalid - delete in; - continue; - } - delete in; - - SavegameDesc desc; - desc.id = strtol(filename.end() - 3, NULL, 10); - desc.date = meta.saveDate; - // We need to fix date in here, because we save DDMMYYYY instead of - // YYYYMMDD, so sorting wouldn't work - desc.date = ((desc.date & 0xFFFF) << 16) | ((desc.date & 0xFF0000) >> 8) | ((desc.date & 0xFF000000) >> 24); - desc.time = meta.saveTime; - desc.version = meta.version; - - if (meta.name.lastChar() == '\n') - meta.name.deleteLastChar(); - - Common::strlcpy(desc.name, meta.name.c_str(), SCI_MAX_SAVENAME_LENGTH); - - debug(3, "Savegame in file %s ok, id %d", filename.c_str(), desc.id); - - saves.push_back(desc); + const Common::String &filename = *iter; + +#ifdef ENABLE_SCI32 + const int id = strtol(filename.end() - 3, NULL, 10); + if (id == kNewGameId || id == kAutoSaveId) { + continue; } +#endif + + SavegameDesc desc; + fillSavegameDesc(filename, &desc); + saves.push_back(desc); } // Sort the list by creation date of the saves diff --git a/engines/sci/engine/file.h b/engines/sci/engine/file.h index 982d7b7823..0154338f6c 100644 --- a/engines/sci/engine/file.h +++ b/engines/sci/engine/file.h @@ -34,12 +34,22 @@ enum { _K_FILE_MODE_CREATE = 2 }; -/* Maximum length of a savegame name (including terminator character). */ -#define SCI_MAX_SAVENAME_LENGTH 0x24 +enum { + SCI_MAX_SAVENAME_LENGTH = 36, ///< Maximum length of a savegame name (including terminator character). + MAX_SAVEGAME_NR = 20 ///< Maximum number of savegames +}; +#ifdef ENABLE_SCI32 enum { - MAX_SAVEGAME_NR = 20 /**< Maximum number of savegames */ + kAutoSaveId = 0, ///< The save game slot number for autosaves + kNewGameId = 999, ///< The save game slot number for a "new game" save + + // SCI engine expects game IDs to start at 0, but slot 0 in ScummVM is + // reserved for autosave, so non-autosave games get their IDs shifted up + // when saving or restoring, and shifted down when enumerating save games + kSaveIdShift = 1 }; +#endif #define VIRTUALFILE_HANDLE_START 32000 #define VIRTUALFILE_HANDLE_SCI32SAVE 32100 @@ -53,6 +63,14 @@ struct SavegameDesc { int time; int version; char name[SCI_MAX_SAVENAME_LENGTH]; + Common::String gameVersion; +#ifdef ENABLE_SCI32 + // Used by Shivers 1 + uint16 lowScore; + uint16 highScore; + // Used by MGDX + uint8 avatarId; +#endif }; class FileHandle { diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp index 6c1713bed9..50f7709baf 100644 --- a/engines/sci/engine/gc.cpp +++ b/engines/sci/engine/gc.cpp @@ -46,7 +46,7 @@ const char *segmentTypeNames[] = { "dynmem", // 9 "obsolete", // 10: obsolete string fragments "array", // 11: SCI32 arrays - "string" // 12: SCI32 strings + "obsolete" // 12: obsolete SCI32 strings }; #endif diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index c03504d277..85cad99226 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -410,7 +410,6 @@ uint16 Kernel::findRegType(reg_t reg) { case SEG_TYPE_HUNK: #ifdef ENABLE_SCI32 case SEG_TYPE_ARRAY: - case SEG_TYPE_STRING: case SEG_TYPE_BITMAP: #endif result |= SIG_TYPE_REFERENCE; diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 45477e1153..cce9a223d3 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -483,30 +483,46 @@ reg_t kShowMovieWinGetDuration(EngineState *s, int argc, reg_t *argv); reg_t kShowMovieWinPlayUntilEvent(EngineState *s, int argc, reg_t *argv); reg_t kShowMovieWinInitDouble(EngineState *s, int argc, reg_t *argv); +reg_t kSave(EngineState *s, int argc, reg_t *argv); +reg_t kSaveGame32(EngineState *s, int argc, reg_t *argv); +reg_t kRestoreGame32(EngineState *s, int argc, reg_t *argv); +reg_t kGetSaveFiles32(EngineState *s, int argc, reg_t *argv); +reg_t kCheckSaveGame32(EngineState *s, int argc, reg_t *argv); +reg_t kMakeSaveCatName(EngineState *s, int argc, reg_t *argv); +reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv); + +reg_t kSetHotRectangles(EngineState *s, int argc, reg_t *argv); reg_t kIsHiRes(EngineState *s, int argc, reg_t *argv); -reg_t kArray(EngineState *s, int argc, reg_t *argv); reg_t kListAt(EngineState *s, int argc, reg_t *argv); -reg_t kString(EngineState *s, int argc, reg_t *argv); +reg_t kArray(EngineState *s, int argc, reg_t *argv); +reg_t kArrayNew(EngineState *s, int argc, reg_t *argv); +reg_t kArrayGetSize(EngineState *s, int argc, reg_t *argv); +reg_t kArrayGetElement(EngineState *s, int argc, reg_t *argv); +reg_t kArraySetElements(EngineState *s, int argc, reg_t *argv); +reg_t kArrayFree(EngineState *s, int argc, reg_t *argv); +reg_t kArrayFill(EngineState *s, int argc, reg_t *argv); +reg_t kArrayCopy(EngineState *s, int argc, reg_t *argv); +reg_t kArrayCompare(EngineState *s, int argc, reg_t *argv); +reg_t kArrayDuplicate(EngineState *s, int argc, reg_t *argv); +reg_t kArrayGetData(EngineState *s, int argc, reg_t *argv); +reg_t kArrayByteCopy(EngineState *s, int argc, reg_t *argv); + +reg_t kString(EngineState *s, int argc, reg_t *argv); reg_t kStringNew(EngineState *s, int argc, reg_t *argv); -reg_t kStringSize(EngineState *s, int argc, reg_t *argv); -reg_t kStringAt(EngineState *s, int argc, reg_t *argv); -reg_t kStringPutAt(EngineState *s, int argc, reg_t *argv); +reg_t kStringGetChar(EngineState *s, int argc, reg_t *argv); reg_t kStringFree(EngineState *s, int argc, reg_t *argv); -reg_t kStringFill(EngineState *s, int argc, reg_t *argv); -reg_t kStringCopy(EngineState *s, int argc, reg_t *argv); reg_t kStringCompare(EngineState *s, int argc, reg_t *argv); -reg_t kStringDup(EngineState *s, int argc, reg_t *argv); reg_t kStringGetData(EngineState *s, int argc, reg_t *argv); -reg_t kStringLen(EngineState *s, int argc, reg_t *argv); -reg_t kStringPrintf(EngineState *s, int argc, reg_t *argv); -reg_t kStringPrintfBuf(EngineState *s, int argc, reg_t *argv); -reg_t kStringAtoi(EngineState *s, int argc, reg_t *argv); +reg_t kStringLength(EngineState *s, int argc, reg_t *argv); +reg_t kStringFormat(EngineState *s, int argc, reg_t *argv); +reg_t kStringFormatAt(EngineState *s, int argc, reg_t *argv); +reg_t kStringToInteger(EngineState *s, int argc, reg_t *argv); reg_t kStringTrim(EngineState *s, int argc, reg_t *argv); -reg_t kStringUpper(EngineState *s, int argc, reg_t *argv); -reg_t kStringLower(EngineState *s, int argc, reg_t *argv); -reg_t kStringTrn(EngineState *s, int argc, reg_t *argv); -reg_t kStringTrnExclude(EngineState *s, int argc, reg_t *argv); +reg_t kStringToUpperCase(EngineState *s, int argc, reg_t *argv); +reg_t kStringToLowerCase(EngineState *s, int argc, reg_t *argv); +reg_t kStringReplaceSubstring(EngineState *s, int argc, reg_t *argv); +reg_t kStringReplaceSubstringEx(EngineState *s, int argc, reg_t *argv); reg_t kScrollWindowCreate(EngineState *s, int argc, reg_t *argv); reg_t kScrollWindowAdd(EngineState *s, int argc, reg_t *argv); @@ -547,7 +563,7 @@ reg_t kBitmapDrawText(EngineState *s, int argc, reg_t *argv); reg_t kBitmapDrawColor(EngineState *s, int argc, reg_t *argv); reg_t kBitmapDrawBitmap(EngineState *s, int argc, reg_t *argv); reg_t kBitmapInvert(EngineState *s, int argc, reg_t *argv); -reg_t kBitmapSetDisplace(EngineState *s, int argc, reg_t *argv); +reg_t kBitmapSetOrigin(EngineState *s, int argc, reg_t *argv); reg_t kBitmapCreateFromView(EngineState *s, int argc, reg_t *argv); reg_t kBitmapCopyPixels(EngineState *s, int argc, reg_t *argv); reg_t kBitmapClone(EngineState *s, int argc, reg_t *argv); @@ -576,8 +592,6 @@ reg_t kListFirstTrue(EngineState *s, int argc, reg_t *argv); reg_t kListAllTrue(EngineState *s, int argc, reg_t *argv); reg_t kEditText(EngineState *s, int argc, reg_t *argv); -reg_t kMakeSaveCatName(EngineState *s, int argc, reg_t *argv); -reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv); reg_t kSetScroll(EngineState *s, int argc, reg_t *argv); reg_t kPaletteSetFromResource32(EngineState *s, int argc, reg_t *argv); @@ -607,8 +621,6 @@ reg_t kMorphOn(EngineState *s, int argc, reg_t *argv); reg_t kText(EngineState *s, int argc, reg_t *argv); reg_t kTextSize32(EngineState *s, int argc, reg_t *argv); reg_t kTextWidth(EngineState *s, int argc, reg_t *argv); -reg_t kSave(EngineState *s, int argc, reg_t *argv); -reg_t kAutoSave(EngineState *s, int argc, reg_t *argv); reg_t kList(EngineState *s, int argc, reg_t *argv); reg_t kCD(EngineState *s, int argc, reg_t *argv); reg_t kCheckCD(EngineState *s, int argc, reg_t *argv); @@ -622,6 +634,7 @@ reg_t kWinHelp(EngineState *s, int argc, reg_t *argv); reg_t kMessageBox(EngineState *s, int argc, reg_t *argv); reg_t kGetConfig(EngineState *s, int argc, reg_t *argv); reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv); +reg_t kPrintDebug(EngineState *s, int argc, reg_t *argv); reg_t kCelInfo(EngineState *s, int argc, reg_t *argv); reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv); reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv); @@ -707,7 +720,7 @@ reg_t kFileIOReadByte(EngineState *s, int argc, reg_t *argv); reg_t kFileIOWriteByte(EngineState *s, int argc, reg_t *argv); reg_t kFileIOReadWord(EngineState *s, int argc, reg_t *argv); reg_t kFileIOWriteWord(EngineState *s, int argc, reg_t *argv); -reg_t kFileIOCreateSaveSlot(EngineState *s, int argc, reg_t *argv); +reg_t kFileIOGetCWD(EngineState *s, int argc, reg_t *argv); reg_t kFileIOIsValidDirectory(EngineState *s, int argc, reg_t *argv); #endif diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 6e141e7f3b..0f1210e0e1 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -67,8 +67,8 @@ struct SciKernelMapSubEntry { #define SIG_SINCE_SCI11 SCI_VERSION_1_1, SCI_VERSION_NONE #define SIG_SCI2 SCI_VERSION_2, SCI_VERSION_2 #define SIG_SCI21EARLY SCI_VERSION_2_1_EARLY, SCI_VERSION_2_1_EARLY -#define SIG_UNTIL_SCI21EARLY SCI_VERSION_2, SCI_VERSION_2_1_EARLY -#define SIG_UNTIL_SCI21MID SCI_VERSION_2, SCI_VERSION_2_1_MIDDLE +#define SIG_THRU_SCI21EARLY SCI_VERSION_2, SCI_VERSION_2_1_EARLY +#define SIG_THRU_SCI21MID SCI_VERSION_2, SCI_VERSION_2_1_MIDDLE #define SIG_SINCE_SCI21 SCI_VERSION_2_1_EARLY, SCI_VERSION_3 #define SIG_SINCE_SCI21MID SCI_VERSION_2_1_MIDDLE, SCI_VERSION_3 #define SIG_SINCE_SCI21LATE SCI_VERSION_2_1_LATE, SCI_VERSION_3 @@ -248,7 +248,7 @@ static const SciKernelMapSubEntry kDoAudio_subops[] = { // version, subId, function-mapping, signature, workarounds static const SciKernelMapSubEntry kGraph_subops[] = { - { SIG_SCI32, 1, MAP_CALL(StubNull), "", NULL }, // called by gk1 sci32 right at the start + // 1 - load bits { SIG_SCIALL, 2, MAP_CALL(GraphGetColorCount), "", NULL }, // 3 - set palette via resource { SIG_SCIALL, 4, MAP_CALL(GraphDrawLine), "iiiii(i)(i)", kGraphDrawLine_workarounds }, @@ -311,9 +311,9 @@ static const SciKernelMapSubEntry kPalette_subops[] = { SCI_SUBOPENTRY_TERMINATOR }; +// version, subId, function-mapping, signature, workarounds static const SciKernelMapSubEntry kFileIO_subops[] = { - { SIG_SCI32, 0, MAP_CALL(FileIOOpen), "r(i)", NULL }, - { SIG_SCIALL, 0, MAP_CALL(FileIOOpen), "ri", NULL }, + { SIG_SCIALL, 0, MAP_CALL(FileIOOpen), "ri", kFileIOOpen_workarounds }, { SIG_SCIALL, 1, MAP_CALL(FileIOClose), "i", NULL }, { SIG_SCIALL, 2, MAP_CALL(FileIOReadRaw), "iri", NULL }, { SIG_SCIALL, 3, MAP_CALL(FileIOWriteRaw), "iri", NULL }, @@ -326,13 +326,13 @@ static const SciKernelMapSubEntry kFileIO_subops[] = { { SIG_SCIALL, 10, MAP_CALL(FileIOExists), "r", NULL }, { SIG_SINCE_SCI11, 11, MAP_CALL(FileIORename), "rr", NULL }, #ifdef ENABLE_SCI32 - { SIG_SCI32, 13, MAP_CALL(FileIOReadByte), "i", NULL }, - { SIG_SCI32, 14, MAP_CALL(FileIOWriteByte), "ii", NULL }, - { SIG_SCI32, 15, MAP_CALL(FileIOReadWord), "i", NULL }, - { SIG_SCI32, 16, MAP_CALL(FileIOWriteWord), "ii", NULL }, - { SIG_SCI32, 17, MAP_CALL(FileIOCreateSaveSlot), "ir", NULL }, - { SIG_SCI32, 18, MAP_EMPTY(FileIOChangeDirectory), "r", NULL }, // for SQ6, when changing the savegame directory in the save/load dialog - { SIG_SCI32, 19, MAP_CALL(FileIOIsValidDirectory), "r", NULL }, // for Torin / Torin demo + { SIG_SINCE_SCI21MID, 13, MAP_CALL(FileIOReadByte), "i", NULL }, + { SIG_SINCE_SCI21MID, 14, MAP_CALL(FileIOWriteByte), "ii", NULL }, + { SIG_SINCE_SCI21MID, 15, MAP_CALL(FileIOReadWord), "i", NULL }, + { SIG_SINCE_SCI21MID, 16, MAP_CALL(FileIOWriteWord), "ii", NULL }, + { SIG_SINCE_SCI21MID, 17, "FileIOCheckFreeSpace", kCheckFreeSpace, "i(r)", NULL }, + { SIG_SINCE_SCI21MID, 18, MAP_CALL(FileIOGetCWD), "r", NULL }, + { SIG_SINCE_SCI21MID, 19, MAP_CALL(FileIOIsValidDirectory), "r", NULL }, #endif SCI_SUBOPENTRY_TERMINATOR }; @@ -351,15 +351,19 @@ static const SciKernelMapSubEntry kPalCycle_subops[] = { // version, subId, function-mapping, signature, workarounds static const SciKernelMapSubEntry kSave_subops[] = { - { SIG_SCI32, 0, MAP_CALL(SaveGame), "[r0]i[r0](r0)", NULL }, - { SIG_SCI32, 1, MAP_CALL(RestoreGame), "[r0]i[r0]", NULL }, - { SIG_SCI32, 2, MAP_CALL(GetSaveDir), "(r*)", NULL }, - { SIG_SCI32, 3, MAP_CALL(CheckSaveGame), ".*", NULL }, + { SIG_SCI32, 0, MAP_CALL(SaveGame32), "[r0]i[r0][r0]", NULL }, + { SIG_SCI32, 1, MAP_CALL(RestoreGame32), "[r0]i[r0]", NULL }, + // System script 64994 in several SCI2.1mid games (KQ7 2.00b, Phant1, + // PQ:SWAT, SQ6, Torin) calls GetSaveDir with an extra unused argument, and + // it is easier to just handle it here than to bother with creating + // workarounds + { SIG_SCI32, 2, MAP_CALL(GetSaveDir), "(r)", NULL }, + { SIG_SCI32, 3, MAP_CALL(CheckSaveGame32), "ri[r0]", NULL }, // Subop 4 hasn't been encountered yet - { SIG_SCI32, 5, MAP_CALL(GetSaveFiles), "rrr", NULL }, + { SIG_SCI32, 5, MAP_CALL(GetSaveFiles32), "rrr", NULL }, { SIG_SCI32, 6, MAP_CALL(MakeSaveCatName), "rr", NULL }, { SIG_SCI32, 7, MAP_CALL(MakeSaveFileName), "rri", NULL }, - { SIG_SCI32, 8, MAP_CALL(AutoSave), "[o0]", NULL }, + { SIG_SCI32, 8, MAP_EMPTY(GameIsRestarting), "(.*)", NULL }, SCI_SUBOPENTRY_TERMINATOR }; @@ -387,12 +391,12 @@ static const SciKernelMapSubEntry kBitmap_subops[] = { { SIG_SINCE_SCI21, 5, MAP_CALL(BitmapDrawColor), "riiiii", NULL }, { SIG_SINCE_SCI21, 6, MAP_CALL(BitmapDrawBitmap), "rr(i)(i)(i)", NULL }, { SIG_SINCE_SCI21, 7, MAP_CALL(BitmapInvert), "riiiiii", NULL }, - { SIG_SINCE_SCI21MID, 8, MAP_CALL(BitmapSetDisplace), "rii", NULL }, + { SIG_SINCE_SCI21MID, 8, MAP_CALL(BitmapSetOrigin), "rii", NULL }, { SIG_SINCE_SCI21MID, 9, MAP_CALL(BitmapCreateFromView), "iii(i)(i)(i)([r0])", NULL }, { SIG_SINCE_SCI21MID, 10, MAP_CALL(BitmapCopyPixels), "rr", NULL }, { SIG_SINCE_SCI21MID, 11, MAP_CALL(BitmapClone), "r", NULL }, - { SIG_SINCE_SCI21LATE, 12, MAP_CALL(BitmapGetInfo), "r(i)(i)", NULL }, - { SIG_SINCE_SCI21LATE, 13, MAP_CALL(BitmapScale), "r...ii", NULL }, + { SIG_SINCE_SCI21MID, 12, MAP_CALL(BitmapGetInfo), "r(i)(i)", NULL }, + { SIG_SINCE_SCI21LATE,13, MAP_CALL(BitmapScale), "r...ii", NULL }, { SIG_SCI3, 14, MAP_CALL(BitmapCreateFromUnknown), "......", NULL }, { SIG_SCI3, 15, MAP_EMPTY(Bitmap), "(.*)", NULL }, { SIG_SCI3, 16, MAP_EMPTY(Bitmap), "(.*)", NULL }, @@ -501,44 +505,56 @@ static const SciKernelMapSubEntry kRemapColors_subops[] = { }; // version, subId, function-mapping, signature, workarounds +static const SciKernelMapSubEntry kArray_subops[] = { + { SIG_SCI32, 0, MAP_CALL(ArrayNew), "ii", NULL }, + { SIG_SCI32, 1, MAP_CALL(ArrayGetSize), "r", NULL }, + { SIG_SCI32, 2, MAP_CALL(ArrayGetElement), "ri", NULL }, + { SIG_SCI32, 3, MAP_CALL(ArraySetElements), "ri(.*)", kArraySetElements_workarounds }, + { SIG_SCI32, 4, MAP_CALL(ArrayFree), "r", NULL }, + { SIG_SCI32, 5, MAP_CALL(ArrayFill), "riii", NULL }, + { SIG_SCI32, 6, MAP_CALL(ArrayCopy), "ririi", NULL }, + // there is no subop 7 + { SIG_SCI32, 8, MAP_CALL(ArrayDuplicate), "r", NULL }, + { SIG_SCI32, 9, MAP_CALL(ArrayGetData), "[or]", NULL }, + { SIG_SCI3, 10, MAP_CALL(ArrayByteCopy), "ririi", NULL }, + SCI_SUBOPENTRY_TERMINATOR +}; + +// version, subId, function-mapping, signature, workarounds static const SciKernelMapSubEntry kString_subops[] = { - { SIG_SCI32, 0, MAP_CALL(StringNew), "i(i)", NULL }, - { SIG_SCI32, 1, MAP_CALL(StringSize), "[or]", NULL }, - { SIG_SCI32, 2, MAP_CALL(StringAt), "[or]i", NULL }, - { SIG_SCI32, 3, MAP_CALL(StringPutAt), "[or]i(i*)", kStringPutAt_workarounds }, - // StringFree accepts invalid references - { SIG_SCI32, 4, MAP_CALL(StringFree), "[or0!]", NULL }, - { SIG_SCI32, 5, MAP_CALL(StringFill), "[or]ii", NULL }, - { SIG_SCI32, 6, MAP_CALL(StringCopy), "[or]i[or]ii", NULL }, - { SIG_SCI32, 7, MAP_CALL(StringCompare), "[or][or](i)", NULL }, - - // =SCI2, SCI2.1 Early and SCI2.1 Middle= - { SIG_UNTIL_SCI21MID, 8, MAP_CALL(StringDup), "[or]", NULL }, - // TODO: This gets called with null references in Torin. Check if this is correct, or it's - // caused by missing functionality - { SIG_UNTIL_SCI21MID, 9, MAP_CALL(StringGetData), "[or0]", NULL }, - { SIG_UNTIL_SCI21MID, 10, MAP_CALL(StringLen), "[or]", NULL }, - { SIG_UNTIL_SCI21MID, 11, MAP_CALL(StringPrintf), "[or](.*)", NULL }, - { SIG_UNTIL_SCI21MID, 12, MAP_CALL(StringPrintfBuf), "[or](.*)", NULL }, - { SIG_UNTIL_SCI21MID, 13, MAP_CALL(StringAtoi), "[or]", NULL }, - { SIG_UNTIL_SCI21MID, 14, MAP_CALL(StringTrim), "[or]i", NULL }, - { SIG_UNTIL_SCI21MID, 15, MAP_CALL(StringUpper), "[or]", NULL }, - { SIG_UNTIL_SCI21MID, 16, MAP_CALL(StringLower), "[or]", NULL }, - // the following 2 are unknown atm (happen in Phantasmagoria) - // possibly translate? - { SIG_UNTIL_SCI21MID, 17, MAP_CALL(StringTrn), "[or]", NULL }, - { SIG_UNTIL_SCI21MID, 18, MAP_CALL(StringTrnExclude), "[or]", NULL }, - - // SCI2.1 Late + SCI3 - kStringDup + kStringGetData were removed - { SIG_SINCE_SCI21LATE, 8, MAP_CALL(StringLen), "[or]", NULL }, - { SIG_SINCE_SCI21LATE, 9, MAP_CALL(StringPrintf), "[or](.*)", NULL }, - { SIG_SINCE_SCI21LATE,10, MAP_CALL(StringPrintfBuf), "[or](.*)", NULL }, - { SIG_SINCE_SCI21LATE,11, MAP_CALL(StringAtoi), "[or]", NULL }, - { SIG_SINCE_SCI21LATE,12, MAP_CALL(StringTrim), "[or]i", NULL }, - { SIG_SINCE_SCI21LATE,13, MAP_CALL(StringUpper), "[or]", NULL }, - { SIG_SINCE_SCI21LATE,14, MAP_CALL(StringLower), "[or]", NULL }, - { SIG_SINCE_SCI21LATE,15, MAP_CALL(StringTrn), "[or]", NULL }, - { SIG_SINCE_SCI21LATE,16, MAP_CALL(StringTrnExclude), "[or]", NULL }, + // every single copy of script 64918 in SCI2 through 2.1mid calls StringNew + // with a second type argument which is unused (new strings are always type + // 3) + { SIG_THRU_SCI21MID, 0, MAP_CALL(StringNew), "i(i)", NULL }, + { SIG_THRU_SCI21MID, 1, MAP_CALL(ArrayGetSize), "r", NULL }, + { SIG_THRU_SCI21MID, 2, MAP_CALL(StringGetChar), "ri", NULL }, + { SIG_THRU_SCI21MID, 3, MAP_CALL(ArraySetElements), "ri(i*)", kArraySetElements_workarounds }, + { SIG_THRU_SCI21MID, 4, MAP_CALL(StringFree), "[0r]", NULL }, + { SIG_THRU_SCI21MID, 5, MAP_CALL(ArrayFill), "rii", NULL }, + { SIG_THRU_SCI21MID, 6, MAP_CALL(ArrayCopy), "ririi", NULL }, + { SIG_SCI32, 7, MAP_CALL(StringCompare), "rr(i)", NULL }, + + { SIG_THRU_SCI21MID, 8, MAP_CALL(ArrayDuplicate), "r", NULL }, + { SIG_THRU_SCI21MID, 9, MAP_CALL(StringGetData), "[0or]", NULL }, + { SIG_THRU_SCI21MID, 10, MAP_CALL(StringLength), "r", NULL }, + { SIG_THRU_SCI21MID, 11, MAP_CALL(StringFormat), "r(.*)", NULL }, + { SIG_THRU_SCI21MID, 12, MAP_CALL(StringFormatAt), "r[ro](.*)", NULL }, + { SIG_THRU_SCI21MID, 13, MAP_CALL(StringToInteger), "r", NULL }, + { SIG_THRU_SCI21MID, 14, MAP_CALL(StringTrim), "ri(i)", NULL }, + { SIG_THRU_SCI21MID, 15, MAP_CALL(StringToUpperCase), "r", NULL }, + { SIG_THRU_SCI21MID, 16, MAP_CALL(StringToLowerCase), "r", NULL }, + { SIG_THRU_SCI21MID, 17, MAP_CALL(StringReplaceSubstring), "rrrr", NULL }, + { SIG_THRU_SCI21MID, 18, MAP_CALL(StringReplaceSubstringEx), "rrrr", NULL }, + + { SIG_SINCE_SCI21LATE, 8, MAP_CALL(StringLength), "r", NULL }, + { SIG_SINCE_SCI21LATE, 9, MAP_CALL(StringFormat), "r(.*)", NULL }, + { SIG_SINCE_SCI21LATE,10, MAP_CALL(StringFormatAt), "rr(.*)", NULL }, + { SIG_SINCE_SCI21LATE,11, MAP_CALL(StringToInteger), "r", NULL }, + { SIG_SINCE_SCI21LATE,12, MAP_CALL(StringTrim), "ri(i)", NULL }, + { SIG_SINCE_SCI21LATE,13, MAP_CALL(StringToUpperCase), "r", NULL }, + { SIG_SINCE_SCI21LATE,14, MAP_CALL(StringToLowerCase), "r", NULL }, + { SIG_SINCE_SCI21LATE,15, MAP_CALL(StringReplaceSubstring), "rrrr", NULL }, + { SIG_SINCE_SCI21LATE,16, MAP_CALL(StringReplaceSubstringEx), "rrrr", NULL }, SCI_SUBOPENTRY_TERMINATOR }; @@ -613,10 +629,13 @@ static SciKernelMapEntry s_kernelMap[] = { { "CelHigh", kCelHigh32, SIG_SCI32, SIGFOR_ALL, "iii", NULL, NULL }, { "CelWide", kCelWide32, SIG_SCI32, SIGFOR_ALL, "iii", NULL, kCelWide_workarounds }, #endif - { MAP_CALL(CheckFreeSpace), SIG_SCI32, SIGFOR_ALL, "r.*", NULL, NULL }, + { MAP_CALL(CheckFreeSpace), SIG_THRU_SCI21EARLY, SIGFOR_ALL, "r(i)", NULL, NULL }, { MAP_CALL(CheckFreeSpace), SIG_SCI11, SIGFOR_ALL, "r(i)", NULL, NULL }, - { MAP_CALL(CheckFreeSpace), SIG_EVERYWHERE, "r", NULL, NULL }, - { MAP_CALL(CheckSaveGame), SIG_EVERYWHERE, ".*", NULL, NULL }, + { MAP_CALL(CheckFreeSpace), SIG_SCI16, SIGFOR_ALL, "r", NULL, NULL }, +#ifdef ENABLE_SCI32 + { "CheckSaveGame", kCheckSaveGame32, SIG_THRU_SCI21EARLY, SIGFOR_ALL, "ri[r0]", NULL, NULL }, +#endif + { MAP_CALL(CheckSaveGame), SIG_SCI16, SIGFOR_ALL, ".*", NULL, NULL }, { MAP_CALL(Clone), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(CoordPri), SIG_EVERYWHERE, "i(i)", NULL, NULL }, { MAP_CALL(CosDiv), SIG_EVERYWHERE, "ii", NULL, NULL }, @@ -632,7 +651,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(DisposeWindow), SIG_EVERYWHERE, "i(i)", NULL, NULL }, { MAP_CALL(DoAudio), SCI_VERSION_NONE, SCI_VERSION_2, SIGFOR_ALL, "i(.*)", NULL, NULL }, // subop #ifdef ENABLE_SCI32 - { "DoAudio", kDoAudio32, SIG_SINCE_SCI21, SIGFOR_ALL, "(.*)", kDoAudio_subops, NULL }, + { "DoAudio", kDoAudio32, SIG_SINCE_SCI21, SIGFOR_ALL, "(.*)", kDoAudio_subops, NULL }, #endif { MAP_CALL(DoAvoider), SIG_EVERYWHERE, "o(i)", NULL, NULL }, { MAP_CALL(DoBresen), SIG_EVERYWHERE, "o", NULL, NULL }, @@ -666,15 +685,23 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(GetMenu), SIG_EVERYWHERE, "i.", NULL, NULL }, { MAP_CALL(GetMessage), SIG_EVERYWHERE, "iiir", NULL, NULL }, { MAP_CALL(GetPort), SIG_EVERYWHERE, "", NULL, NULL }, - { MAP_CALL(GetSaveDir), SIG_SCI32, SIGFOR_ALL, "(r*)", NULL, NULL }, - { MAP_CALL(GetSaveDir), SIG_EVERYWHERE, "", NULL, NULL }, +#ifdef ENABLE_SCI32 + { MAP_CALL(GetSaveDir), SIG_THRU_SCI21EARLY, SIGFOR_ALL, "(r)", NULL, NULL }, +#endif + { MAP_CALL(GetSaveDir), SIG_SCI16, SIGFOR_ALL, "", NULL, NULL }, +#ifdef ENABLE_SCI32 + { "GetSaveFiles", kGetSaveFiles32, SIG_THRU_SCI21EARLY, SIGFOR_ALL, "rrr", NULL, NULL }, +#endif { MAP_CALL(GetSaveFiles), SIG_EVERYWHERE, "rrr", NULL, NULL }, { MAP_CALL(GetTime), SIG_EVERYWHERE, "(i)", NULL, NULL }, { MAP_CALL(GlobalToLocal), SIG_SCI16, SIGFOR_ALL, "o", NULL, NULL }, #ifdef ENABLE_SCI32 { "GlobalToLocal", kGlobalToLocal32, SIG_SCI32, SIGFOR_ALL, "oo", NULL, NULL }, #endif - { MAP_CALL(Graph), SIG_EVERYWHERE, NULL, kGraph_subops, NULL }, + { MAP_CALL(Graph), SIG_SCI16, SIGFOR_ALL, NULL, kGraph_subops, NULL }, +#ifdef ENABLE_SCI32 + { MAP_EMPTY(Graph), SIG_SCI32, SIGFOR_ALL, "(.*)", NULL, NULL }, +#endif { MAP_CALL(HaveMouse), SIG_EVERYWHERE, "", NULL, NULL }, { MAP_CALL(HiliteControl), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(InitBresen), SIG_EVERYWHERE, "o(i)", NULL, NULL }, @@ -729,9 +756,15 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(ResCheck), SIG_EVERYWHERE, "ii(iiii)", NULL, NULL }, { MAP_CALL(RespondsTo), SIG_EVERYWHERE, ".i", NULL, NULL }, { MAP_CALL(RestartGame), SIG_EVERYWHERE, "", NULL, NULL }, +#ifdef ENABLE_SCI32 + { "RestoreGame", kRestoreGame32, SIG_THRU_SCI21EARLY, SIGFOR_ALL, "[r0]i[r0]", NULL, NULL }, +#endif { MAP_CALL(RestoreGame), SIG_EVERYWHERE, "[r0]i[r0]", NULL, NULL }, { MAP_CALL(Said), SIG_EVERYWHERE, "[r0]", NULL, NULL }, - { MAP_CALL(SaveGame), SIG_EVERYWHERE, "[r0]i[r0](r0)", NULL, NULL }, +#ifdef ENABLE_SCI32 + { "SaveGame", kSaveGame32, SIG_THRU_SCI21EARLY, SIGFOR_ALL, "[r0]i[r0][r0]", NULL, NULL }, +#endif + { MAP_CALL(SaveGame), SIG_SCI16, SIGFOR_ALL, "[r0]i[r0](r0)", NULL, NULL }, { MAP_CALL(ScriptID), SIG_EVERYWHERE, "[io](i)", NULL, NULL }, { MAP_CALL(SetCursor), SIG_SCI11, SIGFOR_ALL, "i(i)(i)(i)(iiiiii)", NULL, NULL }, { MAP_CALL(SetCursor), SIG_SCI16, SIGFOR_ALL, "i(i)(i)(i)(i)", NULL, kSetCursor_workarounds }, @@ -805,13 +838,13 @@ static SciKernelMapEntry s_kernelMap[] = { #ifdef ENABLE_SCI32 // SCI2 Kernel Functions // TODO: whoever knows his way through those calls, fix the signatures. - { "TextSize", kTextSize32, SIG_UNTIL_SCI21EARLY, SIGFOR_ALL, "r[r0]i(i)", NULL, NULL }, - { MAP_DUMMY(TextColors), SIG_UNTIL_SCI21EARLY, SIGFOR_ALL, "(.*)", NULL, NULL }, - { MAP_DUMMY(TextFonts), SIG_UNTIL_SCI21EARLY, SIGFOR_ALL, "(.*)", NULL, NULL }, + { "TextSize", kTextSize32, SIG_THRU_SCI21EARLY, SIGFOR_ALL, "r[r0]i(i)", NULL, NULL }, + { MAP_DUMMY(TextColors), SIG_THRU_SCI21EARLY, SIGFOR_ALL, "(.*)", NULL, NULL }, + { MAP_DUMMY(TextFonts), SIG_THRU_SCI21EARLY, SIGFOR_ALL, "(.*)", NULL, NULL }, { MAP_CALL(AddPlane), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(AddScreenItem), SIG_EVERYWHERE, "o", NULL, NULL }, - { MAP_CALL(Array), SIG_EVERYWHERE, "(.*)", NULL, NULL }, + { MAP_CALL(Array), SIG_EVERYWHERE, "i(.*)", kArray_subops, NULL }, { MAP_CALL(CreateTextBitmap), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, { MAP_CALL(DeletePlane), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(DeleteScreenItem), SIG_EVERYWHERE, "o", NULL, NULL }, @@ -840,8 +873,8 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(UpdateScreenItem), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(ObjectIntersect), SIG_EVERYWHERE, "oo", NULL, NULL }, { MAP_CALL(EditText), SIG_EVERYWHERE, "o", NULL, NULL }, - { MAP_CALL(MakeSaveCatName), SIG_EVERYWHERE, "rr", NULL, NULL }, - { MAP_CALL(MakeSaveFileName), SIG_EVERYWHERE, "rri", NULL, NULL }, + { MAP_CALL(MakeSaveCatName), SIG_THRU_SCI21EARLY, SIGFOR_ALL, "rr", NULL, NULL }, + { MAP_CALL(MakeSaveFileName), SIG_THRU_SCI21EARLY, SIGFOR_ALL, "rri", NULL, NULL }, { MAP_CALL(SetScroll), SIG_EVERYWHERE, "oiiii(i)(i)", NULL, NULL }, { MAP_CALL(PalCycle), SIG_EVERYWHERE, "(.*)", kPalCycle_subops, NULL }, @@ -879,9 +912,9 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_DUMMY(MarkMemory), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_DUMMY(GetHighItemPri), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_DUMMY(ShowStylePercent), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - { MAP_DUMMY(InvertRect), SIG_UNTIL_SCI21EARLY, SIGFOR_ALL, "(.*)", NULL, NULL }, + { MAP_DUMMY(InvertRect), SIG_THRU_SCI21EARLY, SIGFOR_ALL, "(.*)", NULL, NULL }, { MAP_DUMMY(InputText), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - { MAP_CALL(TextWidth), SIG_UNTIL_SCI21EARLY, SIGFOR_ALL, "ri", NULL, NULL }, + { MAP_CALL(TextWidth), SIG_THRU_SCI21EARLY, SIGFOR_ALL, "ri", NULL, NULL }, { MAP_DUMMY(PointSize), SIG_EVERYWHERE, "(.*)", NULL, NULL }, // SCI2.1 Kernel Functions @@ -917,14 +950,14 @@ static SciKernelMapEntry s_kernelMap[] = { // stub in the original interpreters, but it gets called by the game scripts. // Usually, it gets called with a string (which is the output format) and a // variable number of parameters - { MAP_EMPTY(PrintDebug), SIG_EVERYWHERE, "(.*)", NULL, NULL }, + { MAP_CALL(PrintDebug), SIG_SCI32, SIGFOR_ALL, "r(.*)", NULL, NULL }, // SetWindowsOption is used to set Windows specific options, like for example the title bar visibility of // the game window in Phantasmagoria 2. We ignore these settings completely. - { MAP_EMPTY(SetWindowsOption), SIG_EVERYWHERE, "ii", NULL, NULL }, + { MAP_EMPTY(SetWindowsOption), SIG_EVERYWHERE, "ii", NULL, NULL }, // Debug function called whenever the current room changes - { MAP_EMPTY(NewRoom), SIG_EVERYWHERE, "(.*)", NULL, NULL }, + { MAP_EMPTY(NewRoom), SIG_EVERYWHERE, "(.*)", NULL, NULL }, // Unused / debug SCI2.1 unused functions, always mapped to kDummy @@ -957,6 +990,7 @@ static SciKernelMapEntry s_kernelMap[] = { // SetHotRectangles - used by Phantasmagoria 1, script 64981 (used in the chase scene) // <lskovlun> The idea, if I understand correctly, is that the engine generates events // of a special HotRect type continuously when the mouse is on that rectangle + { MAP_CALL(SetHotRectangles), SIG_SINCE_SCI21MID, SIGFOR_ALL, "i(r)", NULL, NULL }, // Used by SQ6 to scroll through the inventory via the up/down buttons { MAP_CALL(MovePlaneItems), SIG_SINCE_SCI21, SIGFOR_ALL, "oii(i)", NULL, NULL }, diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp index 9250e0fc13..a00630622e 100644 --- a/engines/sci/engine/kevent.cpp +++ b/engines/sci/engine/kevent.cpp @@ -73,7 +73,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { g_debug_simulated_key = 0; return make_reg(0, 1); } - + curEvent = g_sci->getEventManager()->getSciEvent(mask); if (s->_delayedRestoreGame) { @@ -236,7 +236,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { // check bugs #3058865 and #3127824 if (s->_gameIsBenchmarking) { // Game is benchmarking, don't add a delay - } else { + } else if (getSciVersion() < SCI_VERSION_2) { g_system->delayMillis(10); } @@ -369,6 +369,30 @@ reg_t kLocalToGlobal32(EngineState *s, int argc, reg_t *argv) { return make_reg(0, visible); } + +reg_t kSetHotRectangles(EngineState *s, int argc, reg_t *argv) { + if (argc == 1) { + g_sci->getEventManager()->setHotRectanglesActive((bool)argv[0].toUint16()); + return s->r_acc; + } + + const int16 numRects = argv[0].toSint16(); + SciArray &hotRects = *s->_segMan->lookupArray(argv[1]); + + Common::Array<Common::Rect> rects; + rects.resize(numRects); + + for (int16 i = 0; i < numRects; ++i) { + rects[i].left = hotRects.getAsInt16(i * 4); + rects[i].top = hotRects.getAsInt16(i * 4 + 1); + rects[i].right = hotRects.getAsInt16(i * 4 + 2) + 1; + rects[i].bottom = hotRects.getAsInt16(i * 4 + 3) + 1; + } + + g_sci->getEventManager()->setHotRectanglesActive(true); + g_sci->getEventManager()->setHotRectangles(rects); + return s->r_acc; +} #endif } // End of namespace Sci diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index e8b9d0461d..6aad256664 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -51,6 +51,7 @@ extern FileHandle *getFileFromHandle(EngineState *s, uint handle); extern int fgets_wrapper(EngineState *s, char *dest, int maxsize, int handle); extern void listSavegames(Common::Array<SavegameDesc> &saves); extern int findSavegame(Common::Array<SavegameDesc> &saves, int16 savegameId); +extern bool fillSavegameDesc(const Common::String &filename, SavegameDesc *desc); /** * Writes the cwd to the supplied address and returns the address in acc. @@ -158,33 +159,37 @@ reg_t kDeviceInfo(EngineState *s, int argc, reg_t *argv) { } reg_t kCheckFreeSpace(EngineState *s, int argc, reg_t *argv) { - if (argc > 1) { - // SCI1.1/SCI32 - // TODO: don't know if those are right for SCI32 as well - // Please note that sierra sci supported both calls either w/ or w/o opcode in SCI1.1 - switch (argv[1].toUint16()) { - case 0: // return saved game size - return make_reg(0, 0); // we return 0 - - case 1: // return free harddisc space (shifted right somehow) - return make_reg(0, 0x7fff); // we return maximum - - case 2: // same as call w/o opcode - break; - return make_reg(0, 1); - - default: - error("kCheckFreeSpace: called with unknown sub-op %d", argv[1].toUint16()); - } + // A file path to test is also passed to this function as a separate + // argument, but we do not actually check anything, so it is unused + + enum { + kSaveGameSize = 0, + kFreeDiskSpace = 1, + kEnoughSpaceToSave = 2 + }; + + int16 subop; + // In SCI2.1mid, the call is moved into kFileIO and the arguments are + // flipped + if (getSciVersion() >= SCI_VERSION_2_1_MIDDLE) { + subop = argc > 0 ? argv[0].toSint16() : 2; + } else { + subop = argc > 1 ? argv[1].toSint16() : 2; } - Common::String path = s->_segMan->getString(argv[0]); + switch (subop) { + case kSaveGameSize: + return make_reg(0, 0); - debug(3, "kCheckFreeSpace(%s)", path.c_str()); - // We simply always pretend that there is enough space. The alternative - // would be to write a big test file, which is not nice on systems where - // doing so is very slow. - return make_reg(0, 1); + case kFreeDiskSpace: // in KiB; up to 32MiB maximum + return make_reg(0, 0x7fff); + + case kEnoughSpaceToSave: + return make_reg(0, 1); + + default: + error("kCheckFreeSpace: called with unknown sub-op %d", subop); + } } reg_t kValidPath(EngineState *s, int argc, reg_t *argv) { @@ -224,6 +229,45 @@ reg_t kGetSavedCD(EngineState *s, int argc, reg_t *argv) { // ---- FileIO operations ----------------------------------------------------- +#ifdef ENABLE_SCI32 +static bool isSaveCatalogue(const Common::String &name) { + return name == "autosave.cat" || name.hasSuffix("sg.cat"); +} + +// SCI32 save game scripts check for, and write directly to, the save game +// catalogue. Since ScummVM does not use these catalogues, when looking for a +// catalogue, we instead check for save games within ScummVM that are logically +// equivalent to the behaviour of SSCI. +static bool saveCatalogueExists(const Common::String &name) { + bool exists = false; + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + + // There will always be one save game in some games, the "new game" + // game, which should be ignored when deciding if there are any save + // games available + uint numPermanentSaves; + switch (g_sci->getGameId()) { + case GID_TORIN: + case GID_LSL7: + case GID_LIGHTHOUSE: + numPermanentSaves = 1; + break; + default: + numPermanentSaves = 0; + break; + } + + // Torin uses autosave.cat; LSL7 uses autosvsg.cat + if (name == "autosave.cat" || name == "autosvsg.cat") { + exists = !saveFileMan->listSavefiles(g_sci->getSavegameName(0)).empty(); + } else { + exists = saveFileMan->listSavefiles(g_sci->getSavegamePattern()).size() > numPermanentSaves; + } + + return exists; +} +#endif + reg_t kFileIO(EngineState *s, int argc, reg_t *argv) { if (!s) return make_reg(0, getSciVersion()); @@ -233,9 +277,13 @@ reg_t kFileIO(EngineState *s, int argc, reg_t *argv) { reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { Common::String name = s->_segMan->getString(argv[0]); - // SCI32 can call K_FILEIO_OPEN with only one argument. It seems to - // just be checking if it exists. - int mode = (argc < 2) ? (int)_K_FILE_MODE_OPEN_OR_FAIL : argv[1].toUint16(); + if (name.empty()) { + // Happens many times during KQ1 (e.g. when typing something) + debugC(kDebugLevelFile, "Attempted to open a file with an empty filename"); + return SIGNAL_REG; + } + + int mode = argv[1].toUint16(); bool unwrapFilename = true; // SQ4 floppy prepends /\ to the filenames @@ -253,94 +301,158 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { return SIGNAL_REG; } - // Torin's autosave system checks for the presence of autosave.cat - // by opening it. Since we don't use .cat files, we instead check - // for autosave.000 or autosave.001. - // - // The same logic is being followed for torinsg.cat - this shows - // the "Open..." button when continuing a game. - // - // This has the added benefit of not detecting an SSCI autosave.cat - // accompanying SSCI autosave files that we wouldn't be able to load. - if (g_sci->getGameId() == GID_TORIN && (name == "autosave.cat" || name == "torinsg.cat")) { - Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); - const Common::String pattern = (name == "autosave.cat") ? g_sci->wrapFilename("autosave.###") : g_sci->getSavegamePattern(); - bool exists = !saveFileMan->listSavefiles(pattern).empty(); - if (exists) { - // Dummy handle. Torin only checks if this is SIGNAL_REG, - // and calls kFileIOClose on it. - return make_reg(0, VIRTUALFILE_HANDLE_SCI32SAVE); - } else { - return SIGNAL_REG; +#ifdef ENABLE_SCI32 + // GK1, GK2, KQ7, LSL6hires, Phant1, PQ4, PQ:SWAT, and SQ6 read in + // their game version from the VERSION file + if (name.compareToIgnoreCase("version") == 0) { + unwrapFilename = false; + + // LSL6hires version is in a file with an empty extension + if (Common::File::exists(name + ".")) { + name += "."; } } - if (name.empty()) { - // Happens many times during KQ1 (e.g. when typing something) - debugC(kDebugLevelFile, "Attempted to open a file with an empty filename"); - return SIGNAL_REG; - } - debugC(kDebugLevelFile, "kFileIO(open): %s, 0x%x", name.c_str(), mode); + if (g_sci->getGameId() == GID_SHIVERS && name.hasSuffix(".SG")) { + // Shivers stores the name and score of save games in separate %d.SG + // files, which are used by the save/load screen + if (mode == _K_FILE_MODE_OPEN_OR_CREATE || mode == _K_FILE_MODE_CREATE) { + // Suppress creation of the SG file, since it is not necessary + debugC(kDebugLevelFile, "Not creating unused file %s", name.c_str()); + return SIGNAL_REG; + } else if (mode == _K_FILE_MODE_OPEN_OR_FAIL) { + // Create a virtual file containing the save game description + // and slot number, as the game scripts expect. + int saveNo; + sscanf(name.c_str(), "%d.SG", &saveNo); + saveNo += kSaveIdShift; + + SavegameDesc save; + fillSavegameDesc(g_sci->getSavegameName(saveNo), &save); + + Common::String score; + if (!save.highScore) { + score = Common::String::format("%u", save.lowScore); + } else { + score = Common::String::format("%u%03u", save.highScore, save.lowScore); + } - if (name.hasPrefix("sciAudio\\")) { - // fan-made sciAudio extension, don't create those files and instead return a virtual handle - return make_reg(0, VIRTUALFILE_HANDLE_SCIAUDIO); - } + const uint nameLength = strlen(save.name); + const uint size = nameLength + /* \r\n */ 2 + score.size(); + char *buffer = (char *)malloc(size); + memcpy(buffer, save.name, nameLength); + buffer[nameLength] = '\r'; + buffer[nameLength + 1] = '\n'; + memcpy(buffer + nameLength + 2, score.c_str(), score.size()); -#ifdef ENABLE_SCI32 - // Shivers is trying to store savegame descriptions and current spots in - // separate .SG files, which are hardcoded in the scripts. - // Essentially, there is a normal save file, created by the executable - // and an extra hardcoded save file, created by the game scripts, probably - // because they didn't want to modify the save/load code to add the extra - // information. - // Each slot in the book then has two strings, the save description and a - // description of the current spot that the player is at. Currently, the - // spot strings are always empty (probably related to the unimplemented - // kString subop 14, which gets called right before this call). - // For now, we don't allow the creation of these files, which means that - // all the spot descriptions next to each slot description will be empty - // (they are empty anyway). Until a viable solution is found to handle these - // extra files and until the spot description strings are initialized - // correctly, we resort to virtual files in order to make the load screen - // useable. Without this code it is unusable, as the extra information is - // always saved to 0.SG for some reason, but on restore the correct file is - // used. Perhaps the virtual ID is not taken into account when saving. - // - // Future TODO: maintain spot descriptions and show them too, ideally without - // having to return to this logic of extra hardcoded files. - if (g_sci->getGameId() == GID_SHIVERS && name.hasSuffix(".SG")) { + const uint handle = findFreeFileHandle(s); + + s->_fileHandles[handle]._in = new Common::MemoryReadStream((byte *)buffer, size, DisposeAfterUse::YES); + s->_fileHandles[handle]._out = nullptr; + s->_fileHandles[handle]._name = ""; + + return make_reg(0, handle); + } + } else if (g_sci->getGameId() == GID_MOTHERGOOSEHIRES && name.hasSuffix(".DTA")) { + // MGDX stores the name and avatar ID in separate %d.DTA files, which + // are used by the save/load screen if (mode == _K_FILE_MODE_OPEN_OR_CREATE || mode == _K_FILE_MODE_CREATE) { - // Game scripts are trying to create a file with the save - // description, stop them here + // Suppress creation of the DTA file, since it is not necessary debugC(kDebugLevelFile, "Not creating unused file %s", name.c_str()); return SIGNAL_REG; } else if (mode == _K_FILE_MODE_OPEN_OR_FAIL) { // Create a virtual file containing the save game description // and slot number, as the game scripts expect. - int slotNumber; - sscanf(name.c_str(), "%d.SG", &slotNumber); + int saveNo; + sscanf(name.c_str(), "%d.DTA", &saveNo); + saveNo += kSaveIdShift; - Common::Array<SavegameDesc> saves; - listSavegames(saves); - int savegameNr = findSavegame(saves, slotNumber - SAVEGAMEID_OFFICIALRANGE_START); + SavegameDesc save; + fillSavegameDesc(g_sci->getSavegameName(saveNo), &save); - int size = strlen(saves[savegameNr].name) + 2; - char *buf = (char *)malloc(size); - strcpy(buf, saves[savegameNr].name); - buf[size - 1] = 0; // Spot description (empty) + const Common::String avatarId = Common::String::format("%02d", save.avatarId); + const uint nameLength = strlen(save.name); + const uint size = nameLength + /* \r\n */ 2 + avatarId.size() + 1; + char *buffer = (char *)malloc(size); + memcpy(buffer, save.name, nameLength); + buffer[nameLength] = '\r'; + buffer[nameLength + 1] = '\n'; + memcpy(buffer + nameLength + 2, avatarId.c_str(), avatarId.size() + 1); - uint handle = findFreeFileHandle(s); + const uint handle = findFreeFileHandle(s); - s->_fileHandles[handle]._in = new Common::MemoryReadStream((byte *)buf, size, DisposeAfterUse::YES); + s->_fileHandles[handle]._in = new Common::MemoryReadStream((byte *)buffer, size, DisposeAfterUse::YES); s->_fileHandles[handle]._out = nullptr; s->_fileHandles[handle]._name = ""; return make_reg(0, handle); } + } else if (g_sci->getGameId() == GID_KQ7) { + // KQ7 creates a temp.tmp file to perform an atomic rewrite of the + // catalogue, but since we do not create catalogues for most SCI32 + // games, ignore the write + if (name == "temp.tmp") { + return make_reg(0, VIRTUALFILE_HANDLE_SCI32SAVE); + } + + // KQ7 tries to read out game information from catalogues directly + // instead of using the standard kSaveGetFiles function + if (name == "kq7cdsg.cat") { + if (mode == _K_FILE_MODE_OPEN_OR_CREATE || mode == _K_FILE_MODE_CREATE) { + // Suppress creation of the catalogue file, since it is not necessary + debugC(kDebugLevelFile, "Not creating unused file %s", name.c_str()); + return SIGNAL_REG; + } else if (mode == _K_FILE_MODE_OPEN_OR_FAIL) { + Common::Array<SavegameDesc> saves; + listSavegames(saves); + + const uint recordSize = sizeof(int16) + SCI_MAX_SAVENAME_LENGTH; + const uint numSaves = MIN<uint>(saves.size(), 10); + const uint size = numSaves * recordSize + /* terminator */ 2; + byte *const buffer = (byte *)malloc(size); + + byte *out = buffer; + for (uint i = 0; i < numSaves; ++i) { + WRITE_UINT16(out, saves[i].id - kSaveIdShift); + Common::strlcpy((char *)out + sizeof(int16), saves[i].name, SCI_MAX_SAVENAME_LENGTH); + out += recordSize; + } + WRITE_UINT16(out, 0xFFFF); + + const uint handle = findFreeFileHandle(s); + s->_fileHandles[handle]._in = new Common::MemoryReadStream(buffer, size, DisposeAfterUse::YES); + s->_fileHandles[handle]._out = nullptr; + s->_fileHandles[handle]._name = ""; + + return make_reg(0, handle); + } + } + } + + // See kMakeSaveCatName + if (name == "fake.cat") { + return make_reg(0, VIRTUALFILE_HANDLE_SCI32SAVE); + } + + if (isSaveCatalogue(name)) { + const bool exists = saveCatalogueExists(name); + if (exists) { + // Dummy handle is used to represent the catalogue and ignore any + // direct game script writes + return make_reg(0, VIRTUALFILE_HANDLE_SCI32SAVE); + } else { + return SIGNAL_REG; + } } #endif + debugC(kDebugLevelFile, "kFileIO(open): %s, 0x%x", name.c_str(), mode); + + if (name.hasPrefix("sciAudio\\")) { + // fan-made sciAudio extension, don't create those files and instead return a virtual handle + return make_reg(0, VIRTUALFILE_HANDLE_SCIAUDIO); + } + // QFG import rooms get a virtual filelisting instead of an actual one if (g_sci->inQfGImportRoom()) { // We need to find out what the user actually selected, "savedHeroes" is @@ -363,7 +475,7 @@ reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) { if (handle >= VIRTUALFILE_HANDLE_START) { // it's a virtual handle? ignore it - return SIGNAL_REG; + return getSciVersion() >= SCI_VERSION_2 ? TRUE_REG : SIGNAL_REG; } FileHandle *f = getFileFromHandle(s, handle); @@ -371,7 +483,7 @@ reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) { f->close(); if (getSciVersion() <= SCI_VERSION_0_LATE) return s->r_acc; // SCI0 semantics: no value returned - return SIGNAL_REG; + return getSciVersion() >= SCI_VERSION_2 ? TRUE_REG : SIGNAL_REG; } if (getSciVersion() <= SCI_VERSION_0_LATE) @@ -403,18 +515,37 @@ reg_t kFileIOReadRaw(EngineState *s, int argc, reg_t *argv) { reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) { uint16 handle = argv[0].toUint16(); uint16 size = argv[2].toUint16(); + +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE_SCI32SAVE) { + return make_reg(0, size); + } +#endif + char *buf = new char[size]; + uint bytesWritten = 0; bool success = false; s->_segMan->memcpy((byte *)buf, argv[1], size); debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size); FileHandle *f = getFileFromHandle(s, handle); if (f) { - f->_out->write(buf, size); - success = true; + bytesWritten = f->_out->write(buf, size); + success = !f->_out->err(); } delete[] buf; + +#ifdef ENABLE_SCI32 + if (getSciVersion() >= SCI_VERSION_2) { + if (!success) { + return SIGNAL_REG; + } + + return make_reg(0, bytesWritten); + } +#endif + if (success) return NULL_REG; return make_reg(0, 6); // DOS - invalid handle @@ -444,19 +575,35 @@ reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) { int savedir_nr = saves[slotNum].id; name = g_sci->getSavegameName(savedir_nr); result = saveFileMan->removeSavefile(name); +#ifdef ENABLE_SCI32 } else if (getSciVersion() >= SCI_VERSION_2) { + // Special case for KQ7, basically identical to the SQ4 case above, + // where the game hardcodes its save game names + if (name.hasPrefix("kq7cdsg.")) { + int saveNo = atoi(name.c_str() + name.size() - 3); + name = g_sci->getSavegameName(saveNo + kSaveIdShift); + } + // The file name may be already wrapped, so check both cases result = saveFileMan->removeSavefile(name); if (!result) { const Common::String wrappedName = g_sci->wrapFilename(name); result = saveFileMan->removeSavefile(wrappedName); } +#endif } else { const Common::String wrappedName = g_sci->wrapFilename(name); result = saveFileMan->removeSavefile(wrappedName); } debugC(kDebugLevelFile, "kFileIO(unlink): %s", name.c_str()); + +#ifdef ENABLE_SCI32 + if (getSciVersion() >= SCI_VERSION_2) { + return make_reg(0, result); + } +#endif + if (result) return NULL_REG; return make_reg(0, 2); // DOS - file not found error code @@ -567,6 +714,12 @@ reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) { return NULL_REG; } +#ifdef ENABLE_SCI32 + if (isSaveCatalogue(name)) { + return saveCatalogueExists(name) ? TRUE_REG : NULL_REG; + } +#endif + // TODO: It may apparently be worth caching the existence of // phantsg.dir, and possibly even keeping it open persistently @@ -662,7 +815,7 @@ reg_t kFileIOWriteByte(EngineState *s, int argc, reg_t *argv) { FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); if (f) f->_out->writeByte(argv[1].toUint16() & 0xff); - return s->r_acc; // FIXME: does this really not return anything? + return s->r_acc; } reg_t kFileIOReadWord(EngineState *s, int argc, reg_t *argv) { @@ -676,27 +829,13 @@ reg_t kFileIOWriteWord(EngineState *s, int argc, reg_t *argv) { FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); if (f) f->_out->writeUint16LE(argv[1].toUint16()); - return s->r_acc; // FIXME: does this really not return anything? + return s->r_acc; } -reg_t kFileIOCreateSaveSlot(EngineState *s, int argc, reg_t *argv) { - // Used in Shivers when the user enters his name on the guest book - // in the beginning to start the game. - - // Creates a new save slot, and returns if the operation was successful - - // Argument 0 denotes the save slot as a negative integer, 2 means "0" - // Argument 1 is a string, with the file name, obtained from kSave(5). - // The interpreter checks if it can be written to (by checking for free - // disk space and write permissions) - - // We don't really use or need any of this... - - uint16 saveSlot = argv[0].toUint16(); - char* fileName = s->_segMan->lookupString(argv[1])->getRawData(); - warning("kFileIOCreateSaveSlot(%d, '%s')", saveSlot, fileName); - - return TRUE_REG; // slot creation was successful +reg_t kFileIOGetCWD(EngineState *s, int argc, reg_t *argv) { + SciArray &fileName = *s->_segMan->lookupArray(argv[0]); + fileName.fromString("C:\\SIERRA\\"); + return argv[0]; } reg_t kFileIOIsValidDirectory(EngineState *s, int argc, reg_t *argv) { @@ -721,6 +860,13 @@ reg_t kSave(EngineState *s, int argc, reg_t *argv) { #endif reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { + // slot 0 is the ScummVM auto-save slot, which is not used by us, but is + // still reserved + enum { + SAVEGAMESLOT_FIRST = 1, + SAVEGAMESLOT_LAST = 99 + }; + Common::String game_id = !argv[0].isNull() ? s->_segMan->getString(argv[0]) : ""; int16 virtualId = argv[1].toSint16(); int16 savegameId = -1; @@ -736,13 +882,6 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { return NULL_REG; } - // Torin has two sets of saves: autosave.### and torinsg.###, both with - // their own slots and .cat file. - // The autosave system uses autosave.000 and autosave.001. - // It also checks the presence of autosave.cat to determine if it should - // show the chapter selection menu on startup. (See kFileIOOpen.) - bool torinAutosave = g_sci->getGameId() == GID_TORIN && game_id == "Autosave"; - if (argv[0].isNull()) { // Direct call, from a patched Game::save if ((argv[1] != SIGNAL_REG) || (!argv[2].isNull())) @@ -761,14 +900,6 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { g_sci->_soundCmd->pauseAll(false); // unpause music (we can't have it paused during save) if (savegameId < 0) return NULL_REG; - - } else if (torinAutosave) { - if (argv[2].isNull()) - error("kSaveGame: called with description being NULL"); - game_description = s->_segMan->getString(argv[2]); - savegameId = virtualId; - - debug(3, "kSaveGame(%s,%d,%s,%s) [Torin autosave]", game_id.c_str(), virtualId, game_description.c_str(), version.c_str()); } else { // Real call from script if (argv[2].isNull()) @@ -844,10 +975,6 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); Common::OutSaveFile *out; - if (torinAutosave) { - filename = g_sci->wrapFilename(Common::String::format("autosave.%03d", savegameId)); - } - out = saveFileMan->openForSaving(filename); if (!out) { warning("Error opening savegame \"%s\" for writing", filename.c_str()); @@ -876,10 +1003,6 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { debug(3, "kRestoreGame(%s,%d)", game_id.c_str(), savegameId); - - // See comment in kSaveGame - bool torinAutosave = g_sci->getGameId() == GID_TORIN && game_id == "Autosave"; - if (argv[0].isNull()) { // Direct call, either from launcher or from a patched Game::restore if (savegameId == -1) { @@ -895,7 +1018,7 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { pausedMusic = true; } // don't adjust ID of the saved game, it's already correct - } else if (!torinAutosave) { + } else { if (g_sci->getGameId() == GID_JONES) { // Jones has one save slot only savegameId = 0; @@ -912,9 +1035,8 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { s->r_acc = NULL_REG; // signals success Common::Array<SavegameDesc> saves; - if (!torinAutosave) - listSavegames(saves); - if (!torinAutosave && findSavegame(saves, savegameId) == -1) { + listSavegames(saves); + if (findSavegame(saves, savegameId) == -1) { s->r_acc = TRUE_REG; warning("Savegame ID %d not found", savegameId); } else { @@ -922,10 +1044,6 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { Common::String filename = g_sci->getSavegameName(savegameId); Common::SeekableReadStream *in; - if (torinAutosave) { - filename = g_sci->wrapFilename(Common::String::format("autosave.%03d", savegameId)); - } - in = saveFileMan->openForLoading(filename); if (in) { // found a savegame file @@ -998,10 +1116,6 @@ reg_t kCheckSaveGame(EngineState *s, int argc, reg_t *argv) { } reg_t kGetSaveFiles(EngineState *s, int argc, reg_t *argv) { - Common::String game_id = s->_segMan->getString(argv[0]); - - debug(3, "kGetSaveFiles(%s)", game_id.c_str()); - // Scripts ask for current save files, we can assume that if afterwards they ask us to create a new slot they really // mean new slot instead of overwriting the old one s->_lastSaveVirtualId = SAVEGAMEID_OFFICIALRANGE_START; @@ -1010,6 +1124,10 @@ reg_t kGetSaveFiles(EngineState *s, int argc, reg_t *argv) { listSavegames(saves); uint totalSaves = MIN<uint>(saves.size(), MAX_SAVEGAME_NR); + Common::String game_id = s->_segMan->getString(argv[0]); + + debug(3, "kGetSaveFiles(%s)", game_id.c_str()); + reg_t *slot = s->_segMan->derefRegPtr(argv[2], totalSaves); if (!slot) { @@ -1037,46 +1155,205 @@ reg_t kGetSaveFiles(EngineState *s, int argc, reg_t *argv) { #ifdef ENABLE_SCI32 -reg_t kMakeSaveCatName(EngineState *s, int argc, reg_t *argv) { - // Normally, this creates the name of the save catalogue/directory to save into. - // First parameter is the string to save the result into. Second is a string - // with game parameters. We don't have a use for this at all, as we have our own - // savegame directory management, thus we always return an empty string. - return argv[0]; +reg_t kSaveGame32(EngineState *s, int argc, reg_t *argv) { + const bool isScummVMSave = argv[0].isNull(); + Common::String gameName = ""; + int16 saveNo; + Common::String saveDescription; + Common::String gameVersion = (argc <= 3 || argv[3].isNull()) ? "" : s->_segMan->getString(argv[3]); + + if (isScummVMSave) { + // ScummVM call, from a patched Game::save + g_sci->_soundCmd->pauseAll(true); + GUI::SaveLoadChooser dialog(_("Save game:"), _("Save"), true); + saveNo = dialog.runModalWithCurrentTarget(); + g_sci->_soundCmd->pauseAll(false); + + if (saveNo < 0) { + // User cancelled save + return NULL_REG; + } + + saveDescription = dialog.getResultString(); + if (saveDescription.empty()) { + saveDescription = dialog.createDefaultSaveDescription(saveNo); + } + } else { + // Native script call + gameName = s->_segMan->getString(argv[0]); + saveNo = argv[1].toSint16(); + saveDescription = argv[2].isNull() ? "" : s->_segMan->getString(argv[2]); + } + + debugC(kDebugLevelFile, "Game name %s save %d desc %s ver %s", gameName.c_str(), saveNo, saveDescription.c_str(), gameVersion.c_str()); + + // Auto-save system used by Torin and LSL7 + if (gameName == "Autosave" || gameName == "Autosv") { + if (saveNo == 0) { + // Autosave slot 0 is the autosave + } else { + // Autosave slot 1 is a "new game" save + saveNo = kNewGameId; + } + } else if (!isScummVMSave) { + // ScummVM save screen will give a pre-corrected save number, but native + // save-load will not + saveNo += kSaveIdShift; + } + + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + const Common::String filename = g_sci->getSavegameName(saveNo); + Common::OutSaveFile *saveStream = saveFileMan->openForSaving(filename); + + if (saveStream == nullptr) { + warning("Error opening savegame \"%s\" for writing", filename.c_str()); + return NULL_REG; + } + + if (!gamestate_save(s, saveStream, saveDescription, gameVersion)) { + warning("Saving the game failed"); + saveStream->finalize(); + delete saveStream; + return NULL_REG; + } + + saveStream->finalize(); + if (saveStream->err()) { + warning("Writing the savegame failed"); + delete saveStream; + return NULL_REG; + } + + delete saveStream; + return TRUE_REG; } -reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv) { - // Creates a savegame name from a slot number. Used when deleting saved games. - // Param 0: the output buffer (same as in kMakeSaveCatName) - // Param 1: a string with game parameters, ignored - // Param 2: the selected slot +reg_t kRestoreGame32(EngineState *s, int argc, reg_t *argv) { + const bool isScummVMRestore = argv[0].isNull(); + Common::String gameName = ""; + int16 saveNo = argv[1].toSint16(); + const Common::String gameVersion = argv[2].isNull() ? "" : s->_segMan->getString(argv[2]); + + if (isScummVMRestore && saveNo == -1) { + // ScummVM call, either from lancher or a patched Game::restore + g_sci->_soundCmd->pauseAll(true); + GUI::SaveLoadChooser dialog(_("Restore game:"), _("Restore"), false); + saveNo = dialog.runModalWithCurrentTarget(); + g_sci->_soundCmd->pauseAll(false); + + if (saveNo < 0) { + // User cancelled restore + return s->r_acc; + } + } else { + gameName = s->_segMan->getString(argv[0]); + } - SciString *resultString = s->_segMan->lookupString(argv[0]); - uint16 virtualId = argv[2].toUint16(); - if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END)) - error("kMakeSaveFileName: invalid savegame ID specified"); - uint saveSlot = virtualId - SAVEGAMEID_OFFICIALRANGE_START; + if (gameName == "Autosave" || gameName == "Autosv") { + if (saveNo == 0) { + // Autosave slot 0 is the autosave + } else { + // Autosave slot 1 is a "new game" save + saveNo = kNewGameId; + } + } else if (!isScummVMRestore) { + // ScummVM save screen will give a pre-corrected save number, but native + // save-load will not + saveNo += kSaveIdShift; + } + + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + const Common::String filename = g_sci->getSavegameName(saveNo); + Common::SeekableReadStream *saveStream = saveFileMan->openForLoading(filename); + + if (saveStream == nullptr) { + warning("Savegame #%d not found", saveNo); + return NULL_REG; + } + + gamestate_restore(s, saveStream); + delete saveStream; + + gamestate_afterRestoreFixUp(s, saveNo); + return TRUE_REG; +} + +reg_t kCheckSaveGame32(EngineState *s, int argc, reg_t *argv) { + const Common::String gameName = s->_segMan->getString(argv[0]); + int16 saveNo = argv[1].toSint16(); + const Common::String gameVersion = argv[2].isNull() ? "" : s->_segMan->getString(argv[2]); Common::Array<SavegameDesc> saves; listSavegames(saves); - Common::String filename = g_sci->getSavegameName(saveSlot); - resultString->fromString(filename); + if (gameName == "Autosave" || gameName == "Autosv") { + if (saveNo == 1) { + saveNo = kNewGameId; + } + } else { + saveNo += kSaveIdShift; + } - return argv[0]; -} + SavegameDesc save; + if (!fillSavegameDesc(g_sci->getSavegameName(saveNo), &save)) { + return NULL_REG; + } + + if (save.version < MINIMUM_SAVEGAME_VERSION || + save.version > CURRENT_SAVEGAME_VERSION || + save.gameVersion != gameVersion) { -reg_t kAutoSave(EngineState *s, int argc, reg_t *argv) { - // TODO - // This is a timer callback, with 1 parameter: the timer object - // (e.g. "timers"). - // It's used for auto-saving (i.e. save every X minutes, by checking - // the elapsed time from the timer object) + return NULL_REG; + } - // This function has to return something other than 0 to proceed return TRUE_REG; } +reg_t kGetSaveFiles32(EngineState *s, int argc, reg_t *argv) { + // argv[0] is gameName, used in SSCI as the name of the save game catalogue + // but unused here since ScummVM does not support multiple catalogues + SciArray &descriptions = *s->_segMan->lookupArray(argv[1]); + SciArray &saveIds = *s->_segMan->lookupArray(argv[2]); + + Common::Array<SavegameDesc> saves; + listSavegames(saves); + + // Normally SSCI limits to 20 games per directory, but ScummVM allows more + // than that with games that use the standard save-load dialogue + descriptions.resize(SCI_MAX_SAVENAME_LENGTH * saves.size() + 1, true); + saveIds.resize(saves.size() + 1, true); + + for (uint i = 0; i < saves.size(); ++i) { + const SavegameDesc &save = saves[i]; + char *target = &descriptions.charAt(SCI_MAX_SAVENAME_LENGTH * i); + Common::strlcpy(target, save.name, SCI_MAX_SAVENAME_LENGTH); + saveIds.setFromInt16(i, save.id - kSaveIdShift); + } + + descriptions.charAt(SCI_MAX_SAVENAME_LENGTH * saves.size()) = '\0'; + saveIds.setFromInt16(saves.size(), 0); + + return make_reg(0, saves.size()); +} + +reg_t kMakeSaveCatName(EngineState *s, int argc, reg_t *argv) { + // ScummVM does not use SCI catalogues for save games, but game scripts try + // to write out catalogues manually after a save game is deleted, so we need + // to be able to identify and ignore these IO operations by always giving + // back a fixed catalogue name and then ignoring it in kFileIO + SciArray &outCatName = *s->_segMan->lookupArray(argv[0]); + outCatName.fromString("fake.cat"); + return argv[0]; +} + +reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv) { + SciArray &outFileName = *s->_segMan->lookupArray(argv[0]); + // argv[1] is the game name, which is not used by ScummVM + const int16 saveNo = argv[2].toSint16(); + outFileName.fromString(g_sci->getSavegameName(saveNo + kSaveIdShift)); + return argv[0]; +} + #endif } // End of namespace Sci diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index d375a27954..c605ba29e1 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -356,7 +356,7 @@ reg_t kTextSize(EngineState *s, int argc, reg_t *argv) { } textWidth = dest[3].toUint16(); textHeight = dest[2].toUint16(); - + uint16 languageSplitter = 0; Common::String splitText = g_sci->strSplitLanguage(text.c_str(), &languageSplitter, sep); @@ -832,7 +832,7 @@ void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) { uint16 languageSplitter = 0; Common::String splitText; - + switch (type) { case SCI_CONTROLS_TYPE_BUTTON: case SCI_CONTROLS_TYPE_TEXTEDIT: @@ -1191,7 +1191,7 @@ reg_t kDisplay(EngineState *s, int argc, reg_t *argv) { argc--; argc--; argv++; argv++; text = g_sci->getKernel()->lookupText(textp, index); } - + uint16 languageSplitter = 0; Common::String splitText = g_sci->strSplitLanguage(text.c_str(), &languageSplitter); diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index a33fcf3167..e5b8da4620 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -75,17 +75,14 @@ reg_t kBaseSetter32(EngineState *s, int argc, reg_t *argv) { CelObjView celObj(viewId, loopNo, celNo); const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; - const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; - - const Ratio scaleX(scriptWidth, celObj._scaledWidth); - const Ratio scaleY(scriptHeight, celObj._scaledHeight); + const Ratio scaleX(scriptWidth, celObj._xResolution); int16 brLeft; if (celObj._mirrorX) { - brLeft = x - ((celObj._width - celObj._displace.x) * scaleX).toInt(); + brLeft = x - ((celObj._width - celObj._origin.x) * scaleX).toInt(); } else { - brLeft = x - (celObj._displace.x * scaleX).toInt(); + brLeft = x - (celObj._origin.x * scaleX).toInt(); } const int16 brRight = brLeft + (celObj._width * scaleX).toInt() - 1; @@ -317,7 +314,7 @@ reg_t kText(EngineState *s, int argc, reg_t *argv) { reg_t kTextSize32(EngineState *s, int argc, reg_t *argv) { g_sci->_gfxText32->setFont(argv[2].toUint16()); - reg_t *rect = s->_segMan->derefRegPtr(argv[0], 4); + SciArray *rect = s->_segMan->lookupArray(argv[0]); if (rect == nullptr) { error("kTextSize: %04x:%04x cannot be dereferenced", PRINT_REG(argv[0])); } @@ -327,10 +324,14 @@ reg_t kTextSize32(EngineState *s, int argc, reg_t *argv) { bool doScaling = argc > 4 ? argv[4].toSint16() : true; Common::Rect textRect = g_sci->_gfxText32->getTextSize(text, maxWidth, doScaling); - rect[0] = make_reg(0, textRect.left); - rect[1] = make_reg(0, textRect.top); - rect[2] = make_reg(0, textRect.right - 1); - rect[3] = make_reg(0, textRect.bottom - 1); + + reg_t value[4] = { + make_reg(0, textRect.left), + make_reg(0, textRect.top), + make_reg(0, textRect.right - 1), + make_reg(0, textRect.bottom - 1) }; + + rect->setElements(0, 4, value); return s->r_acc; } @@ -426,7 +427,7 @@ reg_t kCelHigh32(EngineState *s, int argc, reg_t *argv) { int16 loopNo = argv[1].toSint16(); int16 celNo = argv[2].toSint16(); CelObjView celObj(resourceId, loopNo, celNo); - return make_reg(0, mulru(celObj._height, Ratio(g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight, celObj._scaledHeight))); + return make_reg(0, mulru(celObj._height, Ratio(g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight, celObj._yResolution))); } reg_t kCelWide32(EngineState *s, int argc, reg_t *argv) { @@ -434,7 +435,7 @@ reg_t kCelWide32(EngineState *s, int argc, reg_t *argv) { int16 loopNo = argv[1].toSint16(); int16 celNo = argv[2].toSint16(); CelObjView celObj(resourceId, loopNo, celNo); - return make_reg(0, mulru(celObj._width, Ratio(g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth, celObj._scaledWidth))); + return make_reg(0, mulru(celObj._width, Ratio(g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth, celObj._xResolution))); } reg_t kCelInfo(EngineState *s, int argc, reg_t *argv) { @@ -447,10 +448,10 @@ reg_t kCelInfo(EngineState *s, int argc, reg_t *argv) { switch (argv[0].toUint16()) { case 0: - result = view._displace.x; + result = view._origin.x; break; case 1: - result = view._displace.y; + result = view._origin.y; break; case 2: case 3: @@ -615,13 +616,13 @@ reg_t kSetFontHeight(EngineState *s, int argc, reg_t *argv) { // of setting the fontHeight on the font manager, in // which case we could just get the font directly ourselves. g_sci->_gfxText32->setFont(argv[0].toUint16()); - g_sci->_gfxText32->_scaledHeight = (g_sci->_gfxText32->_font->getHeight() * g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight + g_sci->_gfxText32->_scaledHeight - 1) / g_sci->_gfxText32->_scaledHeight; - return make_reg(0, g_sci->_gfxText32->_scaledHeight); + g_sci->_gfxText32->_yResolution = (g_sci->_gfxText32->_font->getHeight() * g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight + g_sci->_gfxText32->_yResolution - 1) / g_sci->_gfxText32->_yResolution; + return make_reg(0, g_sci->_gfxText32->_yResolution); } reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv) { - g_sci->_gfxText32->_scaledWidth = argv[0].toUint16(); - g_sci->_gfxText32->_scaledHeight = argv[1].toUint16(); + g_sci->_gfxText32->_xResolution = argv[0].toUint16(); + g_sci->_gfxText32->_yResolution = argv[1].toUint16(); return s->r_acc; } @@ -636,12 +637,12 @@ reg_t kBitmapCreate(EngineState *s, int argc, reg_t *argv) { int16 height = argv[1].toSint16(); int16 skipColor = argv[2].toSint16(); int16 backColor = argv[3].toSint16(); - int16 scaledWidth = argc > 4 ? argv[4].toSint16() : g_sci->_gfxText32->_scaledWidth; - int16 scaledHeight = argc > 5 ? argv[5].toSint16() : g_sci->_gfxText32->_scaledHeight; + int16 xResolution = argc > 4 ? argv[4].toSint16() : g_sci->_gfxText32->_xResolution; + int16 yResolution = argc > 5 ? argv[5].toSint16() : g_sci->_gfxText32->_yResolution; bool useRemap = argc > 6 ? argv[6].toSint16() : false; reg_t bitmapId; - SciBitmap &bitmap = *s->_segMan->allocateBitmap(&bitmapId, width, height, skipColor, 0, 0, scaledWidth, scaledHeight, 0, useRemap, true); + SciBitmap &bitmap = *s->_segMan->allocateBitmap(&bitmapId, width, height, skipColor, 0, 0, xResolution, yResolution, 0, useRemap, true); memset(bitmap.getPixels(), backColor, width * height); return bitmapId; } @@ -675,12 +676,12 @@ reg_t kBitmapDrawView(EngineState *s, int argc, reg_t *argv) { const int16 alignY = argc > 8 ? argv[8].toSint16() : -1; Common::Point position( - x == -1 ? bitmap.getDisplace().x : x, - y == -1 ? bitmap.getDisplace().y : y + x == -1 ? bitmap.getOrigin().x : x, + y == -1 ? bitmap.getOrigin().y : y ); - position.x -= alignX == -1 ? view._displace.x : alignX; - position.y -= alignY == -1 ? view._displace.y : alignY; + position.x -= alignX == -1 ? view._origin.x : alignX; + position.y -= alignY == -1 ? view._origin.y : alignY; Common::Rect drawRect( position.x, @@ -755,16 +756,37 @@ reg_t kBitmapInvert(EngineState *s, int argc, reg_t *argv) { return kStubNull(s, argc + 1, argv - 1); } -reg_t kBitmapSetDisplace(EngineState *s, int argc, reg_t *argv) { +reg_t kBitmapSetOrigin(EngineState *s, int argc, reg_t *argv) { SciBitmap &bitmap = *s->_segMan->lookupBitmap(argv[0]); - bitmap.setDisplace(Common::Point(argv[1].toSint16(), argv[2].toSint16())); + bitmap.setOrigin(Common::Point(argv[1].toSint16(), argv[2].toSint16())); return s->r_acc; } reg_t kBitmapCreateFromView(EngineState *s, int argc, reg_t *argv) { - // viewId, loopNo, celNo, skipColor, backColor, useRemap, source overlay bitmap + CelObjView view(argv[0].toUint16(), argv[1].toSint16(), argv[2].toSint16()); + const uint8 skipColor = argc > 3 && argv[3].toSint16() != -1 ? argv[3].toSint16() : view._skipColor; + const uint8 backColor = argc > 4 && argv[4].toSint16() != -1 ? argv[4].toSint16() : view._skipColor; + const bool useRemap = argc > 5 ? (bool)argv[5].toSint16() : false; - return kStub(s, argc + 1, argv - 1); + reg_t bitmapId; + SciBitmap &bitmap = *s->_segMan->allocateBitmap(&bitmapId, view._width, view._height, skipColor, 0, 0, view._xResolution, view._yResolution, 0, useRemap, true); + Buffer &buffer = bitmap.getBuffer(); + + const Common::Rect viewRect(view._width, view._height); + buffer.fillRect(viewRect, backColor); + view.draw(buffer, viewRect, Common::Point(0, 0), view._mirrorX); + + if (argc > 6 && !argv[6].isNull()) { + reg_t clutHandle = argv[6]; + if (s->_segMan->isObject(clutHandle)) { + clutHandle = readSelector(s->_segMan, clutHandle, SELECTOR(data)); + } + + SciArray &clut = *s->_segMan->lookupArray(clutHandle); + bitmap.applyRemap(clut); + } + + return bitmapId; } reg_t kBitmapCopyPixels(EngineState *s, int argc, reg_t *argv) { @@ -780,12 +802,24 @@ reg_t kBitmapClone(EngineState *s, int argc, reg_t *argv) { } reg_t kBitmapGetInfo(EngineState *s, int argc, reg_t *argv) { - // bitmap + SciBitmap &bitmap = *s->_segMan->lookupBitmap(argv[0]); - // argc 1 = get width - // argc 2 = pixel at row 0 col n - // argc 3 = pixel at row n col n - return kStub(s, argc + 1, argv - 1); + if (argc == 1) { + return make_reg(0, bitmap.getWidth()); + } + + int32 offset; + if (argc == 2) { + offset = argv[1].toUint16(); + } else { + const int16 x = argv[1].toSint16(); + const int16 y = argv[2].toSint16(); + offset = y * bitmap.getWidth() + x; + } + + assert(offset >= 0 && offset < bitmap.getWidth() * bitmap.getHeight()); + const uint8 color = bitmap.getPixels()[offset]; + return make_reg(0, color); } reg_t kBitmapScale(EngineState *s, int argc, reg_t *argv) { @@ -924,17 +958,17 @@ reg_t kPaletteSetGamma(EngineState *s, int argc, reg_t *argv) { } reg_t kPaletteSetFade(EngineState *s, int argc, reg_t *argv) { - uint16 fromColor = argv[0].toUint16(); - uint16 toColor = argv[1].toUint16(); - uint16 percent = argv[2].toUint16(); + const uint16 fromColor = argv[0].toUint16(); + const uint16 toColor = argv[1].toUint16(); + const uint16 percent = argv[2].toUint16(); g_sci->_gfxPalette32->setFade(percent, fromColor, toColor); return s->r_acc; } reg_t kPalVarySetVary(EngineState *s, int argc, reg_t *argv) { - GuiResourceId paletteId = argv[0].toUint16(); - int time = argc > 1 ? argv[1].toSint16() * 60 : 0; - int16 percent = argc > 2 ? argv[2].toSint16() : 100; + const GuiResourceId paletteId = argv[0].toUint16(); + const int32 time = argc > 1 ? argv[1].toSint16() * 60 : 0; + const int16 percent = argc > 2 ? argv[2].toSint16() : 100; int16 fromColor; int16 toColor; @@ -950,9 +984,9 @@ reg_t kPalVarySetVary(EngineState *s, int argc, reg_t *argv) { } reg_t kPalVarySetPercent(EngineState *s, int argc, reg_t *argv) { - int time = argc > 0 ? argv[0].toSint16() * 60 : 0; - int16 percent = argc > 1 ? argv[1].toSint16() : 0; - g_sci->_gfxPalette32->setVaryPercent(percent, time, -1, -1); + const int32 time = argc > 0 ? argv[0].toSint16() * 60 : 0; + const int16 percent = argc > 1 ? argv[1].toSint16() : 0; + g_sci->_gfxPalette32->setVaryPercent(percent, time); return s->r_acc; } @@ -966,31 +1000,31 @@ reg_t kPalVaryOff(EngineState *s, int argc, reg_t *argv) { } reg_t kPalVaryMergeTarget(EngineState *s, int argc, reg_t *argv) { - GuiResourceId paletteId = argv[0].toUint16(); + const GuiResourceId paletteId = argv[0].toUint16(); g_sci->_gfxPalette32->kernelPalVaryMergeTarget(paletteId); return make_reg(0, g_sci->_gfxPalette32->getVaryPercent()); } reg_t kPalVarySetTime(EngineState *s, int argc, reg_t *argv) { - int time = argv[0].toSint16() * 60; + const int32 time = argv[0].toSint16() * 60; g_sci->_gfxPalette32->setVaryTime(time); return s->r_acc; } reg_t kPalVarySetTarget(EngineState *s, int argc, reg_t *argv) { - GuiResourceId paletteId = argv[0].toUint16(); + const GuiResourceId paletteId = argv[0].toUint16(); g_sci->_gfxPalette32->kernelPalVarySetTarget(paletteId); return make_reg(0, g_sci->_gfxPalette32->getVaryPercent()); } reg_t kPalVarySetStart(EngineState *s, int argc, reg_t *argv) { - GuiResourceId paletteId = argv[0].toUint16(); + const GuiResourceId paletteId = argv[0].toUint16(); g_sci->_gfxPalette32->kernelPalVarySetStart(paletteId); return make_reg(0, g_sci->_gfxPalette32->getVaryPercent()); } reg_t kPalVaryMergeStart(EngineState *s, int argc, reg_t *argv) { - GuiResourceId paletteId = argv[0].toUint16(); + const GuiResourceId paletteId = argv[0].toUint16(); g_sci->_gfxPalette32->kernelPalVaryMergeStart(paletteId); return make_reg(0, g_sci->_gfxPalette32->getVaryPercent()); } @@ -1006,7 +1040,6 @@ reg_t kPalCycleSetCycle(EngineState *s, int argc, reg_t *argv) { const uint16 toColor = argv[1].toUint16(); const int16 direction = argv[2].toSint16(); const uint16 delay = argc > 3 ? argv[3].toUint16() : 0; - g_sci->_gfxPalette32->setCycle(fromColor, toColor, direction, delay); return s->r_acc; } @@ -1014,7 +1047,6 @@ reg_t kPalCycleSetCycle(EngineState *s, int argc, reg_t *argv) { reg_t kPalCycleDoCycle(EngineState *s, int argc, reg_t *argv) { const uint16 fromColor = argv[0].toUint16(); const int16 speed = argc > 1 ? argv[1].toSint16() : 1; - g_sci->_gfxPalette32->doCycle(fromColor, speed); return s->r_acc; } diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index e780d3cdc3..5cd9c3623d 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -554,7 +554,7 @@ reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv) { ++list->numRecursions; - if (list->numRecursions > ARRAYSIZE(list->nextNodes)) { + if (list->numRecursions >= ARRAYSIZE(list->nextNodes)) { error("Too much recursion in kListEachElementDo"); } @@ -683,197 +683,105 @@ reg_t kMoveToEnd(EngineState *s, int argc, reg_t *argv) { } reg_t kArray(EngineState *s, int argc, reg_t *argv) { - uint16 op = argv[0].toUint16(); - - // Use kString when accessing strings - // This is possible, as strings inherit from arrays - // and in this case (type 3) arrays are of type char *. - // kString is almost exactly the same as kArray, so - // this call is possible - // TODO: we need to either merge SCI2 strings and - // arrays together, and in the future merge them with - // the SCI1 strings and arrays in the segment manager - bool callStringFunc = false; - if (op == 0) { - // New, check if the target type is 3 (string) - if (argv[2].toUint16() == 3) - callStringFunc = true; - } else { - if (s->_segMan->getSegmentType(argv[1].getSegment()) == SEG_TYPE_STRING || - s->_segMan->getSegmentType(argv[1].getSegment()) == SEG_TYPE_SCRIPT) { - callStringFunc = true; - } - -#if 0 - if (op == 6) { - if (s->_segMan->getSegmentType(argv[3].getSegment()) == SEG_TYPE_STRING || - s->_segMan->getSegmentType(argv[3].getSegment()) == SEG_TYPE_SCRIPT) { - callStringFunc = true; - } - } -#endif - } + if (!s) + return make_reg(0, getSciVersion()); + error("not supposed to call this"); +} - if (callStringFunc) { - Kernel *kernel = g_sci->getKernel(); - uint16 kernelStringFuncId = kernel->_kernelFunc_StringId; - if (kernelStringFuncId) { - const KernelFunction *kernelStringFunc = &kernel->_kernelFuncs[kernelStringFuncId]; - - if (op < kernelStringFunc->subFunctionCount) { - // subfunction-id is valid - const KernelSubFunction *kernelStringSubCall = &kernelStringFunc->subFunctions[op]; - argc--; - argv++; // remove subfunction-id from arguments - // and call the kString subfunction - return kernelStringSubCall->function(s, argc, argv); - } - } - } +reg_t kArrayNew(EngineState *s, int argc, reg_t *argv) { + uint16 size = argv[0].toUint16(); + const SciArrayType type = (SciArrayType)argv[1].toUint16(); - switch (op) { - case 0: { // New - reg_t arrayHandle; - SciArray<reg_t> *array = s->_segMan->allocateArray(&arrayHandle); - array->setType(argv[2].toUint16()); - array->setSize(argv[1].toUint16()); - return arrayHandle; - } - case 1: { // Size - SciArray<reg_t> *array = s->_segMan->lookupArray(argv[1]); - return make_reg(0, array->getSize()); + if (type == kArrayTypeString) { + ++size; } - case 2: { // At (return value at an index) - SciArray<reg_t> *array = s->_segMan->lookupArray(argv[1]); - if (g_sci->getGameId() == GID_PHANTASMAGORIA2) { - // HACK: Phantasmagoria 2 keeps trying to access past the end of an - // array when it starts. I'm assuming it's trying to see where the - // array ends, or tries to resize it. Adjust the array size - // accordingly, and return NULL for now. - if (array->getSize() == argv[2].toUint16()) { - array->setSize(argv[2].toUint16()); - return NULL_REG; - } - } - return array->getValue(argv[2].toUint16()); - } - case 3: { // Atput (put value at an index) - SciArray<reg_t> *array = s->_segMan->lookupArray(argv[1]); - - uint32 index = argv[2].toUint16(); - uint32 count = argc - 3; - if (index + count > 65535) - break; + reg_t arrayHandle; + s->_segMan->allocateArray(type, size, &arrayHandle); + return arrayHandle; +} - if (array->getSize() < index + count) - array->setSize(index + count); +reg_t kArrayGetSize(EngineState *s, int argc, reg_t *argv) { + const SciArray &array = *s->_segMan->lookupArray(argv[0]); + return make_reg(0, array.size()); +} - for (uint16 i = 0; i < count; i++) - array->setValue(i + index, argv[i + 3]); +reg_t kArrayGetElement(EngineState *s, int argc, reg_t *argv) { + SciArray &array = *s->_segMan->lookupArray(argv[0]); + return array.getAsID(argv[1].toUint16()); +} - return argv[1]; // We also have to return the handle - } - case 4: // Free - // Freeing of arrays is handled by the garbage collector - return s->r_acc; - case 5: { // Fill - SciArray<reg_t> *array = s->_segMan->lookupArray(argv[1]); - uint16 index = argv[2].toUint16(); +reg_t kArraySetElements(EngineState *s, int argc, reg_t *argv) { + SciArray &array = *s->_segMan->lookupArray(argv[0]); + array.setElements(argv[1].toUint16(), argc - 2, argv + 2); + return argv[0]; +} - // A count of -1 means fill the rest of the array - uint16 count = argv[3].toSint16() == -1 ? array->getSize() - index : argv[3].toUint16(); - uint16 arraySize = array->getSize(); +reg_t kArrayFree(EngineState *s, int argc, reg_t *argv) { + s->_segMan->freeArray(argv[0]); + return s->r_acc; +} - if (arraySize < index + count) - array->setSize(index + count); +reg_t kArrayFill(EngineState *s, int argc, reg_t *argv) { + SciArray &array = *s->_segMan->lookupArray(argv[0]); + array.fill(argv[1].toUint16(), argv[2].toUint16(), argv[3]); + return argv[0]; +} - for (uint16 i = 0; i < count; i++) - array->setValue(i + index, argv[4]); +reg_t kArrayCopy(EngineState *s, int argc, reg_t *argv) { + SciArray &target = *s->_segMan->lookupArray(argv[0]); + const uint16 targetIndex = argv[1].toUint16(); - return argv[1]; + SciArray source; + // String copies may be made from static script data + if (!s->_segMan->isArray(argv[2])) { + source.setType(kArrayTypeString); + source.fromString(s->_segMan->getString(argv[2])); + } else { + source = *s->_segMan->lookupArray(argv[2]); } - case 6: { // Cpy - if (argv[1].isNull() || argv[3].isNull()) { - if (getSciVersion() == SCI_VERSION_3) { - // FIXME: Happens in SCI3, probably because of a missing kernel function. - warning("kArray(Cpy): Request to copy from or to a null pointer"); - return NULL_REG; - } else { - // SCI2-2.1: error out - error("kArray(Cpy): Request to copy from or to a null pointer"); - } - } + const uint16 sourceIndex = argv[3].toUint16(); + const uint16 count = argv[4].toUint16(); - reg_t arrayHandle = argv[1]; - SciArray<reg_t> *array1 = s->_segMan->lookupArray(argv[1]); - SciArray<reg_t> *array2 = s->_segMan->lookupArray(argv[3]); - uint32 index1 = argv[2].toUint16(); - uint32 index2 = argv[4].toUint16(); - - // The original engine ignores bad copies too - if (index2 > array2->getSize()) - break; - - // A count of -1 means fill the rest of the array - uint32 count = argv[5].toSint16() == -1 ? array2->getSize() - index2 : argv[5].toUint16(); - - if (array1->getSize() < index1 + count) - array1->setSize(index1 + count); + target.copy(source, sourceIndex, targetIndex, count); + return argv[0]; +} - for (uint16 i = 0; i < count; i++) - array1->setValue(i + index1, array2->getValue(i + index2)); +reg_t kArrayDuplicate(EngineState *s, int argc, reg_t *argv) { + reg_t targetHandle; - return arrayHandle; + // String duplicates may be made from static script data + if (!s->_segMan->isArray(argv[0])) { + const Common::String source = s->_segMan->getString(argv[0]); + SciArray &target = *s->_segMan->allocateArray(kArrayTypeString, source.size(), &targetHandle); + target.fromString(source); + } else { + SciArray &source = *s->_segMan->lookupArray(argv[0]); + SciArray &target = *s->_segMan->allocateArray(source.getType(), source.size(), &targetHandle); + target = source; } - case 7: // Cmp - // Not implemented in SSCI - warning("kArray(Cmp) called"); - return s->r_acc; - case 8: { // Dup - if (argv[1].isNull()) { - warning("kArray(Dup): Request to duplicate a null pointer"); -#if 0 - // Allocate an array anyway - reg_t arrayHandle; - SciArray<reg_t> *dupArray = s->_segMan->allocateArray(&arrayHandle); - dupArray->setType(3); - dupArray->setSize(0); - return arrayHandle; -#endif - return NULL_REG; - } - SegmentObj *sobj = s->_segMan->getSegmentObj(argv[1].getSegment()); - if (!sobj || sobj->getType() != SEG_TYPE_ARRAY) - error("kArray(Dup): Request to duplicate a segment which isn't an array"); - - reg_t arrayHandle; - SciArray<reg_t> *dupArray = s->_segMan->allocateArray(&arrayHandle); - // This must occur after allocateArray, as inserting a new object - // in the heap object list might invalidate this pointer. Also refer - // to the same issue in kClone() - SciArray<reg_t> *array = s->_segMan->lookupArray(argv[1]); - - dupArray->setType(array->getType()); - dupArray->setSize(array->getSize()); - for (uint32 i = 0; i < array->getSize(); i++) - dupArray->setValue(i, array->getValue(i)); - - return arrayHandle; - } - case 9: // Getdata - if (!s->_segMan->isHeapObject(argv[1])) - return argv[1]; + return targetHandle; +} - return readSelector(s->_segMan, argv[1], SELECTOR(data)); - default: - error("Unknown kArray subop %d", op); +reg_t kArrayGetData(EngineState *s, int argc, reg_t *argv) { + if (s->_segMan->isObject(argv[0])) { + return readSelector(s->_segMan, argv[0], SELECTOR(data)); } - return NULL_REG; + return argv[0]; } +reg_t kArrayByteCopy(EngineState *s, int argc, reg_t *argv) { + SciArray &target = *s->_segMan->lookupArray(argv[0]); + const uint16 targetOffset = argv[1].toUint16(); + const SciArray &source = *s->_segMan->lookupArray(argv[2]); + const uint16 sourceOffset = argv[3].toUint16(); + const uint16 count = argv[4].toUint16(); + + target.byteCopy(source, sourceOffset, targetOffset, count); + return argv[0]; +} #endif } // End of namespace Sci diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index f2a3c6b0f7..9aa03a4760 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -459,6 +459,14 @@ reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv) { } } +extern Common::String format(const Common::String &source, int argc, const reg_t *argv); + +reg_t kPrintDebug(EngineState *s, int argc, reg_t *argv) { + const Common::String debugString = s->_segMan->getString(argv[0]); + debugC(kDebugLevelGame, "%s", format(debugString, argc - 1, argv + 1).c_str()); + return s->r_acc; +} + #endif // kIconBar is really a subop of kMacPlatform for SCI1.1 Mac diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 06f16299aa..937b1cfc2f 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -1397,10 +1397,8 @@ static reg_t allocateOutputArray(SegManager *segMan, int size) { #ifdef ENABLE_SCI32 if (getSciVersion() >= SCI_VERSION_2) { - SciArray<reg_t> *array = segMan->allocateArray(&addr); + SciArray *array = segMan->allocateArray(kArrayTypeInt16, size * 2, &addr); assert(array); - array->setType(0); - array->setSize(size * 2); return addr; } #endif diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 6fd130bceb..0e29ccf783 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -238,8 +238,8 @@ reg_t kScriptID(EngineState *s, int argc, reg_t *argv) { // initialized to 0, whereas it's 6 in other versions. Thus, we assign it // to 6 here, fixing the speed of the introduction. Refer to bug #3102071. if (g_sci->getGameId() == GID_PQ2 && script == 200 && - s->variables[VAR_GLOBAL][3].isNull()) { - s->variables[VAR_GLOBAL][3] = make_reg(0, 6); + s->variables[VAR_GLOBAL][kGlobalVarSpeed].isNull()) { + s->variables[VAR_GLOBAL][kGlobalVarSpeed] = make_reg(0, 6); } return make_reg(scriptSeg, address); diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 1c08bf597c..6ec61343b0 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -202,11 +202,6 @@ reg_t kReadNumber(EngineState *s, int argc, reg_t *argv) { } -#define ALIGN_NONE 0 -#define ALIGN_RIGHT 1 -#define ALIGN_LEFT -1 -#define ALIGN_CENTER 2 - /* Format(targ_address, textresnr, index_inside_res, ...) ** or ** Format(targ_address, heap_text_addr, ...) @@ -214,6 +209,13 @@ reg_t kReadNumber(EngineState *s, int argc, reg_t *argv) { ** the supplied parameters and writes it to the targ_address. */ reg_t kFormat(EngineState *s, int argc, reg_t *argv) { + enum { + ALIGN_NONE = 0, + ALIGN_RIGHT = 1, + ALIGN_LEFT = -1, + ALIGN_CENTER = 2 + }; + uint16 *arguments; reg_t dest = argv[0]; int maxsize = 4096; /* Arbitrary... */ @@ -301,12 +303,6 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) { case 's': { /* Copy string */ reg_t reg = argv[startarg + paramindex]; -#ifdef ENABLE_SCI32 - // If the string is a string object, get to the actual string in the data selector - if (s->_segMan->isObject(reg)) - reg = readSelector(s->_segMan, reg, SELECTOR(data)); -#endif - Common::String tempsource = g_sci->getKernel()->lookupText(reg, arguments[paramindex + 1]); int slen = strlen(tempsource.c_str()); @@ -379,12 +375,6 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) { case 'u': unsignedVar = true; case 'd': { /* Copy decimal */ - // In the new SCI2 kString function, %d is used for unsigned - // integers. An example is script 962 in Shivers - it uses %d - // to create file names. - if (getSciVersion() >= SCI_VERSION_2) - unsignedVar = true; - /* int templen; -- unused atm */ const char *format_string = "%d"; @@ -437,14 +427,6 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) { *target = 0; /* Terminate string */ -#ifdef ENABLE_SCI32 - // Resize SCI32 strings if necessary - if (getSciVersion() >= SCI_VERSION_2) { - SciString *string = s->_segMan->lookupString(dest); - string->setSize(strlen(targetbuf) + 1); - } -#endif - s->_segMan->strcpy(dest, targetbuf); return dest; /* Return target addr */ @@ -661,238 +643,236 @@ reg_t kStrSplit(EngineState *s, int argc, reg_t *argv) { #ifdef ENABLE_SCI32 -// TODO: there is an unused second argument, happens at least in LSL6 right during the intro +reg_t kString(EngineState *s, int argc, reg_t *argv) { + if (!s) + return make_reg(0, getSciVersion()); + error("not supposed to call this"); +} + reg_t kStringNew(EngineState *s, int argc, reg_t *argv) { reg_t stringHandle; - SciString *string = s->_segMan->allocateString(&stringHandle); - string->setSize(argv[0].toUint16()); - - // Make sure the first character is a null character - if (string->getSize() > 0) - string->setValue(0, 0); - + const uint16 size = argv[0].toUint16(); + s->_segMan->allocateArray(kArrayTypeString, size, &stringHandle); return stringHandle; } -reg_t kStringSize(EngineState *s, int argc, reg_t *argv) { - return make_reg(0, s->_segMan->getString(argv[0]).size()); -} - -// At (return value at an index) -reg_t kStringAt(EngineState *s, int argc, reg_t *argv) { - // Note that values are put in bytes to avoid sign extension - if (argv[0].getSegment() == s->_segMan->getStringSegmentId()) { - SciString *string = s->_segMan->lookupString(argv[0]); - byte val = string->getRawData()[argv[1].toUint16()]; - return make_reg(0, val); - } else { - Common::String string = s->_segMan->getString(argv[0]); - byte val = string[argv[1].toUint16()]; - return make_reg(0, val); - } -} - -// Atput (put value at an index) -reg_t kStringPutAt(EngineState *s, int argc, reg_t *argv) { - SciString *string = s->_segMan->lookupString(argv[0]); +reg_t kStringGetChar(EngineState *s, int argc, reg_t *argv) { + const uint16 index = argv[1].toUint16(); - uint32 index = argv[1].toUint16(); - uint32 count = argc - 2; + // Game scripts may contain static raw string data + if (!s->_segMan->isArray(argv[0])) { + const Common::String string = s->_segMan->getString(argv[0]); + if (index >= string.size()) { + return make_reg(0, 0); + } - if (index + count > 65535) - return NULL_REG; + return make_reg(0, (byte)string[index]); + } - if (string->getSize() < index + count) - string->setSize(index + count); + SciArray &array = *s->_segMan->lookupArray(argv[0]); - for (uint16 i = 0; i < count; i++) - string->setValue(i + index, argv[i + 2].toUint16()); + if (index >= array.size()) { + return make_reg(0, 0); + } - return argv[0]; // We also have to return the handle + return array.getAsID(index); } reg_t kStringFree(EngineState *s, int argc, reg_t *argv) { - // Freeing of strings is handled by the garbage collector + if (!argv[0].isNull()) { + s->_segMan->freeArray(argv[0]); + } return s->r_acc; } -reg_t kStringFill(EngineState *s, int argc, reg_t *argv) { - SciString *string = s->_segMan->lookupString(argv[0]); - uint16 index = argv[1].toUint16(); +reg_t kStringCompare(EngineState *s, int argc, reg_t *argv) { + const Common::String string1 = s->_segMan->getString(argv[0]); + const Common::String string2 = s->_segMan->getString(argv[1]); - // A count of -1 means fill the rest of the array - uint16 count = argv[2].toSint16() == -1 ? string->getSize() - index : argv[2].toUint16(); - uint16 stringSize = string->getSize(); + int result; + if (argc == 3) { + result = strncmp(string1.c_str(), string2.c_str(), argv[2].toUint16()); + } else { + result = strcmp(string1.c_str(), string2.c_str()); + } - if (stringSize < index + count) - string->setSize(index + count); + return make_reg(0, (result > 0) - (result < 0)); +} - for (uint16 i = 0; i < count; i++) - string->setValue(i + index, argv[3].toUint16()); +reg_t kStringGetData(EngineState *s, int argc, reg_t *argv) { + if (s->_segMan->isObject(argv[0])) { + return readSelector(s->_segMan, argv[0], SELECTOR(data)); + } return argv[0]; } -reg_t kStringCopy(EngineState *s, int argc, reg_t *argv) { - const char *string2 = 0; - uint32 string2Size = 0; - Common::String string; +reg_t kStringLength(EngineState *s, int argc, reg_t *argv) { + return make_reg(0, s->_segMan->getString(argv[0]).size()); +} - if (argv[2].getSegment() == s->_segMan->getStringSegmentId()) { - SciString *sstr; - sstr = s->_segMan->lookupString(argv[2]); - string2 = sstr->getRawData(); - string2Size = sstr->getSize(); - } else { - string = s->_segMan->getString(argv[2]); - string2 = string.c_str(); - string2Size = string.size() + 1; +namespace { + bool isFlag(const char c) { + return strchr("-+ 0#", c); } - uint32 index1 = argv[1].toUint16(); - uint32 index2 = argv[3].toUint16(); - - if (argv[0] == argv[2]) { - // source and destination string are one and the same - if (index1 == index2) { - // even same index? ignore this call - // Happens in KQ7, when starting a chapter - return argv[0]; - } - // TODO: this will crash, when setSize() is triggered later - // we need to exactly replicate original interpreter behavior - warning("kString(Copy): source is the same as destination string"); + bool isPrecision(const char c) { + return strchr(".0123456789*", c); } - // The original engine ignores bad copies too - if (index2 >= string2Size) - return NULL_REG; - - // A count of -1 means fill the rest of the array - uint32 count = string2Size - index2; - if (argv[4].toSint16() != -1) { - count = MIN(count, (uint32)argv[4].toUint16()); + bool isWidth(const char c) { + return strchr("0123456789*", c); } -// reg_t strAddress = argv[0]; - SciString *string1 = s->_segMan->lookupString(argv[0]); - //SciString *string1 = !argv[1].isNull() ? s->_segMan->lookupString(argv[1]) : s->_segMan->allocateString(&strAddress); + bool isLength(const char c) { + return strchr("hjlLtz", c); + } - if (string1->getSize() < index1 + count) - string1->setSize(index1 + count); + bool isType(const char c) { + return strchr("dsuxXaAceEfFgGinop", c); + } - // Note: We're accessing from c_str() here because the - // string's size ignores the trailing 0 and therefore - // triggers an assert when doing string2[i + index2]. - for (uint16 i = 0; i < count; i++) - string1->setValue(i + index1, string2[i + index2]); + bool isSignedType(const char type) { + return type == 'd' || type == 'i'; + } - return argv[0]; -} + bool isUnsignedType(const char type) { + return strchr("uxXoc", type); + } -reg_t kStringCompare(EngineState *s, int argc, reg_t *argv) { - Common::String string1 = argv[0].isNull() ? "" : s->_segMan->getString(argv[0]); - Common::String string2 = argv[1].isNull() ? "" : s->_segMan->getString(argv[1]); + bool isStringType(const char type) { + return type == 's'; + } - if (argc == 3) // Strncmp - return make_reg(0, strncmp(string1.c_str(), string2.c_str(), argv[2].toUint16())); - else // Strcmp - return make_reg(0, strcmp(string1.c_str(), string2.c_str())); -} + Common::String readPlaceholder(const char *&in, reg_t arg) { + const char *const start = in; -// was removed for SCI2.1 Late+ -reg_t kStringDup(EngineState *s, int argc, reg_t *argv) { - reg_t stringHandle; + assert(*in == '%'); + ++in; - SciString *dupString = s->_segMan->allocateString(&stringHandle); + while (isFlag(*in)) { + ++in; + } + while (isWidth(*in)) { + ++in; + } + while (isPrecision(*in)) { + ++in; + } + while (isLength(*in)) { + ++in; + } - if (argv[0].getSegment() == s->_segMan->getStringSegmentId()) { - *dupString = *s->_segMan->lookupString(argv[0]); - } else { - dupString->fromString(s->_segMan->getString(argv[0])); + char format[64]; + format[0] = '\0'; + const char type = *in++; + Common::strlcpy(format, start, MIN<size_t>(64, in - start + 1)); + + if (isType(type)) { + if (isSignedType(type)) { + const int value = arg.toSint16(); + return Common::String::format(format, value); + } else if (isUnsignedType(type)) { + const uint value = arg.toUint16(); + return Common::String::format(format, value); + } else if (isStringType(type)) { + Common::String value; + SegManager *segMan = g_sci->getEngineState()->_segMan; + if (segMan->isObject(arg)) { + value = segMan->getString(readSelector(segMan, arg, SELECTOR(data))); + } else { + value = segMan->getString(arg); + } + return Common::String::format(format, value.c_str()); + } else { + error("Unsupported format type %c", type); + } + } else { + return Common::String::format("%s", format); + } } - - return stringHandle; } -// was removed for SCI2.1 Late+ -reg_t kStringGetData(EngineState *s, int argc, reg_t *argv) { - if (!s->_segMan->isHeapObject(argv[0])) - return argv[0]; +Common::String format(const Common::String &source, int argc, const reg_t *argv) { + Common::String out; + const char *in = source.c_str(); + int argIndex = 0; + while (*in != '\0') { + if (*in == '%') { + if (in[1] == '%') { + in += 2; + out += "%"; + continue; + } - return readSelector(s->_segMan, argv[0], SELECTOR(data)); -} + assert(argIndex < argc); + out += readPlaceholder(in, argv[argIndex++]); + } else { + out += *in++; + } + } -reg_t kStringLen(EngineState *s, int argc, reg_t *argv) { - return make_reg(0, s->_segMan->strlen(argv[0])); + return out; } -reg_t kStringPrintf(EngineState *s, int argc, reg_t *argv) { +reg_t kStringFormat(EngineState *s, int argc, reg_t *argv) { reg_t stringHandle; - s->_segMan->allocateString(&stringHandle); - - reg_t *adjustedArgs = new reg_t[argc + 1]; - adjustedArgs[0] = stringHandle; - memcpy(&adjustedArgs[1], argv, argc * sizeof(reg_t)); - - kFormat(s, argc + 1, adjustedArgs); - delete[] adjustedArgs; + SciArray &target = *s->_segMan->allocateArray(kArrayTypeString, 0, &stringHandle); + reg_t source = argv[0]; + // Str objects may be passed in place of direct references to string data + if (s->_segMan->isObject(argv[0])) { + source = readSelector(s->_segMan, argv[0], SELECTOR(data)); + } + target.fromString(format(s->_segMan->getString(source), argc - 1, argv + 1)); return stringHandle; } -reg_t kStringPrintfBuf(EngineState *s, int argc, reg_t *argv) { - return kFormat(s, argc, argv); +reg_t kStringFormatAt(EngineState *s, int argc, reg_t *argv) { + SciArray &target = *s->_segMan->lookupArray(argv[0]); + reg_t source = argv[1]; + // Str objects may be passed in place of direct references to string data + if (s->_segMan->isObject(argv[1])) { + source = readSelector(s->_segMan, argv[1], SELECTOR(data)); + } + target.fromString(format(s->_segMan->getString(source), argc - 2, argv + 2)); + return argv[0]; } -reg_t kStringAtoi(EngineState *s, int argc, reg_t *argv) { - Common::String string = s->_segMan->getString(argv[0]); - return make_reg(0, (uint16)atoi(string.c_str())); +reg_t kStringToInteger(EngineState *s, int argc, reg_t *argv) { + return make_reg(0, (uint16)s->_segMan->getString(argv[0]).asUint64()); } reg_t kStringTrim(EngineState *s, int argc, reg_t *argv) { - Common::String string = s->_segMan->getString(argv[0]); - - string.trim(); - // TODO: Second parameter (bitfield, trim from left, right, center) - warning("kStringTrim (%d)", argv[1].getOffset()); - s->_segMan->strcpy(argv[0], string.c_str()); - return NULL_REG; + SciArray &array = *s->_segMan->lookupArray(argv[0]); + const int8 flags = argv[1].toSint16(); + const char showChar = argc > 2 ? argv[2].toSint16() : '\0'; + array.trim(flags, showChar); + return s->r_acc; } -reg_t kStringUpper(EngineState *s, int argc, reg_t *argv) { +reg_t kStringToUpperCase(EngineState *s, int argc, reg_t *argv) { Common::String string = s->_segMan->getString(argv[0]); - string.toUppercase(); s->_segMan->strcpy(argv[0], string.c_str()); - return NULL_REG; + return argv[0]; } -reg_t kStringLower(EngineState *s, int argc, reg_t *argv) { +reg_t kStringToLowerCase(EngineState *s, int argc, reg_t *argv) { Common::String string = s->_segMan->getString(argv[0]); - string.toLowercase(); s->_segMan->strcpy(argv[0], string.c_str()); - return NULL_REG; -} - -// Possibly kStringTranslate? -reg_t kStringTrn(EngineState *s, int argc, reg_t *argv) { - warning("kStringTrn (argc = %d)", argc); - return NULL_REG; + return argv[0]; } -// Possibly kStringTranslateExclude? -reg_t kStringTrnExclude(EngineState *s, int argc, reg_t *argv) { - warning("kStringTrnExclude (argc = %d)", argc); - return NULL_REG; +reg_t kStringReplaceSubstring(EngineState *s, int argc, reg_t *argv) { + error("TODO: kStringReplaceSubstring not implemented"); + return argv[3]; } -reg_t kString(EngineState *s, int argc, reg_t *argv) { - if (!s) - return make_reg(0, getSciVersion()); - error("not supposed to call this"); +reg_t kStringReplaceSubstringEx(EngineState *s, int argc, reg_t *argv) { + error("TODO: kStringReplaceSubstringEx not implemented"); + return argv[3]; } - #endif } // End of namespace Sci diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index b539c84f5d..83a02883af 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -165,7 +165,6 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { switch (argv[0].toUint16()) { case 0: { Common::String filename = s->_segMan->getString(argv[1]); - videoDecoder = new Video::AVIDecoder(); if (filename.equalsIgnoreCase("gk2a.avi")) { // HACK: Switch to 16bpp graphics for Indeo3. @@ -180,6 +179,8 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { } } + videoDecoder = new Video::AVIDecoder(); + if (!videoDecoder->loadFile(filename.c_str())) { warning("Failed to open movie file %s", filename.c_str()); delete videoDecoder; @@ -253,11 +254,13 @@ reg_t kRobotGetFrameSize(EngineState *s, int argc, reg_t *argv) { Common::Rect frameRect; const uint16 numFramesTotal = g_sci->_video32->getRobotPlayer().getFrameSize(frameRect); - reg_t *outRect = s->_segMan->derefRegPtr(argv[0], 4); - outRect[0] = make_reg(0, frameRect.left); - outRect[1] = make_reg(0, frameRect.top); - outRect[2] = make_reg(0, frameRect.right - 1); - outRect[3] = make_reg(0, frameRect.bottom - 1); + SciArray *outRect = s->_segMan->lookupArray(argv[0]); + reg_t values[4] = { + make_reg(0, frameRect.left), + make_reg(0, frameRect.top), + make_reg(0, frameRect.right - 1), + make_reg(0, frameRect.bottom - 1) }; + outRect->setElements(0, 4, values); return make_reg(0, numFramesTotal); } @@ -446,10 +449,10 @@ reg_t kPlayVMDSetBlackoutArea(EngineState *s, int argc, reg_t *argv) { const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; Common::Rect blackoutArea; - blackoutArea.left = MAX((int16)0, argv[0].toSint16()); - blackoutArea.top = MAX((int16)0, argv[1].toSint16()); - blackoutArea.right = MIN(scriptWidth, (int16)(argv[2].toSint16() + 1)); - blackoutArea.bottom = MIN(scriptHeight, (int16)(argv[3].toSint16() + 1)); + blackoutArea.left = MAX<int16>(0, argv[0].toSint16()); + blackoutArea.top = MAX<int16>(0, argv[1].toSint16()); + blackoutArea.right = MIN<int16>(scriptWidth, argv[2].toSint16() + 1); + blackoutArea.bottom = MIN<int16>(scriptHeight, argv[3].toSint16() + 1); g_sci->_video32->getVMDPlayer().setBlackoutArea(blackoutArea); return s->r_acc; } diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp index 5300b72b71..b0615b4213 100644 --- a/engines/sci/engine/message.cpp +++ b/engines/sci/engine/message.cpp @@ -439,21 +439,8 @@ Common::String MessageState::processString(const char *s) { void MessageState::outputString(reg_t buf, const Common::String &str) { #ifdef ENABLE_SCI32 if (getSciVersion() >= SCI_VERSION_2) { - if (_segMan->getSegmentType(buf.getSegment()) == SEG_TYPE_STRING) { - SciString *sciString = _segMan->lookupString(buf); - sciString->setSize(str.size() + 1); - for (uint32 i = 0; i < str.size(); i++) - sciString->setValue(i, str.c_str()[i]); - sciString->setValue(str.size(), 0); - } else if (_segMan->getSegmentType(buf.getSegment()) == SEG_TYPE_ARRAY) { - // Happens in the intro of LSL6, we are asked to write the string - // into an array - SciArray<reg_t> *sciString = _segMan->lookupArray(buf); - sciString->setSize(str.size() + 1); - for (uint32 i = 0; i < str.size(); i++) - sciString->setValue(i, make_reg(0, str.c_str()[i])); - sciString->setValue(str.size(), NULL_REG); - } + SciArray *sciString = _segMan->lookupArray(buf); + sciString->fromString(str); } else { #endif SegmentRef buffer_r = _segMan->dereference(buf); diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index be2d7660cb..2e4da46b70 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -102,66 +102,6 @@ void syncWithSerializer(Common::Serializer &s, Node &obj) { 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. @@ -292,9 +232,6 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) { } else if (type == SEG_TYPE_ARRAY) { // Set the correct segment for SCI32 arrays _arraysSegId = i; - } else if (type == SEG_TYPE_STRING) { - // Set the correct segment for SCI32 strings - _stringSegId = i; } else if (s.getVersion() >= 36 && type == SEG_TYPE_BITMAP) { _bitmapSegId = i; #endif @@ -393,6 +330,28 @@ static void sync_SavegameMetadata(Common::Serializer &s, SavegameMetadata &obj) } s.syncAsUint32LE(obj.playTime); } + + // Some games require additional metadata to display their restore screens + // correctly + if (s.getVersion() >= 39) { + if (s.isSaving()) { + const reg_t *globals = g_sci->getEngineState()->variables[VAR_GLOBAL]; + if (g_sci->getGameId() == GID_SHIVERS) { + obj.lowScore = globals[kGlobalVarScore].toUint16(); + obj.highScore = globals[kGlobalVarShivers1Score].toUint16(); + obj.avatarId = 0; + } else if (g_sci->getGameId() == GID_MOTHERGOOSEHIRES) { + obj.lowScore = obj.highScore = 0; + obj.avatarId = readSelectorValue(g_sci->getEngineState()->_segMan, globals[kGlobalVarEgo], SELECTOR(view)); + } else { + obj.lowScore = obj.highScore = obj.avatarId = 0; + } + } + + s.syncAsUint16LE(obj.lowScore); + s.syncAsUint16LE(obj.highScore); + s.syncAsByte(obj.avatarId); + } } void EngineState::saveLoadWithSerializer(Common::Serializer &s) { @@ -673,13 +632,16 @@ void SoundCommandParser::syncPlayList(Common::Serializer &s) { } void SoundCommandParser::reconstructPlayList() { - Common::StackLock lock(_music->_mutex); + _music->_mutex.lock(); // We store all songs here because starting songs may re-shuffle their order MusicList songs; for (MusicList::iterator i = _music->getPlayListStart(); i != _music->getPlayListEnd(); ++i) songs.push_back(*i); + // Done with main playlist, so release lock + _music->_mutex.unlock(); + for (MusicList::iterator i = songs.begin(); i != songs.end(); ++i) { initSoundResource(*i); @@ -707,11 +669,35 @@ void ArrayTable::saveLoadWithSerializer(Common::Serializer &ser) { sync_Table<ArrayTable>(ser, *this); } -void StringTable::saveLoadWithSerializer(Common::Serializer &ser) { - if (ser.getVersion() < 18) - return; +void SciArray::saveLoadWithSerializer(Common::Serializer &s) { + uint16 savedSize; + + if (s.isSaving()) { + savedSize = _size; + } + + s.syncAsByte(_type); + s.syncAsByte(_elementSize); + s.syncAsUint16LE(savedSize); + + if (s.isLoading()) { + resize(savedSize); + } - sync_Table<StringTable>(ser, *this); + switch (_type) { + case kArrayTypeInt16: + case kArrayTypeID: + for (int i = 0; i < savedSize; ++i) { + syncWithSerializer(s, ((reg_t *)_data)[i]); + } + break; + case kArrayTypeByte: + case kArrayTypeString: + s.syncBytes((byte *)_data, savedSize); + break; + default: + error("Attempt to sync invalid SciArray type %d", _type); + } } void BitmapTable::saveLoadWithSerializer(Common::Serializer &ser) { @@ -784,7 +770,7 @@ void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) { } #ifdef ENABLE_SCI32 -void saveLoadPalette32(Common::Serializer &s, Palette *const palette) { +static void saveLoadPalette32(Common::Serializer &s, Palette *const palette) { s.syncAsUint32LE(palette->timestamp); for (int i = 0; i < ARRAYSIZE(palette->colors); ++i) { s.syncAsByte(palette->colors[i].used); @@ -794,7 +780,7 @@ void saveLoadPalette32(Common::Serializer &s, Palette *const palette) { } } -void saveLoadOptionalPalette32(Common::Serializer &s, Palette **const palette) { +static void saveLoadOptionalPalette32(Common::Serializer &s, Palette **const palette) { bool hasPalette; if (s.isSaving()) { hasPalette = (*palette != nullptr); @@ -815,6 +801,16 @@ void GfxPalette32::saveLoadWithSerializer(Common::Serializer &s) { if (s.isLoading()) { ++_version; + + for (int i = 0; i < kNumCyclers; ++i) { + delete _cyclers[i]; + _cyclers[i] = nullptr; + } + + delete _varyTargetPalette; + _varyTargetPalette = nullptr; + delete _varyStartPalette; + _varyStartPalette = nullptr; } s.syncAsSint16LE(_varyDirection); @@ -1044,10 +1040,11 @@ bool gamestate_save(EngineState *s, Common::WriteStream *fh, const Common::Strin meta.gameObjectOffset = g_sci->getGameObject().getOffset(); // Checking here again - if (s->executionStackBase) { - warning("Cannot save from below kernel function"); - return false; - } +// TODO: This breaks Torin autosave, is there actually any reason for it? +// if (s->executionStackBase) { +// warning("Cannot save from below kernel function"); +// return false; +// } Common::Serializer ser(0, fh); sync_SavegameMetadata(ser, meta); diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h index 6616081a20..873394aebb 100644 --- a/engines/sci/engine/savegame.h +++ b/engines/sci/engine/savegame.h @@ -37,6 +37,7 @@ struct EngineState; * * Version - new/changed feature * ============================= + * 39 - Accurate SCI32 arrays/strings, score metadata, avatar metadata * 38 - SCI32 cursor * 37 - Segment entry data changed to pointers * 36 - SCI32 bitmap segment @@ -63,7 +64,7 @@ struct EngineState; */ enum { - CURRENT_SAVEGAME_VERSION = 38, + CURRENT_SAVEGAME_VERSION = 39, MINIMUM_SAVEGAME_VERSION = 14 }; @@ -77,6 +78,13 @@ struct SavegameMetadata { uint32 playTime; uint16 gameObjectOffset; uint16 script0Size; + + // Used by Shivers 1 + uint16 lowScore; + uint16 highScore; + + // Used by MGDX + uint8 avatarId; }; /** diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 664e7fa0c4..f2f290fa9e 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -103,6 +103,9 @@ static const char *const selectorNameTable[] = { "modNum", // King's Quest 6 CD / Laura Bow 2 CD for audio+text support "cycler", // Space Quest 4 / system selector "setLoop", // Laura Bow 1 Colonel's Bequest +#ifdef ENABLE_SCI32 + "newWith", // SCI2 array script +#endif NULL }; @@ -132,8 +135,86 @@ enum ScriptPatcherSelectors { SELECTOR_modNum, SELECTOR_cycler, SELECTOR_setLoop +#ifdef ENABLE_SCI32 + , + SELECTOR_newWith +#endif +}; + +#ifdef ENABLE_SCI32 +// It is not possible to change the directory for ScummVM save games, so disable +// the "change directory" button in the standard save dialogue +static const uint16 sci2ChangeDirSignature[] = { + 0x72, SIG_ADDTOOFFSET(+2), // lofsa changeDirI + 0x4a, SIG_UINT16(0x04), // send 4 + SIG_MAGICDWORD, + 0x36, // push + 0x35, 0xF7, // ldi $f7 + 0x12, // and + 0x36, // push + SIG_END +}; + +static const uint16 sci2ChangeDirPatch[] = { + PATCH_ADDTOOFFSET(+3), // lofsa changeDirI + PATCH_ADDTOOFFSET(+3), // send 4 + PATCH_ADDTOOFFSET(+1), // push + 0x35, 0x00, // ldi 0 + PATCH_END +}; + +// Save game script hardcodes the maximum number of save games to 20, but +// this is an artificial constraint that does not apply to ScummVM +static const uint16 sci2NumSavesSignature1[] = { + SIG_MAGICDWORD, + 0x8b, 0x02, // lsl local[2] + 0x35, 0x14, // ldi 20 + 0x22, // lt? + SIG_END +}; + +static const uint16 sci2NumSavesPatch1[] = { + PATCH_ADDTOOFFSET(+2), // lsl local[2] + 0x35, 0x63, // ldi 99 + PATCH_END +}; + +static const uint16 sci2NumSavesSignature2[] = { + SIG_MAGICDWORD, + 0x8b, 0x02, // lsl local[2] + 0x35, 0x14, // ldi 20 + 0x1a, // eq? + SIG_END +}; + +static const uint16 sci2NumSavesPatch2[] = { + PATCH_ADDTOOFFSET(+2), // lsl local[2] + 0x35, 0x63, // ldi 99 + PATCH_END }; +// Phantasmagoria & SQ6 try to initialize the first entry of an int16 array +// using an empty string, which is not valid (it should be a number) +static const uint16 sci21IntArraySignature[] = { + 0x38, SIG_SELECTOR16(newWith), // pushi newWith + 0x7a, // push2 + 0x39, 0x04, // pushi $4 + 0x72, SIG_ADDTOOFFSET(+2), // lofsa string "" + SIG_MAGICDWORD, + 0x36, // push + 0x51, 0x0b, // class IntArray + 0x4a, 0x8, // send $8 + SIG_END +}; + +static const uint16 sci21IntArrayPatch[] = { + PATCH_ADDTOOFFSET(+6), // push $b9; push2; pushi $4 + 0x76, // push0 + 0x34, PATCH_UINT16(0x0001), // ldi 0001 (waste bytes) + PATCH_END +}; +#endif + // =========================================================================== // Conquests of Camelot // At the bazaar in Jerusalem, it's possible to see a girl taking a shower. @@ -614,6 +695,10 @@ static const SciScriptPatcherEntry freddypharkasSignatures[] = { SCI_SIGNATUREENTRY_TERMINATOR }; +#ifdef ENABLE_SCI32 +#pragma mark - +#pragma mark Gabriel Knight 1 + // =========================================================================== // daySixBeignet::changeState (4) is called when the cop goes out and sets cycles to 220. // this is not enough time to get to the door, so we patch that to 23 seconds @@ -918,9 +1003,25 @@ static const SciScriptPatcherEntry gk1Signatures[] = { { true, 230, "day 6 police beignet timer issue", 1, gk1SignatureDay6PoliceBeignet, gk1PatchDay6PoliceBeignet }, { true, 230, "day 6 police sleep timer issue", 1, gk1SignatureDay6PoliceSleep, gk1PatchDay6PoliceSleep }, { true, 808, "day 10 gabriel dress up infinite turning", 1, gk1SignatureDay10GabrielDressUp, gk1PatchDay10GabrielDressUp }, + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, + { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch }, + SCI_SIGNATUREENTRY_TERMINATOR +}; + +#pragma mark - +#pragma mark Gabriel Knight 2 + +// script, description, signature patch +static const SciScriptPatcherEntry gk2Signatures[] = { + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, + { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch }, SCI_SIGNATUREENTRY_TERMINATOR }; +#endif + // =========================================================================== // at least during harpy scene export 29 of script 0 is called in kq5cd and // has an issue for those calls, where temp 3 won't get inititialized, but @@ -1618,6 +1719,10 @@ static const SciScriptPatcherEntry kq6Signatures[] = { SCI_SIGNATUREENTRY_TERMINATOR }; +#ifdef ENABLE_SCI32 +#pragma mark - +#pragma mark Kings Quest 7 + // =========================================================================== // King's Quest 7 has really weird subtitles. It seems as if the subtitles were @@ -1753,7 +1858,7 @@ static const uint16 kq7SignatureSubtitleFix3[] = { static const uint16 kq7PatchSubtitleFix3[] = { PATCH_ADDTOOFFSET(+2), // skip over "pToa initialized code" 0x2f, 0x0c, // bt [skip init code] - saved 1 byte - 0x38, + 0x38, PATCH_GETORIGINALBYTE(+6), PATCH_GETORIGINALBYTE(+7), // pushi (init) 0x76, // push0 @@ -1779,6 +1884,8 @@ static const SciScriptPatcherEntry kq7Signatures[] = { SCI_SIGNATUREENTRY_TERMINATOR }; +#endif + // =========================================================================== // Script 210 in the German version of Longbow handles the case where Robin // hands out the scroll to Marion and then types his name using the hand code. @@ -2079,6 +2186,20 @@ static const SciScriptPatcherEntry larry6Signatures[] = { SCI_SIGNATUREENTRY_TERMINATOR }; +#ifdef ENABLE_SCI32 +#pragma mark - +#pragma mark Leisure Suit Larry 6 Hires + +// script, description, signature patch +static const SciScriptPatcherEntry larry6HiresSignatures[] = { + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, + { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch }, + SCI_SIGNATUREENTRY_TERMINATOR +}; + +#endif + // =========================================================================== // Laura Bow 1 - Colonel's Bequest // @@ -2700,6 +2821,18 @@ static const SciScriptPatcherEntry mothergoose256Signatures[] = { SCI_SIGNATUREENTRY_TERMINATOR }; +#ifdef ENABLE_SCI32 +#pragma mark - +#pragma mark Phantasmagoria + +// script, description, signature patch +static const SciScriptPatcherEntry phantasmagoriaSignatures[] = { + { true, 901, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch }, + SCI_SIGNATUREENTRY_TERMINATOR +}; + +#endif + // =========================================================================== // Police Quest 1 VGA @@ -2841,6 +2974,20 @@ static const SciScriptPatcherEntry pq1vgaSignatures[] = { SCI_SIGNATUREENTRY_TERMINATOR }; +#ifdef ENABLE_SCI32 +#pragma mark - +#pragma mark Police Quest 4 + +// script, description, signature patch +static const SciScriptPatcherEntry pq4Signatures[] = { + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, + { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch }, + SCI_SIGNATUREENTRY_TERMINATOR +}; + +#endif + // =========================================================================== // At the healer's house there is a bird's nest up on the tree. // The player can throw rocks at it until it falls to the ground. @@ -3745,7 +3892,7 @@ static const uint16 qfg3PatchRoom750Bounds1[] = { static const uint16 qfg3SignatureRoom750Bounds2[] = { // (ego x: 294 y: 39) 0x78, // push1 ("x") - 0x78, // push1 + 0x78, // push1 0x38, SIG_UINT16(294), // pushi 294 0x76, // push0 ("y") 0x78, // push1 @@ -3808,6 +3955,20 @@ static const SciScriptPatcherEntry qfg3Signatures[] = { SCI_SIGNATUREENTRY_TERMINATOR }; +#ifdef ENABLE_SCI32 +#pragma mark - +#pragma mark Quest for Glory 4 + +// script, description, signature patch +static const SciScriptPatcherEntry qfg4Signatures[] = { + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, + { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch }, + SCI_SIGNATUREENTRY_TERMINATOR +}; + +#endif + // =========================================================================== // script 298 of sq4/floppy has an issue. object "nest" uses another property // which isn't included in property count. We return 0 in that case, the game @@ -4371,6 +4532,34 @@ static const SciScriptPatcherEntry sq5Signatures[] = { SCI_SIGNATUREENTRY_TERMINATOR }; +#ifdef ENABLE_SCI32 +#pragma mark - +#pragma mark Space Quest 6 + +// script, description, signature patch +static const SciScriptPatcherEntry sq6Signatures[] = { + { true, 15, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch }, + { true, 22, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch }, + { true, 460, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch }, + { true, 510, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch }, + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, + { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch }, + SCI_SIGNATUREENTRY_TERMINATOR +}; + +#pragma mark - +#pragma mark Torins Passage + +// script, description, signature patch +static const SciScriptPatcherEntry torinSignatures[] = { + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, + { true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, + SCI_SIGNATUREENTRY_TERMINATOR +}; + +#endif + // ================================================================================= ScriptPatcher::ScriptPatcher() { @@ -4802,18 +4991,25 @@ void ScriptPatcher::processScript(uint16 scriptNr, byte *scriptData, const uint3 case GID_FREDDYPHARKAS: signatureTable = freddypharkasSignatures; break; +#ifdef ENABLE_SCI32 case GID_GK1: signatureTable = gk1Signatures; break; + case GID_GK2: + signatureTable = gk2Signatures; + break; +#endif case GID_KQ5: signatureTable = kq5Signatures; break; case GID_KQ6: signatureTable = kq6Signatures; break; +#ifdef ENABLE_SCI32 case GID_KQ7: signatureTable = kq7Signatures; break; +#endif case GID_LAURABOW: signatureTable = laurabow1Signatures; break; @@ -4832,12 +5028,27 @@ void ScriptPatcher::processScript(uint16 scriptNr, byte *scriptData, const uint3 case GID_LSL6: signatureTable = larry6Signatures; break; +#ifdef ENABLE_SCI32 + case GID_LSL6HIRES: + signatureTable = larry6HiresSignatures; + break; +#endif case GID_MOTHERGOOSE256: signatureTable = mothergoose256Signatures; break; +#ifdef ENABLE_SCI32 + case GID_PHANTASMAGORIA: + signatureTable = phantasmagoriaSignatures; + break; +#endif case GID_PQ1: signatureTable = pq1vgaSignatures; break; +#ifdef ENABLE_SCI32 + case GID_PQ4: + signatureTable = pq4Signatures; + break; +#endif case GID_QFG1: signatureTable = qfg1egaSignatures; break; @@ -4850,6 +5061,11 @@ void ScriptPatcher::processScript(uint16 scriptNr, byte *scriptData, const uint3 case GID_QFG3: signatureTable = qfg3Signatures; break; +#ifdef ENABLE_SCI32 + case GID_QFG4: + signatureTable = qfg4Signatures; + break; +#endif case GID_SQ1: signatureTable = sq1vgaSignatures; break; @@ -4859,6 +5075,14 @@ void ScriptPatcher::processScript(uint16 scriptNr, byte *scriptData, const uint3 case GID_SQ5: signatureTable = sq5Signatures; break; +#ifdef ENABLE_SCI32 + case GID_SQ6: + signatureTable = sq6Signatures; + break; + case GID_TORIN: + signatureTable = torinSignatures; + break; +#endif default: break; } diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 5cf8d6162d..83e7495b3c 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -42,7 +42,6 @@ SegManager::SegManager(ResourceManager *resMan, ScriptPatcher *scriptPatcher) #ifdef ENABLE_SCI32 _arraysSegId = 0; - _stringSegId = 0; _bitmapSegId = 0; #endif @@ -72,7 +71,6 @@ void SegManager::resetSegMan() { #ifdef ENABLE_SCI32 _arraysSegId = 0; - _stringSegId = 0; _bitmapSegId = 0; #endif @@ -88,9 +86,8 @@ void SegManager::initSysStrings() { _parserPtr = make_reg(_saveDirPtr.getSegment(), _saveDirPtr.getOffset() + 256); #ifdef ENABLE_SCI32 } else { - SciString *saveDirString = allocateString(&_saveDirPtr); - saveDirString->setSize(256); - saveDirString->setValue(0, 0); + SciArray *saveDirString = allocateArray(kArrayTypeString, 256, &_saveDirPtr); + saveDirString->byteAt(0) = '\0'; _parserPtr = NULL_REG; // no SCI2 game had a parser #endif @@ -863,7 +860,10 @@ bool SegManager::freeDynmem(reg_t addr) { } #ifdef ENABLE_SCI32 -SciArray<reg_t> *SegManager::allocateArray(reg_t *addr) { +#pragma mark - +#pragma mark Arrays + +SciArray *SegManager::allocateArray(SciArrayType type, uint16 size, reg_t *addr) { ArrayTable *table; int offset; @@ -875,10 +875,14 @@ SciArray<reg_t> *SegManager::allocateArray(reg_t *addr) { offset = table->allocEntry(); *addr = make_reg(_arraysSegId, offset); - return &table->at(offset); + + SciArray *array = &table->at(offset); + array->setType(type); + array->resize(size); + return array; } -SciArray<reg_t> *SegManager::lookupArray(reg_t addr) { +SciArray *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)); @@ -899,54 +903,17 @@ void SegManager::freeArray(reg_t addr) { if (!arrayTable.isValidEntry(addr.getOffset())) error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr)); - arrayTable[addr.getOffset()].destroy(); arrayTable.freeEntry(addr.getOffset()); } -SciString *SegManager::allocateString(reg_t *addr) { - StringTable *table; - int offset; - - if (!_stringSegId) { - table = (StringTable *)allocSegment(new StringTable(), &(_stringSegId)); - } else - table = (StringTable *)_heap[_stringSegId]; - - offset = table->allocEntry(); - - *addr = make_reg(_stringSegId, 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()]; - - if (!stringTable.isValidEntry(addr.getOffset())) - error("lookupString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - - 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()]; - - if (!stringTable.isValidEntry(addr.getOffset())) - error("freeString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - - stringTable[addr.getOffset()].destroy(); - stringTable.freeEntry(addr.getOffset()); +bool SegManager::isArray(reg_t addr) const { + return addr.getSegment() == _arraysSegId; } #pragma mark - #pragma mark Bitmaps -SciBitmap *SegManager::allocateBitmap(reg_t *addr, const int16 width, const int16 height, const uint8 skipColor, const int16 displaceX, const int16 displaceY, const int16 scaledWidth, const int16 scaledHeight, const uint32 paletteSize, const bool remap, const bool gc) { +SciBitmap *SegManager::allocateBitmap(reg_t *addr, const int16 width, const int16 height, const uint8 skipColor, const int16 originX, const int16 originY, const int16 xResolution, const int16 yResolution, const uint32 paletteSize, const bool remap, const bool gc) { BitmapTable *table; int offset; @@ -961,7 +928,7 @@ SciBitmap *SegManager::allocateBitmap(reg_t *addr, const int16 width, const int1 *addr = make_reg(_bitmapSegId, offset); SciBitmap &bitmap = table->at(offset); - bitmap.create(width, height, skipColor, displaceX, displaceY, scaledWidth, scaledHeight, paletteSize, remap, gc); + bitmap.create(width, height, skipColor, originX, originY, xResolution, yResolution, paletteSize, remap, gc); return &bitmap; } diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h index 8ed1c3a143..c409744711 100644 --- a/engines/sci/engine/seg_manager.h +++ b/engines/sci/engine/seg_manager.h @@ -433,16 +433,12 @@ public: reg_t getParserPtr() const { return _parserPtr; } #ifdef ENABLE_SCI32 - SciArray<reg_t> *allocateArray(reg_t *addr); - SciArray<reg_t> *lookupArray(reg_t addr); + SciArray *allocateArray(SciArrayType type, uint16 size, reg_t *addr); + SciArray *lookupArray(reg_t addr); void freeArray(reg_t addr); + bool isArray(reg_t addr) const; - SciString *allocateString(reg_t *addr); - SciString *lookupString(reg_t addr); - void freeString(reg_t addr); - SegmentId getStringSegmentId() { return _stringSegId; } - - SciBitmap *allocateBitmap(reg_t *addr, const int16 width, const int16 height, const uint8 skipColor = kDefaultSkipColor, const int16 displaceX = 0, const int16 displaceY = 0, const int16 scaledWidth = kLowResX, const int16 scaledHeight = kLowResY, const uint32 paletteSize = 0, const bool remap = false, const bool gc = true); + SciBitmap *allocateBitmap(reg_t *addr, const int16 width, const int16 height, const uint8 skipColor = kDefaultSkipColor, const int16 originX = 0, const int16 originY = 0, const int16 xResolution = kLowResX, const int16 yResolution = kLowResY, const uint32 paletteSize = 0, const bool remap = false, const bool gc = true); SciBitmap *lookupBitmap(reg_t addr); void freeBitmap(reg_t addr); #endif @@ -469,7 +465,6 @@ private: #ifdef ENABLE_SCI32 SegmentId _arraysSegId; - SegmentId _stringSegId; SegmentId _bitmapSegId; #endif diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index 7943946ee4..fffa7f4d7e 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -67,9 +67,6 @@ SegmentObj *SegmentObj::createSegmentObj(SegmentType type) { case SEG_TYPE_ARRAY: mem = new ArrayTable(); break; - case SEG_TYPE_STRING: - mem = new StringTable(); - break; case SEG_TYPE_BITMAP: mem = new BitmapTable(); break; @@ -254,63 +251,39 @@ SegmentRef DynMem::dereference(reg_t pointer) { SegmentRef ArrayTable::dereference(reg_t pointer) { SegmentRef ret; - ret.isRaw = false; - ret.maxSize = at(pointer.getOffset()).getSize() * 2; - ret.reg = at(pointer.getOffset()).getRawData(); - return ret; -} -void ArrayTable::freeAtAddress(SegManager *segMan, reg_t sub_addr) { - at(sub_addr.getOffset()).destroy(); - freeEntry(sub_addr.getOffset()); + SciArray &array = at(pointer.getOffset()); + const bool isRaw = array.getType() == kArrayTypeByte || array.getType() == kArrayTypeString; + + ret.isRaw = isRaw; + ret.maxSize = array.byteSize(); + if (isRaw) { + ret.raw = (byte *)array.getRawData(); + } else { + ret.reg = (reg_t *)array.getRawData(); + } + return ret; } Common::Array<reg_t> ArrayTable::listAllOutgoingReferences(reg_t addr) const { - Common::Array<reg_t> tmp; + Common::Array<reg_t> refs; if (!isValidEntry(addr.getOffset())) { - error("Invalid array referenced for outgoing references: %04x:%04x", PRINT_REG(addr)); + // Scripts may still hold references to array memory that has been + // explicitly freed; ignore these references + return refs; } - const SciArray<reg_t> *array = &at(addr.getOffset()); - - for (uint32 i = 0; i < array->getSize(); i++) { - reg_t value = array->getValue(i); - if (value.getSegment() != 0) - tmp.push_back(value); + SciArray &array = const_cast<SciArray &>(at(addr.getOffset())); + if (array.getType() == kArrayTypeID || array.getType() == kArrayTypeInt16) { + for (uint16 i = 0; i < array.size(); ++i) { + const reg_t value = array.getAsID(i); + if (value.isPointer()) { + refs.push_back(value); + } + } } - return tmp; -} - -Common::String SciString::toString() const { - if (_type != 3) - error("SciString::toString(): Array is not a string"); - - Common::String string; - for (uint32 i = 0; i < _size && _data[i] != 0; i++) - string += _data[i]; - - return string; -} - -void SciString::fromString(const Common::String &string) { - if (_type != 3) - error("SciString::fromString(): Array is not a string"); - - setSize(string.size() + 1); - - for (uint32 i = 0; i < string.size(); i++) - _data[i] = string[i]; - - _data[string.size()] = 0; -} - -SegmentRef StringTable::dereference(reg_t pointer) { - SegmentRef ret; - ret.isRaw = true; - ret.maxSize = at(pointer.getOffset()).getSize(); - ret.raw = (byte *)at(pointer.getOffset()).getRawData(); - return ret; + return refs; } #endif diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index add5f4c57c..361c1cb895 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -24,7 +24,7 @@ #define SCI_ENGINE_SEGMENT_H #include "common/serializer.h" - +#include "common/str.h" #include "sci/engine/object.h" #include "sci/engine/vm.h" #include "sci/engine/vm_types.h" // for reg_t @@ -70,7 +70,7 @@ enum SegmentType { #ifdef ENABLE_SCI32 SEG_TYPE_ARRAY = 11, - SEG_TYPE_STRING = 12, + // 12 used to be string, now obsolete SEG_TYPE_BITMAP = 13, #endif @@ -408,142 +408,456 @@ public: #ifdef ENABLE_SCI32 -template<typename T> -class SciArray { +#pragma mark - +#pragma mark Arrays + +enum SciArrayType { + kArrayTypeInt16 = 0, + kArrayTypeID = 1, + kArrayTypeByte = 2, + kArrayTypeString = 3, + // Type 4 was for 32-bit integers; never used + kArrayTypeInvalid = 5 +}; + +enum SciArrayTrim { + kArrayTrimRight = 1, ///< Trim whitespace after the last non-whitespace character + kArrayTrimCenter = 2, ///< Trim whitespace between non-whitespace characters + kArrayTrimLeft = 4 ///< Trim whitespace before the first non-whitespace character +}; + +class SciArray : public Common::Serializable { public: - SciArray() : _type(-1), _data(NULL), _size(0), _actualSize(0) { } + SciArray() : + _type(kArrayTypeInvalid), + _size(0), + _data(nullptr) {} - SciArray(const SciArray<T> &array) { + SciArray(const SciArray &array) { _type = array._type; _size = array._size; - _actualSize = array._actualSize; - _data = new T[_actualSize]; + _elementSize = array._elementSize; + _data = malloc(_elementSize * _size); assert(_data); - memcpy(_data, array._data, _size * sizeof(T)); + memcpy(_data, array._data, _elementSize * _size); } - SciArray<T>& operator=(const SciArray<T> &array) { + SciArray &operator=(const SciArray &array) { if (this == &array) return *this; - delete[] _data; + free(_data); _type = array._type; _size = array._size; - _actualSize = array._actualSize; - _data = new T[_actualSize]; + _elementSize = array._elementSize; + _data = malloc(_elementSize * _size); assert(_data); - memcpy(_data, array._data, _size * sizeof(T)); + memcpy(_data, array._data, _elementSize * _size); return *this; } virtual ~SciArray() { - destroy(); + free(_data); + _size = 0; + _type = kArrayTypeInvalid; } - virtual void destroy() { - delete[] _data; - _data = NULL; - _type = -1; - _size = _actualSize = 0; - } + void saveLoadWithSerializer(Common::Serializer &s); - void setType(byte type) { - if (_type >= 0) - error("SciArray::setType(): Type already set"); + /** + * Returns the type of this array. + */ + SciArrayType getType() const { + return _type; + } + /** + * Sets the type of this array. The type of the array may only be set once. + */ + void setType(const SciArrayType type) { + assert(_type == kArrayTypeInvalid); + switch(type) { + case kArrayTypeInt16: + case kArrayTypeID: + _elementSize = sizeof(reg_t); + break; + case kArrayTypeString: + _elementSize = sizeof(char); + break; + case kArrayTypeByte: + _elementSize = sizeof(byte); + break; + default: + error("Invalid array type %d", type); + } _type = type; } - void setSize(uint32 size) { - if (_type < 0) - error("SciArray::setSize(): No type set"); + /** + * Returns the size of the array, in elements. + */ + uint16 size() const { + return _size; + } - // Check if we don't have to do anything - if (_size == size) - return; + /** + * Returns the size of the array, in bytes. + */ + uint16 byteSize() const { + return _size * _elementSize; + } - // Check if we don't have to expand the array - if (size <= _actualSize) { - _size = size; - return; + /** + * Ensures the array is large enough to store at least the given number of + * values given in `newSize`. If `force` is true, the array will be resized + * to store exactly `newSize` values. New values are initialized to zero. + */ + void resize(uint16 newSize, const bool force = false) { + if (force || newSize > _size) { + _data = realloc(_data, _elementSize * newSize); + if (newSize > _size) { + memset((byte *)_data + _elementSize * _size, 0, (newSize - _size) * _elementSize); + } + _size = newSize; } + } - // So, we're going to have to create an array of some sort - T *newArray = new T[size]; - memset(newArray, 0, size * sizeof(T)); + /** + * Shrinks a string array to its optimal size. + */ + void snug() { + assert(_type == kArrayTypeString || _type == kArrayTypeByte); + resize(strlen((char *)_data) + 1, true); + } - // Check if we never created an array before - if (!_data) { - _size = _actualSize = size; - _data = newArray; - return; + /** + * Returns a pointer to the array's raw data storage. + */ + void *getRawData() { return _data; } + const void *getRawData() const { return _data; } + + /** + * Gets the value at the given index as a reg_t. + */ + reg_t getAsID(const uint16 index) { + if (getSciVersion() >= SCI_VERSION_3) { + resize(index); + } else { + assert(index < _size); } - // Copy data from the old array to the new - memcpy(newArray, _data, _size * sizeof(T)); + switch(_type) { + case kArrayTypeInt16: + case kArrayTypeID: + return ((reg_t *)_data)[index]; + case kArrayTypeByte: + case kArrayTypeString: + return make_reg(0, ((byte *)_data)[index]); + default: + error("Invalid array type %d", _type); + } + } + + /** + * Sets the value at the given index from a reg_t. + */ + void setFromID(const uint16 index, const reg_t value) { + if (getSciVersion() >= SCI_VERSION_3) { + resize(index); + } else { + assert(index < _size); + } - // Now set the new array to the old and set the sizes - delete[] _data; - _data = newArray; - _size = _actualSize = size; + switch(_type) { + case kArrayTypeInt16: + case kArrayTypeID: + ((reg_t *)_data)[index] = value; + break; + case kArrayTypeByte: + case kArrayTypeString: + ((byte *)_data)[index] = value.toSint16(); + break; + default: + error("Invalid array type %d", _type); + } } - T getValue(uint16 index) const { - if (index >= _size) - error("SciArray::getValue(): %d is out of bounds (%d)", index, _size); + /** + * Gets the value at the given index as an int16. + */ + int16 getAsInt16(const uint16 index) { + assert(_type == kArrayTypeInt16); - return _data[index]; + if (getSciVersion() >= SCI_VERSION_3) { + resize(index); + } else { + assert(index < _size); + } + + const reg_t value = ((reg_t *)_data)[index]; + assert(value.isNumber()); + return value.toSint16(); } - void setValue(uint16 index, T value) { - if (index >= _size) - error("SciArray::setValue(): %d is out of bounds (%d)", index, _size); + /** + * Sets the value at the given index from an int16. + */ + void setFromInt16(const uint16 index, const int16 value) { + assert(_type == kArrayTypeInt16); + + if (getSciVersion() >= SCI_VERSION_3) { + resize(index + 1); + } else { + assert(index < _size); + } - _data[index] = value; + ((reg_t *)_data)[index] = make_reg(0, value); } - byte getType() const { return _type; } - uint32 getSize() const { return _size; } - T *getRawData() { return _data; } - const T *getRawData() const { return _data; } + /** + * Returns a reference to the byte at the given index. Only valid for + * string and byte arrays. + */ + byte &byteAt(const uint16 index) { + assert(_type == kArrayTypeString || _type == kArrayTypeByte); -protected: - int8 _type; - T *_data; - uint32 _size; // _size holds the number of entries that the scripts have requested - uint32 _actualSize; // _actualSize is the actual numbers of entries allocated -}; + if (getSciVersion() >= SCI_VERSION_3) { + resize(index); + } else { + assert(index < _size); + } -class SciString : public SciArray<char> { -public: - SciString() : SciArray<char>() { setType(3); } + return ((byte *)_data)[index]; + } - // We overload destroy to ensure the string type is 3 after destroying - void destroy() { SciArray<char>::destroy(); _type = 3; } + /** + * Returns a reference to the char at the given index. Only valid for + * string and byte arrays. + */ + char &charAt(const uint16 index) { + assert(_type == kArrayTypeString || _type == kArrayTypeByte); - Common::String toString() const; - void fromString(const Common::String &string); -}; + if (getSciVersion() >= SCI_VERSION_3) { + resize(index); + } else { + assert(index < _size); + } -struct ArrayTable : public SegmentObjTable<SciArray<reg_t> > { - ArrayTable() : SegmentObjTable<SciArray<reg_t> >(SEG_TYPE_ARRAY) {} + return ((char *)_data)[index]; + } - virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr); - virtual Common::Array<reg_t> listAllOutgoingReferences(reg_t object) const; + /** + * Returns a reference to the reg_t at the given index. Only valid for ID + * and int16 arrays. + */ + reg_t &IDAt(const uint16 index) { + assert(_type == kArrayTypeID || _type == kArrayTypeInt16); - void saveLoadWithSerializer(Common::Serializer &ser); - SegmentRef dereference(reg_t pointer); -}; + if (getSciVersion() >= SCI_VERSION_3) { + resize(index); + } else { + assert(index < _size); + } -struct StringTable : public SegmentObjTable<SciString> { - StringTable() : SegmentObjTable<SciString>(SEG_TYPE_STRING) {} + return ((reg_t *)_data)[index]; + } - virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr) { - at(sub_addr.getOffset()).destroy(); - freeEntry(sub_addr.getOffset()); + /** + * Reads values from the given reg_t pointer and sets them in the array, + * growing the array if needed to store all values. + */ + void setElements(const uint16 index, uint16 count, const reg_t *values) { + resize(index + count); + + switch (_type) { + case kArrayTypeInt16: + case kArrayTypeID: { + const reg_t *source = values; + reg_t *target = (reg_t *)_data + index; + while (count--) { + *target++ = *source++; + } + break; + } + case kArrayTypeByte: + case kArrayTypeString: { + const reg_t *source = values; + byte *target = (byte *)_data + index; + while (count--) { + if (!source->isNumber()) { + error("Non-number %04x:%04x sent to byte or string array", PRINT_REG(*source)); + } + *target++ = source->getOffset(); + ++source; + } + break; + } + default: + error("Attempted write to SciArray with invalid type %d", _type); + } + } + + /** + * Fills the array with the given value. Existing values will be + * overwritten. The array will be grown if needed to store all values. + */ + void fill(const uint16 index, uint16 count, const reg_t value) { + if (count == 65535 /* -1 */) { + count = size() - index; + } + + if (!count) { + return; + } + + resize(index + count); + + switch (_type) { + case kArrayTypeInt16: + case kArrayTypeID: { + reg_t *target = (reg_t *)_data + index; + while (count--) { + *target = value; + } + break; + } + case kArrayTypeByte: + case kArrayTypeString: { + byte *target = (byte *)_data + index; + const byte fillValue = value.getOffset(); + while (count--) { + *target = fillValue; + } + break; + } + case kArrayTypeInvalid: + error("Attempted write to uninitialized SciArray"); + } + } + + /** + * Copies values from the source array. Both arrays will be grown if needed + * to prevent out-of-bounds reads/writes. + */ + void copy(SciArray &source, const uint16 sourceIndex, const uint16 targetIndex, uint16 count) { + if (count == 65535 /* -1 */) { + count = source.size() - sourceIndex; + } + + if (!count) { + return; + } + + resize(targetIndex + count); + source.resize(sourceIndex + count); + + assert(source._elementSize == _elementSize); + + const byte *sourceData = (byte *)source._data + sourceIndex * source._elementSize; + byte *targetData = (byte *)_data + targetIndex * _elementSize; + memmove(targetData, sourceData, count * _elementSize); + } + + void byteCopy(const SciArray &source, const uint16 sourceOffset, const uint16 targetOffset, const uint16 count) { + error("SciArray::byteCopy not implemented"); } + /** + * Removes whitespace from string data held in this array. + */ + void trim(const int8 flags, const char showChar) { + enum { + kWhitespaceBoundary = 32, + kAsciiBoundary = 128 + }; + + byte *data = (byte *)_data; + byte *source; + byte *target; + + if (flags & kArrayTrimLeft) { + target = data; + source = data; + while (*source != '\0' && *source != showChar && *source <= kWhitespaceBoundary) { + ++source; + } + strcpy((char *)target, (char *)source); + } + + if (flags & kArrayTrimRight) { + source = data + strlen((char *)data) - 1; + while (source > data && *source != showChar && *source <= kWhitespaceBoundary) { + --source; + } + *source = '\0'; + } + + if (flags & kArrayTrimCenter) { + target = data; + while (*target && *target <= kWhitespaceBoundary && *target != showChar) { + ++target; + } + + if (*target) { + while (*target && (*target > kWhitespaceBoundary || *target == showChar)) { + ++target; + } + + if (*target) { + source = target; + while (*source) { + while (*source && *source <= kWhitespaceBoundary && *source != showChar) { + ++source; + } + + while (*source && (*source > kWhitespaceBoundary || *source == showChar)) { + *target++ = *source++; + } + } + + --source; + while (source > target && (*source <= kWhitespaceBoundary || *source >= kAsciiBoundary) && *source != showChar) { + --source; + } + ++source; + + memmove(target, source, strlen((char *)source) + 1); + } + } + } + } + + /** + * Copies the string data held by this array into a new Common::String. + */ + Common::String toString() const { + assert(_type == kArrayTypeString); + return Common::String((char *)_data); + } + + /** + * Copies the string from the given Common::String into this array. + */ + void fromString(const Common::String &string) { + // At least LSL6hires uses a byte-type array to hold string data + assert(_type == kArrayTypeString || _type == kArrayTypeByte); + resize(string.size() + 1, true); + Common::strlcpy((char *)_data, string.c_str(), string.size() + 1); + } + +protected: + void *_data; + SciArrayType _type; + uint16 _size; + uint8 _elementSize; +}; + +struct ArrayTable : public SegmentObjTable<SciArray> { + ArrayTable() : SegmentObjTable<SciArray>(SEG_TYPE_ARRAY) {} + + virtual Common::Array<reg_t> listAllOutgoingReferences(reg_t object) const; + void saveLoadWithSerializer(Common::Serializer &ser); SegmentRef dereference(reg_t pointer); }; @@ -649,7 +963,7 @@ public: /** * Allocates and initialises a new bitmap. */ - inline void create(const int16 width, const int16 height, const uint8 skipColor, const int16 displaceX, const int16 displaceY, const int16 scaledWidth, const int16 scaledHeight, const uint32 paletteSize, const bool remap, const bool gc) { + inline void create(const int16 width, const int16 height, const uint8 skipColor, const int16 originX, const int16 originY, const int16 xResolution, const int16 yResolution, const uint32 paletteSize, const bool remap, const bool gc) { _dataSize = getBitmapSize(width, height) + paletteSize; _data = (byte *)realloc(_data, _dataSize); @@ -659,7 +973,7 @@ public: setWidth(width); setHeight(height); - setDisplace(Common::Point(displaceX, displaceY)); + setOrigin(Common::Point(originX, originY)); setSkipColor(skipColor); _data[9] = 0; WRITE_SCI11ENDIAN_UINT16(_data + 10, 0); @@ -670,8 +984,8 @@ public: setDataOffset(bitmapHeaderSize); setUncompressedDataOffset(bitmapHeaderSize); setControlOffset(0); - setScaledWidth(scaledWidth); - setScaledHeight(scaledHeight); + setXResolution(xResolution); + setYResolution(yResolution); _buffer = Buffer(getWidth(), getHeight(), getPixels()); } @@ -703,16 +1017,16 @@ public: BITMAP_PROPERTY(16, Width, 0); BITMAP_PROPERTY(16, Height, 2); - inline Common::Point getDisplace() const { + inline Common::Point getOrigin() const { return Common::Point( (int16)READ_SCI11ENDIAN_UINT16(_data + 4), (int16)READ_SCI11ENDIAN_UINT16(_data + 6) ); } - inline void setDisplace(const Common::Point &displace) { - WRITE_SCI11ENDIAN_UINT16(_data + 4, (uint16)displace.x); - WRITE_SCI11ENDIAN_UINT16(_data + 6, (uint16)displace.y); + inline void setOrigin(const Common::Point &origin) { + WRITE_SCI11ENDIAN_UINT16(_data + 4, (uint16)origin.x); + WRITE_SCI11ENDIAN_UINT16(_data + 6, (uint16)origin.y); } inline uint8 getSkipColor() const { @@ -761,7 +1075,7 @@ public: // NOTE: This property always seems to be zero BITMAP_PROPERTY(32, ControlOffset, 32); - inline uint16 getScaledWidth() const { + inline uint16 getXResolution() const { if (getDataOffset() >= 40) { return READ_SCI11ENDIAN_UINT16(_data + 36); } @@ -770,13 +1084,13 @@ public: return 320; } - inline void setScaledWidth(uint16 scaledWidth) { + inline void setXResolution(uint16 xResolution) { if (getDataOffset() >= 40) { - WRITE_SCI11ENDIAN_UINT16(_data + 36, scaledWidth); + WRITE_SCI11ENDIAN_UINT16(_data + 36, xResolution); } } - inline uint16 getScaledHeight() const { + inline uint16 getYResolution() const { if (getDataOffset() >= 40) { return READ_SCI11ENDIAN_UINT16(_data + 38); } @@ -785,9 +1099,9 @@ public: return 200; } - inline void setScaledHeight(uint16 scaledHeight) { + inline void setYResolution(uint16 yResolution) { if (getDataOffset() >= 40) { - WRITE_SCI11ENDIAN_UINT16(_data + 38, scaledHeight); + WRITE_SCI11ENDIAN_UINT16(_data + 38, yResolution); } } @@ -803,6 +1117,16 @@ public: } virtual void saveLoadWithSerializer(Common::Serializer &ser); + + void applyRemap(SciArray &clut) { + const int length = getWidth() * getHeight(); + uint8 *pixel = getPixels(); + for (int i = 0; i < length; ++i) { + const int16 color = clut.getAsInt16(*pixel); + assert(color >= 0 && color <= 255); + *pixel++ = (uint8)color; + } + } }; struct BitmapTable : public SegmentObjTable<SciBitmap> { diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp index ac621f58ae..3ae902215c 100644 --- a/engines/sci/engine/selector.cpp +++ b/engines/sci/engine/selector.cpp @@ -226,15 +226,14 @@ void writeSelector(SegManager *segMan, reg_t object, Selector selectorId, reg_t ObjVarRef address; if ((selectorId < 0) || (selectorId > (int)g_sci->getKernel()->getSelectorNamesSize())) { - error("Attempt to write to invalid selector %d of" - " object at %04x:%04x.", selectorId, PRINT_REG(object)); - return; + const SciCallOrigin origin = g_sci->getEngineState()->getCurrentCallOrigin(); + error("Attempt to write to invalid selector %d. Address %04x:%04x, %s", selectorId, PRINT_REG(object), origin.toString().c_str()); } - if (lookupSelector(segMan, object, selectorId, &address, NULL) != kSelectorVariable) - error("Selector '%s' of object at %04x:%04x could not be" - " written to", g_sci->getKernel()->getSelectorName(selectorId).c_str(), PRINT_REG(object)); - else { + if (lookupSelector(segMan, object, selectorId, &address, NULL) != kSelectorVariable) { + const SciCallOrigin origin = g_sci->getEngineState()->getCurrentCallOrigin(); + error("Selector '%s' of object could not be written to. Address %04x:%04x, %s", g_sci->getKernel()->getSelectorName(selectorId).c_str(), PRINT_REG(object), origin.toString().c_str()); + } else { *address.getPointer(segMan) = value; #ifdef ENABLE_SCI32 updateInfoFlagViewVisible(segMan->getObject(object), selectorId); @@ -255,12 +254,12 @@ void invokeSelector(EngineState *s, reg_t object, int selectorId, slc_type = lookupSelector(s->_segMan, object, selectorId, NULL, NULL); if (slc_type == kSelectorNone) { - error("Selector '%s' of object at %04x:%04x could not be invoked", - g_sci->getKernel()->getSelectorName(selectorId).c_str(), PRINT_REG(object)); + const SciCallOrigin origin = g_sci->getEngineState()->getCurrentCallOrigin(); + error("invokeSelector: Selector '%s' could not be invoked. Address %04x:%04x, %s", g_sci->getKernel()->getSelectorName(selectorId).c_str(), PRINT_REG(object), origin.toString().c_str()); } if (slc_type == kSelectorVariable) { - error("Attempting to invoke variable selector %s of object %04x:%04x", - g_sci->getKernel()->getSelectorName(selectorId).c_str(), PRINT_REG(object)); + const SciCallOrigin origin = g_sci->getEngineState()->getCurrentCallOrigin(); + error("invokeSelector: Attempting to invoke variable selector %s. Address %04x:%04x, %s", g_sci->getKernel()->getSelectorName(selectorId).c_str(), PRINT_REG(object), origin.toString().c_str()); } for (i = 0; i < argc; i++) @@ -288,8 +287,8 @@ SelectorType lookupSelector(SegManager *segMan, reg_t obj_location, Selector sel selectorId &= ~1; if (!obj) { - error("lookupSelector(): Attempt to send to non-object or invalid script. Address was %04x:%04x", - PRINT_REG(obj_location)); + const SciCallOrigin origin = g_sci->getEngineState()->getCurrentCallOrigin(); + error("lookupSelector: Attempt to send to non-object or invalid script. Address %04x:%04x, %s", PRINT_REG(obj_location), origin.toString().c_str()); } index = obj->locateVarSelector(segMan, selectorId); diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index a338beffc9..c23add1211 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -159,11 +159,11 @@ void EngineState::initGlobals() { } uint16 EngineState::currentRoomNumber() const { - return variables[VAR_GLOBAL][13].toUint16(); + return variables[VAR_GLOBAL][kGlobalVarNewRoomNo].toUint16(); } void EngineState::setRoomNumber(uint16 roomNumber) { - variables[VAR_GLOBAL][13] = make_reg(0, roomNumber); + variables[VAR_GLOBAL][kGlobalVarNewRoomNo] = make_reg(0, roomNumber); } void EngineState::shrinkStackToBase() { @@ -202,12 +202,12 @@ Common::String SciEngine::getSciLanguageString(const Common::String &str, kLangu const byte *textPtr = (const byte *)str.c_str(); byte curChar = 0; byte curChar2 = 0; - + while (1) { curChar = *textPtr; if (!curChar) break; - + if ((curChar == '%') || (curChar == '#')) { curChar2 = *(textPtr + 1); foundLanguage = charToLanguage(curChar2); @@ -236,7 +236,7 @@ Common::String SciEngine::getSciLanguageString(const Common::String &str, kLangu while (1) { curChar = *textPtr; - + switch (curChar) { case 0: // Terminator NUL return fullWidth; @@ -257,7 +257,7 @@ Common::String SciEngine::getSciLanguageString(const Common::String &str, kLangu continue; } } - + textPtr++; mappedChar = s_halfWidthSJISMap[curChar]; @@ -380,4 +380,46 @@ void SciEngine::checkVocabularySwitch() { } } +SciCallOrigin EngineState::getCurrentCallOrigin() const { + // IMPORTANT: This method must always return values that match *exactly* the + // values in the workaround tables in workarounds.cpp, or workarounds will + // be broken + + Common::String curObjectName = _segMan->getObjectName(xs->sendp); + Common::String curMethodName; + const Script *localScript = _segMan->getScriptIfLoaded(xs->local_segment); + int curScriptNr = localScript->getScriptNumber(); + + if (xs->debugLocalCallOffset != -1) { + // if lastcall was actually a local call search back for a real call + Common::List<ExecStack>::const_iterator callIterator = _executionStack.end(); + while (callIterator != _executionStack.begin()) { + callIterator--; + const ExecStack &loopCall = *callIterator; + if ((loopCall.debugSelector != -1) || (loopCall.debugExportId != -1)) { + xs->debugSelector = loopCall.debugSelector; + xs->debugExportId = loopCall.debugExportId; + break; + } + } + } + + if (xs->type == EXEC_STACK_TYPE_CALL) { + if (xs->debugSelector != -1) { + curMethodName = g_sci->getKernel()->getSelectorName(xs->debugSelector); + } else if (xs->debugExportId != -1) { + curObjectName = ""; + curMethodName = Common::String::format("export %d", xs->debugExportId); + } + } + + SciCallOrigin reply; + reply.objectName = curObjectName; + reply.methodName = curMethodName; + reply.scriptNr = curScriptNr; + reply.localCallOffset = xs->debugLocalCallOffset; + reply.roomNr = currentRoomNumber(); + return reply; +} + } // End of namespace Sci diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index baa912b60e..5297a176d3 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -57,10 +57,6 @@ enum AbortGameState { kAbortQuitGame = 3 }; -// slot 0 is the ScummVM auto-save slot, which is not used by us, but is still reserved -#define SAVEGAMESLOT_FIRST 1 -#define SAVEGAMESLOT_LAST 99 - // We assume that scripts give us savegameId 0->99 for creating a new save slot // and savegameId 100->199 for existing save slots. Refer to kfile.cpp enum { @@ -99,6 +95,21 @@ struct VideoState { } }; +/** + * Trace information about a VM function call. + */ +struct SciCallOrigin { + int scriptNr; //< The source script of the function + Common::String objectName; //< The name of the object being called + Common::String methodName; //< The name of the method being called + int localCallOffset; //< The byte offset of a local script subroutine called by the origin method. -1 if not in a local subroutine. + int roomNr; //< The room that was loaded at the time of the call + + Common::String toString() const { + return Common::String::format("method %s::%s (room %d, script %d, localCall %x)", objectName.c_str(), methodName.c_str(), roomNr, scriptNr, localCallOffset); + } +}; + struct EngineState : public Common::Serializable { public: EngineState(SegManager *segMan); @@ -209,6 +220,11 @@ public: * Resets the engine state. */ void reset(bool isRestoring); + + /** + * Finds and returns the origin of the current call. + */ + SciCallOrigin getCurrentCallOrigin() const; }; } // End of namespace Sci diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 548fd477bf..82de957387 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -20,6 +20,7 @@ * */ +#include "common/config-manager.h" #include "common/debug.h" #include "common/debug-channels.h" @@ -124,21 +125,17 @@ static reg_t read_var(EngineState *s, int type, int index) { case VAR_TEMP: { // Uninitialized read on a temp // We need to find correct replacements for each situation manually - SciTrackOriginReply originReply; + SciCallOrigin originReply; SciWorkaroundSolution solution = trackOriginAndFindWorkaround(index, uninitializedReadWorkarounds, &originReply); if (solution.type == WORKAROUND_NONE) { #ifdef RELEASE_BUILD // If we are running an official ScummVM release -> fake 0 in unknown cases - warning("Uninitialized read for temp %d from method %s::%s (room %d, script %d, localCall %x)", - index, originReply.objectName.c_str(), originReply.methodName.c_str(), s->currentRoomNumber(), - originReply.scriptNr, originReply.localCallOffset); + warning("Uninitialized read for temp %d from %s", index, originReply.toString().c_str()); s->variables[type][index] = NULL_REG; break; #else - error("Uninitialized read for temp %d from method %s::%s (room %d, script %d, localCall %x)", - index, originReply.objectName.c_str(), originReply.methodName.c_str(), s->currentRoomNumber(), - originReply.scriptNr, originReply.localCallOffset); + error("Uninitialized read for temp %d from %s", index, originReply.toString().c_str()); #endif } assert(solution.type == WORKAROUND_FAKE); @@ -179,7 +176,7 @@ static void write_var(EngineState *s, int type, int index, reg_t value) { // stopGroop object, which points to ego, to the new ego object. If this is not // done, ego's movement will not be updated properly, so the result is // unpredictable (for example in LSL5, Patti spins around instead of walking). - if (index == 0 && type == VAR_GLOBAL && getSciVersion() > SCI_VERSION_0_EARLY) { // global 0 is ego + if (index == kGlobalVarEgo && type == VAR_GLOBAL && getSciVersion() > SCI_VERSION_0_EARLY) { reg_t stopGroopPos = s->_segMan->findObjectByName("stopGroop"); if (!stopGroopPos.isNull()) { // does the game have a stopGroop object? // Find the "client" member variable of the stopGroop object, and update it @@ -200,9 +197,9 @@ static void write_var(EngineState *s, int type, int index, reg_t value) { s->variables[type][index] = value; - if (type == VAR_GLOBAL && index == 90) { + if (type == VAR_GLOBAL && index == kGlobalVarMessageType) { // The game is trying to change its speech/subtitle settings - if (!g_sci->getEngineState()->_syncedAudioOptions || s->variables[VAR_GLOBAL][4] == TRUE_REG) { + if (!g_sci->getEngineState()->_syncedAudioOptions || s->variables[VAR_GLOBAL][kGlobalVarQuit] == TRUE_REG) { // ScummVM audio options haven't been applied yet, so apply them. // We also force the ScummVM audio options when loading a game from // the launcher. @@ -213,6 +210,12 @@ static void write_var(EngineState *s, int type, int index, reg_t value) { g_sci->updateScummVMAudioOptions(); } } + +#ifdef ENABLE_SCI32 + if (type == VAR_GLOBAL && index == kGlobalVarTextSpeed && getSciVersion() >= SCI_VERSION_2) { + ConfMan.setInt("talkspeed", (8 - value.toSint16()) * 255 / 8); + } +#endif } } @@ -361,16 +364,13 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) { if (kernelCall.signature && !kernel->signatureMatch(kernelCall.signature, argc, argv)) { // signature mismatch, check if a workaround is available - SciTrackOriginReply originReply; + SciCallOrigin originReply; SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, kernelCall.workarounds, &originReply); switch (solution.type) { case WORKAROUND_NONE: { Common::String signatureDetailsStr; kernel->signatureDebug(signatureDetailsStr, kernelCall.signature, argc, argv); - error("\n%s[VM] k%s[%x]: signature mismatch in method %s::%s (room %d, script %d, localCall 0x%x)", - signatureDetailsStr.c_str(), - kernelCall.name, kernelCallNr, originReply.objectName.c_str(), originReply.methodName.c_str(), - s->currentRoomNumber(), originReply.scriptNr, originReply.localCallOffset); + error("\n%s[VM] k%s[%x]: signature mismatch in %s", signatureDetailsStr.c_str(), kernelCall.name, kernelCallNr, originReply.toString().c_str()); break; } case WORKAROUND_IGNORE: // don't do kernel call, leave acc alone @@ -429,7 +429,7 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) { const KernelSubFunction &kernelSubCall = kernelCall.subFunctions[subId]; if (kernelSubCall.signature && !kernel->signatureMatch(kernelSubCall.signature, argc, argv)) { // Signature mismatch - SciTrackOriginReply originReply; + SciCallOrigin originReply; SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, kernelSubCall.workarounds, &originReply); switch (solution.type) { case WORKAROUND_NONE: { @@ -438,15 +438,13 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) { int callNameLen = strlen(kernelCall.name); if (strncmp(kernelCall.name, kernelSubCall.name, callNameLen) == 0) { const char *subCallName = kernelSubCall.name + callNameLen; - error("\n%s[VM] k%s(%s): signature mismatch in method %s::%s (room %d, script %d, localCall %x)", - signatureDetailsStr.c_str(), - kernelCall.name, subCallName, originReply.objectName.c_str(), originReply.methodName.c_str(), - s->currentRoomNumber(), originReply.scriptNr, originReply.localCallOffset); + error("\n%s[VM] k%s(%s): signature mismatch in %s", + signatureDetailsStr.c_str(), kernelCall.name, subCallName, + originReply.toString().c_str()); } - error("\n%s[VM] k%s: signature mismatch in method %s::%s (room %d, script %d, localCall %x)", - signatureDetailsStr.c_str(), - kernelSubCall.name, originReply.objectName.c_str(), originReply.methodName.c_str(), - s->currentRoomNumber(), originReply.scriptNr, originReply.localCallOffset); + error("\n%s[VM] k%s: signature mismatch in %s", + signatureDetailsStr.c_str(), kernelSubCall.name, + originReply.toString().c_str()); break; } case WORKAROUND_IGNORE: // don't do kernel call, leave acc alone diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index c41060dc32..dd66d9d52c 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -136,6 +136,22 @@ enum { VAR_PARAM = 3 }; +enum GlobalVar { + kGlobalVarEgo = 0, + kGlobalVarCurrentRoom = 2, + kGlobalVarSpeed = 3, // SCI16 + kGlobalVarQuit = 4, + kGlobalVarPlanes = 10, // SCI32 + kGlobalVarCurrentRoomNo = 11, + kGlobalVarPreviousRoomNo = 12, + kGlobalVarNewRoomNo = 13, + kGlobalVarScore = 15, + kGlobalVarFastCast = 84, // SCI16 + kGlobalVarMessageType = 90, + kGlobalVarTextSpeed = 94, // SCI32; 0 is fastest, 8 is slowest + kGlobalVarShivers1Score = 349 +}; + /** Number of kernel calls in between gcs; should be < 50000 */ enum { GC_INTERVAL = 0x8000 diff --git a/engines/sci/engine/vm_types.cpp b/engines/sci/engine/vm_types.cpp index d74e2b194c..b2e250ab8b 100644 --- a/engines/sci/engine/vm_types.cpp +++ b/engines/sci/engine/vm_types.cpp @@ -66,13 +66,10 @@ void reg_t::setOffset(uint32 offset) { } reg_t reg_t::lookForWorkaround(const reg_t right, const char *operation) const { - SciTrackOriginReply originReply; + SciCallOrigin originReply; SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, arithmeticWorkarounds, &originReply); if (solution.type == WORKAROUND_NONE) - error("Invalid arithmetic operation (%s - params: %04x:%04x and %04x:%04x) from method %s::%s (room %d, script %d, localCall %x)", - operation, PRINT_REG(*this), PRINT_REG(right), originReply.objectName.c_str(), - originReply.methodName.c_str(), g_sci->getEngineState()->currentRoomNumber(), originReply.scriptNr, - originReply.localCallOffset); + error("Invalid arithmetic operation (%s - params: %04x:%04x and %04x:%04x) from %s", operation, PRINT_REG(*this), PRINT_REG(right), originReply.toString().c_str()); assert(solution.type == WORKAROUND_FAKE); return make_reg(0, solution.value); } diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 7aaea0902a..4c0fee49c5 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -318,15 +318,15 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = { { GID_LSL6, 820, 82, 0, "", "export 0", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when touching the electric fence - bug #5103 { GID_LSL6, -1, 85, 0, "washcloth", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // washcloth in inventory { GID_LSL6, -1, 928, -1, "Narrator", "startText", NULL, 0, { WORKAROUND_FAKE, 0 } }, // used by various objects that are even translated in foreign versions, that's why we use the base-class - { GID_LSL6HIRES, 0, 85, 0, "LL6Inv", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // on startup + { GID_LSL6HIRES, -1, 85, 0, "LL6Inv", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when creating a new game { GID_LSL6HIRES, -1, 64950, 1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // at least when entering swimming pool area { GID_LSL6HIRES, -1, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // during the game { GID_MOTHERGOOSE256, -1, 0, 0, "MG", "doit", NULL, 5, { WORKAROUND_FAKE, 0 } }, // SCI1.1: When moving the cursor all the way to the left during the game - bug #5224 { GID_MOTHERGOOSE256, -1, 992, 0, "AIPath", "init", NULL, 0, { WORKAROUND_FAKE, 0 } }, // Happens in the demo and full version. In the demo, it happens when walking two screens from mother goose's house to the north. In the full version, it happens in rooms 7 and 23 - bug #5269 { GID_MOTHERGOOSE256, 90, 90, 0, "introScript", "changeState", NULL, 65, { WORKAROUND_FAKE, 0 } }, // SCI1(CD): At the very end, after the game is completed and restarted - bug #5626 { GID_MOTHERGOOSE256, 94, 94, 0, "sunrise", "changeState", NULL, 367, { WORKAROUND_FAKE, 0 } }, // At the very end, after the game is completed - bug #5294 - { GID_MOTHERGOOSEHIRES,-1,64950, 1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // right when clicking on a child at the start and probably also later - { GID_MOTHERGOOSEHIRES,-1,64950, 1, "View", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // see above + { GID_MOTHERGOOSEHIRES,-1,64950, -1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // right when clicking on a child at the start and probably also later + { GID_MOTHERGOOSEHIRES,-1,64950, -1, "View", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // see above { GID_PEPPER, -1, 894, 0, "Package", "doVerb", NULL, 3, { WORKAROUND_FAKE, 0 } }, // using the hand on the book in the inventory - bug #5154 { GID_PEPPER, 150, 928, 0, "Narrator", "startText", NULL, 0, { WORKAROUND_FAKE, 0 } }, // happens during the non-interactive demo of Pepper { GID_PQ4, -1, 25, 0, "iconToggle", "select", NULL, 1, { WORKAROUND_FAKE, 0 } }, // when toggling the icon bar to auto-hide or not @@ -347,6 +347,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = { { GID_QFG3, 330, 330, -1, "Teller", "doChild", NULL, -1, { WORKAROUND_FAKE, 0 } }, // when talking to King Rajah about "Rajah" (bug #5033, temp 1) or "Tarna" (temp 0), or when clicking on yourself and saying "Greet" (bug #5148, temp 1) { GID_QFG3, 700, 700, -1, "monsterIsDead", "changeState", NULL, 0, { WORKAROUND_FAKE, 0 } }, // in the jungle, after winning any fight, bug #5169 { GID_QFG3, 470, 470, -1, "rm470", "notify", NULL, 0, { WORKAROUND_FAKE, 0 } }, // closing the character screen in the Simbani village in the room with the bridge, bug #5165 + { GID_QFG3, 470, 470, -1, "<invalid name>", "notify", NULL, 0, { WORKAROUND_FAKE, 0 } }, // same as previous, with rm470::name used for temp storage by fan patches added by GOG { GID_QFG3, 490, 490, -1, "computersMove", "changeState", NULL, 0, { WORKAROUND_FAKE, 0 } }, // when finishing awari game, bug #5167 { GID_QFG3, 490, 490, -1, "computersMove", "changeState", sig_uninitread_qfg3_2, 4, { WORKAROUND_FAKE, 0 } }, // also when finishing awari game { GID_QFG3, 851, 32, -1, "ProjObj", "doit", NULL, 1, { WORKAROUND_FAKE, 0 } }, // near the end, when throwing the spear of death, bug #5282 @@ -379,6 +380,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = { { GID_SQ6, -1, 0, 0, "SQ6", "init", NULL, 2, { WORKAROUND_FAKE, 0 } }, // Demo and full version: called when the game starts (demo: room 0, full: room 100) { GID_SQ6, -1, 64950, -1, "Feature", "handleEvent", NULL, 0, { WORKAROUND_FAKE, 0 } }, // called when pressing "Start game" in the main menu, when entering the Orion's Belt bar (room 300), and perhaps other places { GID_SQ6, -1, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // during the game + { GID_SQ6, 210, 210, 0, "buttonSecret", "doVerb", NULL, 0, { WORKAROUND_FAKE, 0 } }, // after winning the first round of stooge fighter 3 { GID_TORIN, -1, 64017, 0, "oFlags", "clear", NULL, 0, { WORKAROUND_FAKE, 0 } }, // entering Torin's home in the French version { GID_TORIN, 10000, 64029, 0, "oMessager", "nextMsg", NULL, 3, { WORKAROUND_FAKE, 0 } }, // start of chapter one { GID_TORIN, 20100, 64964, 0, "DPath", "init", NULL, 1, { WORKAROUND_FAKE, 0 } }, // going down the cliff at the first screen of chapter 2 (washing area) @@ -396,6 +398,12 @@ const SciWorkaroundEntry kAbs_workarounds[] = { }; // gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround +const SciWorkaroundEntry kArraySetElements_workarounds[] = { + { GID_PHANTASMAGORIA,902, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_FAKE, 0 } }, // tries to set an element of a string array to the ego object when starting a new game and selecting a chapter above 1 + SCI_WORKAROUNDENTRY_TERMINATOR +}; + +// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround const SciWorkaroundEntry kCelHigh_workarounds[] = { { GID_KQ5, -1, 255, 0, "deathIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // english floppy: when getting beaten up in the inn and probably more, called with 2nd parameter as object - bug #5049 { GID_PQ2, -1, 255, 0, "DIcon", "setSize", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // when showing picture within windows, called with 2nd/3rd parameters as objects @@ -544,6 +552,12 @@ const SciWorkaroundEntry kGetAngle_workarounds[] = { }; // gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround +const SciWorkaroundEntry kFileIOOpen_workarounds[] = { + { GID_TORIN, 61000, 61000, 0, "roSierraLogo", "init", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo + SCI_WORKAROUNDENTRY_TERMINATOR +}; + +// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround const SciWorkaroundEntry kFindKey_workarounds[] = { { GID_ECOQUEST2, 100, 999, 0, "myList", "contains", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When Noah Greene gives Adam the Ecorder, and just before the game gives a demonstration, a null reference to a list is passed - bug #4987 { GID_HOYLE4, 300, 999, 0, "Piles", "contains", NULL, 0, { WORKAROUND_FAKE, 0 } }, // When passing the three cards in Hearts, a null reference to a list is passed - bug #5664 @@ -670,6 +684,20 @@ const SciWorkaroundEntry kNewWindow_workarounds[] = { }; // gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround +const SciWorkaroundEntry kNumCels_workarounds[] = { + { GID_GK1, 460, 64998, -1, "GKEgo", "lastCel", NULL, -1, { WORKAROUND_FAKE, 5 } }, // when Gabriel clicks "ask" on the bartender from a distance + { GID_GK1, 808, 64998, -1, "sDJEnters", "changeState", NULL, -1, { WORKAROUND_FAKE, 6 } }, // + { GID_GK2, 470, 64998, -1, "pLookieLoos", "lastCel", NULL, -1, { WORKAROUND_FAKE, 50 } }, // random background movement in the crime scene in Munich city centre + { GID_GK2, 470, 64998, -1, "pNewsCrew", "lastCel", NULL, -1, { WORKAROUND_FAKE, 18 } }, // random background movement in the crime scene in Munich city centre + { GID_GK2, 470, 64998, -1, "pLeberGroup", "lastCel", NULL, -1, { WORKAROUND_FAKE, 22 } }, // random background movement in the crime scene in Munich city centre + { GID_SQ6, 270, 64998, -1, "offWorld", "lastCel", NULL, -1, { WORKAROUND_FAKE, 3 } }, // when exiting the kidnapping room + { GID_SQ6, 320, 64998, -1, "wandererB", "lastCel", NULL, -1, { WORKAROUND_FAKE, 8 } }, // random background movement on Polysorbate LX street 3 + { GID_SQ6, 340, 64998, -1, "wandererB", "lastCel", NULL, -1, { WORKAROUND_FAKE, 8 } }, // random background movement on Polysorbate LX street 1 + { GID_SQ6, 530, 64998, -1, "monitors", "lastCel", NULL, -1, { WORKAROUND_FAKE, 5 } }, // random background movement during cutscene + SCI_WORKAROUNDENTRY_TERMINATOR +}; + +// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround const SciWorkaroundEntry kPalVarySetPercent_workarounds[] = { { GID_GK1, 370, 370, 0, "graceComeOut", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // there's an extra parameter in GK1, when changing chapters. This extra parameter seems to be a bug or just unimplemented functionality, as there's no visible change from the original in the chapter change room SCI_WORKAROUNDENTRY_TERMINATOR @@ -699,7 +727,7 @@ const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[] = { // gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround const SciWorkaroundEntry kSetCursor_workarounds[] = { { GID_KQ5, -1, 768, 0, "KQCursor", "init", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // CD: gets called with 4 additional "900d" parameters - { GID_MOTHERGOOSEHIRES,0, 0, -1, "MG", "setCursor", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // At the start of the game, an object is passed as the cel number + { GID_MOTHERGOOSEHIRES,-1, 0, -1, "MG", "setCursor", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // At the start of the game, an object is passed as the cel number SCI_WORKAROUNDENTRY_TERMINATOR }; @@ -767,17 +795,12 @@ const SciWorkaroundEntry kUnLoad_workarounds[] = { }; // gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround -const SciWorkaroundEntry kStringPutAt_workarounds[] = { - { GID_PHANTASMAGORIA,902, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // When starting a new game from after chapter 1, the game tries to save ego's object in a string -}; - -// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround const SciWorkaroundEntry kScrollWindowAdd_workarounds[] = { { GID_PHANTASMAGORIA, 45, 64907, 0, "ScrollableWindow", "addString", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // ScrollWindow interface passes the last two parameters twice + SCI_WORKAROUNDENTRY_TERMINATOR }; - -SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin) { +SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciCallOrigin *trackOrigin) { // HACK for SCI3: Temporarily ignore this if (getSciVersion() == SCI_VERSION_3) { warning("SCI3 HACK: trackOriginAndFindWorkaround() called, ignoring"); @@ -789,37 +812,14 @@ SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroun const EngineState *state = g_sci->getEngineState(); ExecStack *lastCall = state->xs; - const Script *localScript = state->_segMan->getScriptIfLoaded(lastCall->local_segment); - int curScriptNr = localScript->getScriptNumber(); - int curLocalCallOffset = lastCall->debugLocalCallOffset; - - if (curLocalCallOffset != -1) { - // if lastcall was actually a local call search back for a real call - Common::List<ExecStack>::const_iterator callIterator = state->_executionStack.end(); - while (callIterator != state->_executionStack.begin()) { - callIterator--; - const ExecStack &loopCall = *callIterator; - if ((loopCall.debugSelector != -1) || (loopCall.debugExportId != -1)) { - lastCall->debugSelector = loopCall.debugSelector; - lastCall->debugExportId = loopCall.debugExportId; - break; - } - } - } - - Common::String curObjectName = state->_segMan->getObjectName(lastCall->sendp); - Common::String curMethodName; const SciGameId gameId = g_sci->getGameId(); - const int curRoomNumber = state->currentRoomNumber(); - - if (lastCall->type == EXEC_STACK_TYPE_CALL) { - if (lastCall->debugSelector != -1) { - curMethodName = g_sci->getKernel()->getSelectorName(lastCall->debugSelector); - } else if (lastCall->debugExportId != -1) { - curObjectName = ""; - curMethodName = Common::String::format("export %d", lastCall->debugExportId); - } - } + + *trackOrigin = state->getCurrentCallOrigin(); + const Common::String &curObjectName = trackOrigin->objectName; + const Common::String &curMethodName = trackOrigin->methodName; + const int &curRoomNumber = trackOrigin->roomNr; + const int &curScriptNr = trackOrigin->scriptNr; + const int &curLocalCallOffset = trackOrigin->localCallOffset; if (workaroundList) { // Search if there is a workaround for this one @@ -895,12 +895,6 @@ SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroun } while (!searchObject.isNull()); // no parent left? } - // give caller origin data - trackOrigin->objectName = curObjectName; - trackOrigin->methodName = curMethodName; - trackOrigin->scriptNr = curScriptNr; - trackOrigin->localCallOffset = lastCall->debugLocalCallOffset; - SciWorkaroundSolution noneFound; noneFound.type = WORKAROUND_NONE; noneFound.value = 0; diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index 2cccd05475..d1e985dcf1 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -24,6 +24,7 @@ #define SCI_ENGINE_WORKAROUNDS_H #include "sci/engine/vm_types.h" +#include "sci/engine/state.h" #include "sci/sci.h" namespace Sci { @@ -35,13 +36,6 @@ enum SciWorkaroundType { WORKAROUND_FAKE // fake kernel call / replace temp value / fake opcode }; -struct SciTrackOriginReply { - int scriptNr; - Common::String objectName; - Common::String methodName; - int localCallOffset; -}; - struct SciWorkaroundSolution { SciWorkaroundType type; uint16 value; @@ -76,6 +70,7 @@ extern const SciWorkaroundEntry kDirLoop_workarounds[]; extern const SciWorkaroundEntry kDisposeScript_workarounds[]; extern const SciWorkaroundEntry kDoSoundPlay_workarounds[]; extern const SciWorkaroundEntry kDoSoundFade_workarounds[]; +extern const SciWorkaroundEntry kFileIOOpen_workarounds[]; extern const SciWorkaroundEntry kFindKey_workarounds[]; extern const SciWorkaroundEntry kDeleteKey_workarounds[]; extern const SciWorkaroundEntry kGetAngle_workarounds[]; @@ -90,20 +85,22 @@ extern const SciWorkaroundEntry kIsObject_workarounds[]; extern const SciWorkaroundEntry kMemory_workarounds[]; extern const SciWorkaroundEntry kMoveCursor_workarounds[]; extern const SciWorkaroundEntry kNewWindow_workarounds[]; +extern const SciWorkaroundEntry kNumCels_workarounds[]; extern const SciWorkaroundEntry kPalVarySetPercent_workarounds[]; extern const SciWorkaroundEntry kRandom_workarounds[]; extern const SciWorkaroundEntry kReadNumber_workarounds[]; extern const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[]; extern const SciWorkaroundEntry kSetCursor_workarounds[]; +extern const SciWorkaroundEntry kArraySetElements_workarounds[]; extern const SciWorkaroundEntry kSetPort_workarounds[]; extern const SciWorkaroundEntry kStrAt_workarounds[]; extern const SciWorkaroundEntry kStrCpy_workarounds[]; extern const SciWorkaroundEntry kStrLen_workarounds[]; extern const SciWorkaroundEntry kUnLoad_workarounds[]; -extern const SciWorkaroundEntry kStringPutAt_workarounds[]; +extern const SciWorkaroundEntry kStringNew_workarounds[]; extern const SciWorkaroundEntry kScrollWindowAdd_workarounds[]; -extern SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin); +extern SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciCallOrigin *trackOrigin); } // End of namespace Sci diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index b267d2ebc2..44ac7ef4cf 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -109,8 +109,12 @@ static const MouseEventConversion mouseEventMappings[] = { { Common::EVENT_MBUTTONUP, SCI_EVENT_MOUSE_RELEASE } }; -EventManager::EventManager(bool fontIsExtended) : _fontIsExtended(fontIsExtended) { -} +EventManager::EventManager(bool fontIsExtended) : + _fontIsExtended(fontIsExtended) +#ifdef ENABLE_SCI32 + , _hotRectanglesActive(false) +#endif + {} EventManager::~EventManager() { } @@ -138,8 +142,8 @@ static int altify(int ch) { SciEvent EventManager::getScummVMEvent() { #ifdef ENABLE_SCI32 - SciEvent input = { SCI_EVENT_NONE, 0, 0, Common::Point(), Common::Point() }; - SciEvent noEvent = { SCI_EVENT_NONE, 0, 0, Common::Point(), Common::Point() }; + SciEvent input = { SCI_EVENT_NONE, 0, 0, Common::Point(), Common::Point(), -1 }; + SciEvent noEvent = { SCI_EVENT_NONE, 0, 0, Common::Point(), Common::Point(), -1 }; #else SciEvent input = { SCI_EVENT_NONE, 0, 0, Common::Point() }; SciEvent noEvent = { SCI_EVENT_NONE, 0, 0, Common::Point() }; @@ -169,17 +173,20 @@ SciEvent EventManager::getScummVMEvent() { if (getSciVersion() >= SCI_VERSION_2) { const Buffer &screen = g_sci->_gfxFrameout->getCurrentBuffer(); + Common::Point mousePosSci = mousePos; + mulru(mousePosSci, Ratio(screen.scriptWidth, screen.screenWidth), Ratio(screen.scriptHeight, screen.screenHeight)); + noEvent.mousePosSci = input.mousePosSci = mousePosSci; + if (ev.type == Common::EVENT_MOUSEMOVE) { // This will clamp `mousePos` according to the restricted zone, // so any cursor or screen item associated with the mouse position // does not bounce when it hits the edge (or ignore the edge) g_sci->_gfxCursor32->deviceMoved(mousePos); + if (_hotRectanglesActive) { + checkHotRectangles(mousePosSci); + } } - Common::Point mousePosSci = mousePos; - mulru(mousePosSci, Ratio(screen.scriptWidth, screen.screenWidth), Ratio(screen.scriptHeight, screen.screenHeight)); - noEvent.mousePosSci = input.mousePosSci = mousePosSci; - } else { #endif g_sci->_gfxScreen->adjustBackUpscaledCoordinates(mousePos.y, mousePos.x); @@ -198,7 +205,7 @@ SciEvent EventManager::getScummVMEvent() { return noEvent; } - if (ev.type == Common::EVENT_QUIT) { + if (ev.type == Common::EVENT_QUIT || ev.type == Common::EVENT_RTL) { input.type = SCI_EVENT_QUIT; return input; } @@ -365,12 +372,14 @@ void EventManager::updateScreen() { SciEvent EventManager::getSciEvent(uint32 mask) { #ifdef ENABLE_SCI32 - SciEvent event = { SCI_EVENT_NONE, 0, 0, Common::Point(), Common::Point() }; + SciEvent event = { SCI_EVENT_NONE, 0, 0, Common::Point(), Common::Point(), -1 }; #else SciEvent event = { SCI_EVENT_NONE, 0, 0, Common::Point() }; #endif - EventManager::updateScreen(); + if (getSciVersion() < SCI_VERSION_2) { + updateScreen(); + } // Get all queued events from graphics driver do { @@ -401,24 +410,43 @@ SciEvent EventManager::getSciEvent(uint32 mask) { return event; } -void SciEngine::sleep(uint32 msecs) { - uint32 time; - const uint32 wakeUpTime = g_system->getMillis() + msecs; - - while (true) { - // let backend process events and update the screen - _eventMan->getSciEvent(SCI_EVENT_PEEK); - time = g_system->getMillis(); - if (time + 10 < wakeUpTime) { - g_system->delayMillis(10); - } else { - if (time < wakeUpTime) - g_system->delayMillis(wakeUpTime - time); - break; +#ifdef ENABLE_SCI32 +void EventManager::setHotRectanglesActive(const bool active) { + _hotRectanglesActive = active; +} + +void EventManager::setHotRectangles(const Common::Array<Common::Rect> &rects) { + _hotRects = rects; + _activeRectIndex = -1; +} + +void EventManager::checkHotRectangles(const Common::Point &mousePosition) { + int lastActiveRectIndex = _activeRectIndex; + _activeRectIndex = -1; + + for (int16 i = 0; i < (int16)_hotRects.size(); ++i) { + if (_hotRects[i].contains(mousePosition)) { + _activeRectIndex = i; + if (i != lastActiveRectIndex) { + SciEvent hotRectEvent; + hotRectEvent.type = SCI_EVENT_HOT_RECTANGLE; + hotRectEvent.hotRectangleIndex = i; + _events.push_front(hotRectEvent); + break; + } + + lastActiveRectIndex = _activeRectIndex; } + } + if (lastActiveRectIndex != _activeRectIndex && lastActiveRectIndex != -1) { + _activeRectIndex = -1; + SciEvent hotRectEvent; + hotRectEvent.type = SCI_EVENT_HOT_RECTANGLE; + hotRectEvent.hotRectangleIndex = -1; + _events.push_front(hotRectEvent); } } - +#endif } // End of namespace Sci diff --git a/engines/sci/event.h b/engines/sci/event.h index 15a94b3e73..23b59f964a 100644 --- a/engines/sci/event.h +++ b/engines/sci/event.h @@ -50,6 +50,8 @@ struct SciEvent { * in script coordinates. */ Common::Point mousePosSci; + + int16 hotRectangleIndex; #endif }; @@ -60,6 +62,9 @@ struct SciEvent { #define SCI_EVENT_KEYBOARD (1 << 2) #define SCI_EVENT_DIRECTION (1 << 6) #define SCI_EVENT_SAID (1 << 7) +#ifdef ENABLE_SCI32 +#define SCI_EVENT_HOT_RECTANGLE (1 << 8) +#endif /*Fake values for other events*/ #define SCI_EVENT_QUIT (1 << 11) #define SCI_EVENT_PEEK (1 << 15) @@ -138,6 +143,17 @@ private: const bool _fontIsExtended; Common::List<SciEvent> _events; +#ifdef ENABLE_SCI32 +public: + void setHotRectanglesActive(const bool active); + void setHotRectangles(const Common::Array<Common::Rect> &rects); + void checkHotRectangles(const Common::Point &mousePosition); + +private: + bool _hotRectanglesActive; + Common::Array<Common::Rect> _hotRects; + int16 _activeRectIndex; +#endif }; } // End of namespace Sci diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 98278397b7..8d92cb905f 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -145,7 +145,7 @@ bool GfxAnimate::invoke(List *list, int argc, reg_t *argv) { if (_fastCastEnabled) { // Check if the game has a fastCast object set // if we don't abort kAnimate processing, at least in kq5 there will be animation cels drawn into speech boxes. - if (!_s->variables[VAR_GLOBAL][84].isNull()) { + if (!_s->variables[VAR_GLOBAL][kGlobalVarFastCast].isNull()) { // This normally points to an object called "fastCast", // but for example in Eco Quest 1 it may also point to an object called "EventHandler" (see bug #5170) // Original SCI only checked, if this global was not 0. @@ -338,7 +338,7 @@ void GfxAnimate::applyGlobalScaling(AnimateList::iterator entry, GfxView *view) int16 maxScale = readSelectorValue(_s->_segMan, entry->object, SELECTOR(maxScale)); int16 celHeight = view->getHeight(entry->loopNo, entry->celNo); int16 maxCelHeight = (maxScale * celHeight) >> 7; - reg_t globalVar2 = _s->variables[VAR_GLOBAL][2]; // current room object + reg_t globalVar2 = _s->variables[VAR_GLOBAL][kGlobalVarCurrentRoom]; // current room object int16 vanishingY = readSelectorValue(_s->_segMan, globalVar2, SELECTOR(vanishingY)); int16 fixedPortY = _ports->getPort()->rect.bottom - vanishingY; diff --git a/engines/sci/graphics/celobj32.cpp b/engines/sci/graphics/celobj32.cpp index d67a4dc03c..430500ce1e 100644 --- a/engines/sci/graphics/celobj32.cpp +++ b/engines/sci/graphics/celobj32.cpp @@ -28,6 +28,7 @@ #include "sci/graphics/palette32.h" #include "sci/graphics/remap32.h" #include "sci/graphics/text32.h" +#include "sci/engine/workarounds.h" namespace Sci { #pragma mark CelScaler @@ -35,9 +36,6 @@ namespace Sci { CelScaler *CelObj::_scaler = nullptr; void CelScaler::activateScaleTables(const Ratio &scaleX, const Ratio &scaleY) { - const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth; - const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight; - for (int i = 0; i < ARRAYSIZE(_scaleTables); ++i) { if (_scaleTables[i].scaleX == scaleX && _scaleTables[i].scaleY == scaleY) { _activeIndex = i; @@ -50,14 +48,12 @@ void CelScaler::activateScaleTables(const Ratio &scaleX, const Ratio &scaleY) { CelScalerTable &table = _scaleTables[i]; if (table.scaleX != scaleX) { - assert(screenWidth <= ARRAYSIZE(table.valuesX)); - buildLookupTable(table.valuesX, scaleX, screenWidth); + buildLookupTable(table.valuesX, scaleX, kCelScalerTableSize); table.scaleX = scaleX; } if (table.scaleY != scaleY) { - assert(screenHeight <= ARRAYSIZE(table.valuesY)); - buildLookupTable(table.valuesY, scaleY, screenHeight); + buildLookupTable(table.valuesY, scaleY, kCelScalerTableSize); table.scaleY = scaleY; } } @@ -159,17 +155,19 @@ struct SCALER_NoScale { template<bool FLIP, typename READER> struct SCALER_Scale { #ifndef NDEBUG + int16 _minX; int16 _maxX; #endif const byte *_row; READER _reader; int16 _x; - static int16 _valuesX[4096]; - static int16 _valuesY[4096]; + static int16 _valuesX[kCelScalerTableSize]; + static int16 _valuesY[kCelScalerTableSize]; SCALER_Scale(const CelObj &celObj, const Common::Rect &targetRect, const Common::Point &scaledPosition, const Ratio scaleX, const Ratio scaleY) : _row(nullptr), #ifndef NDEBUG + _minX(targetRect.left), _maxX(targetRect.right - 1), #endif // The maximum width of the scaled object may not be as @@ -221,17 +219,17 @@ struct SCALER_Scale { } else { if (FLIP) { const int lastIndex = celObj._width - 1; - for (int16 x = 0; x < targetRect.width(); ++x) { - _valuesX[targetRect.left + x] = lastIndex - table->valuesX[x]; + for (int16 x = targetRect.left; x < targetRect.right; ++x) { + _valuesX[x] = lastIndex - table->valuesX[x - scaledPosition.x]; } } else { - for (int16 x = 0; x < targetRect.width(); ++x) { - _valuesX[targetRect.left + x] = table->valuesX[x]; + for (int16 x = targetRect.left; x < targetRect.right; ++x) { + _valuesX[x] = table->valuesX[x - scaledPosition.x]; } } - for (int16 y = 0; y < targetRect.height(); ++y) { - _valuesY[targetRect.top + y] = table->valuesY[y]; + for (int16 y = targetRect.top; y < targetRect.bottom; ++y) { + _valuesY[y] = table->valuesY[y - scaledPosition.y]; } } } @@ -239,19 +237,19 @@ struct SCALER_Scale { inline void setTarget(const int16 x, const int16 y) { _row = _reader.getRow(_valuesY[y]); _x = x; - assert(_x >= 0 && _x <= _maxX); + assert(_x >= _minX && _x <= _maxX); } inline byte read() { - assert(_x >= 0 && _x <= _maxX); + assert(_x >= _minX && _x <= _maxX); return _row[_valuesX[_x++]]; } }; template<bool FLIP, typename READER> -int16 SCALER_Scale<FLIP, READER>::_valuesX[4096]; +int16 SCALER_Scale<FLIP, READER>::_valuesX[kCelScalerTableSize]; template<bool FLIP, typename READER> -int16 SCALER_Scale<FLIP, READER>::_valuesY[4096]; +int16 SCALER_Scale<FLIP, READER>::_valuesY[kCelScalerTableSize]; #pragma mark - #pragma mark CelObj - Resource readers @@ -283,13 +281,13 @@ public: struct READER_Compressed { private: const byte *const _resource; - byte _buffer[4096]; + byte _buffer[kCelScalerTableSize]; uint32 _controlOffset; uint32 _dataOffset; uint32 _uncompressedDataOffset; int16 _y; const int16 _sourceHeight; - const uint8 _transparentColor; + const uint8 _skipColor; const int16 _maxWidth; public: @@ -297,7 +295,7 @@ public: _resource(celObj.getResPointer()), _y(-1), _sourceHeight(celObj._height), - _transparentColor(celObj._transparentColor), + _skipColor(celObj._skipColor), _maxWidth(maxWidth) { assert(maxWidth <= celObj._width); @@ -328,7 +326,7 @@ public: // Fill with skip color if (controlByte & 0x40) { - memset(_buffer + i, _transparentColor, length); + memset(_buffer + i, _skipColor, length); // Next value is fill color } else { memset(_buffer + i, *literal, length); @@ -570,7 +568,7 @@ uint8 CelObj::readPixel(uint16 x, const uint16 y, bool mirrorX) const { void CelObj::submitPalette() const { if (_hunkPaletteOffset) { - HunkPalette palette(getResPointer() + _hunkPaletteOffset); + const HunkPalette palette(getResPointer() + _hunkPaletteOffset); g_sci->_gfxPalette32->submit(palette); } } @@ -667,7 +665,7 @@ void CelObj::render(Buffer &target, const Common::Rect &targetRect, const Common MAPPER mapper; SCALER scaler(*this, targetRect.left - scaledPosition.x + targetRect.width(), scaledPosition); - RENDERER<MAPPER, SCALER, false> renderer(mapper, scaler, _transparentColor); + RENDERER<MAPPER, SCALER, false> renderer(mapper, scaler, _skipColor); renderer.draw(target, targetRect, scaledPosition); } @@ -677,10 +675,10 @@ void CelObj::render(Buffer &target, const Common::Rect &targetRect, const Common MAPPER mapper; SCALER scaler(*this, targetRect, scaledPosition, scaleX, scaleY); if (_drawBlackLines) { - RENDERER<MAPPER, SCALER, true> renderer(mapper, scaler, _transparentColor); + RENDERER<MAPPER, SCALER, true> renderer(mapper, scaler, _skipColor); renderer.draw(target, targetRect, scaledPosition); } else { - RENDERER<MAPPER, SCALER, false> renderer(mapper, scaler, _transparentColor); + RENDERER<MAPPER, SCALER, false> renderer(mapper, scaler, _skipColor); renderer.draw(target, targetRect, scaledPosition); } } @@ -812,7 +810,31 @@ int16 CelObjView::getNumCels(const GuiResourceId viewId, const int16 loopNo) { const byte *const data = resource->data; const uint16 loopCount = data[2]; - if (loopNo >= loopCount || loopNo < 0) { + + // Every version of SCI32 has a logic error in this function that causes + // random memory to be read if a script requests the cel count for one + // past the maximum loop index. At least GK1 room 800 does this, and gets + // stuck in an infinite loop because the game script expects this method + // to return a non-zero value. + // The scope of this bug means it is likely to pop up in other games, so we + // explicitly trap the bad condition here and report it so that any other + // game scripts relying on this broken behavior can be fixed as well + if (loopNo == loopCount) { + SciCallOrigin origin; + SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, kNumCels_workarounds, &origin); + switch (solution.type) { + case WORKAROUND_NONE: + error("[CelObjView::getNumCels]: loop number %d is equal to loop count in view %u, %s", loopNo, viewId, origin.toString().c_str()); + case WORKAROUND_FAKE: + return (int16)solution.value; + case WORKAROUND_IGNORE: + return 0; + case WORKAROUND_STILLCALL: + break; + } + } + + if (loopNo > loopCount || loopNo < 0) { return 0; } @@ -869,20 +891,20 @@ CelObjView::CelObjView(const GuiResourceId viewId, const int16 loopNo, const int const byte *const data = resource->data; - _scaledWidth = READ_SCI11ENDIAN_UINT16(data + 14); - _scaledHeight = READ_SCI11ENDIAN_UINT16(data + 16); + _xResolution = READ_SCI11ENDIAN_UINT16(data + 14); + _yResolution = READ_SCI11ENDIAN_UINT16(data + 16); - if (_scaledWidth == 0 && _scaledHeight == 0) { + if (_xResolution == 0 && _yResolution == 0) { byte sizeFlag = data[5]; if (sizeFlag == 0) { - _scaledWidth = kLowResX; - _scaledHeight = kLowResY; + _xResolution = kLowResX; + _yResolution = kLowResY; } else if (sizeFlag == 1) { - _scaledWidth = 640; - _scaledHeight = 480; + _xResolution = 640; + _yResolution = 480; } else if (sizeFlag == 2) { - _scaledWidth = 640; - _scaledHeight = 400; + _xResolution = 640; + _yResolution = 400; } } @@ -936,9 +958,9 @@ CelObjView::CelObjView(const GuiResourceId viewId, const int16 loopNo, const int _width = READ_SCI11ENDIAN_UINT16(celHeader); _height = READ_SCI11ENDIAN_UINT16(celHeader + 2); - _displace.x = _width / 2 - (int16)READ_SCI11ENDIAN_UINT16(celHeader + 4); - _displace.y = _height - (int16)READ_SCI11ENDIAN_UINT16(celHeader + 6) - 1; - _transparentColor = celHeader[8]; + _origin.x = _width / 2 - (int16)READ_SCI11ENDIAN_UINT16(celHeader + 4); + _origin.y = _height - (int16)READ_SCI11ENDIAN_UINT16(celHeader + 6) - 1; + _skipColor = celHeader[8]; _compressionType = (CelCompressionType)celHeader[9]; if (_compressionType != kCelCompressionNone && _compressionType != kCelCompressionRLE) { @@ -967,7 +989,7 @@ bool CelObjView::analyzeUncompressedForRemap() const { if ( pixel >= g_sci->_gfxRemap32->getStartColor() && pixel <= g_sci->_gfxRemap32->getEndColor() && - pixel != _transparentColor + pixel != _skipColor ) { return true; } @@ -984,7 +1006,7 @@ bool CelObjView::analyzeForRemap() const { if ( pixel >= g_sci->_gfxRemap32->getStartColor() && pixel <= g_sci->_gfxRemap32->getEndColor() && - pixel != _transparentColor + pixel != _skipColor ) { return true; } @@ -1058,9 +1080,9 @@ CelObjPic::CelObjPic(const GuiResourceId picId, const int16 celNo) { _width = READ_SCI11ENDIAN_UINT16(celHeader); _height = READ_SCI11ENDIAN_UINT16(celHeader + 2); - _displace.x = (int16)READ_SCI11ENDIAN_UINT16(celHeader + 4); - _displace.y = (int16)READ_SCI11ENDIAN_UINT16(celHeader + 6); - _transparentColor = celHeader[8]; + _origin.x = (int16)READ_SCI11ENDIAN_UINT16(celHeader + 4); + _origin.y = (int16)READ_SCI11ENDIAN_UINT16(celHeader + 6); + _skipColor = celHeader[8]; _compressionType = (CelCompressionType)celHeader[9]; _priority = READ_SCI11ENDIAN_UINT16(celHeader + 36); _relativePosition.x = (int16)READ_SCI11ENDIAN_UINT16(celHeader + 38); @@ -1070,17 +1092,17 @@ CelObjPic::CelObjPic(const GuiResourceId picId, const int16 celNo) { const uint16 sizeFlag2 = READ_SCI11ENDIAN_UINT16(data + 12); if (sizeFlag2) { - _scaledWidth = sizeFlag1; - _scaledHeight = sizeFlag2; + _xResolution = sizeFlag1; + _yResolution = sizeFlag2; } else if (sizeFlag1 == 0) { - _scaledWidth = kLowResX; - _scaledHeight = kLowResY; + _xResolution = kLowResX; + _yResolution = kLowResY; } else if (sizeFlag1 == 1) { - _scaledWidth = 640; - _scaledHeight = 480; + _xResolution = 640; + _yResolution = 480; } else if (sizeFlag1 == 2) { - _scaledWidth = 640; - _scaledHeight = 400; + _xResolution = 640; + _yResolution = 400; } if (celHeader[10] & 128) { @@ -1105,7 +1127,7 @@ bool CelObjPic::analyzeUncompressedForSkip() const { const byte *const pixels = resource + READ_SCI11ENDIAN_UINT32(resource + _celHeaderOffset + 24); for (int i = 0; i < _width * _height; ++i) { uint8 pixel = pixels[i]; - if (pixel == _transparentColor) { + if (pixel == _skipColor) { return true; } } @@ -1151,10 +1173,10 @@ CelObjMem::CelObjMem(const reg_t bitmapObject) { _width = bitmap->getWidth(); _height = bitmap->getHeight(); - _displace = bitmap->getDisplace(); - _transparentColor = bitmap->getSkipColor(); - _scaledWidth = bitmap->getScaledWidth(); - _scaledHeight = bitmap->getScaledHeight(); + _origin = bitmap->getOrigin(); + _skipColor = bitmap->getSkipColor(); + _xResolution = bitmap->getXResolution(); + _yResolution = bitmap->getYResolution(); _hunkPaletteOffset = bitmap->getHunkPaletteOffset(); _remap = bitmap->getRemap(); } @@ -1173,10 +1195,10 @@ byte *CelObjMem::getResPointer() const { CelObjColor::CelObjColor(const uint8 color, const int16 width, const int16 height) { _info.type = kCelTypeColor; _info.color = color; - _displace.x = 0; - _displace.y = 0; - _scaledWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; - _scaledHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; + _origin.x = 0; + _origin.y = 0; + _xResolution = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; + _yResolution = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; _hunkPaletteOffset = 0; _mirrorX = false; _remap = false; diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h index 21e86d03e0..03d950a3c3 100644 --- a/engines/sci/graphics/celobj32.h +++ b/engines/sci/graphics/celobj32.h @@ -141,13 +141,20 @@ typedef Common::Array<CelCacheEntry> CelCache; #pragma mark - #pragma mark CelScaler +enum { + /** + * The maximum size of a row/column of scaled pixel data. + */ + kCelScalerTableSize = 4096 +}; + struct CelScalerTable { /** * A lookup table of indexes that should be used to find * the correct column to read from the source bitmap * when drawing a scaled version of the source bitmap. */ - int valuesX[4096]; + int valuesX[kCelScalerTableSize]; /** * The ratio used to generate the x-values. @@ -159,7 +166,7 @@ struct CelScalerTable { * the correct row to read from a source bitmap when * drawing a scaled version of the source bitmap. */ - int valuesY[4096]; + int valuesY[kCelScalerTableSize]; /** * The ratio used to generate the y-values. @@ -279,7 +286,7 @@ public: /** * TODO: Documentation */ - Common::Point _displace; + Common::Point _origin; /** * The dimensions of the original coordinate system for @@ -294,21 +301,21 @@ public: * scriptWidth/Height but seems to typically be changed * to more closely match the native screen resolution. */ - uint16 _scaledWidth, _scaledHeight; + uint16 _xResolution, _yResolution; /** * The skip (transparent) color for the cel. When * compositing, any pixels matching this color will not * be copied to the buffer. */ - uint8 _transparentColor; + uint8 _skipColor; /** * Whether or not this cel has any transparent regions. * This is used for optimised drawing of non-transparent * cels. */ - bool _transparent; // TODO: probably "skip"? + bool _transparent; /** * The compression type for the pixel data for this cel. diff --git a/engines/sci/graphics/controls32.cpp b/engines/sci/graphics/controls32.cpp index 7689655d1d..0cd924b38d 100644 --- a/engines/sci/graphics/controls32.cpp +++ b/engines/sci/graphics/controls32.cpp @@ -160,7 +160,6 @@ reg_t GfxControls32::kernelEditText(const reg_t controlObject) { // Original engine did not have a QUIT event but we have to handle it if (event.type == SCI_EVENT_QUIT) { focused = false; - break; } else if (event.type == SCI_EVENT_MOUSE_PRESS && !editorPlaneRect.contains(event.mousePosSci)) { focused = false; } else if (event.type == SCI_EVENT_KEYBOARD) { @@ -313,8 +312,8 @@ reg_t GfxControls32::kernelEditText(const reg_t controlObject) { if (textChanged) { editor.text.trim(); - SciString *string = _segMan->lookupString(textObject); - string->fromString(editor.text); + SciArray &string = *_segMan->lookupArray(textObject); + string.fromString(editor.text); } return make_reg(0, textChanged); @@ -400,7 +399,7 @@ ScrollWindow::ScrollWindow(SegManager *segMan, const Common::Rect &gameRect, con const uint16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; Common::Rect bitmapRect(gameRect); - mulinc(bitmapRect, Ratio(_gfxText32._scaledWidth, scriptWidth), Ratio(_gfxText32._scaledHeight, scriptHeight)); + mulinc(bitmapRect, Ratio(_gfxText32._xResolution, scriptWidth), Ratio(_gfxText32._yResolution, scriptHeight)); _textRect.left = 2; _textRect.top = 2; @@ -441,6 +440,11 @@ void ScrollWindow::show() { } Plane *plane = g_sci->_gfxFrameout->getPlanes().findByObject(_plane); + + if (plane == nullptr) { + error("[ScrollWindow::show]: Plane %04x:%04x not found", PRINT_REG(_plane)); + } + plane->_screenItemList.add(_screenItem); _visible = true; diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp index 88150db6e6..2f2611c769 100644 --- a/engines/sci/graphics/cursor32.cpp +++ b/engines/sci/graphics/cursor32.cpp @@ -122,6 +122,7 @@ void GfxCursor32::drawToHardware(const DrawRegion &source) { byte *sourcePixel = source.data + (sourceYOffset * source.rect.width()) + sourceXOffset; g_system->copyRectToScreen(sourcePixel, source.rect.width(), drawRect.left, drawRect.top, drawRect.width(), drawRect.height()); + g_system->updateScreen(); } void GfxCursor32::unhide() { @@ -181,7 +182,7 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const if (_macCursorRemap.empty() && viewId != -1) { CelObjView view(viewId, loopNo, celNo); - _hotSpot = view._displace; + _hotSpot = view._origin; _width = view._width; _height = view._height; diff --git a/engines/sci/graphics/cursor32.h b/engines/sci/graphics/cursor32.h index 88a75beb7f..00a8b9baa4 100644 --- a/engines/sci/graphics/cursor32.h +++ b/engines/sci/graphics/cursor32.h @@ -31,7 +31,7 @@ namespace Sci { -class GfxCursor32 : Common::Serializable { +class GfxCursor32 : public Common::Serializable { public: GfxCursor32(); ~GfxCursor32(); diff --git a/engines/sci/graphics/font.h b/engines/sci/graphics/font.h index 451261f315..b79fb2f0ba 100644 --- a/engines/sci/graphics/font.h +++ b/engines/sci/graphics/font.h @@ -75,7 +75,7 @@ private: byte height; int16 offset; }; - + byte _fontHeight; uint16 _numChars; Charinfo *_chars; diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 4e0aa22669..843fe5ed86 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -58,7 +58,7 @@ namespace Sci { GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitions32 *transitions, GfxCursor32 *cursor) : - _isHiRes(ConfMan.getBool("enable_high_resolution_graphics")), + _isHiRes(gameIsHiRes()), _palette(palette), _cursor(cursor), _segMan(segMan), @@ -71,11 +71,6 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio _overdrawThreshold(0), _palMorphIsOn(false) { - // QFG4 is the only SCI32 game that doesn't have a high-resolution version - if (g_sci->getGameId() == GID_QFG4) { - _isHiRes = false; - } - if (g_sci->getGameId() == GID_PHANTASMAGORIA) { _currentBuffer = Buffer(630, 450, nullptr); } else if (_isHiRes) { @@ -146,7 +141,7 @@ void GfxFrameout::syncWithScripts(bool addElements) { return; // Get planes list object - reg_t planesListObject = engineState->variables[VAR_GLOBAL][10]; + reg_t planesListObject = engineState->variables[VAR_GLOBAL][kGlobalVarPlanes]; reg_t planesListElements = readSelector(segMan, planesListObject, SELECTOR(elements)); List *planesList = segMan->lookupList(planesListElements); @@ -213,6 +208,26 @@ void GfxFrameout::syncWithScripts(bool addElements) { } } +bool GfxFrameout::gameIsHiRes() const { + // QFG4 is always low resolution + if (g_sci->getGameId() == GID_QFG4) { + return false; + } + + // GK1 DOS floppy is low resolution only, but GK1 Mac floppy is high + // resolution only + if (g_sci->getGameId() == GID_GK1 && + !g_sci->isCD() && + g_sci->getPlatform() != Common::kPlatformMacintosh) { + + return false; + } + + // All other games are either high resolution by default, or have a + // user-defined toggle + return ConfMan.getBool("enable_high_resolution_graphics"); +} + #pragma mark - #pragma mark Benchmarking @@ -550,7 +565,7 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show Palette sourcePalette(_palette->getNextPalette()); alterVmap(sourcePalette, sourcePalette, -1, styleRanges); - int16 prevRoom = g_sci->getEngineState()->variables[VAR_GLOBAL][12].toSint16(); + int16 prevRoom = g_sci->getEngineState()->variables[VAR_GLOBAL][kGlobalVarPreviousRoomNo].toSint16(); Common::Rect rect(_currentBuffer.screenWidth, _currentBuffer.screenHeight); _showList.add(rect); @@ -989,6 +1004,10 @@ void GfxFrameout::calcLists(ScreenItemListList &drawLists, EraseListList &eraseL _visiblePlanes.add(new Plane(plane)); --plane._created; } else if (plane._updated) { + if (visiblePlane == nullptr) { + error("[GfxFrameout::calcLists]: Attempt to update nonexistent visible plane"); + } + *visiblePlane = plane; --plane._updated; } @@ -1108,6 +1127,7 @@ void GfxFrameout::mergeToShowList(const Common::Rect &drawRect, RectList &showLi void GfxFrameout::showBits() { if (!_showList.size()) { + g_system->updateScreen(); return; } @@ -1146,6 +1166,7 @@ void GfxFrameout::showBits() { _cursor->donePainting(); _showList.clear(); + g_system->updateScreen(); } void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, const int8 style, const int8 *const styleRanges) { @@ -1327,7 +1348,7 @@ bool GfxFrameout::isOnMe(const ScreenItem &screenItem, const Plane &plane, const scaledPosition.x -= screenItem._scaledPosition.x; scaledPosition.y -= screenItem._scaledPosition.y; - mulru(scaledPosition, Ratio(celObj._scaledWidth, _currentBuffer.screenWidth), Ratio(celObj._scaledHeight, _currentBuffer.screenHeight)); + mulru(scaledPosition, Ratio(celObj._xResolution, _currentBuffer.screenWidth), Ratio(celObj._yResolution, _currentBuffer.screenHeight)); if (screenItem._scale.signal != kScaleSignalNone && screenItem._scale.x && screenItem._scale.y) { scaledPosition.x = scaledPosition.x * 128 / screenItem._scale.x; @@ -1335,7 +1356,7 @@ bool GfxFrameout::isOnMe(const ScreenItem &screenItem, const Plane &plane, const } uint8 pixel = celObj.readPixel(scaledPosition.x, scaledPosition.y, mirrorX); - return pixel != celObj._transparentColor; + return pixel != celObj._skipColor; } return true; diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index e4caffd9e5..9481b0ef5a 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -44,6 +44,12 @@ private: GfxPalette32 *_palette; SegManager *_segMan; + /** + * Determines whether the current game should be rendered in + * high resolution. + */ + bool gameIsHiRes() const; + public: GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitions32 *transitions, GfxCursor32 *cursor); ~GfxFrameout(); diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp index 91817d4060..aac922d278 100644 --- a/engines/sci/graphics/paint16.cpp +++ b/engines/sci/graphics/paint16.cpp @@ -541,12 +541,10 @@ reg_t GfxPaint16::kernelDisplay(const char *text, uint16 languageSplitter, int a break; default: - SciTrackOriginReply originReply; + SciCallOrigin originReply; SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, kDisplay_workarounds, &originReply); if (solution.type == WORKAROUND_NONE) - error("Unknown kDisplay argument (%04x:%04x) from method %s::%s (script %d, localCall %x)", - PRINT_REG(displayArg), originReply.objectName.c_str(), originReply.methodName.c_str(), - originReply.scriptNr, originReply.localCallOffset); + error("Unknown kDisplay argument (%04x:%04x) from %s", PRINT_REG(displayArg), originReply.toString().c_str()); assert(solution.type == WORKAROUND_IGNORE); break; } diff --git a/engines/sci/graphics/paint32.cpp b/engines/sci/graphics/paint32.cpp index 338b70901e..bf7c73623e 100644 --- a/engines/sci/graphics/paint32.cpp +++ b/engines/sci/graphics/paint32.cpp @@ -38,7 +38,6 @@ reg_t GfxPaint32::kernelAddLine(const reg_t planeObject, const Common::Point &st Common::Rect gameRect; reg_t bitmapId = makeLineBitmap(startPoint, endPoint, priority, color, style, pattern, thickness, gameRect); - SciBitmap &bitmap = *_segMan->lookupBitmap(bitmapId); CelInfo32 celInfo; celInfo.type = kCelTypeMem; @@ -48,7 +47,7 @@ reg_t GfxPaint32::kernelAddLine(const reg_t planeObject, const Common::Point &st // `kUpdateLine` can get the originally used color celInfo.color = color; - ScreenItem *screenItem = new ScreenItem(planeObject, celInfo, Common::Rect(startPoint.x, startPoint.y, startPoint.x + bitmap.getWidth(), startPoint.y + bitmap.getHeight())); + ScreenItem *screenItem = new ScreenItem(planeObject, celInfo, gameRect); screenItem->_priority = priority; screenItem->_fixedPriority = true; @@ -89,9 +88,13 @@ void GfxPaint32::plotter(int x, int y, int color, void *data) { LineProperties &properties = *static_cast<LineProperties *>(data); byte *pixels = properties.bitmap->getPixels(); - const uint32 index = properties.bitmap->getWidth() * y + x; + const uint16 bitmapWidth = properties.bitmap->getWidth(); + const uint16 bitmapHeight = properties.bitmap->getHeight(); + const uint32 index = bitmapWidth * y + x; - if (index < properties.bitmap->getDataSize()) { + // Only draw the points in the bitmap, and ignore the rest. SSCI scripts + // can draw lines ending outside the visible area (e.g. negative coordinates) + if (x >= 0 && x < bitmapWidth && y >= 0 && y < bitmapHeight) { if (properties.solid) { pixels[index] = (uint8)color; return; @@ -112,25 +115,29 @@ void GfxPaint32::plotter(int x, int y, int color, void *data) { if (properties.patternIndex == ARRAYSIZE(properties.pattern)) { properties.patternIndex = 0; } - } else { - warning("GfxPaint32::plotter: Attempted to write out of bounds (%u >= %u)", index, properties.bitmap->getDataSize()); } } reg_t GfxPaint32::makeLineBitmap(const Common::Point &startPoint, const Common::Point &endPoint, const int16 priority, const uint8 color, const LineStyle style, uint16 pattern, uint8 thickness, Common::Rect &outRect) { const uint8 skipColor = color != kDefaultSkipColor ? kDefaultSkipColor : 0; - // Thickness is expected to be 2n+1 - thickness = ((MAX((uint8)1, thickness) - 1) | 1); + // Line thickness is expected to be 2 * thickness + 1 + thickness = (MAX<uint8>(1, thickness) - 1) | 1; const uint8 halfThickness = thickness >> 1; - outRect.left = (startPoint.x < endPoint.x ? startPoint.x : endPoint.x) - halfThickness; - outRect.top = (startPoint.y < endPoint.y ? startPoint.y : endPoint.y) - halfThickness; - outRect.right = (startPoint.x > endPoint.x ? startPoint.x : endPoint.x) + halfThickness + 1; - outRect.bottom = (startPoint.y > endPoint.y ? startPoint.y : endPoint.y) + halfThickness + 1; + const uint16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; + const uint16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; + + outRect.left = MIN<int16>(startPoint.x, endPoint.x); + outRect.top = MIN<int16>(startPoint.y, endPoint.y); + outRect.right = MAX<int16>(startPoint.x, endPoint.x) + 1 + 1; // rect lower edge + thickness offset + outRect.bottom = MAX<int16>(startPoint.y, endPoint.y) + 1 + 1; // rect lower edge + thickness offset + + outRect.grow(halfThickness); + outRect.clip(Common::Rect(scriptWidth, scriptHeight)); reg_t bitmapId; - SciBitmap &bitmap = *_segMan->allocateBitmap(&bitmapId, outRect.width(), outRect.height(), skipColor, 0, 0, g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth, g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight, 0, false, true); + SciBitmap &bitmap = *_segMan->allocateBitmap(&bitmapId, outRect.width(), outRect.height(), skipColor, 0, 0, scriptWidth, scriptHeight, 0, false, true); byte *pixels = bitmap.getPixels(); memset(pixels, skipColor, bitmap.getWidth() * bitmap.getHeight()); @@ -152,12 +159,11 @@ reg_t GfxPaint32::makeLineBitmap(const Common::Point &startPoint, const Common:: break; } - const Common::Rect drawRect( - startPoint.x - outRect.left, - startPoint.y - outRect.top, - endPoint.x - outRect.left, - endPoint.y - outRect.top - ); + // Change coordinates to be relative to the bitmap + const int16 x1 = startPoint.x - outRect.left; + const int16 y1 = startPoint.y - outRect.top; + const int16 x2 = endPoint.x - outRect.left; + const int16 y2 = endPoint.y - outRect.top; if (!properties.solid) { for (int i = 0; i < ARRAYSIZE(properties.pattern); ++i) { @@ -166,14 +172,14 @@ reg_t GfxPaint32::makeLineBitmap(const Common::Point &startPoint, const Common:: } properties.patternIndex = 0; - properties.horizontal = ABS(drawRect.right - drawRect.left) > ABS(drawRect.bottom - drawRect.top); - properties.lastAddress = properties.horizontal ? drawRect.left : drawRect.top; + properties.horizontal = ABS(x2 - x1) > ABS(y2 - y1); + properties.lastAddress = properties.horizontal ? x1 : y1; } if (thickness <= 1) { - Graphics::drawLine(drawRect.left, drawRect.top, drawRect.right, drawRect.bottom, color, plotter, &properties); + Graphics::drawLine(x1, y1, x2, y2, color, plotter, &properties); } else { - Graphics::drawThickLine2(drawRect.left, drawRect.top, drawRect.right, drawRect.bottom, thickness, color, plotter, &properties); + Graphics::drawThickLine2(x1, y1, x2, y2, thickness, color, plotter, &properties); } return bitmapId; diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp index c7098bc3e4..ec3d912365 100644 --- a/engines/sci/graphics/palette32.cpp +++ b/engines/sci/graphics/palette32.cpp @@ -52,7 +52,7 @@ HunkPalette::HunkPalette(byte *rawPalette) : } } -void HunkPalette::setVersion(const uint32 version) { +void HunkPalette::setVersion(const uint32 version) const { if (_numPalettes != _data[10]) { error("Invalid HunkPalette"); } @@ -93,9 +93,9 @@ const Palette HunkPalette::toPalette() const { if (_numPalettes) { const EntryHeader header = getEntryHeader(); - byte *data = getPalPointer() + kEntryHeaderSize; + const byte *data = getPalPointer() + kEntryHeaderSize; - int16 end = header.startColor + header.numColors; + const int16 end = header.startColor + header.numColors; assert(end <= 256); if (header.sharedUsed) { @@ -118,20 +118,19 @@ const Palette HunkPalette::toPalette() const { return outPalette; } - #pragma mark - #pragma mark GfxPalette32 GfxPalette32::GfxPalette32(ResourceManager *resMan) : _resMan(resMan), + // Palette versioning _version(1), _needsUpdate(false), _currentPalette(), _sourcePalette(), _nextPalette(), - // Clut - _clutTable(nullptr), + // Palette varying _varyStartPalette(nullptr), _varyTargetPalette(nullptr), @@ -142,6 +141,7 @@ GfxPalette32::GfxPalette32(ResourceManager *resMan) _varyDirection(0), _varyTargetPercent(0), _varyNumTimesPaused(0), + // Palette cycling _cyclers(), _cycleMap() { @@ -161,44 +161,6 @@ GfxPalette32::~GfxPalette32() { cycleAllOff(); } -inline void mergePaletteInternal(Palette *const to, const Palette *const from) { - // The last color is always white, so it is not copied. - // (Some palettes try to set the last color, which causes - // churning in the palettes when they are merged) - for (int i = 0, len = ARRAYSIZE(to->colors) - 1; i < len; ++i) { - if (from->colors[i].used) { - to->colors[i] = from->colors[i]; - } - } -} - -void GfxPalette32::submit(const Palette &palette) { - const Palette oldSourcePalette(_sourcePalette); - mergePaletteInternal(&_sourcePalette, &palette); - - if (!_needsUpdate && _sourcePalette != oldSourcePalette) { - ++_version; - _needsUpdate = true; - } -} - -void GfxPalette32::submit(HunkPalette &hunkPalette) { - if (hunkPalette.getVersion() == _version) { - return; - } - - const Palette oldSourcePalette(_sourcePalette); - const Palette palette = hunkPalette.toPalette(); - mergePaletteInternal(&_sourcePalette, &palette); - - if (!_needsUpdate && oldSourcePalette != _sourcePalette) { - ++_version; - _needsUpdate = true; - } - - hunkPalette.setVersion(_version); -} - bool GfxPalette32::loadPalette(const GuiResourceId resourceId) { Resource *palResource = _resMan->findResource(ResourceId(kResourceTypePalette, resourceId), false); @@ -206,7 +168,7 @@ bool GfxPalette32::loadPalette(const GuiResourceId resourceId) { return false; } - HunkPalette palette(palResource->data); + const HunkPalette palette(palResource->data); submit(palette); return true; } @@ -241,6 +203,33 @@ int16 GfxPalette32::matchColor(const uint8 r, const uint8 g, const uint8 b) { return bestIndex; } +void GfxPalette32::submit(const Palette &palette) { + const Palette oldSourcePalette(_sourcePalette); + mergePalette(_sourcePalette, palette); + + if (!_needsUpdate && _sourcePalette != oldSourcePalette) { + ++_version; + _needsUpdate = true; + } +} + +void GfxPalette32::submit(const HunkPalette &hunkPalette) { + if (hunkPalette.getVersion() == _version) { + return; + } + + const Palette oldSourcePalette(_sourcePalette); + const Palette palette = hunkPalette.toPalette(); + mergePalette(_sourcePalette, palette); + + if (!_needsUpdate && oldSourcePalette != _sourcePalette) { + ++_version; + _needsUpdate = true; + } + + hunkPalette.setVersion(_version); +} + bool GfxPalette32::updateForFrame() { applyAll(); _needsUpdate = false; @@ -266,10 +255,10 @@ void GfxPalette32::updateHardware(const bool updateScreen) { _currentPalette.colors[i] = _nextPalette.colors[i]; // NOTE: If the brightness option in the user configuration file is set, - // SCI engine adjusts palette brightnesses here by mapping RGB values to values - // in some hard-coded brightness tables. There is no reason on modern hardware - // to implement this, unless it is discovered that some game uses a non-standard - // brightness setting by default + // SCI engine adjusts palette brightnesses here by mapping RGB values to + // values in some hard-coded brightness tables. There is no reason on + // modern hardware to implement this, unless it is discovered that some + // game uses a non-standard brightness setting by default // All color entries MUST be copied, not just "used" entries, otherwise // uninitialised memory from bpal makes its way into the system palette. @@ -295,7 +284,30 @@ void GfxPalette32::updateHardware(const bool updateScreen) { g_system->getPaletteManager()->setPalette(bpal, 0, 256); if (updateScreen) { - g_sci->getEventManager()->updateScreen(); + g_system->updateScreen(); + } +} + +Palette GfxPalette32::getPaletteFromResource(const GuiResourceId resourceId) const { + Resource *palResource = _resMan->findResource(ResourceId(kResourceTypePalette, resourceId), false); + + if (!palResource) { + error("Could not load vary palette %d", resourceId); + } + + const HunkPalette rawPalette(palResource->data); + return rawPalette.toPalette(); +} + +void GfxPalette32::mergePalette(Palette &to, const Palette &from) { + // The last color is always white in SCI, so it is not copied. (Some + // palettes, particularly in KQ7, try to set the last color, which causes + // unnecessary palette updates since the last color is forced by SSCI to a + // specific value) + for (int i = 0; i < ARRAYSIZE(to.colors) - 1; ++i) { + if (from.colors[i].used) { + to.colors[i] = from.colors[i]; + } } } @@ -306,81 +318,43 @@ void GfxPalette32::applyAll() { } #pragma mark - -#pragma mark Colour look-up - -#ifdef ENABLE_SCI3_GAMES -bool GfxPalette32::loadClut(uint16 clutId) { - // loadClut() will load a color lookup table from a clu file and set - // the palette found in the file. This is to be used with Phantasmagoria 2. - - unloadClut(); - - Common::String filename = Common::String::format("%d.clu", clutId); - Common::File clut; - - if (!clut.open(filename) || clut.size() != 0x10000 + 236 * 3) - return false; - - // Read in the lookup table - // It maps each RGB565 color to a palette index - _clutTable = new byte[0x10000]; - clut.read(_clutTable, 0x10000); +#pragma mark Varying - Palette pal; - memset(&pal, 0, sizeof(Palette)); +void GfxPalette32::setVary(const Palette &target, const int16 percent, const int32 ticks, const int16 fromColor, const int16 toColor) { + setTarget(target); + setVaryTime(percent, ticks); - // Setup 1:1 mapping - for (int i = 0; i < 256; i++) { - pal.mapping[i] = i; + if (fromColor > -1) { + _varyFromColor = fromColor; } - - // Now load in the palette - for (int i = 1; i <= 236; i++) { - pal.colors[i].used = 1; - pal.colors[i].r = clut.readByte(); - pal.colors[i].g = clut.readByte(); - pal.colors[i].b = clut.readByte(); + if (toColor > -1) { + assert(toColor < 256); + _varyToColor = toColor; } - - set(&pal, true); - setOnScreen(); - return true; } -byte GfxPalette32::matchClutColor(uint16 color) { - // Match a color in RGB565 format to a palette index based on the loaded CLUT - assert(_clutTable); - return _clutTable[color]; -} +void GfxPalette32::setVaryPercent(const int16 percent, const int32 ticks) { + if (_varyTargetPalette != nullptr) { + setVaryTime(percent, ticks); + } -void GfxPalette32::unloadClut() { - // This will only unload the actual table, but not reset any palette - delete[] _clutTable; - _clutTable = nullptr; + // NOTE: SSCI had two additional parameters for this function to change the + // `_varyFromColor`, but they were always hardcoded to be ignored } -#endif - -#pragma mark - -#pragma mark Varying - -inline Palette GfxPalette32::getPaletteFromResourceInternal(const GuiResourceId resourceId) const { - Resource *palResource = _resMan->findResource(ResourceId(kResourceTypePalette, resourceId), false); - if (!palResource) { - error("Could not load vary palette %d", resourceId); +void GfxPalette32::setVaryTime(const int32 time) { + if (_varyTargetPalette != nullptr) { + setVaryTime(_varyTargetPercent, time); } - - HunkPalette rawPalette(palResource->data); - return rawPalette.toPalette(); } -inline void GfxPalette32::setVaryTimeInternal(const int16 percent, const int time) { +void GfxPalette32::setVaryTime(const int16 percent, const int32 ticks) { _varyLastTick = g_sci->getTickCount(); - if (!time || _varyPercent == percent) { + if (!ticks || _varyPercent == percent) { _varyDirection = 0; _varyTargetPercent = _varyPercent = percent; } else { - _varyTime = time / (percent - _varyPercent); + _varyTime = ticks / (percent - _varyPercent); _varyTargetPercent = percent; if (_varyTime > 0) { @@ -395,72 +369,6 @@ inline void GfxPalette32::setVaryTimeInternal(const int16 percent, const int tim } } -void GfxPalette32::kernelPalVarySet(const GuiResourceId paletteId, const int16 percent, const int time, const int16 fromColor, const int16 toColor) { - Palette palette = getPaletteFromResourceInternal(paletteId); - setVary(&palette, percent, time, fromColor, toColor); -} - -void GfxPalette32::kernelPalVaryMergeTarget(GuiResourceId paletteId) { - Palette palette = getPaletteFromResourceInternal(paletteId); - mergeTarget(&palette); -} - -void GfxPalette32::kernelPalVarySetTarget(GuiResourceId paletteId) { - Palette palette = getPaletteFromResourceInternal(paletteId); - setTarget(&palette); -} - -void GfxPalette32::kernelPalVarySetStart(GuiResourceId paletteId) { - Palette palette = getPaletteFromResourceInternal(paletteId); - setStart(&palette); -} - -void GfxPalette32::kernelPalVaryMergeStart(GuiResourceId paletteId) { - Palette palette = getPaletteFromResourceInternal(paletteId); - mergeStart(&palette); -} - -void GfxPalette32::kernelPalVaryPause(bool pause) { - if (pause) { - varyPause(); - } else { - varyOn(); - } -} - -void GfxPalette32::setVary(const Palette *const target, const int16 percent, const int time, const int16 fromColor, const int16 toColor) { - setTarget(target); - setVaryTimeInternal(percent, time); - - if (fromColor > -1) { - _varyFromColor = fromColor; - } - if (toColor > -1) { - assert(toColor < 256); - _varyToColor = toColor; - } -} - -void GfxPalette32::setVaryPercent(const int16 percent, const int time, const int16 fromColor, const int16 fromColorAlternate) { - if (_varyTargetPalette != nullptr) { - setVaryTimeInternal(percent, time); - } - - // This looks like a mistake in the actual SCI engine (both SQ6 and Lighthouse); - // the values are always hardcoded to -1 in kPalVary, so this code can never - // actually be executed - if (fromColor > -1) { - _varyFromColor = fromColor; - } - if (fromColorAlternate > -1) { - _varyFromColor = fromColorAlternate; - } -} - -int16 GfxPalette32::getVaryPercent() const { - return ABS(_varyPercent); -} - void GfxPalette32::varyOff() { _varyNumTimesPaused = 0; _varyPercent = _varyTargetPercent = 0; @@ -479,14 +387,6 @@ void GfxPalette32::varyOff() { } } -void GfxPalette32::mergeTarget(const Palette *const palette) { - if (_varyTargetPalette != nullptr) { - mergePaletteInternal(_varyTargetPalette, palette); - } else { - _varyTargetPalette = new Palette(*palette); - } -} - void GfxPalette32::varyPause() { _varyDirection = 0; ++_varyNumTimesPaused; @@ -497,51 +397,44 @@ void GfxPalette32::varyOn() { --_varyNumTimesPaused; } - if (_varyTargetPalette != nullptr && _varyNumTimesPaused == 0 && _varyPercent != _varyTargetPercent) { - if (_varyTime == 0) { - _varyPercent = _varyTargetPercent; - } else if (_varyTargetPercent < _varyPercent) { - _varyDirection = -1; + if (_varyTargetPalette != nullptr && _varyNumTimesPaused == 0) { + if (_varyPercent != _varyTargetPercent && _varyTime != 0) { + _varyDirection = (_varyTargetPercent - _varyPercent > 0) ? 1 : -1; } else { - _varyDirection = 1; + _varyPercent = _varyTargetPercent; } } } -void GfxPalette32::setVaryTime(const int time) { - if (_varyTargetPalette == nullptr) { - return; - } - - setVaryTimeInternal(_varyTargetPercent, time); +void GfxPalette32::setTarget(const Palette &palette) { + delete _varyTargetPalette; + _varyTargetPalette = new Palette(palette); } -void GfxPalette32::setTarget(const Palette *const palette) { - if (_varyTargetPalette != nullptr) { - delete _varyTargetPalette; - } - - _varyTargetPalette = new Palette(*palette); +void GfxPalette32::setStart(const Palette &palette) { + delete _varyStartPalette; + _varyStartPalette = new Palette(palette); } -void GfxPalette32::setStart(const Palette *const palette) { +void GfxPalette32::mergeStart(const Palette &palette) { if (_varyStartPalette != nullptr) { - delete _varyStartPalette; + mergePalette(*_varyStartPalette, palette); + } else { + _varyStartPalette = new Palette(palette); } - - _varyStartPalette = new Palette(*palette); } -void GfxPalette32::mergeStart(const Palette *const palette) { - if (_varyStartPalette != nullptr) { - mergePaletteInternal(_varyStartPalette, palette); +void GfxPalette32::mergeTarget(const Palette &palette) { + if (_varyTargetPalette != nullptr) { + mergePalette(*_varyTargetPalette, palette); } else { - _varyStartPalette = new Palette(*palette); + _varyTargetPalette = new Palette(palette); } } void GfxPalette32::applyVary() { - while (g_sci->getTickCount() - _varyLastTick > (uint32)_varyTime && _varyDirection != 0) { + const uint32 now = g_sci->getTickCount(); + while ((int32)(now - _varyLastTick) > _varyTime && _varyDirection != 0) { _varyLastTick += _varyTime; if (_varyPercent == _varyTargetPercent) { @@ -552,7 +445,7 @@ void GfxPalette32::applyVary() { } if (_varyPercent == 0 || _varyTargetPalette == nullptr) { - for (int i = 0, len = ARRAYSIZE(_nextPalette.colors); i < len; ++i) { + for (int i = 0; i < ARRAYSIZE(_nextPalette.colors); ++i) { if (_varyStartPalette != nullptr && i >= _varyFromColor && i <= _varyToColor) { _nextPalette.colors[i] = _varyStartPalette->colors[i]; } else { @@ -560,7 +453,7 @@ void GfxPalette32::applyVary() { } } } else { - for (int i = 0, len = ARRAYSIZE(_nextPalette.colors); i < len; ++i) { + for (int i = 0; i < ARRAYSIZE(_nextPalette.colors); ++i) { if (i >= _varyFromColor && i <= _varyToColor) { Color targetColor = _varyTargetPalette->colors[i]; Color sourceColor; @@ -591,82 +484,67 @@ void GfxPalette32::applyVary() { } } -#pragma mark - -#pragma mark Cycling - -inline void GfxPalette32::clearCycleMap(const uint16 fromColor, const uint16 numColorsToClear) { - bool *mapEntry = _cycleMap + fromColor; - const bool *lastEntry = _cycleMap + numColorsToClear; - while (mapEntry < lastEntry) { - *mapEntry++ = false; - } +void GfxPalette32::kernelPalVarySet(const GuiResourceId paletteId, const int16 percent, const int32 ticks, const int16 fromColor, const int16 toColor) { + const Palette palette = getPaletteFromResource(paletteId); + setVary(palette, percent, ticks, fromColor, toColor); } -inline void GfxPalette32::setCycleMap(const uint16 fromColor, const uint16 numColorsToSet) { - bool *mapEntry = _cycleMap + fromColor; - const bool *lastEntry = _cycleMap + numColorsToSet; - while (mapEntry < lastEntry) { - if (*mapEntry != false) { - error("Cycles intersect"); - } - *mapEntry++ = true; - } +void GfxPalette32::kernelPalVaryMergeTarget(const GuiResourceId paletteId) { + const Palette palette = getPaletteFromResource(paletteId); + mergeTarget(palette); } -inline PalCycler *GfxPalette32::getCycler(const uint16 fromColor) { - const int numCyclers = ARRAYSIZE(_cyclers); - - for (int cyclerIndex = 0; cyclerIndex < numCyclers; ++cyclerIndex) { - PalCycler *cycler = _cyclers[cyclerIndex]; - if (cycler != nullptr && cycler->fromColor == fromColor) { - return cycler; - } - } +void GfxPalette32::kernelPalVarySetTarget(const GuiResourceId paletteId) { + const Palette palette = getPaletteFromResource(paletteId); + setTarget(palette); +} - return nullptr; +void GfxPalette32::kernelPalVarySetStart(const GuiResourceId paletteId) { + const Palette palette = getPaletteFromResource(paletteId); + setStart(palette); } -inline void doCycleInternal(PalCycler *cycler, const int16 speed) { - int16 currentCycle = cycler->currentCycle; - const uint16 numColorsToCycle = cycler->numColorsToCycle; +void GfxPalette32::kernelPalVaryMergeStart(const GuiResourceId paletteId) { + const Palette palette = getPaletteFromResource(paletteId); + mergeStart(palette); +} - if (cycler->direction == 0) { - currentCycle = (currentCycle - (speed % numColorsToCycle)) + numColorsToCycle; +void GfxPalette32::kernelPalVaryPause(const bool pause) { + if (pause) { + varyPause(); } else { - currentCycle = currentCycle + speed; + varyOn(); } - - cycler->currentCycle = (uint8) (currentCycle % numColorsToCycle); } +#pragma mark - +#pragma mark Cycling + void GfxPalette32::setCycle(const uint8 fromColor, const uint8 toColor, const int16 direction, const int16 delay) { assert(fromColor < toColor); - int cyclerIndex; - const int numCyclers = ARRAYSIZE(_cyclers); - PalCycler *cycler = getCycler(fromColor); if (cycler != nullptr) { clearCycleMap(fromColor, cycler->numColorsToCycle); } else { - for (cyclerIndex = 0; cyclerIndex < numCyclers; ++cyclerIndex) { - if (_cyclers[cyclerIndex] == nullptr) { - cycler = new PalCycler; - _cyclers[cyclerIndex] = cycler; + for (int i = 0; i < kNumCyclers; ++i) { + if (_cyclers[i] == nullptr) { + _cyclers[i] = cycler = new PalCycler; break; } } } - // SCI engine overrides the first oldest cycler that it finds where - // тoldestт is determined by the difference between the tick and now + // If there are no free cycler slots, SCI engine overrides the first oldest + // cycler that it finds, where "oldest" is determined by the difference + // between the tick and now if (cycler == nullptr) { const uint32 now = g_sci->getTickCount(); uint32 minUpdateDelta = 0xFFFFFFFF; - for (cyclerIndex = 0; cyclerIndex < numCyclers; ++cyclerIndex) { - PalCycler *candidate = _cyclers[cyclerIndex]; + for (int i = 0; i < kNumCyclers; ++i) { + PalCycler *const candidate = _cyclers[i]; const uint32 updateDelta = now - candidate->lastUpdateTick; if (updateDelta < minUpdateDelta) { @@ -678,11 +556,14 @@ void GfxPalette32::setCycle(const uint8 fromColor, const uint8 toColor, const in clearCycleMap(cycler->fromColor, cycler->numColorsToCycle); } - const uint16 numColorsToCycle = 1 + ((uint8) toColor) - fromColor; - cycler->fromColor = (uint8) fromColor; - cycler->numColorsToCycle = (uint8) numColorsToCycle; - cycler->currentCycle = (uint8) fromColor; - cycler->direction = direction < 0 ? PalCycleBackward : PalCycleForward; + uint16 numColorsToCycle = toColor - fromColor; + if (getSciVersion() >= SCI_VERSION_2_1_MIDDLE || g_sci->getGameId() == GID_KQ7) { + numColorsToCycle += 1; + } + cycler->fromColor = fromColor; + cycler->numColorsToCycle = numColorsToCycle; + cycler->currentCycle = fromColor; + cycler->direction = direction < 0 ? kPalCycleBackward : kPalCycleForward; cycler->delay = delay; cycler->lastUpdateTick = g_sci->getTickCount(); cycler->numTimesPaused = 0; @@ -691,30 +572,30 @@ void GfxPalette32::setCycle(const uint8 fromColor, const uint8 toColor, const in } void GfxPalette32::doCycle(const uint8 fromColor, const int16 speed) { - PalCycler *cycler = getCycler(fromColor); + PalCycler *const cycler = getCycler(fromColor); if (cycler != nullptr) { cycler->lastUpdateTick = g_sci->getTickCount(); - doCycleInternal(cycler, speed); + updateCycler(*cycler, speed); } } void GfxPalette32::cycleOn(const uint8 fromColor) { - PalCycler *cycler = getCycler(fromColor); + PalCycler *const cycler = getCycler(fromColor); if (cycler != nullptr && cycler->numTimesPaused > 0) { --cycler->numTimesPaused; } } void GfxPalette32::cyclePause(const uint8 fromColor) { - PalCycler *cycler = getCycler(fromColor); + PalCycler *const cycler = getCycler(fromColor); if (cycler != nullptr) { ++cycler->numTimesPaused; } } void GfxPalette32::cycleAllOn() { - for (int i = 0, len = ARRAYSIZE(_cyclers); i < len; ++i) { - PalCycler *cycler = _cyclers[i]; + for (int i = 0; i < kNumCyclers; ++i) { + PalCycler *const cycler = _cyclers[i]; if (cycler != nullptr && cycler->numTimesPaused > 0) { --cycler->numTimesPaused; } @@ -724,8 +605,8 @@ void GfxPalette32::cycleAllOn() { void GfxPalette32::cycleAllPause() { // NOTE: The original engine did not check for null pointers in the // palette cyclers pointer array. - for (int i = 0, len = ARRAYSIZE(_cyclers); i < len; ++i) { - PalCycler *cycler = _cyclers[i]; + for (int i = 0; i < kNumCyclers; ++i) { + PalCycler *const cycler = _cyclers[i]; if (cycler != nullptr) { // This seems odd, because currentCycle is 0..numColorsPerCycle, // but fromColor is 0..255. When applyAllCycles runs, the values @@ -736,8 +617,8 @@ void GfxPalette32::cycleAllPause() { applyAllCycles(); - for (int i = 0, len = ARRAYSIZE(_cyclers); i < len; ++i) { - PalCycler *cycler = _cyclers[i]; + for (int i = 0; i < kNumCyclers; ++i) { + PalCycler *const cycler = _cyclers[i]; if (cycler != nullptr) { ++cycler->numTimesPaused; } @@ -745,8 +626,8 @@ void GfxPalette32::cycleAllPause() { } void GfxPalette32::cycleOff(const uint8 fromColor) { - for (int i = 0, len = ARRAYSIZE(_cyclers); i < len; ++i) { - PalCycler *cycler = _cyclers[i]; + for (int i = 0; i < kNumCyclers; ++i) { + PalCycler *const cycler = _cyclers[i]; if (cycler != nullptr && cycler->fromColor == fromColor) { clearCycleMap(fromColor, cycler->numColorsToCycle); delete cycler; @@ -757,8 +638,8 @@ void GfxPalette32::cycleOff(const uint8 fromColor) { } void GfxPalette32::cycleAllOff() { - for (int i = 0, len = ARRAYSIZE(_cyclers); i < len; ++i) { - PalCycler *cycler = _cyclers[i]; + for (int i = 0; i < kNumCyclers; ++i) { + PalCycler *const cycler = _cyclers[i]; if (cycler != nullptr) { clearCycleMap(cycler->fromColor, cycler->numColorsToCycle); delete cycler; @@ -767,16 +648,57 @@ void GfxPalette32::cycleAllOff() { } } +void GfxPalette32::updateCycler(PalCycler &cycler, const int16 speed) { + int16 currentCycle = cycler.currentCycle; + const uint16 numColorsToCycle = cycler.numColorsToCycle; + + if (cycler.direction == kPalCycleBackward) { + currentCycle = (currentCycle - (speed % numColorsToCycle)) + numColorsToCycle; + } else { + currentCycle = currentCycle + speed; + } + + cycler.currentCycle = currentCycle % numColorsToCycle; +} + +void GfxPalette32::clearCycleMap(const uint16 fromColor, const uint16 numColorsToClear) { + bool *mapEntry = _cycleMap + fromColor; + const bool *const lastEntry = _cycleMap + numColorsToClear; + while (mapEntry < lastEntry) { + *mapEntry++ = false; + } +} + +void GfxPalette32::setCycleMap(const uint16 fromColor, const uint16 numColorsToSet) { + bool *mapEntry = _cycleMap + fromColor; + const bool *const lastEntry = _cycleMap + numColorsToSet; + while (mapEntry < lastEntry) { + if (*mapEntry != false) { + error("Cycles intersect"); + } + *mapEntry++ = true; + } +} + +PalCycler *GfxPalette32::getCycler(const uint16 fromColor) { + for (int cyclerIndex = 0; cyclerIndex < kNumCyclers; ++cyclerIndex) { + PalCycler *cycler = _cyclers[cyclerIndex]; + if (cycler != nullptr && cycler->fromColor == fromColor) { + return cycler; + } + } + + return nullptr; +} + void GfxPalette32::applyAllCycles() { Color paletteCopy[256]; memcpy(paletteCopy, _nextPalette.colors, sizeof(Color) * 256); - for (int cyclerIndex = 0, numCyclers = ARRAYSIZE(_cyclers); cyclerIndex < numCyclers; ++cyclerIndex) { - PalCycler *cycler = _cyclers[cyclerIndex]; + for (int i = 0; i < kNumCyclers; ++i) { + PalCycler *const cycler = _cyclers[i]; if (cycler != nullptr) { - cycler->currentCycle = (uint8) ((((int) cycler->currentCycle) + 1) % cycler->numColorsToCycle); - // Disassembly was not fully evaluated to verify this is exactly the same - // as the code from applyCycles, but it appeared to be at a glance + cycler->currentCycle = (((int) cycler->currentCycle) + 1) % cycler->numColorsToCycle; for (int j = 0; j < cycler->numColorsToCycle; j++) { _nextPalette.colors[cycler->fromColor + j] = paletteCopy[cycler->fromColor + (cycler->currentCycle + j) % cycler->numColorsToCycle]; } @@ -788,15 +710,16 @@ void GfxPalette32::applyCycles() { Color paletteCopy[256]; memcpy(paletteCopy, _nextPalette.colors, sizeof(Color) * 256); - for (int i = 0, len = ARRAYSIZE(_cyclers); i < len; ++i) { - PalCycler *cycler = _cyclers[i]; + const uint32 now = g_sci->getTickCount(); + for (int i = 0; i < kNumCyclers; ++i) { + PalCycler *const cycler = _cyclers[i]; if (cycler == nullptr) { continue; } if (cycler->delay != 0 && cycler->numTimesPaused == 0) { - while ((cycler->delay + cycler->lastUpdateTick) < g_sci->getTickCount()) { - doCycleInternal(cycler, 1); + while ((cycler->delay + cycler->lastUpdateTick) < now) { + updateCycler(*cycler, 1); cycler->lastUpdateTick += cycler->delay; } } @@ -810,31 +733,31 @@ void GfxPalette32::applyCycles() { #pragma mark - #pragma mark Fading -// NOTE: There are some game scripts (like SQ6 Sierra logo and main menu) that call -// setFade with numColorsToFade set to 256, but other parts of the engine like -// processShowStyleNone use 255 instead of 256. It is not clear if this is because -// the last palette entry is intentionally left unmodified, or if this is a bug -// in the engine. It certainly seems confused because all other places that accept -// color ranges typically receive values in the range of 0т255. -void GfxPalette32::setFade(uint16 percent, uint8 fromColor, uint16 numColorsToFade) { - if (fromColor > numColorsToFade) { +void GfxPalette32::setFade(const uint16 percent, const uint8 fromColor, uint16 toColor) { + if (fromColor > toColor) { return; } - assert(numColorsToFade <= ARRAYSIZE(_fadeTable)); + // Some game scripts (like SQ6 Sierra logo and main menu) incorrectly call + // setFade with toColor set to 256 + if (toColor > 255) { + toColor = 255; + } - for (int i = fromColor; i < numColorsToFade; i++) + for (int i = fromColor; i <= toColor; i++) { _fadeTable[i] = percent; + } } void GfxPalette32::fadeOff() { - setFade(100, 0, 256); + setFade(100, 0, 255); } void GfxPalette32::applyFade() { for (int i = 0; i < ARRAYSIZE(_fadeTable); ++i) { - if (_fadeTable[i] == 100) + if (_fadeTable[i] == 100) { continue; + } Color &color = _nextPalette.colors[i]; diff --git a/engines/sci/graphics/palette32.h b/engines/sci/graphics/palette32.h index dc2158022f..81e9bbbfd3 100644 --- a/engines/sci/graphics/palette32.h +++ b/engines/sci/graphics/palette32.h @@ -24,30 +24,33 @@ #define SCI_GRAPHICS_PALETTE32_H #include "sci/graphics/palette.h" - namespace Sci { +#pragma mark HunkPalette + /** - * HunkPalette represents a raw palette resource - * read from disk. + * HunkPalette represents a raw palette resource read from disk. The data + * structure of a HunkPalette allows palettes to be smaller than 256 colors. It + * also allows multiple palettes to be stored in one HunkPalette, though in + * SCI32 games there seems to only ever be one palette per HunkPalette. */ class HunkPalette { public: HunkPalette(byte *rawPalette); /** - * Gets the version of the palette. + * Gets the version of the palette. Used to avoid resubmitting a HunkPalette + * which has already been submitted for the next frame. */ uint32 getVersion() const { return _version; } /** * Sets the version of the palette. */ - void setVersion(const uint32 version); + void setVersion(const uint32 version) const; /** - * Converts the hunk palette to a standard - * palette. + * Converts the hunk palette to a standard Palette. */ const Palette toPalette() const; @@ -64,15 +67,14 @@ private: kEntryHeaderSize = 22, /** - * The offset of the hunk palette version - * within the palette entry header. + * The offset of the hunk palette version within the palette entry + * header. */ kEntryVersionOffset = 18 }; /** - * The header for a palette inside the - * HunkPalette. + * The header for a palette inside the HunkPalette. */ struct EntryHeader { /** @@ -81,8 +83,7 @@ private: uint8 startColor; /** - * The number of palette colors in this - * entry. + * The number of palette colors in this entry. */ uint16 numColors; @@ -92,8 +93,7 @@ private: bool used; /** - * Whether or not all palette entries - * share the same `used` value in + * Whether or not all palette entries share the same `used` value in * `defaultFlag`. */ bool sharedUsed; @@ -105,14 +105,14 @@ private: }; /** - * The version number from the last time this - * palette was submitted to GfxPalette32. + * The version number from the last time this palette was submitted to + * GfxPalette32. */ - uint32 _version; + mutable uint32 _version; /** - * The number of palettes stored in the hunk - * palette. In SCI32 games this is always 1. + * The number of palettes stored in the hunk palette. In SCI32 games this is + * always 1. */ uint8 _numPalettes; @@ -122,41 +122,44 @@ private: byte *_data; /** - * Returns a struct that describes the palette - * held by this HunkPalette. The entry header - * is reconstructed on every call from the raw - * palette data. + * Returns a struct that describes the palette held by this HunkPalette. The + * entry header is reconstructed on every call from the raw palette data. */ const EntryHeader getEntryHeader() const; /** - * Returns a pointer to the palette data within - * the hunk palette. + * Returns a pointer to the palette data within the hunk palette. */ byte *getPalPointer() const { return _data + kHunkPaletteHeaderSize + (2 * _numPalettes); } }; +#pragma mark - +#pragma mark PalCycler + enum PalCyclerDirection { - PalCycleBackward = 0, - PalCycleForward = 1 + kPalCycleBackward = 0, + kPalCycleForward = 1 }; +/** + * PalCycler represents a range of palette entries that are rotated on a timer. + */ struct PalCycler { /** - * The color index of the palette cycler. This value is effectively used as the ID for the - * cycler. + * The color index of this palette cycler. This value is used as the unique + * key for this PalCycler object. */ uint8 fromColor; /** - * The number of palette slots which are cycled by the palette cycler. + * The number of palette slots which are to be cycled by this cycler. */ uint16 numColorsToCycle; /** - * The position of the cursor in its cycle. + * The current position of the first palette entry. */ uint8 currentCycle; @@ -166,15 +169,15 @@ struct PalCycler { PalCyclerDirection direction; /** - * The cycle tick at the last time the cyclerтs currentCycle was updated. - * 795 days of game time ought to be enough for everyone? :) + * The last tick the cycler cycled. */ uint32 lastUpdateTick; /** - * The amount of time in ticks each cycle should take to complete. In other words, - * the higher the delay, the slower the cycle animation. If delay is 0, the cycler - * does not automatically cycle and needs to be pumped manually with DoCycle. + * The amount of time in ticks each cycle should take to complete. In other + * words, the higher the delay, the slower the cycle animation. If delay is + * 0, the cycler does not automatically cycle and needs to be cycled + * manually by calling `doCycle`. */ int16 delay; @@ -184,17 +187,72 @@ struct PalCycler { uint16 numTimesPaused; }; +#pragma mark - +#pragma mark GfxPalette32 + class GfxPalette32 { public: GfxPalette32(ResourceManager *resMan); ~GfxPalette32(); + void saveLoadWithSerializer(Common::Serializer &s); + + /** + * Gets the palette that will be use for the next frame. + */ + inline const Palette &getNextPalette() const { return _nextPalette; }; + + /** + * Gets the palette that is used for the current frame. + */ + inline const Palette &getCurrentPalette() const { return _currentPalette; }; + + /** + * Loads a palette into GfxPalette32 with the given resource ID. + */ + bool loadPalette(const GuiResourceId resourceId); + + /** + * Finds the nearest color in the current palette matching the given RGB + * value. + */ + int16 matchColor(const uint8 r, const uint8 g, const uint8 b); + + /** + * Submits a palette to display. Entries marked as "used" in the submitted + * palette are merged into `_sourcePalette`. + */ + void submit(const Palette &palette); + void submit(const HunkPalette &palette); + + /** + * Applies all fades, cycles, remaps, and varies for the current frame to + * `nextPalette`. + */ + bool updateForFrame(); + + /** + * Copies all palette entries from `sourcePalette` to `nextPalette` and + * applies remaps. Unlike `updateForFrame`, this call does not apply fades, + * cycles, or varies. + */ + void updateFFrame(); + + /** + * Copies all entries from `nextPalette` to `currentPalette` and updates the + * backend's raw palette. + * + * @param updateScreen If true, this call will also tell the backend to draw + * to the screen. + */ + void updateHardware(const bool updateScreen = true); + private: ResourceManager *_resMan; /** - * The palette revision version. Increments once per game - * loop that changes the source palette. + * The palette revision version. Increments once per game loop that changes + * the source palette. */ uint32 _version; @@ -209,90 +267,140 @@ private: Palette _currentPalette; /** - * The unmodified source palette loaded by kPalette. Additional - * palette entries may be mixed into the source palette by - * CelObj objects, which contain their own palettes. + * The unmodified source palette loaded by kPalette. Additional palette + * entries may be mixed into the source palette by CelObj objects, which + * contain their own palettes. */ Palette _sourcePalette; /** * The palette to be used when the hardware is next updated. - * On update, _nextPalette is transferred to _currentPalette. + * On update, `_nextPalette` is transferred to `_currentPalette`. */ Palette _nextPalette; - bool createPaletteFromResourceInternal(const GuiResourceId paletteId, Palette *const out) const; - Palette getPaletteFromResourceInternal(const GuiResourceId paletteId) const; + /** + * Creates and returns a new Palette object with data from the given + * resource ID. + */ + Palette getPaletteFromResource(const GuiResourceId paletteId) const; + + /** + * Merges used colors in the `from` palette into the `to` palette. + */ + void mergePalette(Palette &to, const Palette &from); + + /** + * Applies all varies, cycles, and fades to `_nextPalette`. + */ + void applyAll(); +#pragma mark - +#pragma mark Varying public: - void saveLoadWithSerializer(Common::Serializer &s); - inline const Palette &getNextPalette() const { return _nextPalette; }; - inline const Palette &getCurrentPalette() const { return _currentPalette; }; + /** + * Blends the `target` palette into the current palette over `time` ticks. + * + * @param target The target palette. + * @param percent The amount that the target palette should be blended into + * the source palette by the end of the vary. + * @param ticks The number of ticks that it should take for the blend to be + * completed. + * @param fromColor The first palette entry that should be blended. + * @param toColor The last palette entry that should be blended. + */ + void setVary(const Palette &target, const int16 percent, const int32 ticks, const int16 fromColor, const int16 toColor); /** - * Loads a palette into GfxPalette32 with the given resource - * ID. + * Gets the current vary blend amount. */ - bool loadPalette(const GuiResourceId resourceId); + inline int16 getVaryPercent() const { return ABS(_varyPercent); } /** - * Finds the nearest color in the current palette matching the - * given RGB value. + * Changes the percentage of the current vary to `percent`, to be completed + * over `time` ticks, if there is a currently active vary target palette. */ - int16 matchColor(const uint8 r, const uint8 g, const uint8 b); + void setVaryPercent(const int16 percent, const int32 time); /** - * Submits a palette to display. Entries marked as тusedт in the - * submitted palette are merged into the existing entries of - * _sourcePalette. + * Changes the amount of time, in ticks, an in-progress palette vary should + * take to finish. */ - void submit(const Palette &palette); - void submit(HunkPalette &palette); + void setVaryTime(const int32 ticks); - bool updateForFrame(); - void updateFFrame(); - void updateHardware(const bool updateScreen = true); - void applyAll(); + /** + * Changes the vary percent and time to perform the vary. + */ + void setVaryTime(const int16 percent, const int32 ticks); -#pragma mark - -#pragma mark Color look-up -private: /** - * An optional lookup table used to remap RGB565 colors to a palette - * index. Used by Phantasmagoria 2 in 8-bit color environments. + * Removes the active palette vary. */ - byte *_clutTable; + void varyOff(); -public: - bool loadClut(uint16 clutId); - byte matchClutColor(uint16 color); - void unloadClut(); + /** + * Pauses any active palette vary. + */ + void varyPause(); + + /** + * Unpauses any paused palette vary. + */ + void varyOn(); + + /** + * Sets the target palette for the blend. + */ + void setTarget(const Palette &palette); + + /** + * Sets the start palette for the blend. + */ + void setStart(const Palette &palette); + + /** + * Merges a new start palette into the existing start palette. + */ + void mergeStart(const Palette &palette); + + /** + * Merges a new target palette into the existing target palette. + */ + void mergeTarget(const Palette &palette); + + /** + * Applies any active palette vary to `_nextPalette`. + */ + void applyVary(); + + void kernelPalVarySet(const GuiResourceId paletteId, const int16 percent, const int32 ticks, const int16 fromColor, const int16 toColor); + void kernelPalVaryMergeTarget(const GuiResourceId paletteId); + void kernelPalVarySetTarget(const GuiResourceId paletteId); + void kernelPalVarySetStart(const GuiResourceId paletteId); + void kernelPalVaryMergeStart(const GuiResourceId paletteId); + void kernelPalVaryPause(const bool pause); -#pragma mark - -#pragma mark Varying private: /** - * An optional palette used to describe the source colors used - * in a palette vary operation. If this palette is not specified, - * sourcePalette is used instead. + * An optional palette used to provide source colors for a palette vary + * operation. If this palette is not specified, `_sourcePalette` is used + * instead. */ Palette *_varyStartPalette; /** - * An optional palette used to describe the target colors used - * in a palette vary operation. + * An optional palette used to provide target colors for a palette vary + * operation. */ Palette *_varyTargetPalette; /** - * The minimum palette index that has been varied from the - * source palette. 0т255 + * The minimum palette index that has been varied from the source palette. */ uint8 _varyFromColor; /** - * The maximum palette index that is has been varied from the - * source palette. 0-255 + * The maximum palette index that has been varied from the source palette. */ uint8 _varyToColor; @@ -302,10 +410,10 @@ private: uint32 _varyLastTick; /** - * The amount of time to elapse, in ticks, between each cycle - * of a palette vary animation. + * The amount of time that should elapse, in ticks, between each cycle of a + * palette vary animation. */ - int _varyTime; + int32 _varyTime; /** * The direction of change: -1, 0, or 1. @@ -313,97 +421,158 @@ private: int16 _varyDirection; /** - * The amount, in percent, that the vary color is currently - * blended into the source color. + * The amount, in percent, that the vary color is currently blended into the + * source color. */ int16 _varyPercent; /** - * The target amount that a vary color will be blended into - * the source color. + * The target amount that a vary color will be blended into the source + * color. */ int16 _varyTargetPercent; /** - * The number of time palette varying has been paused. + * The number of times palette varying has been paused. */ uint16 _varyNumTimesPaused; -public: - void kernelPalVarySet(const GuiResourceId paletteId, const int16 percent, const int time, const int16 fromColor, const int16 toColor); - void kernelPalVaryMergeTarget(const GuiResourceId paletteId); - void kernelPalVarySetTarget(const GuiResourceId paletteId); - void kernelPalVarySetStart(const GuiResourceId paletteId); - void kernelPalVaryMergeStart(const GuiResourceId paletteId); - void kernelPalVaryPause(bool pause); - - void setVary(const Palette *const targetPalette, const int16 percent, const int time, const int16 fromColor, const int16 toColor); - void setVaryPercent(const int16 percent, const int time, const int16 fromColor, const int16 fromColorAlternate); - int16 getVaryPercent() const; - void varyOff(); - void mergeTarget(const Palette *const palette); - void varyPause(); - void varyOn(); - void setVaryTime(const int time); - void setTarget(const Palette *const palette); - void setStart(const Palette *const palette); - void mergeStart(const Palette *const palette); - void setVaryTimeInternal(const int16 percent, const int time); - void applyVary(); - #pragma mark - #pragma mark Cycling -private: - // SQ6 defines 10 cyclers - PalCycler *_cyclers[10]; +public: + inline const bool *getCycleMap() const { return _cycleMap; } /** - * The cycle map is used to detect overlapping cyclers. - * According to SCI engine code, when two cyclers overlap, - * a fatal error has occurred and the engine will display - * an error and then exit. + * Cycle palette entries between `fromColor` and `toColor`, inclusive. + * Palette cyclers may not overlap. `fromColor` is used in other methods as + * the key for looking up a cycler. * - * The cycle map is also by the color remapping system to - * avoid attempting to remap to palette entries that are - * cycling (so won't be the expected color once the cycler - * runs again). + * @param fromColor The first color in the cycle. + * @param toColor The last color in the cycle. + * @param delay The number of ticks that should elapse between cycles. + * @param direction A negative `direction` will cycle backwards instead of + * forwards. The numeric value of this argument is ignored; + * only its sign is used to determine direction. */ - bool _cycleMap[256]; - inline void clearCycleMap(uint16 fromColor, uint16 numColorsToClear); - inline void setCycleMap(uint16 fromColor, uint16 numColorsToClear); - inline PalCycler *getCycler(uint16 fromColor); - -public: void setCycle(const uint8 fromColor, const uint8 toColor, const int16 direction, const int16 delay); + + /** + * Performs a round of palette cycling. + * + * @param fromColor The color key for the cycler. + * @param speed The number of entries that should be cycled this round. + */ void doCycle(const uint8 fromColor, const int16 speed); + + /** + * Unpauses the cycler starting at `fromColor`. + */ void cycleOn(const uint8 fromColor); + + /** + * Pauses the cycler starting at `fromColor`. + */ void cyclePause(const uint8 fromColor); + + /** + * Unpauses all cyclers. + */ void cycleAllOn(); + + /** + * Pauses all cyclers. + */ void cycleAllPause(); + + /** + * Removes the cycler starting at `fromColor`. + */ void cycleOff(const uint8 fromColor); + + /** + * Removes all cyclers. + */ void cycleAllOff(); + +private: + enum { + kNumCyclers = 10 + }; + + PalCycler *_cyclers[kNumCyclers]; + + /** + * Updates the `currentCycle` of the given `cycler` by `speed` entries. + */ + void updateCycler(PalCycler &cycler, const int16 speed); + + /** + * The cycle map is used to detect overlapping cyclers, and to avoid + * remapping to palette entries that are being cycled. + * + * According to SCI engine code, when two cyclers overlap, a fatal error has + * occurred and the engine will display an error and then exit. + * + * The color remapping system avoids attempts to remap to palette entries + * that are cycling because they won't be the expected color once the cycler + * updates the palette entries. + */ + bool _cycleMap[256]; + + /** + * Marks `numColorsToClear` colors starting at `fromColor` in the cycle + * map as inactive. + */ + void clearCycleMap(const uint16 fromColor, const uint16 numColorsToClear); + + /** + * Marks `numColorsToClear` colors starting at `fromColor` in the cycle + * map as active. + */ + void setCycleMap(const uint16 fromColor, const uint16 numColorsToClear); + + /** + * Gets the cycler object that starts at the given `fromColor`, or NULL if + * there is no cycler for that color. + */ + PalCycler *getCycler(const uint16 fromColor); + + /** + * Advances all cyclers by one step, regardless of whether or not it is time + * to perform another cycle. + */ void applyAllCycles(); + + /** + * Advances, by one step, only the cyclers whose time has come to cycle. + */ void applyCycles(); - inline const bool *getCycleMap() const { return _cycleMap; } #pragma mark - #pragma mark Fading -private: +public: /** - * The fade table records the expected intensity level of each pixel - * in the palette that will be displayed on the next frame. + * Sets the intensity level for a range of palette entries. An intensity of + * zero indicates total darkness. Intensity may also be set above 100 + * percent to increase the intensity of a palette entry. */ - uint16 _fadeTable[256]; + void setFade(const uint16 percent, const uint8 fromColor, const uint16 toColor); -public: /** - * Sets the intensity level for a range of palette - * entries. An intensity of zero indicates total - * darkness. Intensity may be set to over 100 percent. + * Resets the intensity of all palette entries to 100%. */ - void setFade(const uint16 percent, const uint8 fromColor, const uint16 toColor); void fadeOff(); + + /** + * Applies intensity values to the palette entries in `_nextPalette`. + */ void applyFade(); + +private: + /** + * The intensity levels of each palette entry, in percent. Defaults to 100. + */ + uint16 _fadeTable[256]; }; } // End of namespace Sci diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp index 0025b24476..75a885da57 100644 --- a/engines/sci/graphics/picture.cpp +++ b/engines/sci/graphics/picture.cpp @@ -1004,14 +1004,14 @@ void GfxPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority, by int16 borderRight = curPort->rect.right + curPort->left - 1; int16 borderBottom = curPort->rect.bottom + curPort->top - 1; int16 curToLeft, curToRight, a_set, b_set; - + // Translate coordinates, if required (needed for Macintosh 480x300) _screen->vectorAdjustCoordinate(&borderLeft, &borderTop); _screen->vectorAdjustCoordinate(&borderRight, &borderBottom); //return; stack.push(p); - + while (stack.size()) { p = stack.pop(); if ((matchedMask = _screen->vectorIsFillMatch(p.x, p.y, matchMask, searchColor, searchPriority, searchControl, isEGA)) == 0) // already filled @@ -1239,7 +1239,7 @@ void GfxPicture::vectorPatternTexturedCircle(Common::Rect box, byte size, byte c byte bitNo = 0; const bool *textureData = &vectorPatternTextures[vectorPatternTextureOffset[texture]]; int y, x; - + for (y = box.top; y < box.bottom; y++) { for (x = box.left; x < box.right; x++) { if (bitmap & 1) { diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp index 1cd88d667b..e7da8b815d 100644 --- a/engines/sci/graphics/plane32.cpp +++ b/engines/sci/graphics/plane32.cpp @@ -527,14 +527,8 @@ void Plane::decrementScreenItemArrayCounts(Plane *visiblePlane, const bool force if (item != nullptr) { // update item in visiblePlane if item is updated - if ( - item->_updated || - ( - forceUpdate && - visiblePlane != nullptr && - visiblePlane->_screenItemList.findByObject(item->_object) != nullptr - ) - ) { + if (visiblePlane != nullptr && ( + item->_updated || (forceUpdate && visiblePlane->_screenItemList.findByObject(item->_object) != nullptr))) { *visiblePlane->_screenItemList[i] = *item; } diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index 601ab9f09f..23e92ef6a9 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -37,7 +37,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { // Scale the screen, if needed _upscaledHires = GFX_SCREEN_UPSCALED_DISABLED; - + // we default to scripts running at 320x200 _scriptWidth = 320; _scriptHeight = 200; @@ -45,7 +45,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { _height = 0; _displayWidth = 0; _displayHeight = 0; - + // King's Quest 6 and Gabriel Knight 1 have hires content, gk1/cd was able // to provide that under DOS as well, but as gk1/floppy does support // upscaled hires scriptswise, but doesn't actually have the hires content @@ -58,7 +58,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { // Japanese versions of games use hi-res font on upscaled version of the game. if ((g_sci->getLanguage() == Common::JA_JPN) && (getSciVersion() <= SCI_VERSION_1_1)) _upscaledHires = GFX_SCREEN_UPSCALED_640x400; - + // Macintosh SCI0 games used 480x300, while the scripts were running at 320x200 if (g_sci->getPlatform() == Common::kPlatformMacintosh) { if (getSciVersion() <= SCI_VERSION_01) { @@ -66,7 +66,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { _width = 480; _height = 300; // regular visual, priority and control map are 480x300 (this is different than other upscaled SCI games) } - + // Some Mac SCI1/1.1 games only take up 190 rows and do not // have the menu bar. // TODO: Verify that LSL1 and LSL5 use height 190 @@ -145,7 +145,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { } _displayPixels = _displayWidth * _displayHeight; - + // Allocate visual, priority, control and display screen _visualScreen = (byte *)calloc(_pixels, 1); _priorityScreen = (byte *)calloc(_pixels, 1); @@ -314,7 +314,7 @@ void GfxScreen::vectorAdjustLineCoordinates(int16 *left, int16 *top, int16 *righ void GfxScreen::vectorPutLinePixel(int16 x, int16 y, byte drawMask, byte color, byte priority, byte control) { if (_upscaledHires == GFX_SCREEN_UPSCALED_480x300) { vectorPutLinePixel480x300(x, y, drawMask, color, priority, control); - return; + return; } // For anything else forward to the regular putPixel @@ -628,7 +628,7 @@ void GfxScreen::dither(bool addToFlag) { byte color, ditheredColor; byte *visualPtr = _visualScreen; byte *displayPtr = _displayScreen; - + if (!_unditheringEnabled) { // Do dithering on visual and display-screen for (y = 0; y < _height; y++) { diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h index 65416252f6..63ee4ed09e 100644 --- a/engines/sci/graphics/screen.h +++ b/engines/sci/graphics/screen.h @@ -289,7 +289,7 @@ public: default: break; } - + // For non-upscaled mode and 480x300 Mac put pixels directly int offset = y * _width + x; diff --git a/engines/sci/graphics/screen_item32.cpp b/engines/sci/graphics/screen_item32.cpp index f4ed269265..9b0d390cc3 100644 --- a/engines/sci/graphics/screen_item32.cpp +++ b/engines/sci/graphics/screen_item32.cpp @@ -263,33 +263,30 @@ void ScreenItem::calcRects(const Plane &plane) { } Ratio scaleX, scaleY; - - if (_scale.signal & kScaleSignalDoScaling32) { - if (_scale.signal & kScaleSignalUseVanishingPoint) { - int num = _scale.max * (_position.y - plane._vanishingPoint.y) / (scriptWidth - plane._vanishingPoint.y); - scaleX = Ratio(num, 128); - scaleY = Ratio(num, 128); - } else { - scaleX = Ratio(_scale.x, 128); - scaleY = Ratio(_scale.y, 128); - } + if (_scale.signal == kScaleSignalManual) { + scaleX = Ratio(_scale.x, 128); + scaleY = Ratio(_scale.y, 128); + } else if (_scale.signal == kScaleSignalVanishingPoint) { + int num = _scale.max * (_position.y - plane._vanishingPoint.y) / (scriptWidth - plane._vanishingPoint.y); + scaleX = Ratio(num, 128); + scaleY = Ratio(num, 128); } if (scaleX.getNumerator() && scaleY.getNumerator()) { _screenItemRect = _insetRect; - const Ratio celToScreenX(screenWidth, celObj._scaledWidth); - const Ratio celToScreenY(screenHeight, celObj._scaledHeight); + const Ratio celToScreenX(screenWidth, celObj._xResolution); + const Ratio celToScreenY(screenHeight, celObj._yResolution); // Cel may use a coordinate system that is not the same size as the // script coordinate system (usually this means high-resolution // pictures with low-resolution scripts) - if (celObj._scaledWidth != kLowResX || celObj._scaledHeight != kLowResY) { + if (celObj._xResolution != kLowResX || celObj._yResolution != kLowResY) { // high resolution coordinates if (_useInsetRect) { - const Ratio scriptToCelX(celObj._scaledWidth, scriptWidth); - const Ratio scriptToCelY(celObj._scaledHeight, scriptHeight); + const Ratio scriptToCelX(celObj._xResolution, scriptWidth); + const Ratio scriptToCelY(celObj._yResolution, scriptHeight); mulru(_screenItemRect, scriptToCelX, scriptToCelY, 0); if (_screenItemRect.intersects(celRect)) { @@ -299,11 +296,11 @@ void ScreenItem::calcRects(const Plane &plane) { } } - int displaceX = celObj._displace.x; - int displaceY = celObj._displace.y; + int originX = celObj._origin.x; + int originY = celObj._origin.y; if (_mirrorX != celObj._mirrorX && _celInfo.type != kCelTypePic) { - displaceX = celObj._width - celObj._displace.x - 1; + originX = celObj._width - celObj._origin.x - 1; } if (!scaleX.isOne() || !scaleY.isOne()) { @@ -331,13 +328,13 @@ void ScreenItem::calcRects(const Plane &plane) { } } - displaceX = (displaceX * scaleX).toInt(); - displaceY = (displaceY * scaleY).toInt(); + originX = (originX * scaleX).toInt(); + originY = (originY * scaleY).toInt(); } mulinc(_screenItemRect, celToScreenX, celToScreenY); - displaceX = (displaceX * celToScreenX).toInt(); - displaceY = (displaceY * celToScreenY).toInt(); + originX = (originX * celToScreenX).toInt(); + originY = (originY * celToScreenY).toInt(); const Ratio scriptToScreenX = Ratio(screenWidth, scriptWidth); const Ratio scriptToScreenY = Ratio(screenHeight, scriptHeight); @@ -346,8 +343,8 @@ void ScreenItem::calcRects(const Plane &plane) { _scaledPosition.x = _position.x; _scaledPosition.y = _position.y; } else { - _scaledPosition.x = (_position.x * scriptToScreenX).toInt() - displaceX; - _scaledPosition.y = (_position.y * scriptToScreenY).toInt() - displaceY; + _scaledPosition.x = (_position.x * scriptToScreenX).toInt() - originX; + _scaledPosition.y = (_position.y * scriptToScreenY).toInt() - originY; } _screenItemRect.translate(_scaledPosition.x, _scaledPosition.y); @@ -365,7 +362,7 @@ void ScreenItem::calcRects(const Plane &plane) { if (celObjPic == nullptr) { error("Expected a CelObjPic"); } - temp.translate((celObjPic->_relativePosition.x * scriptToScreenX).toInt() - displaceX, 0); + temp.translate((celObjPic->_relativePosition.x * scriptToScreenX).toInt() - originX, 0); // TODO: This is weird. int deltaX = plane._planeRect.width() - temp.right - 1 - temp.left; @@ -383,9 +380,9 @@ void ScreenItem::calcRects(const Plane &plane) { } else { // low resolution coordinates - int displaceX = celObj._displace.x; + int originX = celObj._origin.x; if (_mirrorX != celObj._mirrorX && _celInfo.type != kCelTypePic) { - displaceX = celObj._width - celObj._displace.x - 1; + originX = celObj._width - celObj._origin.x - 1; } if (!scaleX.isOne() || !scaleY.isOne()) { @@ -397,8 +394,8 @@ void ScreenItem::calcRects(const Plane &plane) { _screenItemRect.bottom -= 1; } - _scaledPosition.x = _position.x - (displaceX * scaleX).toInt(); - _scaledPosition.y = _position.y - (celObj._displace.y * scaleY).toInt(); + _scaledPosition.x = _position.x - (originX * scaleX).toInt(); + _scaledPosition.y = _position.y - (celObj._origin.y * scaleY).toInt(); _screenItemRect.translate(_scaledPosition.x, _scaledPosition.y); if (_mirrorX != celObj._mirrorX && _celInfo.type == kCelTypePic) { @@ -413,7 +410,7 @@ void ScreenItem::calcRects(const Plane &plane) { if (celObjPic == nullptr) { error("Expected a CelObjPic"); } - temp.translate(celObjPic->_relativePosition.x - (displaceX * scaleX).toInt(), celObjPic->_relativePosition.y - (celObj._displace.y * scaleY).toInt()); + temp.translate(celObjPic->_relativePosition.x - (originX * scaleX).toInt(), celObjPic->_relativePosition.y - (celObj._origin.y * scaleY).toInt()); // TODO: This is weird. int deltaX = plane._gameRect.width() - temp.right - 1 - temp.left; @@ -426,7 +423,7 @@ void ScreenItem::calcRects(const Plane &plane) { _scaledPosition.y += plane._gameRect.top; _screenItemRect.translate(plane._gameRect.left, plane._gameRect.top); - if (celObj._scaledWidth != screenWidth || celObj._scaledHeight != screenHeight) { + if (celObj._xResolution != screenWidth || celObj._yResolution != screenHeight) { mulru(_scaledPosition, celToScreenX, celToScreenY); mulru(_screenItemRect, celToScreenX, celToScreenY, 1); } @@ -520,11 +517,11 @@ void ScreenItem::printDebugInfo(Console *con) const { _celInfo.color ); if (_celObj != nullptr) { - con->debugPrintf(" width %d, height %d, scaledWidth %d, scaledHeight %d\n", + con->debugPrintf(" width %d, height %d, x-resolution %d, y-resolution %d\n", _celObj->_width, _celObj->_height, - _celObj->_scaledWidth, - _celObj->_scaledHeight + _celObj->_xResolution, + _celObj->_yResolution ); } } @@ -593,34 +590,32 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const { const uint16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; Ratio scaleX, scaleY; - if (_scale.signal & kScaleSignalDoScaling32) { - if (_scale.signal & kScaleSignalUseVanishingPoint) { - int num = _scale.max * (_position.y - plane._vanishingPoint.y) / (scriptWidth - plane._vanishingPoint.y); - scaleX = Ratio(num, 128); - scaleY = Ratio(num, 128); - } else { - scaleX = Ratio(_scale.x, 128); - scaleY = Ratio(_scale.y, 128); - } + if (_scale.signal == kScaleSignalManual) { + scaleX = Ratio(_scale.x, 128); + scaleY = Ratio(_scale.y, 128); + } else if (_scale.signal == kScaleSignalVanishingPoint) { + int num = _scale.max * (_position.y - plane._vanishingPoint.y) / (scriptWidth - plane._vanishingPoint.y); + scaleX = Ratio(num, 128); + scaleY = Ratio(num, 128); } if (scaleX.getNumerator() == 0 || scaleY.getNumerator() == 0) { return Common::Rect(); } - int16 displaceX = celObj._displace.x; - int16 displaceY = celObj._displace.y; + int16 originX = celObj._origin.x; + int16 originY = celObj._origin.y; if (_mirrorX != celObj._mirrorX && _celInfo.type != kCelTypePic) { - displaceX = celObj._width - displaceX - 1; + originX = celObj._width - originX - 1; } - if (celObj._scaledWidth != kLowResX || celObj._scaledHeight != kLowResY) { + if (celObj._xResolution != kLowResX || celObj._yResolution != kLowResY) { // high resolution coordinates if (_useInsetRect) { - Ratio scriptToCelX(celObj._scaledWidth, scriptWidth); - Ratio scriptToCelY(celObj._scaledHeight, scriptHeight); + Ratio scriptToCelX(celObj._xResolution, scriptWidth); + Ratio scriptToCelY(celObj._yResolution, scriptHeight); mulru(nsRect, scriptToCelX, scriptToCelY, 0); if (nsRect.intersects(celObjRect)) { @@ -661,14 +656,14 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const { } } - Ratio celToScriptX(scriptWidth, celObj._scaledWidth); - Ratio celToScriptY(scriptHeight, celObj._scaledHeight); + Ratio celToScriptX(scriptWidth, celObj._xResolution); + Ratio celToScriptY(scriptHeight, celObj._yResolution); - displaceX = (displaceX * scaleX * celToScriptX).toInt(); - displaceY = (displaceY * scaleY * celToScriptY).toInt(); + originX = (originX * scaleX * celToScriptX).toInt(); + originY = (originY * scaleY * celToScriptY).toInt(); mulinc(nsRect, celToScriptX, celToScriptY); - nsRect.translate(_position.x - displaceX, _position.y - displaceY); + nsRect.translate(_position.x - originX, _position.y - originY); } else { // low resolution coordinates @@ -681,9 +676,9 @@ Common::Rect ScreenItem::getNowSeenRect(const Plane &plane) const { nsRect.bottom -= 1; } - displaceX = (displaceX * scaleX).toInt(); - displaceY = (displaceY * scaleY).toInt(); - nsRect.translate(_position.x - displaceX, _position.y - displaceY); + originX = (originX * scaleX).toInt(); + originY = (originY * scaleY).toInt(); + nsRect.translate(_position.x - originX, _position.y - originY); if (_mirrorX != celObj._mirrorX && _celInfo.type != kCelTypePic) { nsRect.translate(plane._gameRect.width() - nsRect.width(), 0); diff --git a/engines/sci/graphics/screen_item32.h b/engines/sci/graphics/screen_item32.h index 4221c0ea52..009b608f18 100644 --- a/engines/sci/graphics/screen_item32.h +++ b/engines/sci/graphics/screen_item32.h @@ -30,13 +30,9 @@ namespace Sci { enum ScaleSignals32 { - kScaleSignalNone = 0, - // TODO: rename to 'manual' - kScaleSignalDoScaling32 = 1, // enables scaling when drawing that cel (involves scaleX and scaleY) - kScaleSignalUseVanishingPoint = 2, - // TODO: Is this actually a thing? I have not seen it and - // the original engine masks &3 where it uses scale signals. - kScaleSignalDisableGlobalScaling32 = 4 + kScaleSignalNone = 0, + kScaleSignalManual = 1, + kScaleSignalVanishingPoint = 2 }; struct ScaleInfo { diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp index cb6e614657..b5dd9aee0b 100644 --- a/engines/sci/graphics/text16.cpp +++ b/engines/sci/graphics/text16.cpp @@ -83,7 +83,7 @@ void GfxText16::ClearChar(int16 chr) { } // This internal function gets called as soon as a '|' is found in a text. It -// will process the encountered code and set new font/set color. +// will process the encountered code and set new font/set color. // Returns textcode character count. int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int16 orgPenColor, bool doingDrawing) { const char *textCode = text; @@ -179,7 +179,7 @@ static const uint16 text16_shiftJIS_punctuation_SCI01[] = { // return max # of chars to fit maxwidth with full words, does not include // breaking space // Also adjusts text pointer to the new position for the caller -// +// // Special cases in games: // Laura Bow 2 - Credits in the game menu - all the text lines start with spaces (bug #5159) // Act 6 Coroner questionaire - the text of all control buttons has trailing spaces @@ -245,7 +245,7 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId break; } tempWidth += _font->getCharWidth(curChar); - + // Width is too large? -> break out if (tempWidth > maxWidth) break; diff --git a/engines/sci/graphics/text16.h b/engines/sci/graphics/text16.h index 2724d97347..eb39fb2513 100644 --- a/engines/sci/graphics/text16.h +++ b/engines/sci/graphics/text16.h @@ -64,7 +64,7 @@ public: void Box(const char *text, bool show, const Common::Rect &rect, TextAlignment alignment, GuiResourceId fontId) { Box(text, 0, show, rect, alignment, fontId); } - + void DrawString(const char *text); void DrawStatus(const char *text); diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index 11572581ff..d142ff75c3 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -39,8 +39,8 @@ namespace Sci { int16 GfxText32::_defaultFontId = 0; -int16 GfxText32::_scaledWidth = 0; -int16 GfxText32::_scaledHeight = 0; +int16 GfxText32::_xResolution = 0; +int16 GfxText32::_yResolution = 0; GfxText32::GfxText32(SegManager *segMan, GfxCache *fonts) : _segMan(segMan), @@ -52,10 +52,10 @@ GfxText32::GfxText32(SegManager *segMan, GfxCache *fonts) : _fontId = _defaultFontId; _font = _cache->getFont(_defaultFontId); - if (_scaledWidth == 0) { + if (_xResolution == 0) { // initialize the statics - _scaledWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; - _scaledHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; + _xResolution = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; + _yResolution = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; } } @@ -78,8 +78,8 @@ reg_t GfxText32::createFontBitmap(int16 width, int16 height, const Common::Rect int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; - Ratio scaleX(_scaledWidth, scriptWidth); - Ratio scaleY(_scaledHeight, scriptHeight); + Ratio scaleX(_xResolution, scriptWidth); + Ratio scaleY(_yResolution, scriptHeight); _width = (_width * scaleX).toInt(); _height = (_height * scaleY).toInt(); @@ -96,7 +96,7 @@ reg_t GfxText32::createFontBitmap(int16 width, int16 height, const Common::Rect _textRect = Common::Rect(); } - _segMan->allocateBitmap(&_bitmap, _width, _height, _skipColor, 0, 0, _scaledWidth, _scaledHeight, 0, false, gc); + _segMan->allocateBitmap(&_bitmap, _width, _height, _skipColor, 0, 0, _xResolution, _yResolution, 0, false, gc); erase(bitmapRect, false); @@ -120,12 +120,12 @@ reg_t GfxText32::createFontBitmap(const CelInfo32 &celInfo, const Common::Rect & int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; - mulinc(_textRect, Ratio(_scaledWidth, scriptWidth), Ratio(_scaledHeight, scriptHeight)); + mulinc(_textRect, Ratio(_xResolution, scriptWidth), Ratio(_yResolution, scriptHeight)); CelObjView view(celInfo.resourceId, celInfo.loopNo, celInfo.celNo); - _skipColor = view._transparentColor; - _width = view._width * _scaledWidth / view._scaledWidth; - _height = view._height * _scaledHeight / view._scaledHeight; + _skipColor = view._skipColor; + _width = view._width * _xResolution / view._xResolution; + _height = view._height * _yResolution / view._yResolution; Common::Rect bitmapRect(_width, _height); if (_textRect.intersects(bitmapRect)) { @@ -134,7 +134,7 @@ reg_t GfxText32::createFontBitmap(const CelInfo32 &celInfo, const Common::Rect & _textRect = Common::Rect(); } - SciBitmap &bitmap = *_segMan->allocateBitmap(&_bitmap, _width, _height, _skipColor, 0, 0, _scaledWidth, _scaledHeight, 0, false, gc); + SciBitmap &bitmap = *_segMan->allocateBitmap(&_bitmap, _width, _height, _skipColor, 0, 0, _xResolution, _yResolution, 0, false, gc); // NOTE: The engine filled the bitmap pixels with 11 here, which is silly // because then it just erased the bitmap using the skip color. So we don't @@ -144,7 +144,7 @@ reg_t GfxText32::createFontBitmap(const CelInfo32 &celInfo, const Common::Rect & erase(bitmapRect, false); _backColor = backColor; - view.draw(bitmap.getBuffer(), bitmapRect, Common::Point(0, 0), false, Ratio(_scaledWidth, view._scaledWidth), Ratio(_scaledHeight, view._scaledHeight)); + view.draw(bitmap.getBuffer(), bitmapRect, Common::Point(0, 0), false, Ratio(_xResolution, view._xResolution), Ratio(_yResolution, view._yResolution)); if (_backColor != skipColor && _foreColor != skipColor) { erase(_textRect, false); @@ -183,13 +183,15 @@ void GfxText32::drawFrame(const Common::Rect &rect, const int16 size, const uint // NOTE: Not fully disassembled, but this should be right int16 rectWidth = targetRect.width(); - int16 sidesHeight = targetRect.height() - size * 2; + int16 heightRemaining = targetRect.height(); + int16 sidesHeight = heightRemaining - size * 2; int16 centerWidth = rectWidth - size * 2; int16 stride = _width - rectWidth; - for (int16 y = 0; y < size; ++y) { + for (int16 y = 0; y < size && y < heightRemaining; ++y) { memset(pixels, color, rectWidth); pixels += _width; + --heightRemaining; } for (int16 y = 0; y < sidesHeight; ++y) { for (int16 x = 0; x < size; ++x) { @@ -201,9 +203,10 @@ void GfxText32::drawFrame(const Common::Rect &rect, const int16 size, const uint } pixels += stride; } - for (int16 y = 0; y < size; ++y) { + for (int16 y = 0; y < size && y < heightRemaining; ++y) { memset(pixels, color, rectWidth); pixels += _width; + --heightRemaining; } } @@ -329,7 +332,7 @@ void GfxText32::drawText(const uint index, uint length) { void GfxText32::invertRect(const reg_t bitmapId, int16 bitmapStride, const Common::Rect &rect, const uint8 foreColor, const uint8 backColor, const bool doScaling) { Common::Rect targetRect = rect; if (doScaling) { - bitmapStride = bitmapStride * _scaledWidth / g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; + bitmapStride = bitmapStride * _xResolution / g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; targetRect = scaleRect(rect); } @@ -554,13 +557,13 @@ Common::Rect GfxText32::getTextSize(const Common::String &text, int16 maxWidth, int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; - maxWidth = maxWidth * _scaledWidth / scriptWidth; + maxWidth = maxWidth * _xResolution / scriptWidth; _text = text; if (maxWidth >= 0) { if (maxWidth == 0) { - maxWidth = _scaledWidth * 3 / 5; + maxWidth = _xResolution * 3 / 5; } result.right = maxWidth; @@ -603,8 +606,8 @@ Common::Rect GfxText32::getTextSize(const Common::String &text, int16 maxWidth, if (doScaling) { // NOTE: The original engine code also scaled top/left but these are // always zero so there is no reason to do that. - result.right = ((result.right - 1) * scriptWidth + _scaledWidth - 1) / _scaledWidth + 1; - result.bottom = ((result.bottom - 1) * scriptHeight + _scaledHeight - 1) / _scaledHeight + 1; + result.right = ((result.right - 1) * scriptWidth + _xResolution - 1) / _xResolution + 1; + result.bottom = ((result.bottom - 1) * scriptHeight + _yResolution - 1) / _yResolution + 1; } return result; @@ -627,7 +630,7 @@ int16 GfxText32::getTextCount(const Common::String &text, const uint index, cons Common::Rect scaledRect(textRect); if (doScaling) { - mulinc(scaledRect, Ratio(_scaledWidth, scriptWidth), Ratio(_scaledHeight, scriptHeight)); + mulinc(scaledRect, Ratio(_xResolution, scriptWidth), Ratio(_yResolution, scriptHeight)); } Common::String oldText = _text; diff --git a/engines/sci/graphics/text32.h b/engines/sci/graphics/text32.h index 44bd48afd5..c4521a4f56 100644 --- a/engines/sci/graphics/text32.h +++ b/engines/sci/graphics/text32.h @@ -151,8 +151,8 @@ private: Common::Rect scaledRect(rect); int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; - Ratio scaleX(_scaledWidth, scriptWidth); - Ratio scaleY(_scaledHeight, scriptHeight); + Ratio scaleX(_xResolution, scriptWidth); + Ratio scaleY(_yResolution, scriptHeight); mulinc(scaledRect, scaleX, scaleY); return scaledRect; } @@ -169,13 +169,13 @@ public: * The size of the x-dimension of the coordinate system * used by the text renderer. Static since it was global in SSCI. */ - static int16 _scaledWidth; + static int16 _xResolution; /** * The size of the y-dimension of the coordinate system * used by the text renderer. Static since it was global in SSCI. */ - static int16 _scaledHeight; + static int16 _yResolution; /** * The currently active font resource used to write text @@ -199,12 +199,12 @@ public: inline int scaleUpWidth(int value) const { const int scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; - return (value * scriptWidth + _scaledWidth - 1) / _scaledWidth; + return (value * scriptWidth + _xResolution - 1) / _xResolution; } inline int scaleUpHeight(int value) const { const int scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; - return (value * scriptHeight + _scaledHeight - 1) / _scaledHeight; + return (value * scriptHeight + _yResolution - 1) / _yResolution; } /** diff --git a/engines/sci/graphics/transitions32.cpp b/engines/sci/graphics/transitions32.cpp index 37f608da85..ee230f50a8 100644 --- a/engines/sci/graphics/transitions32.cpp +++ b/engines/sci/graphics/transitions32.cpp @@ -20,6 +20,7 @@ * */ +#include "sci/console.h" #include "sci/engine/segment.h" #include "sci/engine/seg_manager.h" #include "sci/engine/state.h" @@ -118,6 +119,7 @@ void GfxTransitions32::processShowStyles() { if (doFrameOut) { g_sci->_gfxFrameout->frameOut(true); + g_sci->getSciDebugger()->onFrame(); throttle(); } } while(continueProcessing && doFrameOut); @@ -233,92 +235,98 @@ void GfxTransitions32::kernelSetShowStyle(const uint16 argc, const reg_t planeOb } } - if (type > 0) { - if (createNewEntry) { - entry = new PlaneShowStyle; - // NOTE: SCI2.1 engine tests if allocation returned a null pointer - // but then only avoids setting currentStep if this is so. Since - // this is a nonsensical approach, we do not do that here - entry->currentStep = 0; - entry->processed = false; - entry->divisions = hasDivisions ? divisions : _defaultDivisions[type]; - entry->plane = planeObj; - entry->fadeColorRangesCount = 0; - - if (getSciVersion() < SCI_VERSION_2_1_MIDDLE) { - // for pixel dissolve - entry->bitmap = NULL_REG; - entry->bitmapScreenItem = nullptr; - - // for wipe - entry->screenItems.clear(); - entry->width = plane->_gameRect.width(); - entry->height = plane->_gameRect.height(); - } else { - entry->fadeColorRanges = nullptr; - if (hasFadeArray) { - // NOTE: SCI2.1mid engine does no check to verify that an array is - // successfully retrieved, and SegMan will cause a fatal error - // if we try to use a memory segment that is not an array - SciArray<reg_t> *table = _segMan->lookupArray(pFadeArray); - - uint32 rangeCount = table->getSize(); - entry->fadeColorRangesCount = rangeCount; - - // NOTE: SCI engine code always allocates memory even if the range - // table has no entries, but this does not really make sense, so - // we avoid the allocation call in this case - if (rangeCount > 0) { - entry->fadeColorRanges = new uint16[rangeCount]; - for (size_t i = 0; i < rangeCount; ++i) { - entry->fadeColorRanges[i] = table->getValue(i).toUint16(); - } + if (type == kShowStyleNone) { + if (createNewEntry == false) { + deleteShowStyle(findIteratorForPlane(planeObj)); + } + + return; + } + + if (createNewEntry) { + entry = new PlaneShowStyle; + // NOTE: SCI2.1 engine tests if allocation returned a null pointer + // but then only avoids setting currentStep if this is so. Since + // this is a nonsensical approach, we do not do that here + entry->currentStep = 0; + entry->processed = false; + entry->divisions = hasDivisions ? divisions : _defaultDivisions[type]; + entry->plane = planeObj; + entry->fadeColorRangesCount = 0; + + if (getSciVersion() < SCI_VERSION_2_1_MIDDLE) { + // for pixel dissolve + entry->bitmap = NULL_REG; + entry->bitmapScreenItem = nullptr; + + // for wipe + entry->screenItems.clear(); + entry->width = plane->_gameRect.width(); + entry->height = plane->_gameRect.height(); + } else { + entry->fadeColorRanges = nullptr; + if (hasFadeArray) { + // NOTE: SCI2.1mid engine does no check to verify that an array is + // successfully retrieved, and SegMan will cause a fatal error + // if we try to use a memory segment that is not an array + SciArray &table = *_segMan->lookupArray(pFadeArray); + + uint32 rangeCount = table.size(); + entry->fadeColorRangesCount = rangeCount; + + // NOTE: SCI engine code always allocates memory even if the range + // table has no entries, but this does not really make sense, so + // we avoid the allocation call in this case + if (rangeCount > 0) { + entry->fadeColorRanges = new uint16[rangeCount]; + for (size_t i = 0; i < rangeCount; ++i) { + entry->fadeColorRanges[i] = table.getAsInt16(i); } } } } + } - // NOTE: The original engine had no nullptr check and would just crash - // if it got to here - if (entry == nullptr) { - error("Cannot edit non-existing ShowStyle entry"); - } + // NOTE: The original engine had no nullptr check and would just crash + // if it got to here + if (entry == nullptr) { + error("Cannot edit non-existing ShowStyle entry"); + } - entry->fadeUp = isFadeUp; - entry->color = color; - entry->nextTick = g_sci->getTickCount(); - entry->type = type; - entry->animate = animate; - entry->delay = (seconds * 60 + entry->divisions - 1) / entry->divisions; + entry->fadeUp = isFadeUp; + entry->color = color; + entry->nextTick = g_sci->getTickCount(); + entry->type = type; + entry->animate = animate; + entry->delay = (seconds * 60 + entry->divisions - 1) / entry->divisions; - if (entry->delay == 0) { - error("ShowStyle has no duration"); - } + if (entry->delay == 0) { + error("ShowStyle has no duration"); + } - if (frameOutNow) { - // Creates a reference frame for the pixel dissolves to use - g_sci->_gfxFrameout->frameOut(false); - } + if (frameOutNow) { + // Creates a reference frame for the pixel dissolves to use + g_sci->_gfxFrameout->frameOut(false); + } - if (createNewEntry) { - if (getSciVersion() <= SCI_VERSION_2_1_EARLY) { - switch (entry->type) { - case kShowStyleIrisOut: - case kShowStyleIrisIn: - configure21EarlyIris(*entry, priority); - break; - case kShowStyleDissolve: - configure21EarlyDissolve(*entry, priority, plane->_gameRect); - break; - default: - // do nothing - break; - } + if (createNewEntry) { + if (getSciVersion() <= SCI_VERSION_2_1_EARLY) { + switch (entry->type) { + case kShowStyleIrisOut: + case kShowStyleIrisIn: + configure21EarlyIris(*entry, priority); + break; + case kShowStyleDissolve: + configure21EarlyDissolve(*entry, priority, plane->_gameRect); + break; + default: + // do nothing + break; } - - _showStyles.push_back(*entry); - delete entry; } + + _showStyles.push_back(*entry); + delete entry; } } @@ -940,8 +948,9 @@ void GfxTransitions32::kernelSetScroll(const reg_t planeId, const int16 deltaX, g_sci->_gfxFrameout->frameOut(true); throttle(); } - delete scroll; } + + delete scroll; } bool GfxTransitions32::processScroll(PlaneScroll &scroll) { @@ -953,7 +962,7 @@ bool GfxTransitions32::processScroll(PlaneScroll &scroll) { int deltaX = scroll.deltaX; int deltaY = scroll.deltaY; - if (((scroll.x + deltaX) * scroll.y) <= 0) { + if (((scroll.x + deltaX) * scroll.x) <= 0) { deltaX = -scroll.x; } if (((scroll.y + deltaY) * scroll.y) <= 0) { @@ -965,6 +974,10 @@ bool GfxTransitions32::processScroll(PlaneScroll &scroll) { Plane *plane = g_sci->_gfxFrameout->getPlanes().findByObject(scroll.plane); + if (plane == nullptr) { + error("[GfxTransitions32::processScroll]: Plane %04x:%04x not found", PRINT_REG(scroll.plane)); + } + if ((scroll.x == 0) && (scroll.y == 0)) { plane->deletePic(scroll.oldPictureId, scroll.newPictureId); finished = true; diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp index 8b1d4ef32b..1db66644c8 100644 --- a/engines/sci/graphics/video32.cpp +++ b/engines/sci/graphics/video32.cpp @@ -58,7 +58,10 @@ SEQPlayer::SEQPlayer(SegManager *segMan) : void SEQPlayer::play(const Common::String &fileName, const int16 numTicks, const int16 x, const int16 y) { delete _decoder; _decoder = new SEQDecoder(numTicks); - _decoder->loadFile(fileName); + if (!_decoder->loadFile(fileName)) { + warning("[SEQPlayer::play]: Failed to load %s", fileName.c_str()); + return; + } // NOTE: In the original engine, video was output directly to the hardware, // bypassing the game's rendering engine. Instead of doing this, we use a @@ -86,9 +89,8 @@ void SEQPlayer::play(const Common::String &fileName, const int16 numTicks, const _decoder->start(); while (!g_engine->shouldQuit() && !_decoder->endOfVideo()) { + g_sci->sleep(_decoder->getTimeToNextFrame()); renderFrame(); - g_sci->getEngineState()->speedThrottler(_decoder->getTimeToNextFrame()); - g_sci->getEngineState()->_throttleTrigger = true; } _segMan->freeBitmap(_screenItem->_celInfo.bitmap); @@ -119,8 +121,8 @@ void SEQPlayer::renderFrame() const { } g_sci->_gfxFrameout->updateScreenItem(*_screenItem); - g_sci->getSciDebugger()->onFrame(); g_sci->_gfxFrameout->frameOut(true); + g_sci->getSciDebugger()->onFrame(); } #pragma mark - @@ -311,9 +313,8 @@ AVIPlayer::IOStatus AVIPlayer::play(const int16 from, const int16 to, const int1 void AVIPlayer::renderVideo() const { _decoder->start(); while (!g_engine->shouldQuit() && !_decoder->endOfVideo()) { - g_sci->getEngineState()->speedThrottler(_decoder->getTimeToNextFrame()); - g_sci->getEngineState()->_throttleTrigger = true; - if (_decoder->needsUpdate()) { + g_sci->sleep(_decoder->getTimeToNextFrame()); + while (_decoder->needsUpdate()) { renderFrame(); } } @@ -408,8 +409,8 @@ void AVIPlayer::renderFrame() const { } g_sci->_gfxFrameout->updateScreenItem(*_screenItem); - g_sci->getSciDebugger()->onFrame(); g_sci->_gfxFrameout->frameOut(true); + g_sci->getSciDebugger()->onFrame(); } else { assert(surface->format.bytesPerPixel == 4); @@ -457,9 +458,8 @@ AVIPlayer::EventFlags AVIPlayer::playUntilEvent(EventFlags flags) { break; } - g_sci->getEngineState()->speedThrottler(_decoder->getTimeToNextFrame()); - g_sci->getEngineState()->_throttleTrigger = true; - if (_decoder->needsUpdate()) { + g_sci->sleep(_decoder->getTimeToNextFrame()); + while (_decoder->needsUpdate()) { renderFrame(); } @@ -485,13 +485,6 @@ AVIPlayer::EventFlags AVIPlayer::playUntilEvent(EventFlags flags) { break; } } - - // TODO: Hot rectangles - if ((flags & kEventFlagHotRectangle) /* && event.type == SCI_EVENT_HOT_RECTANGLE */) { - warning("Hot rectangles not implemented in VMD player"); - stopFlag = kEventFlagHotRectangle; - break; - } } return stopFlag; @@ -635,7 +628,7 @@ VMDPlayer::EventFlags VMDPlayer::kernelPlayUntilEvent(const EventFlags flags, co const int32 maxFrameNo = (int32)(_decoder->getFrameCount() - 1); if ((flags & kEventFlagToFrame) && lastFrameNo > 0) { - _decoder->setEndFrame(MIN((int32)lastFrameNo, maxFrameNo)); + _decoder->setEndFrame(MIN<int32>(lastFrameNo, maxFrameNo)); } else { _decoder->setEndFrame(maxFrameNo); } @@ -645,7 +638,7 @@ VMDPlayer::EventFlags VMDPlayer::kernelPlayUntilEvent(const EventFlags flags, co if (yieldInterval == -1 && !(flags & kEventFlagToFrame)) { _yieldInterval = lastFrameNo; } else if (yieldInterval != -1) { - _yieldInterval = MIN((int32)yieldInterval, maxFrameNo); + _yieldInterval = MIN<int32>(yieldInterval, maxFrameNo); } } else { _yieldInterval = maxFrameNo; @@ -655,11 +648,11 @@ VMDPlayer::EventFlags VMDPlayer::kernelPlayUntilEvent(const EventFlags flags, co } VMDPlayer::EventFlags VMDPlayer::playUntilEvent(const EventFlags flags) { - // Flushing all the keyboard and mouse events out of the event manager to - // avoid letting any events queued from before the video started from - // accidentally activating an event callback + // Flushing all the keyboard and mouse events out of the event manager + // keeps events queued from before the start of playback from accidentally + // activating a video stop flag for (;;) { - const SciEvent event = _eventMan->getSciEvent(SCI_EVENT_KEYBOARD | SCI_EVENT_MOUSE_PRESS | SCI_EVENT_MOUSE_RELEASE | SCI_EVENT_QUIT); + const SciEvent event = _eventMan->getSciEvent(SCI_EVENT_KEYBOARD | SCI_EVENT_MOUSE_PRESS | SCI_EVENT_MOUSE_RELEASE | SCI_EVENT_HOT_RECTANGLE | SCI_EVENT_QUIT); if (event.type == SCI_EVENT_NONE) { break; } else if (event.type == SCI_EVENT_QUIT) { @@ -667,8 +660,6 @@ VMDPlayer::EventFlags VMDPlayer::playUntilEvent(const EventFlags flags) { } } - _decoder->pauseVideo(false); - if (flags & kEventFlagReverse) { // NOTE: This flag may not work properly since SSCI does not care // if a video has audio, but the VMD decoder does. @@ -698,12 +689,12 @@ VMDPlayer::EventFlags VMDPlayer::playUntilEvent(const EventFlags flags) { if (_doublePixels) { vmdScaleInfo.x = 256; vmdScaleInfo.y = 256; - vmdScaleInfo.signal = kScaleSignalDoScaling32; + vmdScaleInfo.signal = kScaleSignalManual; vmdRect.right += vmdRect.width(); vmdRect.bottom += vmdRect.height(); } else if (_stretchVertical) { vmdScaleInfo.y = 256; - vmdScaleInfo.signal = kScaleSignalDoScaling32; + vmdScaleInfo.signal = kScaleSignalManual; vmdRect.bottom += vmdRect.height(); } @@ -748,6 +739,14 @@ VMDPlayer::EventFlags VMDPlayer::playUntilEvent(const EventFlags flags) { g_sci->_gfxFrameout->addScreenItem(*_screenItem); + // HACK: When VMD playback is allowed to yield back to the VM, this + // causes the VMD decoder to freak out for some reason and video output + // starts jittering horribly. This problem does not happen if audio sync + // is disabled, but this causes some audible clicking between frames + // of audio (and, presumably, will cause some AV sync problems). Still, + // that's better than really bad jitter. + _decoder->setAudioSync(!(flags & kEventFlagYieldToVM)); + _decoder->start(); } @@ -758,9 +757,11 @@ VMDPlayer::EventFlags VMDPlayer::playUntilEvent(const EventFlags flags) { break; } - g_sci->getEngineState()->speedThrottler(_decoder->getTimeToNextFrame()); - g_sci->getEngineState()->_throttleTrigger = true; - if (_decoder->needsUpdate()) { + // Sleeping any more than 1/60th of a second will make the mouse feel + // very sluggish during VMD action sequences because the frame rate of + // VMDs is usually only 15fps + g_sci->sleep(MIN<uint32>(10, _decoder->getTimeToNextFrame())); + while (_decoder->needsUpdate()) { renderFrame(); } @@ -802,15 +803,13 @@ VMDPlayer::EventFlags VMDPlayer::playUntilEvent(const EventFlags flags) { } } - // TODO: Hot rectangles - if ((flags & kEventFlagHotRectangle) /* && event.type == SCI_EVENT_HOT_RECTANGLE */) { - warning("Hot rectangles not implemented in VMD player"); + event = _eventMan->getSciEvent(SCI_EVENT_HOT_RECTANGLE | SCI_EVENT_PEEK); + if ((flags & kEventFlagHotRectangle) && event.type == SCI_EVENT_HOT_RECTANGLE) { stopFlag = kEventFlagHotRectangle; break; } } - _decoder->pauseVideo(true); return stopFlag; } @@ -857,9 +856,8 @@ void VMDPlayer::renderFrame() const { } } else { g_sci->_gfxFrameout->updateScreenItem(*_screenItem); - g_sci->getSciDebugger()->onFrame(); g_sci->_gfxFrameout->frameOut(true); - g_sci->_gfxFrameout->throttle(); + g_sci->getSciDebugger()->onFrame(); } } @@ -891,7 +889,7 @@ void VMDPlayer::restrictPalette(const uint8 startColor, const int16 endColor) { // At least GK2 sends 256 as the end color, which is wrong, // but works in the original engine as the storage size is 4 bytes // and used values are clamped to 0-255 - _endColor = MIN((int16)255, endColor); + _endColor = MIN<int16>(255, endColor); } } // End of namespace Sci diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 2e69932e49..8826b0625a 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -159,7 +159,7 @@ static const ResourceType s_resTypeMapSci21[] = { kResourceTypeView, kResourceTypePic, kResourceTypeScript, kResourceTypeAnimation, // 0x00-0x03 kResourceTypeSound, kResourceTypeEtc, kResourceTypeVocab, kResourceTypeFont, // 0x04-0x07 kResourceTypeCursor, kResourceTypePatch, kResourceTypeBitmap, kResourceTypePalette, // 0x08-0x0B - kResourceTypeInvalid, kResourceTypeAudio, kResourceTypeSync, kResourceTypeMessage, // 0x0C-0x0F + kResourceTypeAudio, kResourceTypeAudio, kResourceTypeSync, kResourceTypeMessage, // 0x0C-0x0F kResourceTypeMap, kResourceTypeHeap, kResourceTypeChunk, kResourceTypeAudio36, // 0x10-0x13 kResourceTypeSync36, kResourceTypeTranslation, kResourceTypeRobot, kResourceTypeVMD, // 0x14-0x17 kResourceTypeDuck, kResourceTypeClut, kResourceTypeTGA, kResourceTypeZZZ // 0x18-0x1B @@ -948,7 +948,7 @@ void ResourceManager::init() { // cache, leading to constant decompression of picture resources // and making the renderer very slow. if (getSciVersion() >= SCI_VERSION_2) { - _maxMemoryLRU = 2048 * 1024; // 2MiB + _maxMemoryLRU = 4096 * 1024; // 4MiB } switch (_viewType) { diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp index cbc4a02739..4b3a13c490 100644 --- a/engines/sci/resource_audio.cpp +++ b/engines/sci/resource_audio.cpp @@ -965,6 +965,10 @@ bool ResourceManager::addAudioSources() { } void ResourceManager::changeAudioDirectory(Common::String path) { + // TODO: This implementation is broken. + return; + +#if 0 // Remove all of the audio map resource sources, as well as the audio resource sources for (Common::List<ResourceSource *>::iterator it = _sources.begin(); it != _sources.end();) { ResourceSource *source = *it; @@ -1007,6 +1011,7 @@ void ResourceManager::changeAudioDirectory(Common::String path) { // Rescan the newly added resources scanNewSources(); +#endif } } // End of namespace Sci diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 86c0cffe15..246c031c06 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -128,6 +128,7 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gam DebugMan.addDebugChannel(kDebugLevelScriptPatcher, "ScriptPatcher", "Notifies when scripts are patched"); DebugMan.addDebugChannel(kDebugLevelWorkarounds, "Workarounds", "Notifies when workarounds are triggered"); DebugMan.addDebugChannel(kDebugLevelVideo, "Video", "Video (SEQ, VMD, RBT) debugging"); + DebugMan.addDebugChannel(kDebugLevelGame, "Game", "Debug calls from game scripts"); DebugMan.addDebugChannel(kDebugLevelGC, "GC", "Garbage Collector debugging"); DebugMan.addDebugChannel(kDebugLevelResMan, "ResMan", "Resource manager debugging"); DebugMan.addDebugChannel(kDebugLevelOnStartup, "OnStartup", "Enter debugger at start of game"); @@ -494,62 +495,89 @@ static byte patchGameRestoreSave[] = { 0x48, // ret }; +#ifdef ENABLE_SCI32 // SCI2 version: Same as above, but the second parameter to callk is a word -static byte patchGameRestoreSaveSci2[] = { - 0x39, 0x03, // pushi 03 - 0x76, // push0 - 0x38, 0xff, 0xff, // pushi -1 - 0x76, // push0 - 0x43, 0xff, 0x06, 0x00, // callk kRestoreGame/kSaveGame (will get changed afterwards) - 0x48, // ret +// and third parameter is a string reference +static byte patchGameRestoreSci2[] = { + 0x39, 0x03, // pushi 03 + 0x76, // push0 (game name) + 0x38, 0xff, 0xff, // pushi -1 (save number) + 0x89, 0x1b, // lsg global[27] (game version) + 0x43, 0xff, 0x06, 0x00, // callk kRestoreGame (0xFF will be overwritten by patcher) + 0x48, // ret }; -// SCI21 version: Same as above, but the second parameter to callk is a word -static byte patchGameRestoreSaveSci21[] = { - 0x39, 0x04, // pushi 04 - 0x76, // push0 // 0: save, 1: restore (will get changed afterwards) - 0x76, // push0 - 0x38, 0xff, 0xff, // pushi -1 - 0x76, // push0 - 0x43, 0xff, 0x08, 0x00, // callk kSave (will get changed afterwards) - 0x48, // ret +static byte patchGameSaveSci2[] = { + 0x39, 0x04, // pushi 04 + 0x76, // push0 (game name) + 0x38, 0xff, 0xff, // pushi -1 (save number) + 0x76, // push0 (save description) + 0x89, 0x1b, // lsg global[27] (game version) + 0x43, 0xff, 0x08, 0x00, // callk kSaveGame (0xFF will be overwritten by patcher) + 0x48, // ret +}; + +// SCI2.1mid version: Same as above, but with an extra subop parameter +static byte patchGameRestoreSci21[] = { + 0x39, 0x04, // pushi 04 + 0x78, // push1 (subop) + 0x76, // push0 (game name) + 0x38, 0xff, 0xff, // pushi -1 (save number) + 0x89, 0x1b, // lsg global[27] (game version) + 0x43, 0xff, 0x08, 0x00, // callk kSave (0xFF will be overwritten by patcher) + 0x48, // ret }; +static byte patchGameSaveSci21[] = { + 0x39, 0x05, // pushi 05 + 0x76, // push0 (subop) + 0x76, // push0 (game name) + 0x38, 0xff, 0xff, // pushi -1 (save number) + 0x76, // push0 (save description) + 0x89, 0x1b, // lsg global[27] (game version) + 0x43, 0xff, 0x0a, 0x00, // callk kSave (0xFF will be overwritten by patcher) + 0x48, // ret +}; +#endif + static void patchGameSaveRestoreCode(SegManager *segMan, reg_t methodAddress, byte id) { Script *script = segMan->getScript(methodAddress.getSegment()); byte *patchPtr = const_cast<byte *>(script->getBuf(methodAddress.getOffset())); - if (getSciVersion() <= SCI_VERSION_1_1) { - memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); - } else { // SCI2+ - memcpy(patchPtr, patchGameRestoreSaveSci2, sizeof(patchGameRestoreSaveSci2)); - - if (g_sci->isBE()) { - // LE -> BE - patchPtr[9] = 0x00; - patchPtr[10] = 0x06; - } - } - + memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); patchPtr[8] = id; } -static void patchGameSaveRestoreCodeSci21(SegManager *segMan, reg_t methodAddress, byte id, bool doRestore) { +#ifdef ENABLE_SCI32 +static void patchGameSaveRestoreCodeSci2(SegManager *segMan, reg_t methodAddress, byte id, bool doRestore) { Script *script = segMan->getScript(methodAddress.getSegment()); byte *patchPtr = const_cast<byte *>(script->getBuf(methodAddress.getOffset())); - memcpy(patchPtr, patchGameRestoreSaveSci21, sizeof(patchGameRestoreSaveSci21)); + int kcallOffset; - if (doRestore) - patchPtr[2] = 0x78; // push1 + if (getSciVersion() < SCI_VERSION_2_1_MIDDLE) { + if (doRestore) { + memcpy(patchPtr, patchGameRestoreSci2, sizeof(patchGameRestoreSci2)); + kcallOffset = 9; + } else { + memcpy(patchPtr, patchGameSaveSci2, sizeof(patchGameSaveSci2)); + kcallOffset = 10; + } + } else { + if (doRestore) { + memcpy(patchPtr, patchGameRestoreSci21, sizeof(patchGameRestoreSci21)); + kcallOffset = 10; + } else { + memcpy(patchPtr, patchGameSaveSci21, sizeof(patchGameSaveSci21)); + kcallOffset = 11; + } + } + patchPtr[kcallOffset] = id; if (g_sci->isBE()) { - // LE -> BE - patchPtr[10] = 0x00; - patchPtr[11] = 0x08; + SWAP(patchPtr[kcallOffset + 1], patchPtr[kcallOffset + 2]); } - - patchPtr[9] = id; } +#endif void SciEngine::patchGameSaveRestore() { SegManager *segMan = _gamestate->_segMan; @@ -564,9 +592,12 @@ void SciEngine::patchGameSaveRestore() { case GID_HOYLE1: // gets confused, although the game doesn't support saving/restoring at all case GID_HOYLE2: // gets confused, see hoyle1 case GID_JONES: // gets confused, when we patch us in, the game is only able to save to 1 slot, so hooking is not required + case GID_KQ7: // has custom save/load code case GID_MOTHERGOOSE: // mother goose EGA saves/restores directly and has no save/restore dialogs case GID_MOTHERGOOSE256: // mother goose saves/restores directly and has no save/restore dialogs + case GID_MOTHERGOOSEHIRES: // has custom save/load code case GID_PHANTASMAGORIA: // has custom save/load code + case GID_PQSWAT: // has custom save/load code case GID_SHIVERS: // has custom save/load code return; default: @@ -593,17 +624,21 @@ void SciEngine::patchGameSaveRestore() { uint16 selectorId = gameSuperObject->getFuncSelector(methodNr); Common::String methodName = _kernel->getSelectorName(selectorId); if (methodName == "restore") { - if (kernelIdSave != kernelIdRestore) +#ifdef ENABLE_SCI32 + if (getSciVersion() >= SCI_VERSION_2) { + patchGameSaveRestoreCodeSci2(segMan, gameSuperObject->getFunction(methodNr), kernelIdRestore, true); + } else +#endif patchGameSaveRestoreCode(segMan, gameSuperObject->getFunction(methodNr), kernelIdRestore); - else - patchGameSaveRestoreCodeSci21(segMan, gameSuperObject->getFunction(methodNr), kernelIdRestore, true); } else if (methodName == "save") { if (_gameId != GID_FAIRYTALES) { // Fairy Tales saves automatically without a dialog - if (kernelIdSave != kernelIdRestore) +#ifdef ENABLE_SCI32 + if (getSciVersion() >= SCI_VERSION_2) { + patchGameSaveRestoreCodeSci2(segMan, gameSuperObject->getFunction(methodNr), kernelIdSave, false); + } else +#endif patchGameSaveRestoreCode(segMan, gameSuperObject->getFunction(methodNr), kernelIdSave); - else - patchGameSaveRestoreCodeSci21(segMan, gameSuperObject->getFunction(methodNr), kernelIdSave, false); } } } @@ -627,10 +662,12 @@ void SciEngine::patchGameSaveRestore() { Common::String methodName = _kernel->getSelectorName(selectorId); if (methodName == "save") { if (_gameId != GID_FAIRYTALES) { // Fairy Tales saves automatically without a dialog - if (kernelIdSave != kernelIdRestore) +#ifdef ENABLE_SCI32 + if (getSciVersion() >= SCI_VERSION_2) { + patchGameSaveRestoreCodeSci2(segMan, gameSuperObject->getFunction(methodNr), kernelIdSave, false); + } else +#endif patchGameSaveRestoreCode(segMan, patchObjectSave->getFunction(methodNr), kernelIdSave); - else - patchGameSaveRestoreCodeSci21(segMan, patchObjectSave->getFunction(methodNr), kernelIdSave, false); } break; } @@ -955,6 +992,25 @@ int SciEngine::inQfGImportRoom() const { return 0; } +void SciEngine::sleep(uint32 msecs) { + uint32 time; + const uint32 wakeUpTime = g_system->getMillis() + msecs; + + for (;;) { + // let backend process events and update the screen + _eventMan->getSciEvent(SCI_EVENT_PEEK); + time = g_system->getMillis(); + if (time + 10 < wakeUpTime) { + g_system->delayMillis(10); + } else { + if (time < wakeUpTime) + g_system->delayMillis(wakeUpTime - time); + break; + } + + } +} + void SciEngine::setLauncherLanguage() { if (_gameDescription->flags & ADGF_ADDENGLISH) { // If game is multilingual @@ -1065,11 +1121,17 @@ void SciEngine::syncIngameAudioOptions() { bool subtitlesOn = ConfMan.getBool("subtitles"); bool speechOn = !ConfMan.getBool("speech_mute"); +#ifdef ENABLE_SCI32 + if (getSciVersion() >= SCI_VERSION_2) { + _gamestate->variables[VAR_GLOBAL][kGlobalVarTextSpeed] = make_reg(0, 8 - ConfMan.getInt("talkspeed") * 8 / 255); + } +#endif + if (useGlobal90) { if (subtitlesOn && !speechOn) { - _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 1); // subtitles + _gamestate->variables[VAR_GLOBAL][kGlobalVarMessageType] = make_reg(0, 1); // subtitles } else if (!subtitlesOn && speechOn) { - _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 2); // speech + _gamestate->variables[VAR_GLOBAL][kGlobalVarMessageType] = make_reg(0, 2); // speech } else if (subtitlesOn && speechOn) { // Is it a game that supports simultaneous speech and subtitles? switch (_gameId) { @@ -1090,11 +1152,11 @@ void SciEngine::syncIngameAudioOptions() { // Phantasmagoria does not support simultaneous speech + subtitles // Mixed Up Mother Goose Deluxe does not support simultaneous speech + subtitles #endif // ENABLE_SCI32 - _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 3); // speech + subtitles + _gamestate->variables[VAR_GLOBAL][kGlobalVarMessageType] = make_reg(0, 3); // speech + subtitles break; default: // Game does not support speech and subtitles, set it to speech - _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 2); // speech + _gamestate->variables[VAR_GLOBAL][kGlobalVarMessageType] = make_reg(0, 2); // speech } } } @@ -1105,7 +1167,7 @@ void SciEngine::updateScummVMAudioOptions() { // Update ScummVM's speech/subtitles settings for SCI1.1 CD games, // depending on the in-game settings if (isCD() && getSciVersion() == SCI_VERSION_1_1) { - uint16 ingameSetting = _gamestate->variables[VAR_GLOBAL][90].getOffset(); + uint16 ingameSetting = _gamestate->variables[VAR_GLOBAL][kGlobalVarMessageType].getOffset(); switch (ingameSetting) { case 1: diff --git a/engines/sci/sci.h b/engines/sci/sci.h index b336eb8cce..b46207b075 100644 --- a/engines/sci/sci.h +++ b/engines/sci/sci.h @@ -125,7 +125,8 @@ enum kDebugLevels { kDebugLevelDebugMode = 1 << 21, kDebugLevelScriptPatcher = 1 << 22, kDebugLevelWorkarounds = 1 << 23, - kDebugLevelVideo = 1 << 24 + kDebugLevelVideo = 1 << 24, + kDebugLevelGame = 1 << 25 }; enum SciGameId { diff --git a/engines/sci/sound/audio32.cpp b/engines/sci/sound/audio32.cpp index 4af474b918..659a5265d4 100644 --- a/engines/sci/sound/audio32.cpp +++ b/engines/sci/sound/audio32.cpp @@ -183,6 +183,9 @@ int Audio32::writeAudioInternal(Audio::AudioStream *const sourceStream, Audio::R do { if (loop && sourceStream->endOfStream()) { Audio::RewindableAudioStream *rewindableStream = dynamic_cast<Audio::RewindableAudioStream *>(sourceStream); + if (rewindableStream == nullptr) { + error("[Audio32::writeAudioInternal]: Unable to cast stream"); + } rewindableStream->rewind(); } @@ -453,7 +456,11 @@ void Audio32::freeUnusedChannels() { const AudioChannel &channel = getChannel(channelIndex); if (!channel.robot && channel.stream->endOfStream()) { if (channel.loop) { - dynamic_cast<Audio::SeekableAudioStream *>(channel.stream)->rewind(); + Audio::SeekableAudioStream *stream = dynamic_cast<Audio::SeekableAudioStream *>(channel.stream); + if (stream == nullptr) { + error("[Audio32::freeUnusedChannels]: Unable to cast stream for resource %s", channel.id.toString().c_str()); + } + stream->rewind(); } else { stop(channelIndex--); } @@ -658,6 +665,9 @@ uint16 Audio32::play(int16 channelIndex, const ResourceId resourceId, const bool if (channelIndex != kNoExistingChannel) { AudioChannel &channel = getChannel(channelIndex); Audio::SeekableAudioStream *stream = dynamic_cast<Audio::SeekableAudioStream *>(channel.stream); + if (stream == nullptr) { + error("[Audio32::play]: Unable to cast stream for resource %s", resourceId.toString().c_str()); + } if (channel.pausedAtTick) { resume(channelIndex); @@ -764,7 +774,12 @@ uint16 Audio32::play(int16 channelIndex, const ResourceId resourceId, const bool // use audio streams, and allocate and fill the monitoring buffer // when reading audio data from the stream. - channel.duration = /* round up */ 1 + (dynamic_cast<Audio::SeekableAudioStream *>(channel.stream)->getLength().msecs() * 60 / 1000); + Audio::SeekableAudioStream *stream = dynamic_cast<Audio::SeekableAudioStream *>(channel.stream); + if (stream == nullptr) { + error("[Audio32::play]: Unable to cast stream for resource %s", resourceId.toString().c_str()); + } + + channel.duration = /* round up */ 1 + (stream->getLength().msecs() * 60 / 1000); const uint32 now = g_sci->getTickCount(); channel.pausedAtTick = autoPlay ? 0 : now; @@ -1012,7 +1027,7 @@ int16 Audio32::getVolume(const int16 channelIndex) const { } void Audio32::setVolume(const int16 channelIndex, int16 volume) { - volume = MIN((int16)kMaxVolume, volume); + volume = MIN<int16>(kMaxVolume, volume); if (channelIndex == kAllChannels) { ConfMan.setInt("sfx_volume", volume * Audio::Mixer::kMaxChannelVolume / kMaxVolume); ConfMan.setInt("speech_volume", volume * Audio::Mixer::kMaxChannelVolume / kMaxVolume); diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp index 1757088ea4..446b986581 100644 --- a/engines/sci/video/robot_decoder.cpp +++ b/engines/sci/video/robot_decoder.cpp @@ -445,7 +445,7 @@ void RobotDecoder::initVideo(const int16 x, const int16 y, const int16 scale, co if (scale != 128) { _scaleInfo.x = scale; _scaleInfo.y = scale; - _scaleInfo.signal = kScaleSignalDoScaling32; + _scaleInfo.signal = kScaleSignalManual; } _plane = g_sci->_gfxFrameout->getPlanes().findByObject(plane); @@ -703,7 +703,7 @@ void RobotDecoder::showFrame(const uint16 frameNo, const uint16 newX, const uint const int16 lowResX = (scaledX * screenToLowResX).toInt(); const int16 lowResY = (scaledY2 * screenToLowResY).toInt(); - bitmap.setDisplace(Common::Point( + bitmap.setOrigin(Common::Point( (scaledX - (lowResX * lowResToScreenX).toInt()) * -1, (lowResY * lowResToScreenY).toInt() - scaledY1 )); @@ -713,7 +713,7 @@ void RobotDecoder::showFrame(const uint16 frameNo, const uint16 newX, const uint } else { const int16 scaledX = _originalScreenItemX[i] + _position.x; const int16 scaledY = _originalScreenItemY[i] + _position.y + bitmap.getHeight() - 1; - bitmap.setDisplace(Common::Point(0, bitmap.getHeight() - 1)); + bitmap.setOrigin(Common::Point(0, bitmap.getHeight() - 1)); _screenItemX[i] = scaledX; _screenItemY[i] = scaledY; } @@ -1391,7 +1391,7 @@ void RobotDecoder::doVersion5(const bool shouldSubmitAudio) { // TODO: Version 6 robot? // int scaleXRemainder; - if (_scaleInfo.signal == kScaleSignalDoScaling32) { + if (_scaleInfo.signal == kScaleSignalManual) { position.x = (position.x * _scaleInfo.x) / 128; // TODO: Version 6 robot? // scaleXRemainder = (position.x * _scaleInfo.x) % 128; @@ -1461,7 +1461,7 @@ uint32 RobotDecoder::createCel5(const byte *rawVideoData, const int16 screenItem const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth; const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight; - Common::Point displace; + Common::Point origin; if (scriptWidth == kLowResX && scriptHeight == kLowResY) { const Ratio lowResToScreenX(screenWidth, kLowResX); const Ratio lowResToScreenY(screenHeight, kLowResY); @@ -1475,22 +1475,22 @@ uint32 RobotDecoder::createCel5(const byte *rawVideoData, const int16 screenItem const int16 lowResX = (scaledX * screenToLowResX).toInt(); const int16 lowResY = (scaledY2 * screenToLowResY).toInt(); - displace.x = (scaledX - (lowResX * lowResToScreenX).toInt()) * -1; - displace.y = (lowResY * lowResToScreenY).toInt() - scaledY1; + origin.x = (scaledX - (lowResX * lowResToScreenX).toInt()) * -1; + origin.y = (lowResY * lowResToScreenY).toInt() - scaledY1; _screenItemX[screenItemIndex] = lowResX; _screenItemY[screenItemIndex] = lowResY; - debugC(kDebugLevelVideo, "Low resolution position c: %d %d l: %d/%d %d/%d d: %d %d s: %d/%d %d/%d x: %d y: %d", celPosition.x, celPosition.y, lowResX, scriptWidth, lowResY, scriptHeight, displace.x, displace.y, scaledX, screenWidth, scaledY2, screenHeight, scaledX - displace.x, scaledY2 - displace.y); + debugC(kDebugLevelVideo, "Low resolution position c: %d %d l: %d/%d %d/%d d: %d %d s: %d/%d %d/%d x: %d y: %d", celPosition.x, celPosition.y, lowResX, scriptWidth, lowResY, scriptHeight, origin.x, origin.y, scaledX, screenWidth, scaledY2, screenHeight, scaledX - origin.x, scaledY2 - origin.y); } else { const int16 highResX = celPosition.x + _position.x; const int16 highResY = celPosition.y + _position.y + celHeight - 1; - displace.x = 0; - displace.y = celHeight - 1; + origin.x = 0; + origin.y = celHeight - 1; _screenItemX[screenItemIndex] = highResX; _screenItemY[screenItemIndex] = highResY; - debugC(kDebugLevelVideo, "High resolution position c: %d %d s: %d %d d: %d %d", celPosition.x, celPosition.y, highResX, highResY, displace.x, displace.y); + debugC(kDebugLevelVideo, "High resolution position c: %d %d s: %d %d d: %d %d", celPosition.x, celPosition.y, highResX, highResY, origin.x, origin.y); } _originalScreenItemX[screenItemIndex] = celPosition.x; @@ -1500,9 +1500,9 @@ uint32 RobotDecoder::createCel5(const byte *rawVideoData, const int16 screenItem SciBitmap &bitmap = *_segMan->lookupBitmap(_celHandles[screenItemIndex].bitmapId); assert(bitmap.getWidth() == celWidth && bitmap.getHeight() == celHeight); - assert(bitmap.getScaledWidth() == _xResolution && bitmap.getScaledHeight() == _yResolution); + assert(bitmap.getXResolution() == _xResolution && bitmap.getYResolution() == _yResolution); assert(bitmap.getHunkPaletteOffset() == (uint32)bitmap.getWidth() * bitmap.getHeight() + SciBitmap::getBitmapHeaderSize()); - bitmap.setDisplace(displace); + bitmap.setOrigin(origin); byte *targetBuffer = nullptr; if (_verticalScaleFactor == 100) { diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index b3e7926015..f09729a1ed 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -99,7 +99,7 @@ static const byte v0ActorTalk[25] = { 0x06, // Sandy (Cut-Scene) }; -static const byte v0WalkboxSlantedModifier[0x16] = { +static const byte v0WalkboxSlantedModifier[0x16] = { 0x00,0x01,0x02,0x03,0x03,0x04,0x05,0x06, 0x06,0x07,0x08,0x09,0x09,0x0A,0x0B, 0x0C,0x0C,0x0D,0x0E,0x0F,0x10,0x10 @@ -237,7 +237,7 @@ void Actor_v0::initActor(int mode) { _costCommand = 0xFF; _miscflags = 0; _speaking = 0; - + _walkCountModulo = 0; _newWalkBoxEntered = false; _walkDirX = 0; @@ -297,7 +297,7 @@ void Actor_v0::walkboxQueueReverse() { return; for (int i = 1; i < j && j >= 1 ; ++i, --j) { - + byte tmp = _walkboxQueue[i]; _walkboxQueue[i] = _walkboxQueue[j]; @@ -371,7 +371,7 @@ bool Actor_v0::walkBoxQueuePrepare() { _walkboxQueue[--_walkboxQueueIndex] = kInvalidBox; BoxFound = _walkboxQueue[_walkboxQueueIndex - 1]; - } + } } while (_walkboxQueueIndex > 0); @@ -616,7 +616,7 @@ bool Actor_v0::calcWalkDistances() { if (!_walkXCountInc && !_walkYCountInc) return true; - if (_walkXCountInc <= _walkYCountInc) + if (_walkXCountInc <= _walkYCountInc) _walkYCountGreaterThanXCount = 1; // 2FCC @@ -652,7 +652,7 @@ byte Actor_v0::actorWalkX() { setActorFromTmp(); return 3; - } + } // 2EBF if (_tmp_Dest.x == _CurrentWalkTo.x) return 1; @@ -679,7 +679,7 @@ byte Actor_v0::actorWalkY() { // 2EF8 setActorFromTmp(); return 4; - } + } // 2EFE if (_walkYCountInc != 0) { if (_walkYCountInc == 0xFF) { @@ -690,7 +690,7 @@ byte Actor_v0::actorWalkY() { // 2F0D if (_CurrentWalkTo.y == _tmp_Dest.y) return 1; - + return 0; } @@ -904,8 +904,8 @@ L2A33:; } directionUpdate(); - - if (_moving & 0x80) + + if (_moving & 0x80) return; animateActor(newDirToOldDir(_facing)); @@ -913,7 +913,7 @@ L2A33:; } else { // 2A0A if ((_moving & 0x7F) != 1) { - + if (_NewWalkTo == _pos) return; } @@ -1025,7 +1025,7 @@ L2CA3:; _moving &= 0xF0; _moving |= A; } else { - if (A == 4) + if (A == 4) stopActorMoving(); } @@ -1061,7 +1061,7 @@ L2CA3:; } else { _targetFacing = getAngleFromPos(V12_X_MULTIPLIER*-1, V12_Y_MULTIPLIER*0, false); } - + directionUpdate(); animateActor(newDirToOldDir(_facing)); goto L2CA3; @@ -1433,13 +1433,13 @@ void Actor::turnToDirection(int newdir) { if (_vm->_game.version <= 6) { _targetFacing = newdir; - + if (_vm->_game.version == 0) { setDirection(newdir); return; } _moving = MF_TURN; - + } else { _moving &= ~MF_TURN; if (newdir != _facing) { @@ -1637,7 +1637,7 @@ AdjustBoxResult Actor_v0::adjustPosInBorderWalkbox(AdjustBoxResult box) { int16 A; boxMask &= 0x7C; - if (boxMask == 0x0C) + if (boxMask == 0x0C) A = 2; else { if (boxMask != 0x08) @@ -2114,7 +2114,7 @@ void ScummEngine::processActors() { // comment further up in this method for some details. if (a->_costume) { - // Unfortunately in V0, the 'animateCostume' call happens right after the call to 'walkActor' (which is before drawing the actor)... + // Unfortunately in V0, the 'animateCostume' call happens right after the call to 'walkActor' (which is before drawing the actor)... // doing it the other way with V0, causes animation glitches (when beginnning to walk, as the costume hasnt been updated). // Updating the costume directly after 'walkActor' and again, after drawing... causes frame skipping if (_game.version == 0) { @@ -3476,7 +3476,7 @@ void Actor_v0::saveLoadWithSerializer(Serializer *ser) { // valid costume command? if (_costCommand != 0xFF) { - + // Do we have a walkbox queue? if (_walkboxQueueIndex < 1) { _costCommand = 0xFF; diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index e6740df482..6366ffd998 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -1124,7 +1124,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co md5Warning += Common::String::format(" SCUMM gameid '%s', file '%s', MD5 '%s'\n\n", res.game.gameid, - generateFilenameForDetection(res.fp.pattern, res.fp.genMethod, Common::kPlatformUnknown).c_str(), + generateFilenameForDetection(res.fp.pattern, res.fp.genMethod, res.game.platform).c_str(), res.md5.c_str()); g_system->logMessage(LogMessageType::kWarning, md5Warning.c_str()); diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index bb3e7f6ec3..adcecaba55 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -488,13 +488,13 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "monkey2", "mi2demo.%03d", kGenDiskNum, UNK_LANG, UNK, 0 }, { "atlantis", "atlantis.%03d", kGenDiskNum, UNK_LANG, UNK, 0 }, - { "atlantis", "atlantis.%03d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformWindows, "Steam" }, - { "atlantis", "atlantis.%03d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformMacintosh, "Steam" }, { "atlantis", "fate.%03d", kGenDiskNum, UNK_LANG, UNK, 0 }, { "atlantis", "playfate.%03d", kGenDiskNum, UNK_LANG, UNK, 0 }, { "atlantis", "indy4.%03d", kGenDiskNum, Common::JA_JPN, Common::kPlatformFMTowns, "FM-TOWNS" }, { "atlantis", "indydemo.%03d", kGenDiskNum, Common::JA_JPN, Common::kPlatformFMTowns, "FM-TOWNS" }, { "atlantis", "Fate of Atlantis Data", kGenUnchanged, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "atlantis", "atlantis.%03d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformWindows, "Steam" }, + { "atlantis", "atlantis.%03d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformMacintosh, "Steam" }, { "tentacle", "tentacle.%03d", kGenDiskNum, UNK_LANG, UNK, 0 }, { "tentacle", "dottdemo.%03d", kGenDiskNum, UNK_LANG, UNK, 0 }, @@ -513,11 +513,11 @@ static const GameFilenamePattern gameFilenamesTable[] = { #ifdef ENABLE_SCUMM_7_8 { "dig", "dig.la%d", kGenDiskNum, UNK_LANG, UNK, 0 }, - { "dig", "dig.la%d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformWindows, "Steam" }, - { "dig", "dig.la%d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformMacintosh, "Steam" }, { "dig", "thedig.la%d", kGenDiskNum, UNK_LANG, UNK, "Demo" }, // Used by an alternate version of the demo { "dig", "The Dig Data", kGenUnchanged, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "dig", "The Dig Demo Data", kGenUnchanged, UNK_LANG, Common::kPlatformMacintosh, "Demo" }, + { "dig", "dig.la%d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformWindows, "Steam" }, + { "dig", "dig.la%d", kGenDiskNumSteam, UNK_LANG, Common::kPlatformMacintosh, "Steam" }, { "ft", "ft.la%d", kGenDiskNum, UNK_LANG, UNK, 0 }, { "ft", "ft.%03d", kGenDiskNum, UNK_LANG, UNK, "Demo" }, // Used by PC version of Full Throttle demo diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp index 96b46aa21a..139f798d83 100644 --- a/engines/scumm/file.cpp +++ b/engines/scumm/file.cpp @@ -262,7 +262,7 @@ ScummDiskImage::ScummDiskImage(const char *disk1, const char *disk2, GameSetting _numGlobalObjects = 256; _numRooms = 55; _numCostumes = 25; - + if (_game.features & GF_DEMO) { _numScripts = 55; _numSounds = 40; diff --git a/engines/scumm/he/logic/moonbase_logic.cpp b/engines/scumm/he/logic/moonbase_logic.cpp index c504ad4fe8..8e4b5c9cc7 100644 --- a/engines/scumm/he/logic/moonbase_logic.cpp +++ b/engines/scumm/he/logic/moonbase_logic.cpp @@ -446,7 +446,7 @@ int LogicHEmoonbase::op_net_get_session_player_count(int op, int numArgs, int32 return _vm1->_moonbase->_net->getSessionPlayerCount(args[0] - 1); } -int LogicHEmoonbase::op_net_destroy_player(int op, int numArgs, int32 *args) { +int LogicHEmoonbase::op_net_destroy_player(int op, int numArgs, int32 *args) { return _vm1->_moonbase->_net->destroyPlayer(args[0]); } @@ -506,7 +506,7 @@ int LogicHEmoonbase::op_net_who_am_i(int op, int numArgs, int32 *args) { } int LogicHEmoonbase::op_net_set_provider_by_name(int op, int numArgs, int32 *args) { - // Parameter 1 is the provider name and + // Parameter 1 is the provider name and // Parameter 2 is the (optional) tcp/ip address return _vm1->_moonbase->_net->setProviderByName(args[0], args[1]); } diff --git a/engines/scumm/he/moonbase/net_main.h b/engines/scumm/he/moonbase/net_main.h index 8350904fcd..dd8cce5937 100644 --- a/engines/scumm/he/moonbase/net_main.h +++ b/engines/scumm/he/moonbase/net_main.h @@ -72,7 +72,7 @@ public: void getSessionName(int sessionNumber, char *buffer, int length); int getSessionPlayerCount(int sessionNumber); void getProviderName(int providerIndex, char *buffer, int length); - + private: //mostly getters diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index a922af1671..b2af816afe 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -1506,7 +1506,7 @@ void ScummEngine_v72he::getStringFromArray(int arrayNumber, char *buffer, int ma // this is ARRAY_GetStringFromArray() from ARRAYS.cpp of SPUTM // this function makes a C-string out of <arrayNumber> contents - + VAR(0) = arrayNumber; // it was 0 in original code, but I've seen ScummVM Moonbase code which uses VAR_U32_ARRAY_UNK int i, ch; diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp index f0bbab53e6..c0ba9ea6c8 100644 --- a/engines/scumm/insane/insane.cpp +++ b/engines/scumm/insane/insane.cpp @@ -66,6 +66,18 @@ Insane::Insane(ScummEngine_v7 *scumm) { readFileToMem("minefite.flu", &_smush_minefiteFlu); _smush_bensgoggNut = new NutRenderer(_vm, "bensgogg.nut"); _smush_bencutNut = new NutRenderer(_vm, "bencut.nut"); + } else { + _smush_roadrashRip = NULL; + _smush_roadrsh2Rip = NULL; + _smush_roadrsh3Rip = NULL; + _smush_goglpaltRip = NULL; + _smush_tovista1Flu = NULL; + _smush_tovista2Flu = NULL; + _smush_toranchFlu = NULL; + _smush_minedrivFlu = NULL; + _smush_minefiteFlu = NULL; + _smush_bensgoggNut = NULL; + _smush_bencutNut = NULL; } _smush_iconsNut = new NutRenderer(_vm, "icons.nut"); diff --git a/engines/scumm/resource_v2.cpp b/engines/scumm/resource_v2.cpp index 87dc132ff0..2e37e4de76 100644 --- a/engines/scumm/resource_v2.cpp +++ b/engines/scumm/resource_v2.cpp @@ -39,7 +39,7 @@ void ScummEngine_v2::readClassicIndexFile() { _numSounds = 40; } else { _numScripts = 160; - _numSounds = 70; + _numSounds = 70; } } else if (_game.platform == Common::kPlatformNES) { diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp index 609cbd1e89..7bacd847ac 100644 --- a/engines/scumm/script_v0.cpp +++ b/engines/scumm/script_v0.cpp @@ -641,7 +641,7 @@ void ScummEngine_v0::setMode(byte mode) { // Note: do not change freeze state here state = USERSTATE_SET_IFACE | USERSTATE_SET_CURSOR; - + break; case kModeKeypad: if (_game.features & GF_DEMO) { diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp index fe936b550c..8bcbb70e97 100644 --- a/engines/scumm/verbs.cpp +++ b/engines/scumm/verbs.cpp @@ -905,7 +905,7 @@ void ScummEngine_v0::checkExecVerbs() { } } } - + if (_drawDemo && _game.features & GF_DEMO) { verbDemoMode(); } diff --git a/engines/sherlock/animation.h b/engines/sherlock/animation.h index f3c95d4027..24d2bc3c3c 100644 --- a/engines/sherlock/animation.h +++ b/engines/sherlock/animation.h @@ -57,7 +57,7 @@ public: * Load the prologue name array */ void setPrologueNames(const char *const *names, int count); - + /** * Load the prologue frame array */ @@ -67,7 +67,7 @@ public: * Load the title name array */ void setTitleNames(const char *const *names, int count); - + /** * Load the title frame array */ diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp index 6cfee5d822..12ea1dbbdf 100644 --- a/engines/sherlock/events.cpp +++ b/engines/sherlock/events.cpp @@ -94,7 +94,7 @@ void Events::setCursor(CursorId cursorId) { void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY) { _cursorId = INVALID_CURSOR; _hotspotPos = Common::Point(hotspotX, hotspotY); - + if (!IS_3DO) { // PC 8-bit palettized CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff); @@ -400,7 +400,7 @@ bool Events::checkInput() { void Events::incWaitCounter() { setCursor(WAIT); - ++_waitCounter; + ++_waitCounter; } void Events::decWaitCounter() { diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp index dc7ecd521e..853591305d 100644 --- a/engines/sherlock/fonts.cpp +++ b/engines/sherlock/fonts.cpp @@ -140,7 +140,7 @@ void Fonts::setFont(int fontNum) { _yOffsets[idx] = 0; if (IS_ROSE_TATTOO) { - if ((idx >= 129 && idx < 135) || (idx >= 136 && idx < 143) || (idx >= 147 && idx < 155) || + if ((idx >= 129 && idx < 135) || (idx >= 136 && idx < 143) || (idx >= 147 && idx < 155) || (idx >= 156 && idx < 165)) _yOffsets[idx] = 1; else if ((idx >= 143 && idx < 146) || idx == 165) diff --git a/engines/sherlock/fonts.h b/engines/sherlock/fonts.h index 6c805447b3..1ee4cbd6eb 100644 --- a/engines/sherlock/fonts.h +++ b/engines/sherlock/fonts.h @@ -44,7 +44,7 @@ protected: static int _widestChar; static uint16 _charCount; - static void writeString(BaseSurface *surface, const Common::String &str, + static void writeString(BaseSurface *surface, const Common::String &str, const Common::Point &pt, int overrideColor = 0); static inline byte translateChar(byte c); diff --git a/engines/sherlock/music.cpp b/engines/sherlock/music.cpp index da4aec6994..cef7157034 100644 --- a/engines/sherlock/music.cpp +++ b/engines/sherlock/music.cpp @@ -196,7 +196,7 @@ bool MidiParser_SH::loadMusic(byte *musData, uint32 musDataSize) { _numTracks = 1; _tracks[0] = pos; - + _ppqn = 1; setTempo(16667); setTrack(0); diff --git a/engines/sherlock/music.h b/engines/sherlock/music.h index b1eba1d889..5dc173c824 100644 --- a/engines/sherlock/music.h +++ b/engines/sherlock/music.h @@ -66,7 +66,7 @@ private: Audio::SoundHandle _digitalMusicHandle; MusicType _musicType; byte *_midiMusicData; - + /** * Play the specified music resource */ @@ -100,7 +100,7 @@ public: * Start playing a song */ void startSong(); - + /** * Free any currently loaded song */ @@ -110,7 +110,7 @@ public: * Stop playing the music */ void stopMusic(); - + bool isPlaying(); uint32 getCurrentPosition(); diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index a05351b170..c7eee36544 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -267,7 +267,7 @@ void BaseObject::checkObject() { break; } _frameNumber += 3; - + } else { v -= 128; @@ -306,7 +306,7 @@ void BaseObject::checkObject() { } } else if (IS_ROSE_TATTOO && v == 10) { // Set delta for objects - _delta = Common::Point(READ_LE_UINT16(&_sequences[_frameNumber + 1]), + _delta = Common::Point(READ_LE_UINT16(&_sequences[_frameNumber + 1]), READ_LE_UINT16(&_sequences[_frameNumber + 3])); _noShapeSize = Common::Point(0, 0); _frameNumber += 4; @@ -644,7 +644,7 @@ void Sprite::clear() { void Sprite::setImageFrame() { int frameNum = MAX(_frameNumber, 0); int imageNumber = _walkSequences[_sequenceNumber][frameNum]; - + if (IS_SERRATED_SCALPEL) imageNumber = imageNumber + _walkSequences[_sequenceNumber][0] - 2; else if (imageNumber > _maxFrames) @@ -1014,7 +1014,7 @@ void Object::load(Common::SeekableReadStream &s, bool isRoseTattoo) { _oldPosition.y = s.readSint16LE(); _oldSize.x = s.readUint16LE(); _oldSize.y = s.readUint16LE(); - + _goto.x = s.readSint16LE(); _goto.y = s.readSint16LE(); if (!isRoseTattoo) { @@ -1113,7 +1113,7 @@ void Object::load3DO(Common::SeekableReadStream &s) { _oldPosition.y = s.readSint16BE(); _oldSize.x = s.readUint16BE(); _oldSize.y = s.readUint16BE(); - + _goto.x = s.readSint16BE(); _goto.y = s.readSint16BE(); _goto.x = _goto.x * FIXED_INT_MULTIPLIER / 100; @@ -1485,7 +1485,7 @@ void CAnim::load(Common::SeekableReadStream &s, bool isRoseTattoo, uint32 dataOf _position.x = s.readSint16LE(); _position.y = s.readSint16LE(); - + if (isRoseTattoo) { _flags = s.readByte(); _scaleVal = s.readSint16LE(); diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h index 38b02aeae8..25ccddedbb 100644 --- a/engines/sherlock/objects.h +++ b/engines/sherlock/objects.h @@ -92,7 +92,7 @@ enum { #define GOTO_CODE 228 #define TALK_SEQ_CODE 252 // Code specifying start of talk sequence frames in a Sequence #define TALK_LISTEN_CODE 251 // Code specifying start of talk listen frames in a Sequence -#define ALLOW_TALK_CODE 250 +#define ALLOW_TALK_CODE 250 #define UPPER_LIMIT 0 #define LOWER_LIMIT (IS_SERRATED_SCALPEL ? CONTROLS_Y : SHERLOCK_SCREEN_HEIGHT) @@ -124,7 +124,7 @@ public: PositionFacing() : Point32(), _facing(0) {} PositionFacing(int xp, int yp, int theFacing) : Point32(xp, yp), _facing(theFacing) {} - PositionFacing &operator=(const Point32 &pt) { + PositionFacing &operator=(const Point32 &pt) { x = pt.x; y = pt.y; return *this; } diff --git a/engines/sherlock/people.cpp b/engines/sherlock/people.cpp index 8057e26204..2b282c35b0 100644 --- a/engines/sherlock/people.cpp +++ b/engines/sherlock/people.cpp @@ -244,7 +244,7 @@ bool People::freeWalk() { if (_data[idx]->_walkLoaded) { delete _data[idx]->_images; _data[idx]->_images = nullptr; - + _data[idx]->_walkLoaded = false; result = true; } diff --git a/engines/sherlock/people.h b/engines/sherlock/people.h index c47d45145a..41e298b2a9 100644 --- a/engines/sherlock/people.h +++ b/engines/sherlock/people.h @@ -168,10 +168,10 @@ public: virtual const Common::Point restrictToZone(int zoneId, const Common::Point &destPos) = 0; /** - * If the specified speaker is a background object, it will set it so that it uses - * the Listen Sequence (specified by the sequence number). If the current sequence - * has an Allow Talk Code in it, the _gotoSeq field will be set so that the object - * begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code, + * If the specified speaker is a background object, it will set it so that it uses + * the Listen Sequence (specified by the sequence number). If the current sequence + * has an Allow Talk Code in it, the _gotoSeq field will be set so that the object + * begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code, * the Listen Sequence will begin immediately. * @param speaker Who is speaking * @param sequenceNum Which listen sequence to use diff --git a/engines/sherlock/resources.cpp b/engines/sherlock/resources.cpp index c4093048bd..ec7d60a1a2 100644 --- a/engines/sherlock/resources.cpp +++ b/engines/sherlock/resources.cpp @@ -119,7 +119,7 @@ void Resources::addToCache(const Common::String &filename) { // Return immediately if the library has already been loaded if (_indexes.contains(filename)) return; - + _cache.load(filename); // Check to see if the file is a library diff --git a/engines/sherlock/resources.h b/engines/sherlock/resources.h index 99d58a51b1..72d5e907da 100644 --- a/engines/sherlock/resources.h +++ b/engines/sherlock/resources.h @@ -100,12 +100,12 @@ public: * loading its index for future use */ void addToCache(const Common::String &filename); - + /** * Adds a resource from a library file to the cache */ void addToCache(const Common::String &filename, const Common::String &libFilename); - + /** * Adds a given stream to the cache under the given name */ diff --git a/engines/sherlock/saveload.h b/engines/sherlock/saveload.h index f4f3e7cfd9..9a26741172 100644 --- a/engines/sherlock/saveload.h +++ b/engines/sherlock/saveload.h @@ -133,7 +133,7 @@ public: * Load the game in the specified slot */ void loadGame(int slot); - + /** * Save the game in the specified slot with the given name */ diff --git a/engines/sherlock/scalpel/3do/movie_decoder.cpp b/engines/sherlock/scalpel/3do/movie_decoder.cpp index da0d16c145..bd2f44209f 100644 --- a/engines/sherlock/scalpel/3do/movie_decoder.cpp +++ b/engines/sherlock/scalpel/3do/movie_decoder.cpp @@ -140,7 +140,7 @@ bool Scalpel3DOMovieDecoder::loadStream(Common::SeekableReadStream *stream) { _stream->readUint32BE(); // Unknown 0x00004000 _stream->readUint32BE(); // Unknown 0x00000000 _stream->readUint32BE(); // Unknown 0x00000010 - audioSampleRate = _stream->readUint32BE(); + audioSampleRate = _stream->readUint32BE(); audioChannels = _stream->readUint32BE(); audioCodecTag = _stream->readUint32BE(); _stream->readUint32BE(); // Unknown 0x00000004 compression ratio? diff --git a/engines/sherlock/scalpel/3do/scalpel_3do_screen.h b/engines/sherlock/scalpel/3do/scalpel_3do_screen.h index 422f588b17..71674803ba 100644 --- a/engines/sherlock/scalpel/3do/scalpel_3do_screen.h +++ b/engines/sherlock/scalpel/3do/scalpel_3do_screen.h @@ -42,7 +42,7 @@ protected: /** * 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, + virtual void transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, bool flipped, int overrideColor); public: Scalpel3DOScreen(SherlockEngine *vm); diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp index cbb202095f..5050062938 100644 --- a/engines/sherlock/scalpel/scalpel.cpp +++ b/engines/sherlock/scalpel/scalpel.cpp @@ -507,7 +507,7 @@ bool ScalpelEngine::showAlleyCutscene() { } if (finished) { - // quick fade out + // quick fade out _screen->fadeToBlack(1); // wait until after third "scream" in music happened diff --git a/engines/sherlock/scalpel/scalpel_darts.cpp b/engines/sherlock/scalpel/scalpel_darts.cpp index c5ba8032f3..1b7c266de7 100644 --- a/engines/sherlock/scalpel/scalpel_darts.cpp +++ b/engines/sherlock/scalpel/scalpel_darts.cpp @@ -408,7 +408,7 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i if (!(idx % 8)) events.wait(1); - + ++idx; } while (!done); diff --git a/engines/sherlock/scalpel/scalpel_darts.h b/engines/sherlock/scalpel/scalpel_darts.h index 483a163510..24198a4052 100644 --- a/engines/sherlock/scalpel/scalpel_darts.h +++ b/engines/sherlock/scalpel/scalpel_darts.h @@ -53,7 +53,7 @@ private: * Initializes the variables needed for the dart game */ void initDarts(); - + /** * Frees the images used by the dart game */ @@ -98,7 +98,7 @@ private: * Returns true if a mouse button or key is pressed. */ int dartHit(); - + /** * Return the score of the given location on the dart-board */ diff --git a/engines/sherlock/scalpel/scalpel_people.h b/engines/sherlock/scalpel/scalpel_people.h index 2ab6f5bc7d..1e29309d35 100644 --- a/engines/sherlock/scalpel/scalpel_people.h +++ b/engines/sherlock/scalpel/scalpel_people.h @@ -112,10 +112,10 @@ public: virtual bool loadWalk(); /** - * If the specified speaker is a background object, it will set it so that it uses - * the Listen Sequence (specified by the sequence number). If the current sequence - * has an Allow Talk Code in it, the _gotoSeq field will be set so that the object - * begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code, + * If the specified speaker is a background object, it will set it so that it uses + * the Listen Sequence (specified by the sequence number). If the current sequence + * has an Allow Talk Code in it, the _gotoSeq field will be set so that the object + * begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code, * the Listen Sequence will begin immediately. * @param speaker Who is speaking * @param sequenceNum Which listen sequence to use diff --git a/engines/sherlock/scalpel/scalpel_saveload.cpp b/engines/sherlock/scalpel/scalpel_saveload.cpp index 90eab5930c..7098d47065 100644 --- a/engines/sherlock/scalpel/scalpel_saveload.cpp +++ b/engines/sherlock/scalpel/scalpel_saveload.cpp @@ -40,7 +40,7 @@ const int ENV_POINTS[6][3] = { /*----------------------------------------------------------------*/ -ScalpelSaveManager::ScalpelSaveManager(SherlockEngine *vm, const Common::String &target) : +ScalpelSaveManager::ScalpelSaveManager(SherlockEngine *vm, const Common::String &target) : SaveManager(vm, target), _envMode(SAVEMODE_NONE) { _fixedTextExit = FIXED(LoadSave_Exit); @@ -262,14 +262,14 @@ bool ScalpelSaveManager::promptForDescription(int slot) { xp -= screen.charWidth(saveName.lastChar()); screen.vgaBar(Common::Rect(xp, yp - 1, xp + 8, yp + 9), INV_FOREGROUND); saveName.deleteLastChar(); - + } else if (keyState.keycode == Common::KEYCODE_RETURN && saveName.compareToIgnoreCase(EMPTY_SAVEGAME_SLOT)) { done = 1; } else if (keyState.keycode == Common::KEYCODE_ESCAPE) { screen.vgaBar(Common::Rect(xp, yp - 1, xp + 8, yp + 9), INV_BACKGROUND); done = -1; - + } else if (keyState.ascii >= ' ' && keyState.ascii <= 'z' && saveName.size() < 50 && (xp + screen.charWidth(keyState.ascii)) < 308) { char c = (char)keyState.ascii; diff --git a/engines/sherlock/scalpel/scalpel_scene.cpp b/engines/sherlock/scalpel/scalpel_scene.cpp index 11fb807c3b..3a7c04baee 100644 --- a/engines/sherlock/scalpel/scalpel_scene.cpp +++ b/engines/sherlock/scalpel/scalpel_scene.cpp @@ -741,7 +741,7 @@ int ScalpelScene::findBgShape(const Common::Point &pt) { for (int idx = (int)_bgShapes.size() - 1; idx >= 0; --idx) { Object &o = _bgShapes[idx]; if (o._type != INVALID && o._type != NO_SHAPE && o._type != HIDDEN - && o._aType <= PERSON) { + && o._type != REMOVE && o._aType <= PERSON) { if (o.getNewBounds().contains(pt)) return idx; } else if (o._type == NO_SHAPE) { diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp index ff38c07537..f1460fd01d 100644 --- a/engines/sherlock/scalpel/scalpel_talk.cpp +++ b/engines/sherlock/scalpel/scalpel_talk.cpp @@ -136,7 +136,7 @@ ScalpelTalk::ScalpelTalk(SherlockEngine *vm) : Talk(vm) { (OpcodeMethod)&ScalpelTalk::cmdHolmesOn, (OpcodeMethod)&ScalpelTalk::cmdGotoScene, (OpcodeMethod)&ScalpelTalk::cmdPlayPrologue, - + (OpcodeMethod)&ScalpelTalk::cmdAddItemToInventory, (OpcodeMethod)&ScalpelTalk::cmdSetObject, (OpcodeMethod)&ScalpelTalk::cmdCallTalkFile, @@ -147,7 +147,7 @@ ScalpelTalk::ScalpelTalk(SherlockEngine *vm) : Talk(vm) { (OpcodeMethod)&ScalpelTalk::cmdRemoveItemFromInventory, (OpcodeMethod)&ScalpelTalk::cmdEnableEndKey, (OpcodeMethod)&ScalpelTalk::cmdDisableEndKey, - + (OpcodeMethod)&ScalpelTalk::cmdEndTextWindow, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, @@ -387,7 +387,7 @@ OpcodeReturn ScalpelTalk::cmdClearInfoLine(const byte *&str) { OpcodeReturn ScalpelTalk::cmdClearWindow(const byte *&str) { UserInterface &ui = *_vm->_ui; - + ui.clearWindow(); _yp = CONTROLS_Y + 12; _charCount = _line = 0; @@ -450,7 +450,7 @@ OpcodeReturn ScalpelTalk::cmdMoveMouse(const byte *&str) { if (_talkToAbort) return RET_EXIT; str += 3; - + return RET_SUCCESS; } @@ -650,7 +650,7 @@ bool ScalpelTalk::talk3DOMovieTrigger(int subIndex) { } Common::Point ScalpelTalk::get3doPortraitPosition() const { - // TODO: This current method is only an assumption of how the original figured + // TODO: This current method is only an assumption of how the original figured // out where to place each character's portrait movie. People &people = *_vm->_people; Scene &scene = *_vm->_scene; @@ -672,7 +672,7 @@ Common::Point ScalpelTalk::get3doPortraitPosition() const { pt = scene._bgShapes[objNum]._position; } - + // Adjust the top-left so the center of the portrait will be on the character, // but ensure the portrait will be entirely on-screen pt -= Common::Point(PORTRAIT_W / 2, PORTRAIT_H / 2); diff --git a/engines/sherlock/scalpel/scalpel_user_interface.h b/engines/sherlock/scalpel/scalpel_user_interface.h index cc3aafff65..586f9ab000 100644 --- a/engines/sherlock/scalpel/scalpel_user_interface.h +++ b/engines/sherlock/scalpel/scalpel_user_interface.h @@ -105,38 +105,38 @@ private: * Handles input when the file list window is being displayed */ void doEnvControl(); - + /** * Handle input whilst the inventory is active */ void doInvControl(); - + /** * Handles waiting whilst an object's description window is open. */ void doLookControl(); - + /** * Handles input until one of the user interface buttons/commands is selected */ void doMainControl(); - + /** * Handles the input for the MOVE, OPEN, and CLOSE commands */ void doMiscControl(int allowed); - + /** * Handles input for picking up items */ void doPickControl(); - + /** * Handles input when in talk mode. It highlights the buttons and available statements, * and handles allowing the user to click on them */ void doTalkControl(); - + /** * Handles events when the Journal is active. * @remarks Whilst this would in theory be better in the Journal class, since it displays in @@ -150,7 +150,7 @@ private: */ void checkUseAction(const UseType *use, const Common::String &invName, FixedTextActionId fixedTextActionId, int objNum, bool giveMode); - + /** * Print the previously selected object's decription */ @@ -212,7 +212,7 @@ public: /** * Draw the user interface onto the screen's back buffers - */ + */ virtual void drawInterface(int bufferNum = 3); /** @@ -243,7 +243,7 @@ public: /** * Print the previously selected object's decription - */ + */ virtual void printObjectDesc(); }; diff --git a/engines/sherlock/scalpel/tsage/logo.cpp b/engines/sherlock/scalpel/tsage/logo.cpp index a885057f35..67959a19f9 100644 --- a/engines/sherlock/scalpel/tsage/logo.cpp +++ b/engines/sherlock/scalpel/tsage/logo.cpp @@ -181,7 +181,7 @@ void Object::setAnimMode(bool isAnimating) { } void Object::setDestination(const Common::Point &pt) { - _destination = pt; + _destination = pt; int moveRate = 10; _walkStartFrame = _vm->_events->getFrameCounter(); @@ -215,7 +215,7 @@ void Object::setDestination(const Common::Point &pt) { void Object::erase() { Screen &screen = *_vm->_screen; - + if (_visage.isLoaded() && !_oldBounds.isEmpty()) screen.SHblitFrom(screen._backBuffer1, Common::Point(_oldBounds.left, _oldBounds.top), _oldBounds); } @@ -233,7 +233,7 @@ void Object::update() { move(); } } - + if (_isAnimating) { if (_frame < _visage.getFrameCount()) _frame = changeFrame(); @@ -436,7 +436,7 @@ Logo::Logo(ScalpelEngine *vm) : _vm(vm), _lib("sf3.rlb") { _animateFrameDelay = 0; _animateFrames = NULL; _animateFrame = 0; - + // Save a copy of the original palette _vm->_screen->getPalette(_originalPalette); @@ -630,7 +630,7 @@ void Logo::startAnimation(uint object, uint frameDelay, const AnimationFrame *fr void Logo::loadBackground() { Screen &screen = *_vm->_screen; - + for (int idx = 0; idx < 4; ++idx) { // Get the portion of the screen Common::SeekableReadStream *stream = _lib.getResource(RES_BITMAP, 10, idx); diff --git a/engines/sherlock/scalpel/tsage/logo.h b/engines/sherlock/scalpel/tsage/logo.h index 8e47ea42a1..5a669da19a 100644 --- a/engines/sherlock/scalpel/tsage/logo.h +++ b/engines/sherlock/scalpel/tsage/logo.h @@ -79,7 +79,7 @@ public: * Get a frame from the visage */ void getFrame(ObjectSurface &s, int frameNum); - + /** * Return the number of frames */ diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index 78d0cd862c..b02569b26e 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -374,7 +374,7 @@ bool Scene::loadScene(const Common::String &filename) { } else { rrmStream->read(screen._backBuffer1.getPixels(), fullWidth * SHERLOCK_SCREEN_HEIGHT); } - } + } // Read in the shapes header info Common::Array<BgFileHeaderInfo> bgInfo; @@ -528,7 +528,7 @@ bool Scene::loadScene(const Common::String &filename) { delete[] cAnimOffsetTablePtr; } - + // Read in the room bounding areas int size = rrmStream->readUint16LE(); @@ -627,7 +627,7 @@ bool Scene::loadScene(const Common::String &filename) { if (IS_ROSE_TATTOO) { // Load the object sound list char buffer[27]; - + _objSoundList.resize(rrmStream->readUint16LE()); for (uint idx = 0; idx < _objSoundList.size(); ++idx) { rrmStream->read(buffer, 27); @@ -1205,9 +1205,9 @@ void Scene::transitionToScene() { if (hSavedFacing < 8 && !saves._justLoaded) { if (IS_ROSE_TATTOO) hSavedFacing = Tattoo::FS_TRANS[hSavedFacing]; - else + else hSavedFacing = Scalpel::FS_TRANS[hSavedFacing]; - + hSavedPos.x *= FIXED_INT_MULTIPLIER; hSavedPos.y *= FIXED_INT_MULTIPLIER; } @@ -1235,7 +1235,7 @@ void Scene::transitionToScene() { people[HOLMES]._position = Common::Point(0, 0); } - // If the scene is capable of scrolling, set the current scroll so that whoever has control + // 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.width() > SHERLOCK_SCREEN_WIDTH) people[people._walkControl].centerScreenOnPerson(); @@ -1256,7 +1256,7 @@ void Scene::transitionToScene() { } if (Common::Rect(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y).contains( - Common::Point(people[HOLMES]._position.x / FIXED_INT_MULTIPLIER, + Common::Point(people[HOLMES]._position.x / FIXED_INT_MULTIPLIER, people[HOLMES]._position.y / FIXED_INT_MULTIPLIER))) { // Current point is already inside box - impact occurred on // a previous call. So simply do nothing except talk until the diff --git a/engines/sherlock/screen.h b/engines/sherlock/screen.h index fb44c6dde2..d1ec1885c7 100644 --- a/engines/sherlock/screen.h +++ b/engines/sherlock/screen.h @@ -132,14 +132,14 @@ public: * Copy an image from the back buffer to the screen, taking care of both the * new area covered by the shape as well as the old area, which must be restored */ - void flushImage(ImageFrame *frame, const Common::Point &pt, int16 *xp, int16 *yp, + void flushImage(ImageFrame *frame, const Common::Point &pt, int16 *xp, int16 *yp, int16 *width, int16 *height); /** * Similar to flushImage, this method takes in an extra parameter for the scale proporation, * which affects the calculated bounds accordingly */ - void flushScaleImage(ImageFrame *frame, const Common::Point &pt, int16 *xp, int16 *yp, + void flushScaleImage(ImageFrame *frame, const Common::Point &pt, int16 *xp, int16 *yp, int16 *width, int16 *height, int scaleVal); /** diff --git a/engines/sherlock/sound.cpp b/engines/sherlock/sound.cpp index e5b1099123..0e5652d52c 100644 --- a/engines/sherlock/sound.cpp +++ b/engines/sherlock/sound.cpp @@ -72,7 +72,7 @@ Sound::Sound(SherlockEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer) { _vm->_res->addToCache("TITLE.SND"); else { _vm->_res->addToCache("MUSIC.LIB"); - + if (IS_ROSE_TATTOO) { _vm->_res->addToCache("SOUND.LIB"); } else { diff --git a/engines/sherlock/sound.h b/engines/sherlock/sound.h index a82aaf6730..2ca8d2d0e6 100644 --- a/engines/sherlock/sound.h +++ b/engines/sherlock/sound.h @@ -85,7 +85,7 @@ public: * Load a sound */ void loadSound(const Common::String &name, int priority); - + /** * Play the sound in the specified resource */ @@ -100,17 +100,17 @@ public: * Stop the AIFF sound that was started with playAiff(). */ void stopAiff(); - + /** * Play a previously loaded sound */ void playLoadedSound(int bufNum, WaitType waitType); - + /** * Free any previously loaded sounds */ void freeLoadedSounds(); - + /** * Stop playing any active sound */ diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 3c6bf44837..b4987f070a 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -172,7 +172,7 @@ void Talk::talkTo(const Common::String filename) { // Turn on the Exit option ui._endKeyActive = true; - if (people[HOLMES]._walkCount || (!people[HOLMES]._walkTo.empty() && + if (people[HOLMES]._walkCount || (!people[HOLMES]._walkTo.empty() && (IS_SERRATED_SCALPEL || people._allowWalkAbort))) { // Only interrupt if trying to do an action, and not just if player is walking around the scene if (people._allowWalkAbort) @@ -1195,7 +1195,7 @@ OpcodeReturn Talk::cmdWalkToCAnimation(const byte *&str) { ++str; CAnim &animation = scene._cAnim[str[0] - 1]; people[HOLMES].walkToCoords(animation._goto[0], animation._goto[0]._facing); - + return _talkToAbort ? RET_EXIT : RET_SUCCESS; } diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h index 2c0da24d69..1fa015362b 100644 --- a/engines/sherlock/talk.h +++ b/engines/sherlock/talk.h @@ -71,7 +71,7 @@ enum { OP_ENABLE_END_KEY = 31, OP_DISABLE_END_KEY = 32, OP_END_TEXT_WINDOW = 33, - + OP_MOUSE_OFF_ON = 34, OP_SET_WALK_CONTROL = 35, OP_SET_TALK_SEQUENCE = 36, @@ -123,7 +123,7 @@ struct SequenceEntry { short _frameNumber; // Frame number in frame sequence to draw short _sequenceNumber; // Start frame of sequences that are repeated int _seqStack; // Allows gosubs to return to calling frame - int _seqTo; // Allows 1-5, 8-3 type sequences encoded + int _seqTo; // Allows 1-5, 8-3 type sequences encoded int _seqCounter; // How many times this sequence has been executed int _seqCounter2; @@ -315,7 +315,7 @@ public: * saved onto the sequence stack. */ void pushSequence(int speaker); - + /** * Push the details of a passed object onto the saved sequences stack */ @@ -351,7 +351,7 @@ public: * Prints a single conversation option in the interface window */ virtual int talkLine(int lineNum, int stateNum, byte color, int lineY, bool slamIt) { return 0; } - + /** * Pulls a background object sequence from the sequence stack and restore's the * object's sequence diff --git a/engines/sherlock/tattoo/tattoo.cpp b/engines/sherlock/tattoo/tattoo.cpp index 3131df7649..31a65783e3 100644 --- a/engines/sherlock/tattoo/tattoo.cpp +++ b/engines/sherlock/tattoo/tattoo.cpp @@ -63,7 +63,7 @@ void TattooEngine::initialize() { // Add some more files to the cache _res->addToCache("walk.lib"); - + // Set up list of people TattooFixedText &fixedText = *(TattooFixedText *)_fixedText; const char *peopleNamePtr = nullptr; @@ -122,7 +122,7 @@ void TattooEngine::startScene() { // Darts Board minigame _darts.playDarts(GAME_CRICKET); break; - + case 102: // Darts Board minigame _darts.playDarts(GAME_301); diff --git a/engines/sherlock/tattoo/tattoo_darts.cpp b/engines/sherlock/tattoo/tattoo_darts.cpp index cbc3ea1fe8..b3fa8cda9e 100644 --- a/engines/sherlock/tattoo/tattoo_darts.cpp +++ b/engines/sherlock/tattoo/tattoo_darts.cpp @@ -121,7 +121,7 @@ void Darts::playDarts(GameType gameType) { numHits = 1; if (numHits > 3) numHits = 3; - + lastDart = lastDart & 0xffff; updateCricketScore(playerNum, lastDart, numHits); score = (playerNum == 0) ? _score1 : _score2; @@ -134,7 +134,7 @@ void Darts::playDarts(GameType gameType) { done = true; playerNum = 0; } - + if (_gameType == GAME_301) { if (playerNum == 0) @@ -217,7 +217,7 @@ void Darts::playDarts(GameType gameType) { } if (score != 0 && playerNum == 0 && !gameOver) - screen.print(Common::Point(_dartInfo.left, _dartInfo.top + _spacing * 3), 0, + screen.print(Common::Point(_dartInfo.left, _dartInfo.top + _spacing * 3), 0, "%s", FIXED(DartsPressKey)); if (gameOver) { @@ -388,14 +388,14 @@ void Darts::showNames(int playerNum) { color = playerNum == 0 ? PLAYER_COLOR : DART_COLOR_FORE; screen.print(Common::Point(STATUS_INFO_X, STATUS_INFO_Y), 0, "%s", FIXED(DartsPlayerHolmes)); - screen._backBuffer1.fillRect(Common::Rect(STATUS_INFO_X, STATUS_INFO_Y + _spacing + 1, + screen._backBuffer1.fillRect(Common::Rect(STATUS_INFO_X, STATUS_INFO_Y + _spacing + 1, STATUS_INFO_X + 50, STATUS_INFO_Y + _spacing + 3), color); screen.fillRect(Common::Rect(STATUS_INFO_X, STATUS_INFO_Y + _spacing + 1, STATUS_INFO_X + 50, STATUS_INFO_Y + _spacing + 3), color); color = playerNum == 1 ? PLAYER_COLOR : DART_COLOR_FORE; screen.print(Common::Point(STATUS2_INFO_X, STATUS_INFO_Y), 0, "%s", _opponent.c_str()); - screen._backBuffer1.fillRect(Common::Rect(STATUS2_INFO_X, STATUS_INFO_Y + _spacing + 1, + screen._backBuffer1.fillRect(Common::Rect(STATUS2_INFO_X, STATUS_INFO_Y + _spacing + 1, STATUS2_INFO_X + 50, STATUS_INFO_Y + _spacing + 3), color); screen.fillRect(Common::Rect(STATUS2_INFO_X, STATUS_INFO_Y + _spacing + 1, STATUS2_INFO_X + 50, STATUS_INFO_Y + _spacing + 3), color); @@ -449,7 +449,7 @@ void Darts::showStatus(int playerNum) { } 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, + Common::Rect(STATUS_INFO_X, STATUS_INFO_Y + 10, STATUS_INFO_X + STATUS_INFO_WIDTH, STATUS_INFO_Y + STATUS_INFO_HEIGHT - 10)); } @@ -674,9 +674,9 @@ void Darts::drawDartThrow(const Common::Point &dartPos, int computer) { screen.slamArea(drawPos.x, drawPos.y, xSize, ySize); if (oldDrawPos.x != -1) // Flush the erased dart area - screen.slamArea(oldDrawPos.x, oldDrawPos.y, oldxSize, oldySize); + screen.slamArea(oldDrawPos.x, oldDrawPos.y, oldxSize, oldySize); - screen._backBuffer1.SHblitFrom(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; @@ -745,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.SHblitFrom(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); @@ -805,7 +805,7 @@ int Darts::findNumberOnBoard(int aim, Common::Point &pt) { } } } - + pt = convertFromScreenToScoreCoords(pt); if (aim == 3) @@ -832,7 +832,7 @@ void Darts::getComputerNumber(int playerNum, Common::Point &targetPos) { if (_gameType == GAME_301) { // Try to hit number - aim = score; + aim = score; if(score > 60) shootBull = true; } else { @@ -855,7 +855,7 @@ void Darts::getComputerNumber(int playerNum, Common::Point &targetPos) { if (!cricketaimset) { // Everything is closed // just in case we don't get set in loop below, which should never happen - aim = 14; + aim = 14; for (int idx = 0; idx < 7; ++idx) { if (_cricketScore[playerNum^1][idx] < 3) { // Opponent has this open @@ -896,7 +896,7 @@ void Darts::getComputerNumber(int playerNum, Common::Point &targetPos) { // the higher the level, the more accurate the throw int v = _vm->getRandomNumber(9); - v += _level * 2; + v += _level * 2; if (v <= 2) { targetPos.x += _vm->getRandomNumber(70) - 35; @@ -981,12 +981,12 @@ int Darts::throwDart(int dartNum, int computer) { // Copy power bars to the secondary back buffer 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, + Common::Rect(DART_BAR_VX - 1, DART_HEIGHT_Y - 1, DART_BAR_VX - 1 + 10, DART_HEIGHT_Y - 1 + DART_BAR_SIZE + 2)); Common::Point dartPos(DARTBOARD_TOTALLEFT + horiz*DARTBOARD_TOTALX / 100, DARTBOARD_TOTALTOP + height * DARTBOARD_TOTALY / 100); - + dartPos.x += 2 - _vm->getRandomNumber(4); dartPos.y += 2 - _vm->getRandomNumber(4); diff --git a/engines/sherlock/tattoo/tattoo_darts.h b/engines/sherlock/tattoo/tattoo_darts.h index ab6b1c8204..94402a5b1b 100644 --- a/engines/sherlock/tattoo/tattoo_darts.h +++ b/engines/sherlock/tattoo/tattoo_darts.h @@ -103,7 +103,7 @@ private: int doPowerBar(const Common::Point &pt, byte color, int goToPower, int orientation); /** - * This is similar to doPowerBar, except it draws the player's hand moving across the + * This is similar to doPowerBar, except it draws the player's hand moving across the * bottom of the screen to indicate the positioning of the darts */ int drawHand(int goToPower, int computer); diff --git a/engines/sherlock/tattoo/tattoo_inventory.h b/engines/sherlock/tattoo/tattoo_inventory.h index a18324b785..0a46045d4b 100644 --- a/engines/sherlock/tattoo/tattoo_inventory.h +++ b/engines/sherlock/tattoo/tattoo_inventory.h @@ -38,7 +38,7 @@ public: * Load the list of names the inventory items correspond to, if not already loaded, * and then calls loadGraphics to load the associated graphics */ - virtual void loadInv(); + virtual void loadInv(); }; } // End of namespace Tattoo diff --git a/engines/sherlock/tattoo/tattoo_map.cpp b/engines/sherlock/tattoo/tattoo_map.cpp index 23e8bd9739..e432c255d8 100644 --- a/engines/sherlock/tattoo/tattoo_map.cpp +++ b/engines/sherlock/tattoo/tattoo_map.cpp @@ -70,7 +70,7 @@ int TattooMap::show() { } if (music._musicOn) { - // See if Holmes or Watson is the active character + // See if Holmes or Watson is the active character Common::String song; if (_vm->readFlags(FLAG_PLAYER_IS_HOLMES)) // Player is Holmes @@ -86,7 +86,7 @@ int TattooMap::show() { } screen.initPaletteFade(1364485); - + // Load the custom mouse cursors for the map ImageFile cursors("omouse.vgs"); events.setCursor(cursors[0]._frame); @@ -298,7 +298,7 @@ void TattooMap::loadData() { void TattooMap::drawMapIcons() { Debugger &debugger = *_vm->_debugger; Screen &screen = *_vm->_screen; - + for (uint idx = 0; idx < _data.size(); ++idx) { if (debugger._showAllLocations != LOC_DISABLED) _vm->setFlagsDirect(idx + 1); @@ -344,7 +344,7 @@ void TattooMap::checkMapNames(bool slamIt) { const Common::String &desc = _data[_bgFound]._description; _mapTooltip.setText(desc); } - + _oldBgFound = _bgFound; } diff --git a/engines/sherlock/tattoo/tattoo_map.h b/engines/sherlock/tattoo/tattoo_map.h index 1c7173bdb0..df3e3b3def 100644 --- a/engines/sherlock/tattoo/tattoo_map.h +++ b/engines/sherlock/tattoo/tattoo_map.h @@ -51,7 +51,7 @@ private: int _bgFound, _oldBgFound; WidgetMapTooltip _mapTooltip; Common::Point _targetScroll; - + /** * Load data needed for the map */ diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp index 65cc283b66..fc3c2e6574 100644 --- a/engines/sherlock/tattoo/tattoo_people.cpp +++ b/engines/sherlock/tattoo/tattoo_people.cpp @@ -197,7 +197,7 @@ void TattooPerson::adjustSprite() { // See if the player has come to a stop after clicking on an Arrow zone to leave the scene. // If so, this will set up the exit information for the scene transition if (!_walkCount && ui._exitZone != -1 && scene._walkedInScene && scene._goToScene == -1 && - !_description.compareToIgnoreCase(people[HOLMES]._description)) { + !_description.compareToIgnoreCase(people[HOLMES]._description)) { Exit &exit = scene._exits[ui._exitZone]; scene._goToScene = exit._scene; @@ -221,7 +221,7 @@ void TattooPerson::gotoStand() { _walkCount = 0; int oldFacing = _sequenceNumber; - // If the person was talking or listening, just return it to the standing sequence + // If the person was talking or listening, just return it to the standing sequence // in the direction they were pointing if (_sequenceNumber >= TALK_UPRIGHT && _sequenceNumber <= LISTEN_UPLEFT) { switch (_sequenceNumber) { @@ -269,7 +269,7 @@ void TattooPerson::gotoStand() { return; } - // If the sprite that is stopping is an NPC and he is supposed to face a certain direction + // If the sprite that is stopping is an NPC and he is supposed to face a certain direction // when he stops, set that direction here int npc = -1; for (int idx = 1; idx < MAX_CHARACTERS; ++idx) { @@ -317,7 +317,7 @@ void TattooPerson::gotoStand() { } } - // Only restart the frame number at 0 if the new sequence is different from the last sequence + // Only restart the frame number at 0 if the new sequence is different from the last sequence // so we don't let Holmes repeat standing. if (_oldWalkSequence != -1) { if (_seqTo) { @@ -356,7 +356,7 @@ void TattooPerson::setWalking() { Common::Point diagSpeed(MAX(WALK_SPEED_DIAG_X[scene._currentScene - 1] * SCALE_THRESHOLD / scaleVal, 2), MAX((WALK_SPEED_Y[scene._currentScene - 1] - 2) * SCALE_THRESHOLD / scaleVal, 2)); - // If the player is already close to the given destination that no walking is needed, + // If the player is already close to the given destination that no walking is needed, // move to the next straight line segment in the overall walking route, if there is one for (;;) { if (_centerWalk || !_walkTo.empty()) { @@ -505,7 +505,7 @@ void TattooPerson::setWalking() { if (!_walkCount && _walkTo.empty()) gotoStand(); - // If the sequence is the same as when we started, then Holmes was standing still and we're trying + // If the sequence is the same as when we started, then Holmes was standing still and we're trying // to re-stand him, so reset Holmes' rame to the old frame number from before it was reset to 0 if (_sequenceNumber == oldDirection) _frameNumber = oldFrame; @@ -536,7 +536,7 @@ void TattooPerson::walkToCoords(const Point32 &destPos, int destDir) { _centerWalk = false; // Only move the person if they're going an appreciable distance - if (ABS(_walkDest.x - (_position.x / FIXED_INT_MULTIPLIER)) > 8 || + if (ABS(_walkDest.x - (_position.x / FIXED_INT_MULTIPLIER)) > 8 || ABS(_walkDest.y - (_position.y / FIXED_INT_MULTIPLIER)) > 4) { goAllTheWay(); @@ -631,7 +631,7 @@ void TattooPerson::updateNPC() { // Now see if we need to update the NPC's frame sequence so that he faces Holmes if (_lookHolmes) { - // See where Holmes is with respect to the NPC (x coordinate) + // See where Holmes is with respect to the NPC (x coordinate) _npcFacing = (people[HOLMES]._position.x < _position.x) ? STOP_LEFT : STOP_RIGHT; // See where Holmes is with respect to the NPC (y coordinate) @@ -643,7 +643,7 @@ void TattooPerson::updateNPC() { _npcFacing = (_npcFacing == STOP_RIGHT) ? STOP_DOWNRIGHT : STOP_DOWNLEFT; } - // See if we need to set the old_walk_sequence so the NPC will put his arms + // See if we need to set the old_walk_sequence so the NPC will put his arms // up if he turns another way if (_sequenceNumber != _npcFacing) _oldWalkSequence = _sequenceNumber; @@ -660,7 +660,7 @@ void TattooPerson::updateNPC() { if (!_npcPath[_npcIndex]) _npcIndex = 0; - // The NPC is stopped and any pause he was doing is done. We can now see what + // The NPC is stopped and any pause he was doing is done. We can now see what // the next command in the NPC path is. // Scan Past any NPC Path Labels since they do nothing except mark places for If's and Goto's @@ -725,7 +725,7 @@ void TattooPerson::updateNPC() { } case NPCPATH_TAKE_NOTES: - // Set the NPC to Pause where he is and set his frame sequences + // Set the NPC to Pause where he is and set his frame sequences // so he takes notes while he's paused _npcPause = (_npcPath[_npcIndex + 1] - 1) * 256 + _npcPath[_npcIndex + 2] - 1; _npcIndex += 3; @@ -875,7 +875,7 @@ Common::Point TattooPerson::getSourcePoint() const { TattooScene &scene = *(TattooScene *)_vm->_scene; int scaleVal = scene.getScaleVal(_position); - return Common::Point(_position.x / FIXED_INT_MULTIPLIER + + return Common::Point(_position.x / FIXED_INT_MULTIPLIER + (_imageFrame ? _imageFrame->sDrawXSize(scaleVal) / 2 : 0), _position.y / FIXED_INT_MULTIPLIER); } @@ -1028,7 +1028,7 @@ void TattooPerson::walkHolmesToNPC() { // Clear the path variables memset(_npcPath, 0, 100); - + // Set the NPC path so he pauses for 250 while looking at Holmes _npcPath[0] = 6; _npcPath[1] = 1; @@ -1426,7 +1426,7 @@ bool TattooPeople::loadWalk() { // Load the walk sequence data Common::SeekableReadStream *stream = res.load(fname, _useWalkLib ? "walk.lib" : "vgs.lib"); - + person._walkSequences.resize(stream->readByte()); for (uint seqNum = 0; seqNum < person._walkSequences.size(); ++seqNum) diff --git a/engines/sherlock/tattoo/tattoo_people.h b/engines/sherlock/tattoo/tattoo_people.h index c844d86e19..1517084c1c 100644 --- a/engines/sherlock/tattoo/tattoo_people.h +++ b/engines/sherlock/tattoo/tattoo_people.h @@ -64,7 +64,7 @@ enum TattooSequences { TALK_UPLEFT = 21, // NPC Listen Sequence Numbers - LISTEN_UPRIGHT = 22, + LISTEN_UPRIGHT = 22, LISTEN_RIGHT = 23, LISTEN_DOWNRIGHT = 24, LISTEN_DOWNLEFT = 25, @@ -160,7 +160,7 @@ public: * This means that the index must be decremented by 3 * 2) The NPC was in route to a position * He must be set to walk to that position again. This is done by moving the path index - * so that it points to the code that set the NPC walking there in the first place. + * so that it points to the code that set the NPC walking there in the first place. * The regular calls to updateNPC will handle the rest */ void pullNPCPath(); @@ -262,10 +262,10 @@ public: virtual const Common::Point restrictToZone(int zoneId, const Common::Point &destPos); /** - * If the specified speaker is a background object, it will set it so that it uses - * the Listen Sequence (specified by the sequence number). If the current sequence - * has an Allow Talk Code in it, the _gotoSeq field will be set so that the object - * begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code, + * If the specified speaker is a background object, it will set it so that it uses + * the Listen Sequence (specified by the sequence number). If the current sequence + * has an Allow Talk Code in it, the _gotoSeq field will be set so that the object + * begins listening as soon as it hits the Allow Talk Code. If there is no Abort Code, * the Listen Sequence will begin immediately. * @param speaker Who is speaking * @param sequenceNum Which listen sequence to use diff --git a/engines/sherlock/tattoo/tattoo_resources.cpp b/engines/sherlock/tattoo/tattoo_resources.cpp index 4b73356d58..6247750911 100644 --- a/engines/sherlock/tattoo/tattoo_resources.cpp +++ b/engines/sherlock/tattoo/tattoo_resources.cpp @@ -27,7 +27,7 @@ namespace Sherlock { namespace Tattoo { -const PeopleData PEOPLE_DATA[TATTOO_MAX_PEOPLE] = { +const PeopleData PEOPLE_DATA[TATTOO_MAX_PEOPLE] = { { "HOLM", kFixedText_People_SherlockHolmes }, { "WATS", kFixedText_People_DrWatson }, { "HUDS", kFixedText_People_MrsHudson }, diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp index 00015cb189..628e8a3b7a 100644 --- a/engines/sherlock/tattoo/tattoo_scene.cpp +++ b/engines/sherlock/tattoo/tattoo_scene.cpp @@ -49,7 +49,7 @@ struct ShapeEntry { _shape(nullptr), _person(person), _yp(yp), _isAnimation(false), _ordering(ordering) {} ShapeEntry(Object *shape, int yp, int ordering) : _shape(shape), _person(nullptr), _yp(yp), _isAnimation(false), _ordering(ordering) {} - ShapeEntry(int yp, int ordering) : + ShapeEntry(int yp, int ordering) : _shape(nullptr), _person(nullptr), _yp(yp), _isAnimation(true), _ordering(ordering) {} }; typedef Common::List<ShapeEntry> ShapeList; @@ -99,7 +99,7 @@ bool TattooScene::loadScene(const Common::String &filename) { // If it's a new song, then start it up if (music._currentSongName.compareToIgnoreCase(music._nextSongName)) { - // WORKAROUND: Stop playing music after Diogenes fire scene in the intro, + // WORKAROUND: Stop playing music after Diogenes fire scene in the intro, // since it overlaps slightly into the next scene if (talk._scriptName == "prol80p" && _currentScene == 80) { music.stopMusic(); @@ -361,7 +361,7 @@ void TattooScene::doBgAnim() { if (people[idx]._type == CHARACTER) people[idx].checkSprite(); } - + for (uint idx = 0; idx < _bgShapes.size(); ++idx) { if (_bgShapes[idx]._type == ACTIVE_BG_SHAPE) _bgShapes[idx].checkObject(); @@ -539,10 +539,10 @@ void TattooScene::doBgAnimDrawSprites() { if (obj._type == ACTIVE_BG_SHAPE || obj._type == REMOVE) { if (_goToScene == -1) { if (obj._scaleVal == SCALE_THRESHOLD) - screen.flushImage(obj._imageFrame, obj._position, &obj._oldPosition.x, &obj._oldPosition.y, + screen.flushImage(obj._imageFrame, obj._position, &obj._oldPosition.x, &obj._oldPosition.y, &obj._oldSize.x, &obj._oldSize.y); else - screen.flushScaleImage(obj._imageFrame, obj._position, &obj._oldPosition.x, &obj._oldPosition.y, + screen.flushScaleImage(obj._imageFrame, obj._position, &obj._oldPosition.x, &obj._oldPosition.y, &obj._oldSize.x, &obj._oldSize.y, obj._scaleVal); if (obj._type == REMOVE) @@ -595,7 +595,7 @@ int TattooScene::getScaleVal(const Point32 &pt) { } } - // If it wasn't found, we may be off screen to the left or right, so find the scale zone + // If it wasn't found, we may be off screen to the left or right, so find the scale zone // that would apply to the y val passed in disregarding the x if (!found) { for (uint idx = 0; idx < _scaleZones.size() && !found; ++idx) { @@ -659,7 +659,7 @@ int TattooScene::startCAnim(int cAnimNum, int playRate) { if (ui._windowOpen) ui.banishWindow(); - + // Open up the room resource file and get the data for the animation Common::SeekableReadStream *stream = res.load(_roomFilename); stream->seek(44 + cAnimNum * 4); @@ -768,7 +768,7 @@ int TattooScene::findBgShape(const Common::Point &pt) { for (int idx = (int)_bgShapes.size() - 1; idx >= 0 && result == -1; --idx) { Object &o = _bgShapes[idx]; - if (o._type != INVALID && o._type != NO_SHAPE && o._type != HIDDEN && + if (o._type != INVALID && o._type != NO_SHAPE && o._type != HIDDEN && (o._aType <= PERSON || (ui._menuMode == LAB_MODE && o._aType == SOLID))) { if (o.getNewBounds().contains(pt)) result = idx; diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp index e6b9a9627e..8eda7368ea 100644 --- a/engines/sherlock/tattoo/tattoo_talk.cpp +++ b/engines/sherlock/tattoo/tattoo_talk.cpp @@ -34,7 +34,7 @@ namespace Tattoo { static const uint8 DIRECTION_CONVERSION[] = { WALK_RIGHT, WALK_DOWN, WALK_LEFT, WALK_UP, STOP_RIGHT, STOP_DOWN, STOP_LEFT, STOP_UP, - WALK_UPRIGHT, WALK_DOWNRIGHT, WALK_UPLEFT, WALK_DOWNLEFT, STOP_UPRIGHT, STOP_UPLEFT, + WALK_UPRIGHT, WALK_DOWNRIGHT, WALK_UPLEFT, WALK_DOWNLEFT, STOP_UPRIGHT, STOP_UPLEFT, STOP_DOWNRIGHT, STOP_DOWNLEFT }; @@ -254,7 +254,7 @@ OpcodeReturn TattooTalk::cmdSwitchSpeaker(const byte *&str) { return RET_EXIT; ui.clearWindow(); - + _yp = screen.fontHeight() + 11; _charCount = _line = 0; @@ -267,7 +267,7 @@ OpcodeReturn TattooTalk::cmdSwitchSpeaker(const byte *&str) { return RET_SUCCESS; } -OpcodeReturn TattooTalk::cmdMouseOnOff(const byte *&str) { +OpcodeReturn TattooTalk::cmdMouseOnOff(const byte *&str) { Events &events = *_vm->_events; bool mouseOn = *++str == 2; if (mouseOn) @@ -286,7 +286,7 @@ OpcodeReturn TattooTalk::cmdWalkHolmesToCoords(const byte *&str) { // Negative X xp = -1 * (xp - 16384); int yp = (str[2] - 1) * 256 + str[3] - 1; - + people[HOLMES].walkToCoords(Point32(xp * FIXED_INT_MULTIPLIER, yp * FIXED_INT_MULTIPLIER), DIRECTION_CONVERSION[str[4] - 1]); @@ -352,7 +352,7 @@ OpcodeReturn TattooTalk::cmdNPCLabelGoto(const byte *&str) { int npcNum = *++str; TattooPeople &people = *(TattooPeople *)_vm->_people; TattooPerson &person = people[npcNum]; - + if (person._resetNPCPath) { person._npcIndex = person._npcPause = 0; person._resetNPCPath = false; @@ -371,7 +371,7 @@ OpcodeReturn TattooTalk::cmdNPCLabelIfFlagGoto(const byte *&str) { int npcNum = *++str; TattooPeople &people = *(TattooPeople *)_vm->_people; TattooPerson &person = people[npcNum]; - + if (person._resetNPCPath) { person._npcIndex = person._npcPause = 0; person._resetNPCPath = false; @@ -392,7 +392,7 @@ OpcodeReturn TattooTalk::cmdNPCLabelSet(const byte *&str) { int npcNum = *++str; TattooPeople &people = *(TattooPeople *)_vm->_people; TattooPerson &person = people[npcNum]; - + if (person._resetNPCPath) { person._npcIndex = person._npcPause = 0; person._resetNPCPath = false; @@ -413,7 +413,7 @@ OpcodeReturn TattooTalk::cmdPassword(const byte *&str) { return RET_EXIT; } -OpcodeReturn TattooTalk::cmdPlaySong(const byte *&str) { +OpcodeReturn TattooTalk::cmdPlaySong(const byte *&str) { Music &music = *_vm->_music; Common::String currentSong = music._currentSongName; @@ -498,7 +498,7 @@ OpcodeReturn TattooTalk::cmdSetNPCOff(const byte *&str) { return RET_SUCCESS; } -OpcodeReturn TattooTalk::cmdSetNPCOn(const byte *&str) { +OpcodeReturn TattooTalk::cmdSetNPCOn(const byte *&str) { TattooPeople &people = *(TattooPeople *)_vm->_people; int npcNum = *++str; people[npcNum]._type = CHARACTER; @@ -510,7 +510,7 @@ OpcodeReturn TattooTalk::cmdSetNPCPathDest(const byte *&str) { int npcNum = *++str; TattooPeople &people = *(TattooPeople *)_vm->_people; TattooPerson &person = people[npcNum]; - + if (person._resetNPCPath) { person._npcIndex = person._npcPause = 0; person._resetNPCPath = false; @@ -532,7 +532,7 @@ OpcodeReturn TattooTalk::cmdSetNPCPathPause(const byte *&str) { int npcNum = *++str; TattooPeople &people = *(TattooPeople *)_vm->_people; TattooPerson &person = people[npcNum]; - + if (person._resetNPCPath) { person._npcIndex = person._npcPause = 0; person._resetNPCPath = false; @@ -553,7 +553,7 @@ OpcodeReturn TattooTalk::cmdSetNPCPathPauseTakingNotes(const byte *&str) { int npcNum = *++str; TattooPeople &people = *(TattooPeople *)_vm->_people; TattooPerson &person = people[npcNum]; - + if (person._resetNPCPath) { person._npcIndex = person._npcPause = 0; person._resetNPCPath = false; @@ -574,7 +574,7 @@ OpcodeReturn TattooTalk::cmdSetNPCPathPauseLookingHolmes(const byte *&str) { int npcNum = *++str; TattooPeople &people = *(TattooPeople *)_vm->_people; TattooPerson &person = people[npcNum]; - + if (person._resetNPCPath) { person._npcIndex = person._npcPause = 0; person._resetNPCPath = false; @@ -600,7 +600,7 @@ OpcodeReturn TattooTalk::cmdSetNPCPosition(const byte *&str) { if (posX > 16384) posX = -1 * (posX - 16384); int posY = (str[2] - 1) * 256 + str[3] - 1; - + person._position = Point32(posX * FIXED_INT_MULTIPLIER, posY * FIXED_INT_MULTIPLIER); if (person._seqTo && person._walkLoaded) { person._walkSequences[person._sequenceNumber]._sequences[person._frameNumber] = person._seqTo; @@ -637,7 +637,7 @@ OpcodeReturn TattooTalk::cmdSetNPCTalkFile(const byte *&str) { int npcNum = *++str; TattooPeople &people = *(TattooPeople *)_vm->_people; TattooPerson &person = people[npcNum]; - + if (person._resetNPCPath) { person._npcIndex = person._npcPause = 0; person._resetNPCPath = false; @@ -691,7 +691,7 @@ OpcodeReturn TattooTalk::cmdSetNPCVerbScript(const byte *&str) { int verbNum = *++str - 1; TattooPeople &people = *(TattooPeople *)_vm->_people; UseType &useType = people[npcNum]._use[verbNum]; - + Common::String &name = useType._names[0]; name = "*C"; @@ -775,7 +775,7 @@ OpcodeReturn TattooTalk::cmdSetTalkSequence(const byte *&str) { people.setTalkSequence(speaker, sequenceNumber); else people.setListenSequence(speaker, sequenceNumber); - + str += 2; return RET_SUCCESS; @@ -785,7 +785,7 @@ OpcodeReturn TattooTalk::cmdSetWalkControl(const byte *&str) { TattooPeople &people = *(TattooPeople *)_vm->_people; ++str; people._walkControl = str[0] - 1; - + return RET_SUCCESS; } @@ -958,7 +958,7 @@ void TattooTalk::pullSequence(int slot) { // Check for an entry in this slot if (seq._obj) { Object &o = *seq._obj; - + // See if we're not supposed to restore it until an Allow Talk Interrupt if (slot == -1 && seq._obj->hasAborts()) { seq._obj->_gotoSeq = -1; diff --git a/engines/sherlock/tattoo/tattoo_talk.h b/engines/sherlock/tattoo/tattoo_talk.h index 9b010513dc..b1e294725d 100644 --- a/engines/sherlock/tattoo/tattoo_talk.h +++ b/engines/sherlock/tattoo/tattoo_talk.h @@ -103,7 +103,7 @@ protected: public: TattooTalk(SherlockEngine *vm); virtual ~TattooTalk() {} - + /** * Called whenever a conversation or item script needs to be run. For standard conversations, * it opens up a description window similar to how 'talk' does, but shows a 'reply' directly diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp index 677a662535..1cb0220bba 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.cpp +++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp @@ -42,7 +42,7 @@ bool WidgetList::contains(const WidgetBase *item) const { /*-------------------------------------------------------------------------*/ TattooUserInterface::TattooUserInterface(SherlockEngine *vm): UserInterface(vm), - _inventoryWidget(vm), _messageWidget(vm), _textWidget(vm), _tooltipWidget(vm), + _inventoryWidget(vm), _messageWidget(vm), _textWidget(vm), _tooltipWidget(vm), _verbsWidget(vm), _creditsWidget(vm), _optionsWidget(vm), _quitWidget(vm) { Common::fill(&_lookupTable[0], &_lookupTable[PALETTE_COUNT], 0); Common::fill(&_lookupTable1[0], &_lookupTable1[PALETTE_COUNT], 0); @@ -126,7 +126,7 @@ void TattooUserInterface::lookAtObject() { name.deleteLastChar(); // See if this Object Sound List entry matches the object's name - if (!_bgShape->_name.compareToIgnoreCase(name)) { + if (!_bgShape->_name.compareToIgnoreCase(name)) { // Move forward to get the sound filename while ((*p == ' ') || (*p == '=')) ++p; @@ -266,7 +266,7 @@ void TattooUserInterface::handleInput() { if (_lockoutTimer) --_lockoutTimer; - + // Key handling if (events.kbHit()) { _keyState = events.getKey(); @@ -416,7 +416,7 @@ void TattooUserInterface::doStandardControl() { if (vm.readFlags(FLAG_PLAYER_IS_HOLMES)) { freeMenu(); doJournal(); - + // See if we're in a Lab Table Room _menuMode = (scene._labTableScene) ? LAB_MODE : STD_MODE; return; @@ -573,7 +573,7 @@ void TattooUserInterface::displayObjectNames() { void TattooUserInterface::doInventory(int mode) { People &people = *_vm->_people; people[HOLMES].gotoStand(); - + _inventoryWidget.load(mode); _inventoryWidget.summonWindow(); @@ -661,7 +661,7 @@ void TattooUserInterface::putMessage(const char *formatStr, ...) { void TattooUserInterface::setupBGArea(const byte cMap[PALETTE_SIZE]) { Scene &scene = *_vm->_scene; - // This requires that there is a 16 grayscale palette sequence in the palette that goes from lighter + // This requires that there is a 16 grayscale palette sequence in the palette that goes from lighter // to darker as the palette numbers go up. The last palette entry in that run is specified by _bgColor byte *p = &_lookupTable[0]; for (int idx = 0; idx < PALETTE_COUNT; ++idx) @@ -693,7 +693,7 @@ void TattooUserInterface::setupBGArea(const byte cMap[PALETTE_SIZE]) { g = cMap[idx * 3 + 1] * 4 / 3; b = cMap[idx * 3 + 2] * 4 / 3; break; - + default: r = g = b = 0; break; @@ -703,7 +703,7 @@ void TattooUserInterface::setupBGArea(const byte cMap[PALETTE_SIZE]) { int cd = 99999; for (int pal = 0; pal < PALETTE_COUNT; ++pal) { - int d = (r - cMap[pal * 3]) * (r - cMap[pal * 3]) + (g - cMap[pal * 3 + 1]) * (g - cMap[pal * 3 + 1]) + + int d = (r - cMap[pal * 3]) * (r - cMap[pal * 3]) + (g - cMap[pal * 3 + 1]) * (g - cMap[pal * 3 + 1]) + (b - cMap[pal * 3 + 2]) * (b - cMap[pal * 3 + 2]); if (d < cd) { @@ -722,12 +722,12 @@ void TattooUserInterface::doBgAnimEraseBackground() { People &people = *_vm->_people; Scene &scene = *_vm->_scene; Screen &screen = *_vm->_screen; - + static const int16 OFFSETS[16] = { -1, -2, -3, -3, -2, -1, -1, 0, 1, 2, 3, 3, 2, 1, 0, 0 }; if (_mask != nullptr) { // Since a mask is active, restore the screen from the secondary back buffer prior to applying the mask - screen._backBuffer1.SHblitFrom(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) { @@ -768,7 +768,7 @@ void TattooUserInterface::doBgAnimEraseBackground() { } else { // Standard scene without mask, so call user interface to erase any UI elements as necessary doBgAnimRestoreUI(); - + // Restore background for any areas covered by characters and shapes for (int idx = 0; idx < MAX_CHARACTERS; ++idx) screen.restoreBackground(Common::Rect(people[idx]._oldPosition.x, people[idx]._oldPosition.y, @@ -776,10 +776,10 @@ void TattooUserInterface::doBgAnimEraseBackground() { for (uint idx = 0; idx < scene._bgShapes.size(); ++idx) { Object &obj = scene._bgShapes[idx]; - - if ((obj._type == ACTIVE_BG_SHAPE && (obj._maxFrames > 1 || obj._delta.x != 0 || obj._delta.y != 0)) || + + 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.SHblitFrom(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)); } @@ -801,10 +801,10 @@ void TattooUserInterface::doBgAnimEraseBackground() { } // Adjust the Target Scroll if needed - if ((people[people._walkControl]._position.x / FIXED_INT_MULTIPLIER - screen._currentScroll.x) < + if ((people[people._walkControl]._position.x / FIXED_INT_MULTIPLIER - screen._currentScroll.x) < (SHERLOCK_SCREEN_WIDTH / 8) && people[people._walkControl]._delta.x < 0) { - - _targetScroll.x = (short)(people[people._walkControl]._position.x / FIXED_INT_MULTIPLIER - + + _targetScroll.x = (short)(people[people._walkControl]._position.x / FIXED_INT_MULTIPLIER - SHERLOCK_SCREEN_WIDTH / 8 - 250); if (_targetScroll.x < 0) _targetScroll.x = 0; @@ -812,7 +812,7 @@ void TattooUserInterface::doBgAnimEraseBackground() { if ((people[people._walkControl]._position.x / FIXED_INT_MULTIPLIER - screen._currentScroll.x) > (SHERLOCK_SCREEN_WIDTH / 4 * 3) && people[people._walkControl]._delta.x > 0) - _targetScroll.x = (short)(people[people._walkControl]._position.x / FIXED_INT_MULTIPLIER - + _targetScroll.x = (short)(people[people._walkControl]._position.x / FIXED_INT_MULTIPLIER - SHERLOCK_SCREEN_WIDTH / 4 * 3 + 250); if (_targetScroll.x > _scrollSize) diff --git a/engines/sherlock/tattoo/tattoo_user_interface.h b/engines/sherlock/tattoo/tattoo_user_interface.h index d89da4a6da..28e41219bf 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.h +++ b/engines/sherlock/tattoo/tattoo_user_interface.h @@ -42,7 +42,7 @@ namespace Sherlock { namespace Tattoo { // Button width/height -#define BUTTON_SIZE 15 +#define BUTTON_SIZE 15 // How long to play the intro before it can be skipped #define STARTUP_KEYS_DISABLED_DELAY 200 @@ -241,7 +241,7 @@ public: /** * Draw the user interface onto the screen's back buffers - */ + */ virtual void drawInterface(int bufferNum = 3); /** diff --git a/engines/sherlock/tattoo/widget_base.cpp b/engines/sherlock/tattoo/widget_base.cpp index a35f4e5d74..eab8e3217a 100644 --- a/engines/sherlock/tattoo/widget_base.cpp +++ b/engines/sherlock/tattoo/widget_base.cpp @@ -106,7 +106,7 @@ void WidgetBase::draw() { if (_bounds.width() > 0 && !_surface.empty()) { // Get the area to draw, adjusted for scroll position restrictToScreen(); - + // Draw the background for the widget drawBackground(); @@ -146,7 +146,7 @@ Common::String WidgetBase::splitLines(const Common::String &str, Common::StringA const char *lineStartP = strP; // Find how many characters will fit on the next line - while (width < maxWidth && *strP && ((byte)*strP < talk._opcodes[OP_SWITCH_SPEAKER] || + while (width < maxWidth && *strP && ((byte)*strP < talk._opcodes[OP_SWITCH_SPEAKER] || (byte)*strP == talk._opcodes[OP_NULL])) { width += _surface.charWidth(*strP); @@ -156,7 +156,7 @@ Common::String WidgetBase::splitLines(const Common::String &str, Common::StringA ++strP; } - // If the line was too wide to fit on a single line, go back to the last space + // If the line was too wide to fit on a single line, go back to the last space // if there was one, or otherwise simply break the line at this point if (width >= maxWidth && spaceP != nullptr) strP = spaceP; @@ -167,7 +167,7 @@ Common::String WidgetBase::splitLines(const Common::String &str, Common::StringA // Move the string ahead to the next line if (*strP == ' ' || *strP == 13) ++strP; - } while (*strP && (lines.size() < maxLines) && ((byte)*strP < talk._opcodes[OP_SWITCH_SPEAKER] + } while (*strP && (lines.size() < maxLines) && ((byte)*strP < talk._opcodes[OP_SWITCH_SPEAKER] || (byte)*strP == talk._opcodes[OP_NULL])); // Return any remaining text left over @@ -266,7 +266,7 @@ void WidgetBase::drawScrollBar(int index, int pageSize, int count) { // Draw the scroll position bar int barHeight = (r.height() - BUTTON_SIZE * 2) * pageSize / count; barHeight = CLIP(barHeight, BUTTON_SIZE, r.height() - BUTTON_SIZE * 2); - int barY = (count <= pageSize) ? r.top + BUTTON_SIZE : r.top + BUTTON_SIZE + + int barY = (count <= pageSize) ? r.top + BUTTON_SIZE : r.top + BUTTON_SIZE + (r.height() - BUTTON_SIZE * 2 - barHeight) * index / (count - pageSize); _surface.fillRect(Common::Rect(r.left + 2, barY + 2, r.right - 2, barY + barHeight - 3), INFO_MIDDLE); diff --git a/engines/sherlock/tattoo/widget_credits.cpp b/engines/sherlock/tattoo/widget_credits.cpp index 1c878daaf6..fa1ac6fbae 100644 --- a/engines/sherlock/tattoo/widget_credits.cpp +++ b/engines/sherlock/tattoo/widget_credits.cpp @@ -49,7 +49,7 @@ void WidgetCredits::initCredits() { const char *p = line.c_str() + 12; while ((*p < '0') || (*p > '9')) p++; - + _creditSpeed = atoi(p); } else if (line.hasPrefix("Y Spacing")) { const char *p = line.c_str() + 12; @@ -73,7 +73,7 @@ void WidgetCredits::initCredits() { if (p != nullptr && p[1] == '>') { cl._line2 = Common::String(p + 3); cl._line = Common::String(cl._line.c_str(), p); - + int width = cl._width; int width1 = screen.stringWidth(cl._line); int width2 = screen.stringWidth(cl._line2); diff --git a/engines/sherlock/tattoo/widget_files.cpp b/engines/sherlock/tattoo/widget_files.cpp index 7666e81480..5e877c53f4 100644 --- a/engines/sherlock/tattoo/widget_files.cpp +++ b/engines/sherlock/tattoo/widget_files.cpp @@ -54,7 +54,7 @@ void WidgetFiles::show(SaveMode mode) { createSavegameList(); // Set up the display area - _bounds = Common::Rect(SHERLOCK_SCREEN_WIDTH * 2 / 3, (_surface.fontHeight() + 1) * + _bounds = Common::Rect(SHERLOCK_SCREEN_WIDTH * 2 / 3, (_surface.fontHeight() + 1) * (FILES_LINES_COUNT + 1) + 17); _bounds.moveTo(mousePos.x - _bounds.width() / 2, mousePos.y - _bounds.height() / 2); @@ -141,7 +141,7 @@ void WidgetFiles::render(FilesRenderMode mode) { int xp = _surface.stringWidth("00.") + _surface.widestChar() + 5; int yp = _surface.fontHeight() + 14; - + for (int idx = _savegameIndex; idx < (_savegameIndex + FILES_LINES_COUNT); ++idx) { if (idx == _selector && mode != RENDER_ALL) color = COMMAND_HIGHLIGHTED; @@ -150,7 +150,7 @@ void WidgetFiles::render(FilesRenderMode mode) { if (mode == RENDER_NAMES_AND_SCROLLBAR) _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); _surface.writeString(_savegames[idx], Common::Point(xp, yp), color); @@ -170,7 +170,7 @@ void WidgetFiles::handleEvents() { Common::KeyState keyState = ui._keyState; // Handle scrollbar events - ScrollHighlight oldHighlight = ui._scrollHighlight; + ScrollHighlight oldHighlight = ui._scrollHighlight; handleScrollbarEvents(_savegameIndex, FILES_LINES_COUNT, _savegames.size()); int oldScrollIndex = _savegameIndex; @@ -258,11 +258,11 @@ bool WidgetFiles::getFilename() { assert(_selector != -1); Common::Point pt(_surface.stringWidth("00.") + _surface.widestChar() + 5, _surface.fontHeight() + 14 + (_selector - _savegameIndex) * (_surface.fontHeight() + 1)); - + Common::String numStr = Common::String::format("%d.", _selector + 1); _surface.writeString(numStr, Common::Point(_surface.widestChar(), pt.y), COMMAND_HIGHLIGHTED); - Common::String filename = _savegames[_selector]; + Common::String filename = _savegames[_selector]; if (isSlotEmpty(_selector)) { index = 0; @@ -328,7 +328,7 @@ bool WidgetFiles::getFilename() { _surface.writeString(filename.c_str() + index, pt, COMMAND_HIGHLIGHTED); } else if ((keyState.keycode == Common::KEYCODE_LEFT && index > 0) - || (keyState.keycode == Common::KEYCODE_RIGHT && index < 49 && pt.x < (_bounds.right - BUTTON_SIZE - 20)) + || (keyState.keycode == Common::KEYCODE_RIGHT && index < 49 && pt.x < (_bounds.right - BUTTON_SIZE - 20)) || (keyState.keycode == Common::KEYCODE_HOME && index > 0) || (keyState.keycode == Common::KEYCODE_END)) { _surface.fillRect(Common::Rect(pt.x, pt.y, pt.x + width, pt.y + _surface.fontHeight()), TRANSPARENCY); @@ -345,7 +345,7 @@ bool WidgetFiles::getFilename() { pt.x += _surface.charWidth(filename[index]); ++index; break; - + case Common::KEYCODE_HOME: pt.x = _surface.stringWidth("00.") + _surface.widestChar() + 5; index = 0; @@ -376,7 +376,7 @@ bool WidgetFiles::getFilename() { _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.right - BUTTON_SIZE - 9, pt.y + _surface.fontHeight() - 1), TRANSPARENCY); _surface.writeString(filename + index, pt, COMMAND_HIGHLIGHTED); - + } else if (keyState.keycode == Common::KEYCODE_RETURN) { done = 1; @@ -393,7 +393,7 @@ bool WidgetFiles::getFilename() { else filename.setChar(keyState.ascii, index); - _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.width() - BUTTON_SIZE - 9, + _surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.width() - BUTTON_SIZE - 9, pt.y + _surface.fontHeight() - 1), TRANSPARENCY); _surface.writeString(filename.c_str() + index, pt, COMMAND_HIGHLIGHTED); pt.x += _surface.charWidth(keyState.ascii); diff --git a/engines/sherlock/tattoo/widget_files.h b/engines/sherlock/tattoo/widget_files.h index 87106f8edb..a4feb0d6dd 100644 --- a/engines/sherlock/tattoo/widget_files.h +++ b/engines/sherlock/tattoo/widget_files.h @@ -50,7 +50,7 @@ private: * Show the ScummVM Save Game dialog */ void showScummVMSaveDialog(); - + /** * Show the ScummVM Load Game dialog */ diff --git a/engines/sherlock/tattoo/widget_foolscap.cpp b/engines/sherlock/tattoo/widget_foolscap.cpp index 8225946838..f5afa56856 100644 --- a/engines/sherlock/tattoo/widget_foolscap.cpp +++ b/engines/sherlock/tattoo/widget_foolscap.cpp @@ -125,7 +125,7 @@ void WidgetFoolscap::show() { // Show the window summonWindow(); ui._menuMode = FOOLSCAP_MODE; -} +} void WidgetFoolscap::handleEvents() { Events &events = *_vm->_events; diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp index 5e7238680a..24c32f6332 100644 --- a/engines/sherlock/tattoo/widget_inventory.cpp +++ b/engines/sherlock/tattoo/widget_inventory.cpp @@ -36,7 +36,7 @@ namespace Tattoo { #define MAX_INV_COMMANDS 10 // Maximum elements in dialog #define NUM_INV_PER_LINE 4 // Number of inentory items per line in the dialog -WidgetInventoryTooltip::WidgetInventoryTooltip(SherlockEngine *vm, WidgetInventory *owner) : +WidgetInventoryTooltip::WidgetInventoryTooltip(SherlockEngine *vm, WidgetInventory *owner) : WidgetTooltipBase(vm), _owner(owner) { } @@ -100,7 +100,7 @@ void WidgetInventoryTooltip::setText(const Common::String &str) { _surface.writeFancyString(str, Common::Point(0, 0), BLACK, INFO_TOP); } else { int xp, yp; - + xp = (_bounds.width() - _surface.stringWidth(line1) - 2) / 2; _surface.writeFancyString(line1, Common::Point(xp, 0), BLACK, INFO_TOP); @@ -110,7 +110,7 @@ void WidgetInventoryTooltip::setText(const Common::String &str) { } } -void WidgetInventoryTooltip::handleEvents() { +void WidgetInventoryTooltip::handleEvents() { Events &events = *_vm->_events; FixedText &fixedText = *_vm->_fixedText; Inventory &inv = *_vm->_inventory; @@ -133,7 +133,7 @@ void WidgetInventoryTooltip::handleEvents() { if (_owner->_invVerbMode == 3) { select = ui._bgFound; oldSelect = ui._oldBgFound; - + if (select != -1 && (select != oldSelect || (select != -1 && _surface.empty()))) { // See if we're pointing at a shape or a sprite if (select < 1000) { @@ -143,17 +143,17 @@ void WidgetInventoryTooltip::handleEvents() { if (_vm->getLanguage() == Common::GR_GRE) { if (!_owner->_swapItems) - str = Common::String::format("%s %s %s %s", _owner->_action.c_str(), obj._description.c_str(), + str = Common::String::format("%s %s %s %s", _owner->_action.c_str(), obj._description.c_str(), inv[_owner->_invSelect]._name.c_str(), _owner->_verb.c_str()); else - str = Common::String::format("%s %s %s %s", _owner->_action.c_str(), inv[_owner->_invSelect]._name.c_str(), + str = Common::String::format("%s %s %s %s", _owner->_action.c_str(), inv[_owner->_invSelect]._name.c_str(), obj._description.c_str(), _owner->_verb.c_str()); } else { if (_owner->_swapItems) - str = Common::String::format("%s %s %s %s", _owner->_verb.c_str(), obj._description.c_str(), _owner->_action.c_str(), + str = Common::String::format("%s %s %s %s", _owner->_verb.c_str(), obj._description.c_str(), _owner->_action.c_str(), inv[_owner->_invSelect]._name.c_str()); else - str = Common::String::format("%s %s %s %s", _owner->_verb.c_str(), inv[_owner->_invSelect]._name.c_str(), + str = Common::String::format("%s %s %s %s", _owner->_verb.c_str(), inv[_owner->_invSelect]._name.c_str(), _owner->_action.c_str(), obj._description.c_str()); } } @@ -192,7 +192,7 @@ void WidgetInventoryTooltip::handleEvents() { select = -1; } else { oldSelect = _owner->_invSelect; - + if (select != _owner->_invSelect || _surface.empty()) { if (_owner->_invMode == 1) { @@ -249,7 +249,7 @@ void WidgetInventoryTooltip::handleEvents() { /*----------------------------------------------------------------*/ -WidgetInventoryVerbs::WidgetInventoryVerbs(SherlockEngine *vm, WidgetInventory *owner) : +WidgetInventoryVerbs::WidgetInventoryVerbs(SherlockEngine *vm, WidgetInventory *owner) : WidgetBase(vm), _owner(owner) { _invVerbSelect = _oldInvVerbSelect = -1; } @@ -472,7 +472,7 @@ void WidgetInventoryVerbs::highlightControls() { /*----------------------------------------------------------------*/ -WidgetInventory::WidgetInventory(SherlockEngine *vm) : WidgetBase(vm), +WidgetInventory::WidgetInventory(SherlockEngine *vm) : WidgetBase(vm), _tooltipWidget(vm, this), _verbList(vm, this) { _invMode = 0; _invVerbMode = 0; @@ -571,7 +571,7 @@ void WidgetInventory::drawInventory() { } } - drawScrollBar(inv._invIndex / NUM_INV_PER_LINE, NUM_INVENTORY_SHOWN / NUM_INV_PER_LINE, + drawScrollBar(inv._invIndex / NUM_INV_PER_LINE, NUM_INVENTORY_SHOWN / NUM_INV_PER_LINE, (inv._holdings + NUM_INV_PER_LINE - 1) / NUM_INV_PER_LINE); } @@ -594,10 +594,10 @@ void WidgetInventory::handleEvents() { int invIndex = inv._invIndex / NUM_INV_PER_LINE; ScrollHighlight oldHighlight = ui._scrollHighlight; - handleScrollbarEvents(invIndex, NUM_INVENTORY_SHOWN / NUM_INV_PER_LINE, + handleScrollbarEvents(invIndex, NUM_INVENTORY_SHOWN / NUM_INV_PER_LINE, (inv._holdings + NUM_INV_PER_LINE - 1) / NUM_INV_PER_LINE); - handleScrolling(invIndex, NUM_INVENTORY_SHOWN / NUM_INV_PER_LINE, + handleScrolling(invIndex, NUM_INVENTORY_SHOWN / NUM_INV_PER_LINE, (inv._holdings + NUM_INV_PER_LINE - 1) / NUM_INV_PER_LINE); if (oldScrollIndex != invIndex) { @@ -665,16 +665,16 @@ void WidgetInventory::handleEvents() { ui.putMessage("%s", FIXED(NoEffect)); } } else if ((_outsideMenu && !_bounds.contains(mousePos)) || ui._keyState.keycode == Common::KEYCODE_ESCAPE) { - // Want to close the window (clicked outside of it). So close the window and return to Standard + // Want to close the window (clicked outside of it). So close the window and return to Standard close(); } else if (_bounds.contains(mousePos)) { // Mouse button was released inside the inventory window _outsideMenu = false; - + // See if they are pointing at one of the inventory items if (_invSelect != -1) { - // See if they are in Use Obj with Inv. Mode (they right clicked on an item + // See if they are in Use Obj with Inv. Mode (they right clicked on an item // in the room and selected "Use with Inv.") if (_invMode == 1) { _tooltipWidget.banishWindow(); @@ -709,13 +709,13 @@ void WidgetInventory::handleEvents() { _verbList._oldInvVerbSelect = -1; _tooltipWidget.banishWindow(); - // Keep track of the name of the inventory object so we can check it against the target fields + // Keep track of the name of the inventory object so we can check it against the target fields // of verbs when we activate it _invTarget = inv[_invSelect]._name; _swapItems = false; _verbList.load(); - } else { + } else { // They left clicked on an inventory item, so Look at it // Check if they are looking at the solved Foolscap @@ -726,7 +726,7 @@ void WidgetInventory::handleEvents() { _invVerbMode = 0; inv.freeInv(); - + events.clearEvents(); events.setCursor(ARROW); ui._menuMode = scene._labTableScene ? LAB_MODE : STD_MODE; diff --git a/engines/sherlock/tattoo/widget_lab.cpp b/engines/sherlock/tattoo/widget_lab.cpp index eb32e2e22c..5e6b88df9d 100644 --- a/engines/sherlock/tattoo/widget_lab.cpp +++ b/engines/sherlock/tattoo/widget_lab.cpp @@ -93,7 +93,7 @@ void WidgetLab::handleEvents() { // Show the command list for this object ui._verbsWidget.load(!noDesc); } else if (!noDesc) { - // The player has released on an object, see if they had an object selected + // The player has released on an object, see if they had an object selected // that will be used with this new object if (_labObject) { // See if the dragged object can be used with the new object @@ -150,7 +150,7 @@ void WidgetLab::handleEvents() { // Set the mouse cursor to the object Graphics::Surface &img = _labObject->_imageFrame->_frame; - Common::Point cursorOffset = mousePos - _labObject->_position; + Common::Point cursorOffset = mousePos - _labObject->_position; events.setCursor(ARROW, cursorOffset, img); ui._tooltipWidget._offsetY = cursorOffset.y; diff --git a/engines/sherlock/tattoo/widget_options.cpp b/engines/sherlock/tattoo/widget_options.cpp index 81f50f3bc5..35f1f267dc 100644 --- a/engines/sherlock/tattoo/widget_options.cpp +++ b/engines/sherlock/tattoo/widget_options.cpp @@ -192,7 +192,7 @@ void WidgetOptions::handleEvents() { render(OP_NAMES); vm.saveConfig(); break; - + case 7: // Toggle Text Windows vm._textWindowsOn = !vm._textWindowsOn; @@ -230,7 +230,7 @@ void WidgetOptions::handleEvents() { default: break; } - + _oldSelector = -1; } } @@ -302,17 +302,17 @@ 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.width() - 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.fillRect(Common::Rect(_surface.widestChar(), sliderY + 2, _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, + + _surface.fillRect(Common::Rect(_midiSliderX - 1, sliderY - (num - 6) / 2 + 2, _midiSliderX + 1, sliderY - (num - 6) / 2 + num - 3), INFO_MIDDLE); - drawDialogRect(Common::Rect(_midiSliderX - 3, sliderY - (num - 6) / 2, + drawDialogRect(Common::Rect(_midiSliderX - 3, sliderY - (num - 6) / 2, _midiSliderX + 4, sliderY - (num - 6) / 2 + num)); - + if (_midiSliderX - 4 > _surface.widestChar()) _surface.fillRect(Common::Rect(_midiSliderX - 4, sliderY, _midiSliderX - 4, sliderY + 4), INFO_BOTTOM); if (_midiSliderX + 4 < _surface.width() - _surface.widestChar()) @@ -332,14 +332,14 @@ 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.width() - 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.width() - _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.width() - _surface.widestChar(), sliderY + 6)); - _surface.fillRect(Common::Rect(_digiSliderX - 1, sliderY - (num - 6) / 2 + 2, _digiSliderX + 1, + _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, + 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); diff --git a/engines/sherlock/tattoo/widget_password.cpp b/engines/sherlock/tattoo/widget_password.cpp index 2a2921026d..90e67729c5 100644 --- a/engines/sherlock/tattoo/widget_password.cpp +++ b/engines/sherlock/tattoo/widget_password.cpp @@ -119,7 +119,7 @@ void WidgetPassword::handleEvents() { _surface.fillRect(Common::Rect(_cursorPos.x, _cursorPos.y, _cursorPos.x + width, _cursorPos.y + _surface.fontHeight()), TRANSPARENCY); if (currentChar != ' ') _surface.writeString(Common::String::format("%c", _password[_index]), _cursorPos, COMMAND_HIGHLIGHTED); - + switch (keycode) { case Common::KEYCODE_LEFT: _cursorPos.x -= _surface.charWidth(_password[_index - 1]); @@ -136,7 +136,7 @@ void WidgetPassword::handleEvents() { case Common::KEYCODE_END: _cursorPos.x = _surface.stringWidth(_password) + _surface.widestChar(); _index = _password.size(); - + while (_index > 0 && _password[_index - 1] == ' ') { _cursorPos.x -= _surface.charWidth(_password[_index - 1]); --_index; @@ -187,7 +187,7 @@ void WidgetPassword::handleEvents() { void WidgetPassword::close() { Talk &talk = *_vm->_talk; - + banishWindow(); if (talk._talkToAbort) return; diff --git a/engines/sherlock/tattoo/widget_quit.cpp b/engines/sherlock/tattoo/widget_quit.cpp index ea8f2e080c..92fabc49bf 100644 --- a/engines/sherlock/tattoo/widget_quit.cpp +++ b/engines/sherlock/tattoo/widget_quit.cpp @@ -130,7 +130,7 @@ void WidgetQuit::handleEvents() { byte color = (_select == 1) ? COMMAND_HIGHLIGHTED : INFO_TOP; int yp = (_surface.fontHeight() + 4) * 2 + 8; _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.width() - _surface.stringWidth(FIXED(No))) / 2, yp), color); diff --git a/engines/sherlock/tattoo/widget_talk.cpp b/engines/sherlock/tattoo/widget_talk.cpp index aec664561e..4a5b7f7dc7 100644 --- a/engines/sherlock/tattoo/widget_talk.cpp +++ b/engines/sherlock/tattoo/widget_talk.cpp @@ -133,7 +133,7 @@ void WidgetTalk::handleEvents() { // Flag if they started pressing outside of the window if (events._firstPress && !_bounds.contains(mousePos)) _outsideMenu = true; - + // Check for which statement they are pointing at _selector = -1; if (ui._scrollHighlight == SH_NONE) { @@ -159,7 +159,7 @@ void WidgetTalk::handleEvents() { if (keycode == Common::KEYCODE_TAB && ui._scrollHighlight == SH_NONE) { if (_selector == -1) { _selector = _statementLines[_scroll ? _talkScrollIndex : 0]._num; - + events.warpMouse(Common::Point(_bounds.right - BUTTON_SIZE - 10, _bounds.top + _surface.fontHeight() + 2)); } else { if (ui._keyState.flags & Common::KBD_SHIFT) { @@ -275,7 +275,7 @@ void WidgetTalk::handleEvents() { do { talk._scriptSelect = _selector; talk._speaker = talk._talkTo; - + // Make a copy of the reply (since talkTo can reload the statements list), and call talkTo Common::String reply = talk._statements[_selector]._reply; talk.doScript(reply); @@ -430,7 +430,7 @@ void WidgetTalk::setStatementLines() { ++numStatements; } - // If there are more lines than can be displayed in the interface window at one time, adjust the allowed + // If there are more lines than can be displayed in the interface window at one time, adjust the allowed // width to take into account needing a scrollbar int xSize = _scroll ? _bounds.width() - BUTTON_SIZE - 3 : _bounds.width(); diff --git a/engines/sherlock/tattoo/widget_text.cpp b/engines/sherlock/tattoo/widget_text.cpp index a29cd2700f..b9653e371a 100644 --- a/engines/sherlock/tattoo/widget_text.cpp +++ b/engines/sherlock/tattoo/widget_text.cpp @@ -56,14 +56,14 @@ void WidgetText::load(const Common::String &str, int speaker) { // See if it's only a single line long if (height == _surface.fontHeight() + 10) { width = _surface.widestChar() * 2 + 6; - + const char *strP = str.c_str(); while (*strP && (*strP < talk._opcodes[OP_SWITCH_SPEAKER] || *strP == talk._opcodes[OP_NULL])) width += _surface.charWidth(*strP++); } _bounds = Common::Rect(width, height); - + if (speaker == -1) { // No speaker specified, so center window on look position _bounds.translate(ui._lookPos.x - width / 2, ui._lookPos.y - height / 2); @@ -89,11 +89,11 @@ void WidgetText::centerWindowOnSpeaker(int speaker) { int scaleVal = scene.getScaleVal(people[HOLMES]._position); if (scaleVal == SCALE_THRESHOLD) { pt.x += people[HOLMES].frameWidth() / 2; - pt.y = people[HOLMES]._position.y / FIXED_INT_MULTIPLIER - people[HOLMES].frameHeight() + pt.y = people[HOLMES]._position.y / FIXED_INT_MULTIPLIER - people[HOLMES].frameHeight() - _bounds.height() - _surface.fontHeight(); } else { pt.x += people[HOLMES]._imageFrame->sDrawXSize(scaleVal) / 2; - pt.y = people[HOLMES]._position.y / FIXED_INT_MULTIPLIER - people[HOLMES]._imageFrame->sDrawYSize(scaleVal) + pt.y = people[HOLMES]._position.y / FIXED_INT_MULTIPLIER - people[HOLMES]._imageFrame->sDrawYSize(scaleVal) - _bounds.height() - _surface.fontHeight(); } } else { diff --git a/engines/sherlock/tattoo/widget_tooltip.cpp b/engines/sherlock/tattoo/widget_tooltip.cpp index 1560cb9a80..27f9c22d69 100644 --- a/engines/sherlock/tattoo/widget_tooltip.cpp +++ b/engines/sherlock/tattoo/widget_tooltip.cpp @@ -44,10 +44,10 @@ void WidgetTooltipBase::draw() { // Blit the affected area to the screen screen.slamRect(_bounds); - + // 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.SHtransBlitFrom(_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 @@ -76,7 +76,7 @@ void WidgetTooltip::setText(const Common::String &str) { Events &events = *_vm->_events; Common::Point mousePos = events.mousePos(); bool reset = false; - + // Make sure that the description is present if (!str.empty()) { int width = _surface.stringWidth(str) + 2; @@ -200,7 +200,7 @@ void WidgetSceneTooltip::handleEvents() { str = scene._exits[ui._arrowZone]._dest; } - setText(str.hasPrefix(" ") ? Common::String() : str); + setText(str.hasPrefix(" ") ? Common::String() : str); } else if ((ui._bgFound == -1 && ui._oldBgFound != -1) || (ui._arrowZone == -1 && ui._oldArrowZone != -1)) { setText(""); } diff --git a/engines/sherlock/tattoo/widget_verbs.cpp b/engines/sherlock/tattoo/widget_verbs.cpp index 5041888ffb..171fb247bc 100644 --- a/engines/sherlock/tattoo/widget_verbs.cpp +++ b/engines/sherlock/tattoo/widget_verbs.cpp @@ -65,7 +65,7 @@ void WidgetVerbs::load(bool objectsOn) { if (scumm_strnicmp(person._examine.c_str(), "_EXIT", 5)) _verbCommands.push_back(FIXED(Look)); - + _verbCommands.push_back(FIXED(Talk)); // Add any extra active verbs from the NPC's verb list @@ -116,7 +116,7 @@ void WidgetVerbs::load(bool objectsOn) { // Set the bounds _bounds = Common::Rect(width, height); _bounds.moveTo(mousePos.x - _bounds.width() / 2, mousePos.y - _bounds.height() / 2); - + // Render the window on the internal surface render(); } @@ -134,7 +134,7 @@ void WidgetVerbs::render() { // Draw the verb commands and the lines separating them for (uint idx = 0; idx < _verbCommands.size(); ++idx) { - _surface.writeString(_verbCommands[idx], Common::Point((_bounds.width() - _surface.stringWidth(_verbCommands[idx])) / 2, + _surface.writeString(_verbCommands[idx], Common::Point((_bounds.width() - _surface.stringWidth(_verbCommands[idx])) / 2, (_surface.fontHeight() + 7) * idx + 5), INFO_TOP); if (idx < (_verbCommands.size() - 1)) { @@ -143,7 +143,7 @@ void WidgetVerbs::render() { _surface.hLine(3, (_surface.fontHeight() + 7) * (idx + 1) + 2, _bounds.width() - 4, INFO_BOTTOM); _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.SHtransBlitFrom(images[5], Common::Point(_bounds.width() - images[5]._width, (_surface.fontHeight() + 7) * (idx + 1) - 1)); } } @@ -226,7 +226,7 @@ void WidgetVerbs::handleEvents() { // Talk command is being activated talk.initTalk(ui._activeObj); ui._activeObj = -1; - + } else if (!_verbCommands[_selector].compareToIgnoreCase(strJournal)) { ui.doJournal(); diff --git a/engines/sherlock/user_interface.h b/engines/sherlock/user_interface.h index c16c9f5d11..852b608245 100644 --- a/engines/sherlock/user_interface.h +++ b/engines/sherlock/user_interface.h @@ -102,7 +102,7 @@ public: /** * Draw the user interface onto the screen's back buffers - */ + */ virtual void drawInterface(int bufferNum = 3) {} /** diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp index ce62dcb2ae..c2ca557ec2 100644 --- a/engines/sky/compact.cpp +++ b/engines/sky/compact.cpp @@ -236,7 +236,7 @@ SkyCompact::SkyCompact() { for (cnt = 0; cnt < _numSaveIds; cnt++) _saveIds[cnt] = FROM_LE_16(_saveIds[cnt]); _resetDataPos = _cptFile->pos(); - + checkAndFixOfficerBluntError(); } @@ -259,7 +259,7 @@ SkyCompact::~SkyCompact() { delete _cptFile; } -/* WORKAROUND for bug #2687: +/* WORKAROUND for bug #2687: The first release of scummvm with externalized, binary compact data has one broken 16 bit reference. When talking to Officer Blunt on ground level while in a crouched position, the game enters an unfinishable state because Blunt jumps into the lake and can no longer be interacted with. diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp index d86689e5d7..4b91f50a61 100644 --- a/engines/sky/detection.cpp +++ b/engines/sky/detection.cpp @@ -78,7 +78,7 @@ public: virtual bool hasFeature(MetaEngineFeature f) const; virtual GameList getSupportedGames() const; virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const; - virtual GameDescriptor findGame(const char *gameid) const; + virtual GameDescriptor findGame(const char *gameid) const; virtual GameList detectGames(const Common::FSList &fslist) const; virtual Common::Error createInstance(OSystem *syst, Engine **engine) const; diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp index 423a2b86b4..cd65855653 100644 --- a/engines/sword25/gfx/animationresource.cpp +++ b/engines/sword25/gfx/animationresource.cpp @@ -211,7 +211,7 @@ bool AnimationResource::precacheAllFrames() const { error("Could not precache \"%s\".", (*iter).fileName.c_str()); return false; } -#else +#else Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource((*iter).fileName); pResource->release(); //unlock precached resource #endif diff --git a/engines/sword25/gfx/fontresource.cpp b/engines/sword25/gfx/fontresource.cpp index 1d7aedcb6e..78276338da 100644 --- a/engines/sword25/gfx/fontresource.cpp +++ b/engines/sword25/gfx/fontresource.cpp @@ -103,7 +103,7 @@ bool FontResource::parserCallback_font(ParserNode *node) { if (!_pKernel->getResourceManager()->precacheResource(_bitmapFileName)) { error("Could not precache \"%s\".", _bitmapFileName.c_str()); } -#else +#else Resource *pResource = _pKernel->getResourceManager()->requestResource(_bitmapFileName); pResource->release(); //unlock precached resource #endif diff --git a/engines/sword25/package/packagemanager.cpp b/engines/sword25/package/packagemanager.cpp index 87bedcc9c1..19425b50ab 100644 --- a/engines/sword25/package/packagemanager.cpp +++ b/engines/sword25/package/packagemanager.cpp @@ -75,7 +75,7 @@ PackageManager::~PackageManager() { Common::String PackageManager::ensureSpeechLang(const Common::String &fileName) { if (!_useEnglishSpeech || fileName.size() < 9 || !fileName.hasPrefix("/speech/")) return fileName; - + // Always keep German speech as a fallback in case the English speech pack is not present. // However this means we cannot play with German text and English voice. if (fileName.hasPrefix("/speech/de")) diff --git a/engines/sword25/package/packagemanager.h b/engines/sword25/package/packagemanager.h index 5475cb02fc..72e15e6bcd 100644 --- a/engines/sword25/package/packagemanager.h +++ b/engines/sword25/package/packagemanager.h @@ -87,7 +87,7 @@ private: Common::String _currentDirectory; Common::FSNode _rootFolder; Common::List<ArchiveEntry *> _archiveList; - + bool _useEnglishSpeech; Common::String ensureSpeechLang(const Common::String &fileName); diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp index afb1c5800a..e774008560 100644 --- a/engines/testbed/graphics.cpp +++ b/engines/testbed/graphics.cpp @@ -488,7 +488,7 @@ TestExitStatus GFXtests::fullScreenMode() { prompt = "This should be your initial state. Is it?"; - if (!Testsuite::handleInteractiveInput(prompt, "Yes, it is", "Nopes", shouldSelect)) { + if (!Testsuite::handleInteractiveInput(prompt, "Yes, it is", "Nopes", kOptionLeft)) { // User selected incorrect mode Testsuite::logDetailedPrintf("switching back to initial state failed\n"); passed = kTestFailed; diff --git a/engines/titanic/carry/glass.cpp b/engines/titanic/carry/glass.cpp index 03050dc60d..ff4c54ca39 100644 --- a/engines/titanic/carry/glass.cpp +++ b/engines/titanic/carry/glass.cpp @@ -90,7 +90,7 @@ bool CGlass::UseWithCharMsg(CUseWithCharMsg *msg) { if (_string6 != "Bird") setPosition(_origPos); - + actMsg.execute(msg->_character); } else { petAddToInventory(); diff --git a/engines/titanic/carry/note.cpp b/engines/titanic/carry/note.cpp index 388f87e638..f06e41094f 100644 --- a/engines/titanic/carry/note.cpp +++ b/engines/titanic/carry/note.cpp @@ -35,7 +35,7 @@ void CNote::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeQuotedLine(_string6, indent); file->writeNumberLine(_field138, indent); - + CCarry::save(file, indent); } diff --git a/engines/titanic/carry/phonograph_cylinder.cpp b/engines/titanic/carry/phonograph_cylinder.cpp index 3dedbc4ac9..777aa8be5b 100644 --- a/engines/titanic/carry/phonograph_cylinder.cpp +++ b/engines/titanic/carry/phonograph_cylinder.cpp @@ -118,7 +118,7 @@ bool CPhonographCylinder::QueryCylinderMsg(CQueryCylinderMsg *msg) { bool CPhonographCylinder::RecordOntoCylinderMsg(CRecordOntoCylinderMsg *msg) { _itemName = "STMusic"; - + CQueryMusicControlSettingMsg queryMsg; queryMsg.execute("Bells Mute Control"); _bellsMuteControl = queryMsg._value; @@ -145,7 +145,7 @@ bool CPhonographCylinder::RecordOntoCylinderMsg(CRecordOntoCylinderMsg *msg) { queryMsg.execute("Piano Speed Control"); _pianoSpeedControl = queryMsg._value; queryMsg.execute("Piano Pitch Control"); - _pianoPitchControl = queryMsg._value; + _pianoPitchControl = queryMsg._value; queryMsg.execute("Piano Inversion Control"); _pianoInversionControl = queryMsg._value; queryMsg.execute("Piano Direction Control"); diff --git a/engines/titanic/core/file_item.h b/engines/titanic/core/file_item.h index 4cecee4882..0b02d9d938 100644 --- a/engines/titanic/core/file_item.h +++ b/engines/titanic/core/file_item.h @@ -44,7 +44,7 @@ public: /** * Load the data for the class from file */ - virtual void load(SimpleFile *file); + virtual void load(SimpleFile *file); /** * Returns true if the item is a file item diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 56c838995e..8f71b3d995 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -89,7 +89,7 @@ void CGameObject::save(SimpleFile *file, int indent) { if (_surface) { const CMovieRangeInfoList *rangeList = _surface->getMovieRangeInfo(); - + if (rangeList) { for (CMovieRangeInfoList::const_iterator i = rangeList->begin(); i != rangeList->end(); ++i) { @@ -109,7 +109,7 @@ void CGameObject::save(SimpleFile *file, int indent) { file->writeNumberLine(_field40, indent + 1); file->writeQuotedLine(_resource, indent + 1); file->writeBounds(_bounds, indent + 1); - + file->writeFloatLine(_field34, indent + 1); file->writeFloatLine(_field38, indent + 1); file->writeFloatLine(_field3C, indent + 1); @@ -178,7 +178,7 @@ void CGameObject::load(SimpleFile *file) { _id = file->readNumber(); _roomFlags = file->readNumber(); - resourceKey.load(file); + resourceKey.load(file); _surface = nullptr; val = file->readNumber(); if (val) { @@ -199,7 +199,7 @@ void CGameObject::draw(CScreenManager *screenManager) { if (_credits && _credits->_objectP == this) { if (!_credits->draw()) CGameObject::deinit(); - + return; } @@ -281,7 +281,7 @@ bool CGameObject::checkPoint(const Point &pt, bool ignore40, bool visibleOnly) { } Common::Point pixelPos = pt - _bounds; - if (_surface->_transBlitFlag) { + if (_surface->_flipVertically) { pixelPos.y = ((_bounds.height() - _bounds.top) / 2) * 2 - pixelPos.y; } @@ -354,7 +354,7 @@ void CGameObject::loadMovie(const CString &name, bool pendingFlag) { // Create the surface if it doesn't already exist if (!_surface) { CGameManager *gameManager = getGameManager(); - _surface = new OSVideoSurface(gameManager->setScreenManager(), nullptr); + _surface = new OSVideoSurface(gameManager->setScreenManager(), nullptr); } // Load the new movie resource @@ -402,9 +402,10 @@ void CGameObject::loadImage(const CString &name, bool pendingFlag) { } void CGameObject::loadFrame(int frameNumber) { - if (frameNumber != -1 && !_resource.empty()) + _frameNumber = -1; + if (!_resource.empty()) loadResource(_resource); - + if (_surface) _surface->setMovieFrame(frameNumber); @@ -858,14 +859,14 @@ CViewItem *CGameObject::parseView(const CString &viewString) { CRoomItem *room = gameManager->getRoom(); CProjectItem *project = room->getRoot(); - + // Ensure we have the specified room if (project) { if (room->getName() != roomName) { // Scan for the correct room for (room = project->findFirstRoom(); room && room->getName() != roomName; room = project->findNextRoom(room)) ; - } + } } if (!room) return nullptr; @@ -953,7 +954,7 @@ CGameObject *CGameObject::findMailByFlags(int mode, uint roomFlags) { CMailMan *mailMan = getMailMan(); if (!mailMan) return nullptr; - + for (CGameObject *obj = mailMan->getFirstObject(); obj; obj = mailMan->getNextObject(obj)) { if (compareRoomFlags(mode, roomFlags, obj->_roomFlags)) @@ -1077,7 +1078,7 @@ void CGameObject::setText(const CString &str, int border, int borderRight) { _text = new CPetText(); _textBorder = border; _textBorderRight = borderRight; - + _text->setText(str); CScreenManager *screenManager = getGameManager()->setScreenManager(); _text->scrollToTop(screenManager); @@ -1207,7 +1208,7 @@ bool CGameObject::changeView(const CString &viewName, const CString &clipName) { if (!oldView || !newView) return false; - + CMovieClip *clip = nullptr; if (!clipName.empty()) { clip = oldView->findNode()->findRoom()->findClip(clipName); diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index b9a55ac008..b50278cf21 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -401,7 +401,7 @@ protected: * Clear the PET display */ void petClear() const; - + /** * Returns the MailMan */ @@ -488,7 +488,7 @@ protected: * Locks the PET, disabling all input. Can be called multiple times */ void petLockInput(); - + /** * Unlocks PET input */ @@ -646,7 +646,7 @@ public: * Change the object's status */ void playMovie(uint flags); - + /** * Play the movie specified in _resource */ @@ -671,7 +671,7 @@ public: * Get the current movie frame */ int getMovieFrame() const; - + /** * Returns the object's frame number */ @@ -706,7 +706,7 @@ public: * Return the player's passenger class */ int getPassengerClass() const; - + /** * Return the player's previous passenger class */ @@ -732,7 +732,7 @@ public: * Returns a hidden object */ CGameObject *getHiddenObject(const CString &name) const; - + /** * Sets up credits text */ @@ -742,7 +742,7 @@ public: * Support function for drag moving */ void dragMove(const Point &pt); - + /** * Returns the currently dragging item (if any) if it's a game object */ @@ -965,17 +965,17 @@ public: /*--- CGameState Methods ---*/ void setState1C(bool flag); - + /** * Change to the next season */ void stateChangeSeason(); - + /** * Returns the currently active season */ Season stateGetSeason() const; - + void stateSet24(); int stateGet24() const; void stateInc38(); diff --git a/engines/titanic/core/link_item.cpp b/engines/titanic/core/link_item.cpp index f77d081c61..559191efc9 100644 --- a/engines/titanic/core/link_item.cpp +++ b/engines/titanic/core/link_item.cpp @@ -57,8 +57,8 @@ CString CLinkItem::formName() { view->getName().c_str(), destView->getName().c_str()); case 3: - return CString::format("_TRACK,%d,%s,%d,%s", - node->_nodeNumber, view->getName().c_str(), + return CString::format("_TRACK,%d,%s,%d,%s", + node->_nodeNumber, view->getName().c_str(), destNode->_nodeNumber, destView->getName().c_str()); case 4: diff --git a/engines/titanic/core/list.h b/engines/titanic/core/list.h index 91a74adbdc..09068fb06a 100644 --- a/engines/titanic/core/list.h +++ b/engines/titanic/core/list.h @@ -130,7 +130,7 @@ public: */ void destroyContents() { typename Common::List<T *>::iterator i; - for (i = Common::List<T *>::begin(); + for (i = Common::List<T *>::begin(); i != Common::List<T *>::end(); ++i) { CSaveableObject *obj = *i; delete obj; @@ -149,7 +149,7 @@ public: } bool contains(const T *item) const { - for (typename Common::List<T *>::const_iterator i = Common::List<T *>::begin(); + for (typename Common::List<T *>::const_iterator i = Common::List<T *>::begin(); i != Common::List<T *>::end(); ++i) { if (*i == item) return true; diff --git a/engines/titanic/core/message_target.cpp b/engines/titanic/core/message_target.cpp index 4815d03973..a1060c643e 100644 --- a/engines/titanic/core/message_target.cpp +++ b/engines/titanic/core/message_target.cpp @@ -24,7 +24,7 @@ namespace Titanic { -const MSGMAP *CMessageTarget::getMessageMap() const { +const MSGMAP *CMessageTarget::getMessageMap() const { return getThisMessageMap(); } diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp index 76293233b0..65e8645baa 100644 --- a/engines/titanic/core/project_item.cpp +++ b/engines/titanic/core/project_item.cpp @@ -287,7 +287,7 @@ void CProjectItem::saveData(SimpleFile *file, CTreeItem *item) const { item->saveHeader(file, 0); item->save(file, 1); item->saveFooter(file, 0); - + CTreeItem *child = item->getFirstChild(); if (child) { file->write("\n{\n", 3); @@ -300,7 +300,7 @@ void CProjectItem::saveData(SimpleFile *file, CTreeItem *item) const { file->write("\n{\n", 3); file->writeQuotedString("ALONG"); } - + file->write("\n}\n", 3); item = item->getNextSibling(); } diff --git a/engines/titanic/core/project_item.h b/engines/titanic/core/project_item.h index 473ffd9556..4d009dd50b 100644 --- a/engines/titanic/core/project_item.h +++ b/engines/titanic/core/project_item.h @@ -66,7 +66,7 @@ public: /** * Load the data for the class from file */ - virtual void load(SimpleFile *file); + virtual void load(SimpleFile *file); }; /** @@ -89,7 +89,7 @@ private: * Called during save, iterates through the children to do some stuff */ void buildFilesList(); - + /** * Called at the beginning of loading a game */ @@ -161,7 +161,7 @@ public: /** * Load the data for the class from file */ - virtual void load(SimpleFile *file); + virtual void load(SimpleFile *file); /** * Get the game manager for the project diff --git a/engines/titanic/core/resource_key.cpp b/engines/titanic/core/resource_key.cpp index 3b390af2d4..3db5812d7d 100644 --- a/engines/titanic/core/resource_key.cpp +++ b/engines/titanic/core/resource_key.cpp @@ -37,7 +37,7 @@ void CResourceKey::save(SimpleFile *file, int indent) { void CResourceKey::load(SimpleFile *file) { int val = file->readNumber(); - + if (val == 0 || val == 1) { file->readBuffer(); CString str = file->readString(); diff --git a/engines/titanic/core/room_item.cpp b/engines/titanic/core/room_item.cpp index 49b3232ba1..1c360c7571 100644 --- a/engines/titanic/core/room_item.cpp +++ b/engines/titanic/core/room_item.cpp @@ -59,7 +59,7 @@ void CRoomItem::save(SimpleFile *file, int indent) { void CRoomItem::load(SimpleFile *file) { int val = file->readNumber(); - + switch (val) { case 3: // Read exit movie @@ -114,7 +114,7 @@ void CRoomItem::postLoad() { void CRoomItem::calcNodePosition(const Point &nodePos, double &xVal, double &yVal) const { xVal = yVal = 0.0; - + if (_roomDimensionX >= 0.0 && _roomDimensionY >= 0.0) { xVal = _roomRect.width() / _roomDimensionX; yVal = _roomRect.height() / _roomDimensionY; diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index 630404a6ee..7522a34737 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -421,7 +421,7 @@ CSaveableObject *ClassDef::create() { /*------------------------------------------------------------------------*/ -Common::HashMap<Common::String, CSaveableObject::CreateFunction> * +Common::HashMap<Common::String, CSaveableObject::CreateFunction> * CSaveableObject::_classList = nullptr; Common::List<ClassDef *> *CSaveableObject::_classDefs; @@ -1346,7 +1346,7 @@ void CSaveableObject::initClassList() { ADDFN(CTextUp, CPetGraphic); ADDFN(CToggleButton, CBackground); ADDFN(CToggleSwitch, CGameObject); - + ADDFN(CActMsg, CMessage); ADDFN(CActivationmsg, CMessage); ADDFN(CAddHeadPieceMsg, CMessage); diff --git a/engines/titanic/core/saveable_object.h b/engines/titanic/core/saveable_object.h index 6d80ad121d..4c7c1a7737 100644 --- a/engines/titanic/core/saveable_object.h +++ b/engines/titanic/core/saveable_object.h @@ -47,7 +47,7 @@ public: template<typename T> class TypeTemplate : public ClassDef { public: - TypeTemplate(const char *className, ClassDef *parent) : + TypeTemplate(const char *className, ClassDef *parent) : ClassDef(className, parent) {} virtual CSaveableObject *create() { return new T(); } }; @@ -79,7 +79,7 @@ public: public: CLASSDEF virtual ~CSaveableObject() {} - + bool isInstanceOf(const ClassDef *classDef) const; /** @@ -91,13 +91,13 @@ public: * Load the data for the class from file */ virtual void load(SimpleFile *file); - + /** * Write out a header definition for the class to file * prior to saving the actual data for the class */ virtual void saveHeader(SimpleFile *file, int indent); - + /** * Writes out a footer for the class after it's data has * been written to file diff --git a/engines/titanic/core/tree_item.cpp b/engines/titanic/core/tree_item.cpp index 86c34cab8b..97d06d7bbe 100644 --- a/engines/titanic/core/tree_item.cpp +++ b/engines/titanic/core/tree_item.cpp @@ -51,7 +51,7 @@ void CTreeItem::dump(int indent) { CTreeItem *item = getFirstChild(); while (item) { item->dump(indent + 1); - + item = item->getNextSibling(); } } diff --git a/engines/titanic/core/turn_on_play_sound.cpp b/engines/titanic/core/turn_on_play_sound.cpp index ab50b33134..44a9b3b0eb 100644 --- a/engines/titanic/core/turn_on_play_sound.cpp +++ b/engines/titanic/core/turn_on_play_sound.cpp @@ -28,7 +28,7 @@ BEGIN_MESSAGE_MAP(CTurnOnPlaySound, CTurnOnObject) ON_MESSAGE(MouseButtonUpMsg) END_MESSAGE_MAP() -CTurnOnPlaySound::CTurnOnPlaySound() : CTurnOnObject(), +CTurnOnPlaySound::CTurnOnPlaySound() : CTurnOnObject(), _soundName("NULL"), _soundVolume(80), _soundVal3(0) { } diff --git a/engines/titanic/core/view_item.cpp b/engines/titanic/core/view_item.cpp index 176765b12f..9b20860a46 100644 --- a/engines/titanic/core/view_item.cpp +++ b/engines/titanic/core/view_item.cpp @@ -63,7 +63,7 @@ void CViewItem::save(SimpleFile *file, int indent) { void CViewItem::load(SimpleFile *file) { int val = file->readNumber(); - + switch (val) { case 1: _resourceKey.load(file); @@ -86,7 +86,7 @@ bool CViewItem::getResourceKey(CResourceKey *key) { } void CViewItem::leaveView(CViewItem *newView) { - // Only do the processing if we've been passed a view, and it's not the same + // Only do the processing if we've been passed a view, and it's not the same if (newView && newView != this) { CLeaveViewMsg viewMsg(this, newView); viewMsg.execute(this, nullptr, MSGFLAG_SCAN); @@ -112,7 +112,7 @@ void CViewItem::leaveView(CViewItem *newView) { } void CViewItem::preEnterView(CViewItem *newView) { - // Only do the processing if we've been passed a view, and it's not the same + // Only do the processing if we've been passed a view, and it's not the same if (newView && newView != this) { CPreEnterViewMsg viewMsg(this, newView); viewMsg.execute(newView, nullptr, MSGFLAG_SCAN); @@ -134,7 +134,7 @@ void CViewItem::preEnterView(CViewItem *newView) { } void CViewItem::enterView(CViewItem *newView) { - // Only do the processing if we've been passed a view, and it's not the same + // Only do the processing if we've been passed a view, and it's not the same if (newView && newView != this) { CEnterViewMsg viewMsg(this, newView); viewMsg.execute(newView, nullptr, MSGFLAG_SCAN); diff --git a/engines/titanic/debugger.cpp b/engines/titanic/debugger.cpp index a9da83f724..5d95ef5186 100644 --- a/engines/titanic/debugger.cpp +++ b/engines/titanic/debugger.cpp @@ -23,7 +23,9 @@ #include "titanic/debugger.h" #include "titanic/titanic.h" #include "titanic/core/tree_item.h" +#include "titanic/game/movie_tester.h" #include "titanic/pet_control/pet_control.h" +#include "titanic/support/movie.h" namespace Titanic { @@ -33,6 +35,7 @@ Debugger::Debugger(TitanicEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("room", WRAP_METHOD(Debugger, cmdRoom)); registerCmd("pet", WRAP_METHOD(Debugger, cmdPET)); registerCmd("item", WRAP_METHOD(Debugger, cmdItem)); + registerCmd("movie", WRAP_METHOD(Debugger, cmdMovie)); } int Debugger::strToInt(const char *s) { @@ -109,7 +112,7 @@ void Debugger::listRooms() { CRoomItem *room = gm._gameState._gameLocation.getRoom(); debugPrintf("Current location: %s, %s, %s\n", room->getName().c_str(), node->getName().c_str(), view->getName().c_str()); - + debugPrintf("Available rooms:\n"); for (CTreeItem *treeItem = root; treeItem; treeItem = treeItem->scan(root)) { CRoomItem *roomItem = dynamic_cast<CRoomItem *>(treeItem); @@ -139,7 +142,7 @@ bool Debugger::cmdDump(int argc, const char **argv) { CTreeItem *root = g_vm->_window->_gameManager->_project; if (argc == 2) root = root->findByName(argv[1]); - + if (root == nullptr) { debugPrintf("Could not find item\n"); } else { @@ -204,7 +207,7 @@ bool Debugger::cmdPET(int argc, const char **argv) { return true; } } - + debugPrintf("%s [on | off]\n", argv[0]); return true; } @@ -260,4 +263,35 @@ bool Debugger::cmdItem(int argc, const char **argv) { return true; } +bool Debugger::cmdMovie(int argc, const char **argv) { + if (argc < 2) { + debugPrintf("movie filename.avi [startFrame endFrame]\n"); + return true; + } + + CViewItem *view = g_vm->_window->_gameManager->getView(); + CMovieTester *tester = static_cast<CMovieTester *>( + view->findChildInstanceOf(CMovieTester::_type)); + if (!tester) { + // No movie tester present, so create one + tester = new CMovieTester(); + tester->addUnder(view); + } + + CString filename(argv[1]); + if (!filename.hasSuffix(".avi")) + filename += ".avi"; + tester->loadMovie(filename); + + if (argc == 2) { + tester->playMovie(MOVIE_STOP_PREVIOUS); + } else { + uint startFrame = strToInt(argv[2]); + uint endFrame = strToInt(argv[2]); + tester->playMovie(startFrame, endFrame, MOVIE_STOP_PREVIOUS); + } + + return false; +} + } // End of namespace Titanic diff --git a/engines/titanic/debugger.h b/engines/titanic/debugger.h index 5edb7cb324..919d6c5358 100644 --- a/engines/titanic/debugger.h +++ b/engines/titanic/debugger.h @@ -44,27 +44,27 @@ private: * Find a room by name or number */ CRoomItem *findRoom(const char *name); - + /** * Find a node within a room by name or number */ CNodeItem *findNode(CRoomItem *room, const char *name); - + /** * Find a view within a room node by name or number */ CViewItem *findView(CNodeItem *node, const char *name); - + /** * List all the rooms in the game */ void listRooms(); - + /** * List the nodes within a room */ void listRoom(CRoomItem *room); - + /** * List the views within a room node */ @@ -89,6 +89,11 @@ private: * Item handling */ bool cmdItem(int argc, const char **argv); + + /** + * Shows a movie + */ + bool cmdMovie(int argc, const char **argv); protected: TitanicEngine *_vm; public: diff --git a/engines/titanic/detection.cpp b/engines/titanic/detection.cpp index 096cd4b618..33bae22312 100644 --- a/engines/titanic/detection.cpp +++ b/engines/titanic/detection.cpp @@ -128,7 +128,7 @@ SaveStateList TitanicMetaEngine::listSaves(const char *target) const { if (in) { Titanic::CompressedFile cf; cf.open(in); - + if (Titanic::CProjectItem::readSavegameHeader(&cf, header)) saveList.push_back(SaveStateDescriptor(slot, header._saveName)); diff --git a/engines/titanic/detection_tables.h b/engines/titanic/detection_tables.h index ba67942dfe..5ff09cec16 100644 --- a/engines/titanic/detection_tables.h +++ b/engines/titanic/detection_tables.h @@ -21,7 +21,7 @@ */ namespace Titanic { - + static const TitanicGameDescription gameDescriptions[] = { { { diff --git a/engines/titanic/events.h b/engines/titanic/events.h index 68666c7c46..3ea9b63217 100644 --- a/engines/titanic/events.h +++ b/engines/titanic/events.h @@ -34,8 +34,8 @@ namespace Titanic { #define GAME_FRAME_TIME (1000 / GAME_FRAME_RATE) #define DOUBLE_CLICK_TIME 100 -enum SpecialButtons { - MK_LBUTTON = 1, MK_RBUTTON = 2, MK_SHIFT = 4, MK_CONTROL = 8, +enum SpecialButtons { + MK_LBUTTON = 1, MK_RBUTTON = 2, MK_SHIFT = 4, MK_CONTROL = 8, MK_MBUTTON = 0x10 }; diff --git a/engines/titanic/game/bar_menu.cpp b/engines/titanic/game/bar_menu.cpp index 3812a8dab6..476e243fe9 100644 --- a/engines/titanic/game/bar_menu.cpp +++ b/engines/titanic/game/bar_menu.cpp @@ -40,7 +40,7 @@ void CBarMenu::save(SimpleFile *file, int indent) { file->writeNumberLine(_barFrameNumber, indent); file->writeNumberLine(_visibleFlag, indent); file->writeNumberLine(_numFrames, indent); - + CGameObject::save(file, indent); } @@ -67,7 +67,7 @@ bool CBarMenu::PETDownMsg(CPETDownMsg *msg) { if (_visibleFlag) { if (--_barFrameNumber < 0) _barFrameNumber = _numFrames - 1; - + loadFrame(_barFrameNumber); } diff --git a/engines/titanic/game/cdrom_computer.cpp b/engines/titanic/game/cdrom_computer.cpp index ceb0595188..5fd8e16350 100644 --- a/engines/titanic/game/cdrom_computer.cpp +++ b/engines/titanic/game/cdrom_computer.cpp @@ -29,7 +29,7 @@ BEGIN_MESSAGE_MAP(CCDROMComputer, CGameObject) ON_MESSAGE(MouseButtonDownMsg) END_MESSAGE_MAP() -CCDROMComputer::CCDROMComputer() : CGameObject(), +CCDROMComputer::CCDROMComputer() : CGameObject(), _clickRect(0, 3, 55, 32) { } @@ -58,7 +58,7 @@ bool CCDROMComputer::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (tray) { CStatusChangeMsg statusMsg; statusMsg.execute(tray); - + if (!statusMsg._success) { // Check if the mouse is within the clickable area Rect tempRect = _clickRect; diff --git a/engines/titanic/game/cdrom_tray.cpp b/engines/titanic/game/cdrom_tray.cpp index 1e5b135d35..505bdad319 100644 --- a/engines/titanic/game/cdrom_tray.cpp +++ b/engines/titanic/game/cdrom_tray.cpp @@ -110,7 +110,7 @@ bool CCDROMTray::ActMsg(CActMsg *msg) { bool CCDROMTray::MovieEndMsg(CMovieEndMsg *msg) { CTreeItem *screen = getRoom()->findByName("newScreen"); - + if (screen) { CActMsg actMsg(_insertedCD); actMsg.execute(screen); diff --git a/engines/titanic/game/chev_code.cpp b/engines/titanic/game/chev_code.cpp index 0acdf575f4..9381e1563a 100644 --- a/engines/titanic/game/chev_code.cpp +++ b/engines/titanic/game/chev_code.cpp @@ -69,7 +69,7 @@ bool CChevCode::SetChevFloorBits(CSetChevFloorBits *msg) { int section = (msg->_floorNum + 4) / 10; int index = (msg->_floorNum + 4) % 10; _chevCode &= ~0xFF00; - + int val = 0; switch (section) { case 0: @@ -87,7 +87,7 @@ bool CChevCode::SetChevFloorBits(CSetChevFloorBits *msg) { default: break; } - + _chevCode |= ((index + val) << 8); return true; } diff --git a/engines/titanic/game/chev_panel.cpp b/engines/titanic/game/chev_panel.cpp index ed730c9d61..5b58cbe594 100644 --- a/engines/titanic/game/chev_panel.cpp +++ b/engines/titanic/game/chev_panel.cpp @@ -41,7 +41,7 @@ void CChevPanel::save(SimpleFile *file, int indent) { file->writeNumberLine(_startPos.x, indent); file->writeNumberLine(_startPos.y, indent); file->writeNumberLine(_chevCode, indent); - + CGameObject::save(file, indent); } diff --git a/engines/titanic/game/chicken_dispensor.cpp b/engines/titanic/game/chicken_dispensor.cpp index e1e07844e1..8e02a1ec5c 100644 --- a/engines/titanic/game/chicken_dispensor.cpp +++ b/engines/titanic/game/chicken_dispensor.cpp @@ -107,7 +107,7 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) { _fieldE8 = 1; } break; - + default: break; } diff --git a/engines/titanic/game/code_wheel.cpp b/engines/titanic/game/code_wheel.cpp index 71d59ff514..441fddec02 100644 --- a/engines/titanic/game/code_wheel.cpp +++ b/engines/titanic/game/code_wheel.cpp @@ -77,7 +77,7 @@ bool CodeWheel::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { _state = (_state + 1) % 15; playMovie(START_FRAMES[_state], END_FRAMES[_state], - MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT); + MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT); } else { if (_state == _field108) _field110 = true; @@ -112,7 +112,7 @@ bool CodeWheel::MovieEndMsg(CMovieEndMsg *msg) { changeMsg._newStatus = 1; changeMsg.execute("Bomb"); - return true; + return true; } } // End of namespace Titanic diff --git a/engines/titanic/game/computer_screen.cpp b/engines/titanic/game/computer_screen.cpp index 9a7ac4b34e..98bef6eb63 100644 --- a/engines/titanic/game/computer_screen.cpp +++ b/engines/titanic/game/computer_screen.cpp @@ -99,7 +99,7 @@ bool CComputerScreen::TimerMsg(CTimerMsg *msg) { playClip(51, 150); playSound("a#31.wav"); playClip(151, 200); - + handle = playSound("a#27.wav"); playClip(200, 306); playSound("a#30.wav"); @@ -116,7 +116,7 @@ bool CComputerScreen::TimerMsg(CTimerMsg *msg) { playClip(392, 450); startTalking("Doorbot", 0x3611A); sleep(8000); - + playClip(450, 492); startTalking("Doorbot", 0x36121); playClip(492, 522); diff --git a/engines/titanic/game/credits.cpp b/engines/titanic/game/credits.cpp index d9149f6dd2..e13a2ce6f4 100644 --- a/engines/titanic/game/credits.cpp +++ b/engines/titanic/game/credits.cpp @@ -36,7 +36,7 @@ void CCredits::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_fieldBC, indent); file->writeNumberLine(_fieldC0, indent); - + CGameObject::save(file, indent); } @@ -60,7 +60,7 @@ bool CCredits::TimerMsg(CTimerMsg *msg) { setVisible(true); loadSound("a#16.wav"); loadSound("a#24.wav"); - + playCutscene(0, 18); playGlobalSound("a#16.wav", -1, false, false, 0); playCutscene(19, 642); diff --git a/engines/titanic/game/fan_control.cpp b/engines/titanic/game/fan_control.cpp index ad3efc92fb..288fdb639f 100644 --- a/engines/titanic/game/fan_control.cpp +++ b/engines/titanic/game/fan_control.cpp @@ -128,7 +128,7 @@ bool CFanControl::StatusChangeMsg(CStatusChangeMsg *msg) { } } break; - + default: break; } diff --git a/engines/titanic/game/fan_noises.cpp b/engines/titanic/game/fan_noises.cpp index 9144f523f4..d285563de3 100644 --- a/engines/titanic/game/fan_noises.cpp +++ b/engines/titanic/game/fan_noises.cpp @@ -96,7 +96,7 @@ bool CFanNoises::LeaveRoomMsg(CLeaveRoomMsg *msg) { if (getParent() == msg->_oldRoom && _soundHandle != -1) { if (isSoundActive(_soundHandle)) stopSound(_soundHandle, _stopSeconds); - + _soundHandle = -1; _startFlag = false; } diff --git a/engines/titanic/game/gondolier/gondolier_mixer.cpp b/engines/titanic/game/gondolier/gondolier_mixer.cpp index 26deda8bca..fc71ddd357 100644 --- a/engines/titanic/game/gondolier/gondolier_mixer.cpp +++ b/engines/titanic/game/gondolier/gondolier_mixer.cpp @@ -73,7 +73,7 @@ bool CGondolierMixer::EnterRoomMsg(CEnterRoomMsg *msg) { CTurnOn onMsg; onMsg.execute(this); } - + return true; } diff --git a/engines/titanic/game/gondolier/gondolier_slider.cpp b/engines/titanic/game/gondolier/gondolier_slider.cpp index e7a46eb33d..e7ca61de9c 100644 --- a/engines/titanic/game/gondolier/gondolier_slider.cpp +++ b/engines/titanic/game/gondolier/gondolier_slider.cpp @@ -190,7 +190,7 @@ bool CGondolierSlider::FrameMsg(CFrameMsg *msg) { int yp = 0; if (_arrayIndex > 0) yp = ARRAY[_arrayIndex] - ARRAY[_arrayIndex - 1]; - + if (!_string2.empty()) { CTranslateObjectMsg transMsg; transMsg._delta = Point(0, yp); diff --git a/engines/titanic/game/head_slot.cpp b/engines/titanic/game/head_slot.cpp index f7df02d364..06c366abd6 100644 --- a/engines/titanic/game/head_slot.cpp +++ b/engines/titanic/game/head_slot.cpp @@ -87,9 +87,9 @@ bool CHeadSlot::AddHeadPieceMsg(CAddHeadPieceMsg *msg) { } bool CHeadSlot::SenseWorkingMsg(CSenseWorkingMsg *msg) { - if (_fieldEC) + if (_fieldEC) playMovie(_fieldE4, _fieldE8, 0); - + _string1 = msg->_value; _fieldEC = false; return true; diff --git a/engines/titanic/game/idle_summoner.cpp b/engines/titanic/game/idle_summoner.cpp index 5ca3209e28..0e3604a4a9 100644 --- a/engines/titanic/game/idle_summoner.cpp +++ b/engines/titanic/game/idle_summoner.cpp @@ -82,7 +82,7 @@ bool CIdleSummoner::TimerMsg(CTimerMsg *msg) { int region = talkGetDialRegion("BellBot", 1); uint delay = region == 1 ? 15000 : 12000; uint enterTicks = MIN(getNodeEnterTicks(), _ticks); - + CString name; uint ticks = getTicksCount() - enterTicks; if (ticks > delay) { diff --git a/engines/titanic/game/light_switch.cpp b/engines/titanic/game/light_switch.cpp index 188691033a..6badf63b5b 100644 --- a/engines/titanic/game/light_switch.cpp +++ b/engines/titanic/game/light_switch.cpp @@ -40,7 +40,7 @@ END_MESSAGE_MAP() bool CLightSwitch::_flag; -CLightSwitch::CLightSwitch() : CBackground(), +CLightSwitch::CLightSwitch() : CBackground(), _fieldE0(0), _fieldE4(0), _fieldE8(0) { } diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp index 6f47131716..8f7845bc3f 100644 --- a/engines/titanic/game/missiveomat.cpp +++ b/engines/titanic/game/missiveomat.cpp @@ -96,7 +96,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) { if (editMsg._param == 1000) { editMsg._mode = 3; editMsg.execute(loginControl); - + _string1 = editMsg._text; if (!_string1.empty()) { loadFrame(2); @@ -222,7 +222,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) { CString *strP = &_messages[_personIndex * 19]; for (_totalMessages = 0; !strP->empty(); ++strP, ++_totalMessages) ; - + CMissiveOMatActionMsg actionMsg; actionMsg._action = REDRAW_MESSAGE; actionMsg.execute(this); @@ -237,7 +237,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) { actionMsg.execute(this); } break; - + case PRIOR_MESSAGE: if (_messageNum > 0) { --_messageNum; diff --git a/engines/titanic/game/movie_tester.h b/engines/titanic/game/movie_tester.h index 17a7d489d8..60eacee7e9 100644 --- a/engines/titanic/game/movie_tester.h +++ b/engines/titanic/game/movie_tester.h @@ -45,6 +45,14 @@ public: * Load the data for the class from file */ virtual void load(SimpleFile *file); + + /** + * Loads a movie + */ + void loadMovie(const CString &name, bool pendingFlag = true) { + CGameObject::loadMovie(name, pendingFlag); + _surface->flipVertically(); + } }; } // End of namespace Titanic diff --git a/engines/titanic/game/music_console_button.cpp b/engines/titanic/game/music_console_button.cpp index dc86765476..40492aafe4 100644 --- a/engines/titanic/game/music_console_button.cpp +++ b/engines/titanic/game/music_console_button.cpp @@ -56,7 +56,7 @@ bool CMusicConsoleButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { CMusicHasStartedMsg startedMsg; startedMsg.execute("Music Room Phonograph"); - + if (CMusicRoom::_musicHandler->checkSound(1) && CMusicRoom::_musicHandler->checkSound(2) && CMusicRoom::_musicHandler->checkSound(3)) { @@ -82,7 +82,7 @@ bool CMusicConsoleButton::LeaveViewMsg(CLeaveViewMsg *msg) { bool CMusicConsoleButton::SetMusicControlsMsg(CSetMusicControlsMsg *msg) { CMusicRoom *musicRoom = getMusicRoom(); CQueryMusicControlSettingMsg queryMsg; - + queryMsg.execute("Bells Mute Control"); musicRoom->setMuteControl(BELLS, queryMsg._value == 1 ? 1 : 0); queryMsg.execute("Bells Pitch Control"); diff --git a/engines/titanic/game/nav_helmet.cpp b/engines/titanic/game/nav_helmet.cpp index 96411ad6b7..3e2a38486d 100644 --- a/engines/titanic/game/nav_helmet.cpp +++ b/engines/titanic/game/nav_helmet.cpp @@ -100,7 +100,7 @@ bool CNavHelmet::PETHelmetOnOffMsg(CPETHelmetOnOffMsg *msg) { playSound("a#48.wav"); playSound("a#47.wav"); } - + return true; } diff --git a/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp b/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp index 2654042967..69fc629606 100644 --- a/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp +++ b/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp @@ -35,7 +35,7 @@ BEGIN_MESSAGE_MAP(CParrotNutBowlActor, CGameObject) ON_MESSAGE(NutPuzzleMsg) END_MESSAGE_MAP() -CParrotNutBowlActor::CParrotNutBowlActor() : CGameObject(), +CParrotNutBowlActor::CParrotNutBowlActor() : CGameObject(), _puzzleDone(0), _state(0) { } @@ -43,7 +43,7 @@ void CParrotNutBowlActor::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_puzzleDone, indent); file->writeNumberLine(_state, indent); - + CGameObject::save(file, indent); } diff --git a/engines/titanic/game/parrot/parrot_nut_eater.cpp b/engines/titanic/game/parrot/parrot_nut_eater.cpp index 751da931ac..49b8de509f 100644 --- a/engines/titanic/game/parrot/parrot_nut_eater.cpp +++ b/engines/titanic/game/parrot/parrot_nut_eater.cpp @@ -39,7 +39,7 @@ CParrotNutEater::CParrotNutEater() : CGameObject(), _fieldBC(0), void CParrotNutEater::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_fieldBC, indent); - + CGameObject::save(file, indent); } diff --git a/engines/titanic/game/place_holder_item.cpp b/engines/titanic/game/place_holder_item.cpp index ecd9c9a10b..108c25ced8 100644 --- a/engines/titanic/game/place_holder_item.cpp +++ b/engines/titanic/game/place_holder_item.cpp @@ -44,7 +44,7 @@ void CPlaceHolderItem::save(SimpleFile *file, int indent) { file->writePoint(_pos1, indent); file->writePoint(_pos2, indent); file->writeQuotedLine(_string1, indent); - + CNamedItem::save(file, indent); } @@ -89,7 +89,7 @@ void CPlaceHolderItem::load(SimpleFile *file) { default: break; } - + CNamedItem::load(file); } diff --git a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h index 8ad3dcb8d1..25613643ea 100644 --- a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h +++ b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h @@ -37,7 +37,7 @@ private: public: CLASSDEF; CBarShelfVisCentre() : CPlaceHolder(), _flag(false) {} - + /** * Save the data for the class to file */ diff --git a/engines/titanic/game/restaurant_cylinder_holder.cpp b/engines/titanic/game/restaurant_cylinder_holder.cpp index 8726d1a925..adf029d8f7 100644 --- a/engines/titanic/game/restaurant_cylinder_holder.cpp +++ b/engines/titanic/game/restaurant_cylinder_holder.cpp @@ -121,7 +121,7 @@ bool CRestaurantCylinderHolder::MovieEndMsg(CMovieEndMsg *msg) { bool CRestaurantCylinderHolder::QueryCylinderHolderMsg(CQueryCylinderHolderMsg *msg) { CNamedItem *cylinder = findByName("Phonograph Cylinder", true); - msg->_value1 = _field118; + msg->_value1 = _field118; if (cylinder) { msg->_value2 = 1; msg->_target = cylinder; diff --git a/engines/titanic/game/sauce_dispensor.cpp b/engines/titanic/game/sauce_dispensor.cpp index 410d4a3153..7010d00be1 100644 --- a/engines/titanic/game/sauce_dispensor.cpp +++ b/engines/titanic/game/sauce_dispensor.cpp @@ -67,7 +67,7 @@ void CSauceDispensor::load(SimpleFile *file) { bool CSauceDispensor::Use(CUse *msg) { CVisibleMsg visibleMsg(true); - + if (msg->_item->isEquals("Chicken")) { CChicken *chicken = static_cast<CChicken *>(msg->_item); _field104 = true; @@ -113,7 +113,7 @@ bool CSauceDispensor::Use(CUse *msg) { CActMsg actMsg(_string3); actMsg.execute("BeerGlass"); - } + } } return true; diff --git a/engines/titanic/game/service_elevator_window.cpp b/engines/titanic/game/service_elevator_window.cpp index b0cc53abb4..13db7a26f8 100644 --- a/engines/titanic/game/service_elevator_window.cpp +++ b/engines/titanic/game/service_elevator_window.cpp @@ -69,7 +69,7 @@ bool CServiceElevatorWindow::ServiceElevatorFloorChangeMsg(CServiceElevatorFloor int count = _endFrame - _startFrame; setMovieFrameRate(1.0 * count / val); - + int startFrame = clip->_startFrame + count * FACTORS[msg->_value1] / 100; int endFrame = clip->_startFrame + count * FACTORS[msg->_value2] / 100; @@ -107,7 +107,7 @@ bool CServiceElevatorWindow::EnterViewMsg(CEnterViewMsg *msg) { loadFrame(0); } } - + return true; } diff --git a/engines/titanic/game/sgt/chest_of_drawers.cpp b/engines/titanic/game/sgt/chest_of_drawers.cpp index d9c72d3021..2db26addf5 100644 --- a/engines/titanic/game/sgt/chest_of_drawers.cpp +++ b/engines/titanic/game/sgt/chest_of_drawers.cpp @@ -58,7 +58,7 @@ bool CChestOfDrawers::TurnOff(CTurnOff *msg) { visibleMsg.execute("Drawer"); _statics->_v6 = "Closed"; _fieldE0 = true; - + _startFrame = 14; _endFrame = 27; playMovie(14, 27, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp index 780f92b5ad..571ebcd6fa 100644 --- a/engines/titanic/game/television.cpp +++ b/engines/titanic/game/television.cpp @@ -137,7 +137,7 @@ bool CTelevision::ChangeSeasonMsg(CChangeSeasonMsg *msg) { _v3 = 0; } - return true; + return true; } bool CTelevision::EnterViewMsg(CEnterViewMsg *msg) { @@ -219,7 +219,7 @@ bool CTelevision::PETActivateMsg(CPETActivateMsg *msg) { stopMovie(); if (isSoundActive(_soundHandle)) stopSound(_soundHandle, 0); - + setVisible(false); } diff --git a/engines/titanic/game/transport/lift_indicator.cpp b/engines/titanic/game/transport/lift_indicator.cpp index 10d62a0775..a642451fe0 100644 --- a/engines/titanic/game/transport/lift_indicator.cpp +++ b/engines/titanic/game/transport/lift_indicator.cpp @@ -150,7 +150,7 @@ bool CLiftindicator::PETActivateMsg(CPETActivateMsg *msg) { petDisplayMessage(1, BOT_BLOCKING_ELEVATOR); } else { _endFrame = pet->getRoomsFloorNum(); - + if (petGetRoomsWellEntry() == 4 && !CLift::_v6 && pet->getRoomsFloorNum() != CLift::_elevator4Floor) { petDisplayMessage(1, ELEVATOR_NON_FUNCTIONAL); diff --git a/engines/titanic/game/transport/service_elevator.cpp b/engines/titanic/game/transport/service_elevator.cpp index 1980825cb6..066a418dbb 100644 --- a/engines/titanic/game/transport/service_elevator.cpp +++ b/engines/titanic/game/transport/service_elevator.cpp @@ -24,7 +24,7 @@ #include "titanic/core/room_item.h" #include "titanic/npcs/doorbot.h" -namespace Titanic { +namespace Titanic { BEGIN_MESSAGE_MAP(CServiceElevator, CTransport) ON_MESSAGE(BodyInBilgeRoomMsg) @@ -182,7 +182,7 @@ bool CServiceElevator::TimerMsg(CTimerMsg *msg) { else if (_v3 == 1) actMsg._action = "DoorbotPlayerPressedMiddleButton"; - actMsg.execute(doorbot); + actMsg.execute(doorbot); } } } diff --git a/engines/titanic/game/variable_list.cpp b/engines/titanic/game/variable_list.cpp index 1ddf1bc957..2a4a7df961 100644 --- a/engines/titanic/game/variable_list.cpp +++ b/engines/titanic/game/variable_list.cpp @@ -33,7 +33,7 @@ void CVariableListItem::save(SimpleFile *file, int indent) { file->writeQuotedLine(_string2, indent); file->writeQuotedLine(_string3, indent); file->writeQuotedLine(_string4, indent); - + ListItem::save(file, indent); } @@ -66,7 +66,7 @@ void CVariableListItem::load(SimpleFile *file) { _field40 = field40; _field44 = field44; - + ListItem::load(file); } diff --git a/engines/titanic/game_location.cpp b/engines/titanic/game_location.cpp index 3a1d0c9e48..1e4e067f70 100644 --- a/engines/titanic/game_location.cpp +++ b/engines/titanic/game_location.cpp @@ -52,7 +52,7 @@ void CGameLocation::load(SimpleFile *file) { void CGameLocation::setView(CViewItem *view) { if (_view) { - for (CTreeItem *treeItem = _view; treeItem; + for (CTreeItem *treeItem = _view; treeItem; treeItem = treeItem->scan(_view)) { CGameObject *obj = dynamic_cast<CGameObject *>(treeItem); if (obj) diff --git a/engines/titanic/game_manager.cpp b/engines/titanic/game_manager.cpp index 7d9dc37a10..6023244325 100644 --- a/engines/titanic/game_manager.cpp +++ b/engines/titanic/game_manager.cpp @@ -32,11 +32,11 @@ namespace Titanic { CGameManager::CGameManager(CProjectItem *project, CGameView *gameView, Audio::Mixer *mixer): _project(project), _gameView(gameView), _trueTalkManager(this), - _inputHandler(this), _inputTranslator(&_inputHandler), + _inputHandler(this), _inputTranslator(&_inputHandler), _gameState(this), _sound(this, mixer), _musicRoom(this), _treeItem(nullptr), _soundMaker(nullptr), _movieRoom(nullptr), _dragItem(nullptr), _field54(0), _lastDiskTicksCount(0), _tickCount2(0) { - + CTimeEventInfo::_nextId = 0; _movie = nullptr; _movieSurface = CScreenManager::_screenManagerPtr->createSurface(600, 340); @@ -95,7 +95,7 @@ void CGameManager::postLoad(CProjectItem *project) { _gameView->setView(view); } } - + // Signal to anything interested that the game has been loaded CLoadSuccessMsg msg(_lastDiskTicksCount - _tickCount2); msg.execute(project, nullptr, MSGFLAG_SCAN); @@ -188,7 +188,7 @@ void CGameManager::update() { CTextCursor *textCursor = screenManager->_textCursor; if (textCursor && textCursor->_active) _bounds.extend(textCursor->getCursorBounds()); - + // Set the surface bounds screenManager->setSurfaceBounds(SURFACE_BACKBUFFER, _bounds); diff --git a/engines/titanic/game_manager.h b/engines/titanic/game_manager.h index 262ea0169b..1671517e07 100644 --- a/engines/titanic/game_manager.h +++ b/engines/titanic/game_manager.h @@ -196,7 +196,7 @@ public: /** * Flags whether the timer will be persisent across save & loads */ - void setTimerPersisent(uint id, bool flag) { + void setTimerPersisent(uint id, bool flag) { _timers.setPersisent(id, flag); } diff --git a/engines/titanic/game_state.cpp b/engines/titanic/game_state.cpp index 8814dba831..ea94deec35 100644 --- a/engines/titanic/game_state.cpp +++ b/engines/titanic/game_state.cpp @@ -89,7 +89,7 @@ void CGameState::setMode(GameStateMode newMode) { } else if (newMode != GSMODE_CUTSCENE && newMode != _mode) { if (sm && sm->_mouseCursor) sm->_mouseCursor->show(); - + if (_gameManager) _gameManager->unlockInputHandler(); } diff --git a/engines/titanic/game_state.h b/engines/titanic/game_state.h index 70d47b55c1..77b4ded79f 100644 --- a/engines/titanic/game_state.h +++ b/engines/titanic/game_state.h @@ -33,7 +33,7 @@ namespace Titanic { class CGameManager; -enum GameStateMode { +enum GameStateMode { GSMODE_NONE = 0, GSMODE_INTERACTIVE = 1, GSMODE_CUTSCENE = 2, GSMODE_3 = 3, GSMODE_4 = 4, GSMODE_INSERT_CD = 5, GSMODE_PENDING_LOAD = 6 }; diff --git a/engines/titanic/game_view.cpp b/engines/titanic/game_view.cpp index cb84b6a3b1..d155812390 100644 --- a/engines/titanic/game_view.cpp +++ b/engines/titanic/game_view.cpp @@ -58,7 +58,7 @@ void CGameView::createSurface(const CResourceKey &key) { _gameManager->initBounds(); delete _surface; _surface = nullptr; - + // Create a fresh surface CScreenManager::setCurrent(); _surface = CScreenManager::_currentScreenManagerPtr->createSurface(key); diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index 29e800bc7a..e17d72b472 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -57,7 +57,7 @@ public: * Set the currently active view */ virtual void setView(CViewItem *item) = 0; - + virtual void draw(const Rect &bounds) = 0; /** diff --git a/engines/titanic/gfx/send_to_succ.h b/engines/titanic/gfx/send_to_succ.h index 734c4a7db3..201735385d 100644 --- a/engines/titanic/gfx/send_to_succ.h +++ b/engines/titanic/gfx/send_to_succ.h @@ -32,7 +32,7 @@ class CSendToSucc : public CToggleSwitch { public: CLASSDEF; CSendToSucc(); - + /** * Save the data for the class to file */ diff --git a/engines/titanic/input_handler.cpp b/engines/titanic/input_handler.cpp index df09cf24fb..9fa2b0073c 100644 --- a/engines/titanic/input_handler.cpp +++ b/engines/titanic/input_handler.cpp @@ -164,7 +164,7 @@ CGameObject *CInputHandler::dragEnd(const Point &pt, CTreeItem *dragItem) { if (target) { // Check if the cursor is on the PET. If so, pass to the PET // to see what specific element the drag ended on - CProjectItem *project = view->getRoot(); + CProjectItem *project = view->getRoot(); if (project) { CPetControl *petControl = project->getPetControl(); if (petControl && petControl->contains(pt)) { diff --git a/engines/titanic/main_game_window.cpp b/engines/titanic/main_game_window.cpp index 690acdc25f..80da792e4a 100644 --- a/engines/titanic/main_game_window.cpp +++ b/engines/titanic/main_game_window.cpp @@ -130,14 +130,14 @@ int CMainGameWindow::selectSavegame() { void CMainGameWindow::setActiveView(CViewItem *viewItem) { _gameManager->_gameState._gameLocation.setView(viewItem); - + CResourceKey key; if (viewItem->getResourceKey(&key)) { // Create a surface based on the key _gameView->createSurface(key); } } - + void CMainGameWindow::draw() { if (_gameManager) { if (!_gameView->_surface) { diff --git a/engines/titanic/messages/messages.cpp b/engines/titanic/messages/messages.cpp index 5f587c975d..a8507063ff 100644 --- a/engines/titanic/messages/messages.cpp +++ b/engines/titanic/messages/messages.cpp @@ -91,7 +91,7 @@ const MSGMAP_ENTRY *CMessage::findMapEntry(const CTreeItem *treeItem, const Clas for (const ClassDef *entryDef = entry->_class; entryDef; entryDef = entryDef->_parent) { if (entryDef == classDef) return entry; - } + } } } diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h index 4fc4067a1a..b421e8ecb8 100644 --- a/engines/titanic/messages/messages.h +++ b/engines/titanic/messages/messages.h @@ -29,7 +29,7 @@ namespace Titanic { -enum MessageFlag { +enum MessageFlag { MSGFLAG_SCAN = 1, MSGFLAG_BREAK_IF_HANDLED = 2, MSGFLAG_CLASS_DEF = 4 diff --git a/engines/titanic/messages/mouse_messages.cpp b/engines/titanic/messages/mouse_messages.cpp index 18fa625c1c..888ca36187 100644 --- a/engines/titanic/messages/mouse_messages.cpp +++ b/engines/titanic/messages/mouse_messages.cpp @@ -29,7 +29,7 @@ namespace Titanic { void CMouseButtonDownMsg::generate() { CInputHandler &inputHandler = *CScreenManager::_screenManagerPtr->_inputHandler; const Point &mousePos = inputHandler._mousePos; - + CMouseButtonDownMsg msg(mousePos, MB_LEFT); inputHandler.handleMessage(msg, false); } diff --git a/engines/titanic/messages/mouse_messages.h b/engines/titanic/messages/mouse_messages.h index e7c419bbdc..a10f3b42a8 100644 --- a/engines/titanic/messages/mouse_messages.h +++ b/engines/titanic/messages/mouse_messages.h @@ -157,7 +157,7 @@ public: public: CLASSDEF; CPassOnDragStartMsg() : CMessage() {} - CPassOnDragStartMsg(const Point &pt, int v3 = 0, int v4 = 0) : + CPassOnDragStartMsg(const Point &pt, int v3 = 0, int v4 = 0) : CMessage(), _mousePos(pt), _value3(v3), _value4(v4) {} static bool isSupportedBy(const CTreeItem *item) { diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 377a22fbf8..e802456c5a 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -474,6 +474,7 @@ MODULE_OBJS := \ support/movie_range_info.o \ support/movie_manager.o \ support/credit_text.o \ + support/transparency_surface.o \ support/rect.o \ support/screen_manager.o \ support/simple_file.o \ diff --git a/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp b/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp index c7e16ef84e..6d1951b72b 100644 --- a/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp +++ b/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp @@ -63,7 +63,7 @@ bool CEnterExitSecClassMiniLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { _statics->_viewName = getRoomNodeName() + ".W"; changeView("SecClassLittleLift.Node 1.E"); _statics->_state = 1; - + CPetControl *pet = getPetControl(); if (pet) { pet->setRoomsRoomNum(_roomNum); diff --git a/engines/titanic/moves/enter_exit_sec_class_mini_lift.h b/engines/titanic/moves/enter_exit_sec_class_mini_lift.h index 839d2c04fa..a16122a591 100644 --- a/engines/titanic/moves/enter_exit_sec_class_mini_lift.h +++ b/engines/titanic/moves/enter_exit_sec_class_mini_lift.h @@ -46,7 +46,7 @@ public: CEnterExitSecClassMiniLift() : CGameObject(), _roomNum(0) {} static void init(); static void deinit(); - + /** * Save the data for the class to file */ diff --git a/engines/titanic/moves/enter_exit_view.cpp b/engines/titanic/moves/enter_exit_view.cpp index 6778ebb52a..a3f01f981a 100644 --- a/engines/titanic/moves/enter_exit_view.cpp +++ b/engines/titanic/moves/enter_exit_view.cpp @@ -31,7 +31,7 @@ BEGIN_MESSAGE_MAP(CEnterExitView, CGameObject) END_MESSAGE_MAP() CEnterExitView::CEnterExitView() : CGameObject(), _leaveEndFrame(0), - _leaveStartFrame(0), _enterEndFrame(0), _enterStartFrame(0), + _leaveStartFrame(0), _enterEndFrame(0), _enterStartFrame(0), _visibleAfterMovie(true) { } diff --git a/engines/titanic/moves/exit_arboretum.cpp b/engines/titanic/moves/exit_arboretum.cpp index ba162843b5..3c1591c393 100644 --- a/engines/titanic/moves/exit_arboretum.cpp +++ b/engines/titanic/moves/exit_arboretum.cpp @@ -32,7 +32,7 @@ BEGIN_MESSAGE_MAP(CExitArboretum, CMovePlayerTo) ON_MESSAGE(TurnOff) END_MESSAGE_MAP() -CExitArboretum::CExitArboretum() : CMovePlayerTo(), +CExitArboretum::CExitArboretum() : CMovePlayerTo(), _seasonNum(0), _fieldCC(0), _enabled(true) { } diff --git a/engines/titanic/moves/exit_pellerator.cpp b/engines/titanic/moves/exit_pellerator.cpp index 3140d90b4c..3d1438a942 100644 --- a/engines/titanic/moves/exit_pellerator.cpp +++ b/engines/titanic/moves/exit_pellerator.cpp @@ -61,7 +61,7 @@ void CExitPellerator::load(SimpleFile *file) { bool CExitPellerator::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { CString name = getName(); - + if (name == "ExitPellerator") { if (_statics->_v2 != 2) { switch (getRandomNumber(2)) { diff --git a/engines/titanic/npcs/barbot.cpp b/engines/titanic/npcs/barbot.cpp index 2524a835f8..791adaa05c 100644 --- a/engines/titanic/npcs/barbot.cpp +++ b/engines/titanic/npcs/barbot.cpp @@ -142,7 +142,7 @@ void CBarbot::load(SimpleFile *file) { _field158 = file->readNumber(); _field15C = file->readNumber(); _field160 = file->readNumber(); - + CTrueTalkNPC::load(file); } @@ -179,7 +179,7 @@ bool CBarbot::ActMsg(CActMsg *msg) { statusMsg._newStatus = 2; statusMsg.execute("PickUpGlass"); _field158 = 3; - + playRange(_frames[32], MOVIE_NOTIFY_OBJECT); playRange(_frames[30], MOVIE_NOTIFY_OBJECT); _frameNum = _frames[30]._endFrame; @@ -317,7 +317,7 @@ bool CBarbot::TurnOn(CTurnOn *msg) { playRange(_frames[23], MOVIE_NOTIFY_OBJECT); playRange(_frames[21], MOVIE_NOTIFY_OBJECT); _frameNum = _frames[21]._endFrame; - + switch (g_vm->getRandomNumber(2)) { case 0: playRange(_frames[10], MOVIE_NOTIFY_OBJECT); @@ -575,7 +575,7 @@ bool CBarbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) { } bool CBarbot::FrameMsg(CFrameMsg *msg) { - if (!_fieldC4 || _frameNum != -1 || _field148 != -1 + if (!_fieldC4 || _frameNum != -1 || _field148 != -1 || (msg->_ticks - _field14C) <= 5000 || (msg->_ticks - _field150) <= 1000) return true; @@ -611,7 +611,7 @@ bool CBarbot::FrameMsg(CFrameMsg *msg) { playRange(_frames[1], MOVIE_NOTIFY_OBJECT); _field148 = _frames[1]._endFrame; break; - + case 4: playRange(_frames[3], MOVIE_NOTIFY_OBJECT); _field148 = _frames[3]._endFrame; diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp index 0170491270..7aa32eeef3 100644 --- a/engines/titanic/npcs/bellbot.cpp +++ b/engines/titanic/npcs/bellbot.cpp @@ -74,7 +74,7 @@ bool CBellBot::OnSummonBotMsg(COnSummonBotMsg *msg) { { "MusicRoomLobby", "z#192.wav" }, { "1stClassRestaurant", "z#190.wav" } }; - + int idx; for (idx = 0; idx < 8; ++idx) { if (compareRoomNameTo(ROOM_WAVES[idx][0])) { diff --git a/engines/titanic/npcs/callbot.cpp b/engines/titanic/npcs/callbot.cpp index 4af9876b35..0979fa46f6 100644 --- a/engines/titanic/npcs/callbot.cpp +++ b/engines/titanic/npcs/callbot.cpp @@ -57,7 +57,7 @@ bool CCallBot::TurnOn(CTurnOn *msg) { bool CCallBot::EnterViewMsg(CEnterViewMsg *msg) { if (_enabled) { CRoomItem *room = getRoom(); - + if (room) { CSummonBotQueryMsg queryMsg; queryMsg._npcName = _npcName; diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp index 8f1fc28e20..c5032f1674 100644 --- a/engines/titanic/npcs/deskbot.cpp +++ b/engines/titanic/npcs/deskbot.cpp @@ -94,7 +94,7 @@ bool CDeskbot::EnterViewMsg(CEnterViewMsg *msg) { _deskbotActive = false; _fieldC4 = 0; loadFrame(625); - + return true; } @@ -264,7 +264,7 @@ bool CDeskbot::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *m default: break; } - + return true; } diff --git a/engines/titanic/npcs/maitre_d.cpp b/engines/titanic/npcs/maitre_d.cpp index 09444f5611..658b7c7123 100644 --- a/engines/titanic/npcs/maitre_d.cpp +++ b/engines/titanic/npcs/maitre_d.cpp @@ -156,7 +156,7 @@ bool CMaitreD::NPCPlayTalkingAnimationMsg(CNPCPlayTalkingAnimationMsg *msg) { if (msg->_value2 != 2) { msg->_names = NAMES; - + CAnimateMaitreDMsg animMsg; if (_field12C) animMsg._value = 0; diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp index 6e7aa4ec57..358a86686f 100644 --- a/engines/titanic/npcs/parrot.cpp +++ b/engines/titanic/npcs/parrot.cpp @@ -116,13 +116,13 @@ CParrot::CParrot() : CTrueTalkNPC() { void CParrot::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_assetNumber, indent); - + file->writeQuotedLine(_assetName, indent); file->writeNumberLine(_field108, indent); file->writeNumberLine(_v1, indent); file->writeNumberLine(_v2, indent); file->writeNumberLine(_v3, indent); - + file->writeQuotedLine(_string2, indent); file->writeNumberLine(_field118, indent); file->writeNumberLine(_field11C, indent); @@ -581,7 +581,7 @@ bool CParrot::FrameMsg(CFrameMsg *msg) { actMsg.execute(_field134); } - _npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000 + _npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000 | NPCFLAG_80000 | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_400000); return true; } diff --git a/engines/titanic/npcs/parrot_succubus.cpp b/engines/titanic/npcs/parrot_succubus.cpp index d285c219b5..657bde5b66 100644 --- a/engines/titanic/npcs/parrot_succubus.cpp +++ b/engines/titanic/npcs/parrot_succubus.cpp @@ -34,7 +34,7 @@ BEGIN_MESSAGE_MAP(CParrotSuccUBus, CSuccUBus) ON_MESSAGE(LeaveNodeMsg) END_MESSAGE_MAP() -CParrotSuccUBus::CParrotSuccUBus() : CSuccUBus(), _field1DC(0), +CParrotSuccUBus::CParrotSuccUBus() : CSuccUBus(), _field1DC(0), _field1EC(0), _field1F0(376), _field1F4(393) { } @@ -43,7 +43,7 @@ void CParrotSuccUBus::save(SimpleFile *file, int indent) { file->writeNumberLine(_field1DC, indent); file->writeQuotedLine(_string3, indent); file->writeNumberLine(_field1EC, indent); - + CSuccUBus::save(file, indent); } diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp index 453f016757..6db8c8d798 100644 --- a/engines/titanic/npcs/succubus.cpp +++ b/engines/titanic/npcs/succubus.cpp @@ -183,7 +183,7 @@ void CSuccUBus::load(SimpleFile *file) { _startFrame2 = file->readNumber(); _endFrame2 = file->readNumber(); _field140 = file->readNumber(); - + _v2 = file->readNumber(); _startFrame5 = file->readNumber(); _endFrame5 = file->readNumber(); @@ -282,7 +282,7 @@ bool CSuccUBus::SubAcceptCCarryMsg(CSubAcceptCCarryMsg *msg) { CChicken *chicken = dynamic_cast<CChicken *>(item); bool chickenFlag = chicken ? chicken->_string6 != "None" : false; - + item->setVisible(false); if (_startFrame1 >= 0) { playSound("z#23.wav"); @@ -353,7 +353,7 @@ bool CSuccUBus::LeaveViewMsg(CLeaveViewMsg *msg) { _enabled = false; if (_startFrame10 >= 0) playSound("z#27.wav", 100); - + if (_field15C) setVisible(false); } @@ -397,7 +397,7 @@ bool CSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) { petDisplayMessage(2, NOTHING_IN_SUCCUBUS_TRAY); } else { _field19C = 0; - + CRoomFlags roomFlags = _roomFlags; if (!pet->testRooms5(roomFlags) || getPassengerClass() > 0) { roomFlags = pet->getSpecialRoomFlags("BilgeRoom"); @@ -512,7 +512,7 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { if (msg->_endFrame == _endFrame10) { if (_startFrame11 >= 0) playSound("z#30.wav", 100); - + if (_field15C) { _field15C = false; setVisible(false); diff --git a/engines/titanic/npcs/titania.cpp b/engines/titanic/npcs/titania.cpp index 000595f6b7..aa92ddd166 100644 --- a/engines/titanic/npcs/titania.cpp +++ b/engines/titanic/npcs/titania.cpp @@ -159,7 +159,7 @@ bool CTitania::ActMsg(CActMsg *msg) { CSenseWorkingMsg workingMsg2("Not Working"); CSenseWorkingMsg workingMsg3("Not Working"); CSenseWorkingMsg workingMsg4("Not Working"); - + if (_eye1 && _eye2) { workingMsg1._value = _visionCentre ? "Working" : "Random"; } @@ -201,10 +201,10 @@ bool CTitania::EnterViewMsg(CEnterViewMsg *msg) { _showIntro = false; disableMouse(); petHide(); - + CSetFrameMsg frameMsg; frameMsg._frameNumber = 25; - frameMsg.execute("Bomb"); + frameMsg.execute("Bomb"); playCutscene(0, 52); setVisible(false); diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index 95438ce81e..4cdab24f6d 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -42,7 +42,7 @@ BEGIN_MESSAGE_MAP(CPetControl, CGameObject) ON_MESSAGE(TimerMsg) END_MESSAGE_MAP() -CPetControl::CPetControl() : CGameObject(), +CPetControl::CPetControl() : CGameObject(), _currentArea(PET_CONVERSATION), _inputLockCount(0), _areaLockCount(0), _areaChangeType(-1), _activeNPC(nullptr), _remoteTarget(nullptr), _hiddenRoom(nullptr), _drawBounds(20, 350, 620, 480) { @@ -68,12 +68,12 @@ void CPetControl::save(SimpleFile *file, int indent) { void CPetControl::load(SimpleFile *file) { int val = file->readNumber(); isValid(); - + if (!val) { _currentArea = (PetArea)file->readNumber(); _activeNPCName = file->readString(); _remoteTargetName = file->readString(); - + loadAreas(file, 0); } @@ -93,7 +93,7 @@ void CPetControl::setup() { bool CPetControl::isValid() { return _conversations.isValid(this) && - _rooms.isValid(this) && + _rooms.isValid(this) && _remote.isValid(this) && _inventory.isValid(this) && _starfield.isValid(this) && @@ -427,7 +427,7 @@ void CPetControl::addToInventory(CGameObject *item) { setArea(PET_INVENTORY); if (_currentArea == PET_INVENTORY) _inventory.highlightItem(item); - + makeDirty(); CPETGainedObjectMsg msg; msg.execute(item); @@ -471,7 +471,7 @@ bool CPetControl::checkNode(const CString &name) { return true; if (name == "NULL") return false; - + CViewItem *view = gameManager->getView(); if (!view) return true; @@ -558,7 +558,7 @@ bool CPetControl::isBotInView(const CString &name) const { CViewItem *view = gameManager->getView(); if (!view) return false; - + // Iterate to find NPC for (CTreeItem *child = view->getFirstChild(); child; child = child->scan(view)) { CGameObject *gameObject = dynamic_cast<CGameObject *>(child); diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index 454fc0991b..d42dff598c 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -340,12 +340,12 @@ public: * Returns true if all input is currently locked (disabled) */ bool isInputLocked() const { return _inputLockCount > 0; } - + /** * Increments the input locked count */ void incInputLocks() { ++_inputLockCount; } - + /** * Decremenst the input locked count */ @@ -364,7 +364,7 @@ public: /** * Decrement the number of PET area (tab) locks */ - void decAreaLocks() { + void decAreaLocks() { _areaLockCount = MAX(_areaLockCount - 1, 0); } diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp index 173c586fc1..58dcd57384 100644 --- a/engines/titanic/pet_control/pet_conversations.cpp +++ b/engines/titanic/pet_control/pet_conversations.cpp @@ -60,7 +60,7 @@ bool CPetConversations::reset() { _dials[0].setup(MODE_UNSELECTED, "3PetDial1", _petControl); _dials[1].setup(MODE_UNSELECTED, "3PetDial2", _petControl); _dials[2].setup(MODE_UNSELECTED, "3PetDial3", _petControl); - + _dialBackground.reset("PetDialBack", _petControl); _scrollUp.reset("PetScrollUp", _petControl); _scrollDown.reset("PetScrollDown", _petControl); @@ -334,7 +334,7 @@ bool CPetConversations::setupControl(CPetControl *petControl) { _dialBackground.setBounds(Rect(0, 0, 21, 130)); _dialBackground.translate(20, 350); - + const Rect rect1(0, 0, 22, 36); _dials[0].setBounds(rect1); _dials[0].translate(20, 359); diff --git a/engines/titanic/pet_control/pet_conversations.h b/engines/titanic/pet_control/pet_conversations.h index 3333bdc523..efb7db4277 100644 --- a/engines/titanic/pet_control/pet_conversations.h +++ b/engines/titanic/pet_control/pet_conversations.h @@ -136,7 +136,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -146,12 +146,12 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Get the bounds for the section */ virtual Rect getBounds() const; - + /** * Returns true if the object is in a valid state */ @@ -190,7 +190,7 @@ public: * Called when a section is switched to */ virtual void enter(PetArea oldArea); - + /** * Called when a section is being left, to switch to another area */ @@ -220,7 +220,7 @@ public: * Show the text cursor */ virtual void showCursor(); - + /** * Hide the text cursor */ diff --git a/engines/titanic/pet_control/pet_frame.cpp b/engines/titanic/pet_control/pet_frame.cpp index 7375c69436..e8244cf2d7 100644 --- a/engines/titanic/pet_control/pet_frame.cpp +++ b/engines/titanic/pet_control/pet_frame.cpp @@ -97,7 +97,7 @@ bool CPetFrame::setPetControl(CPetControl *petControl) { // Set the bounds of the individual elements _background.setBounds(Rect(20, 350, 620, 480)); _modeBackground.setBounds(Rect(590, 365, 611, 467)); - + // Squares used for holding glyphs in various tabs Rect r(35, 373, 91, 429); for (int idx = 0, xp = 0; idx < TOTAL_GLYPHS; ++idx, xp += 70) { @@ -113,7 +113,7 @@ bool CPetFrame::setPetControl(CPetControl *petControl) { _modeButtons[idx].translate(4, YLIST[idx]); } _modeButtons[PET_AREAS[0]].setMode(MODE_SELECTED); - + const int XLIST[] = { 73, 54, 85, 109, 38, 71 }; for (int idx = 0; idx < 6; ++idx) { _titles[idx].setBounds(Rect(0, 0, 110, 11)); diff --git a/engines/titanic/pet_control/pet_frame.h b/engines/titanic/pet_control/pet_frame.h index d8924e83d3..720112c1c0 100644 --- a/engines/titanic/pet_control/pet_frame.h +++ b/engines/titanic/pet_control/pet_frame.h @@ -53,12 +53,12 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Sets up the section */ virtual bool reset(); - + /** * Handles mouse down messages */ diff --git a/engines/titanic/pet_control/pet_gfx_element.cpp b/engines/titanic/pet_control/pet_gfx_element.cpp index 6022885770..e43c847bb1 100644 --- a/engines/titanic/pet_control/pet_gfx_element.cpp +++ b/engines/titanic/pet_control/pet_gfx_element.cpp @@ -48,7 +48,7 @@ void CPetGfxElement::reset(const CString &name, CPetControl *petControl, PetElem if (!petControl) return; - CString numString(3); + CString numString(3); int classNum = petControl->getPassengerClass(); if (classNum >= 1 && classNum <= 3) { diff --git a/engines/titanic/pet_control/pet_glyphs.h b/engines/titanic/pet_control/pet_glyphs.h index c07cc5ed9a..79e032162c 100644 --- a/engines/titanic/pet_control/pet_glyphs.h +++ b/engines/titanic/pet_control/pet_glyphs.h @@ -77,7 +77,7 @@ public: * Called when the PET area is entered */ virtual void enter() {} - + /** * Called when the PET area is left */ @@ -137,7 +137,7 @@ public: * Handles keypresses */ virtual bool KeyCharMsg(int key) { return false; } - + /** * Handles keypresses */ @@ -162,7 +162,7 @@ public: * Selects a glyph */ virtual void selectGlyph(const Point &topLeft, const Point &pt) {} - + /** * Called when a glyph drag starts */ @@ -195,7 +195,7 @@ public: * Called on a highlighted item when PET area is entered */ virtual bool enterHighlighted() { return false; } - + /** * Called on a highlighted item when PET area is left */ @@ -241,7 +241,7 @@ public: */ bool isHighlighted() const; }; - + class CPetGlyphs : public List<CPetGlyph> { private: /** diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp index 88310459c6..be01146398 100644 --- a/engines/titanic/pet_control/pet_inventory.cpp +++ b/engines/titanic/pet_control/pet_inventory.cpp @@ -53,7 +53,7 @@ void CPetInventory::draw(CScreenManager *screenManager) { _text.draw(screenManager); } -Rect CPetInventory::getBounds() const { +Rect CPetInventory::getBounds() const { return _movie ? _movie->getBounds() : Rect(); } @@ -231,7 +231,7 @@ CGameObject *CPetInventory::getImage(int index) { return _itemGlyphs[index]; } } - + return nullptr; } diff --git a/engines/titanic/pet_control/pet_inventory.h b/engines/titanic/pet_control/pet_inventory.h index 184bb20385..5433feae95 100644 --- a/engines/titanic/pet_control/pet_inventory.h +++ b/engines/titanic/pet_control/pet_inventory.h @@ -64,7 +64,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Sets up the section */ @@ -74,12 +74,12 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Get the bounds for the section */ virtual Rect getBounds() const; - + /** * Called when a general change occurs */ @@ -141,7 +141,7 @@ public: virtual CGameObject *getBackground(int index) const; /** - * + * */ void change(CGameObject *item); diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.h b/engines/titanic/pet_control/pet_inventory_glyphs.h index 0d167c4c98..508db67f2d 100644 --- a/engines/titanic/pet_control/pet_inventory_glyphs.h +++ b/engines/titanic/pet_control/pet_inventory_glyphs.h @@ -63,7 +63,7 @@ public: CGameObject *_background; CGameObject *_image; public: - CPetInventoryGlyph() : _item(nullptr), _field34(1), + CPetInventoryGlyph() : _item(nullptr), _field34(1), _background(nullptr), _image(nullptr) {} CPetInventoryGlyph(CCarry *item, int val) : _item(item), _field34(val), _background(nullptr), _image(nullptr) {} @@ -72,7 +72,7 @@ public: * Called when the PET area is entered */ virtual void enter(); - + /** * Called when the PET area is left */ @@ -97,7 +97,7 @@ public: * Glyph has been shifted to be first visible one */ virtual void glyphFocused(const Point &topLeft, bool flag); - + /** * Called when a glyph drag starts */ @@ -133,7 +133,7 @@ class CInventoryGlyphAction : public CGlyphAction { public: CGameObject *_item; public: - CInventoryGlyphAction(CGameObject *item, GlyphActionMode mode) : + CInventoryGlyphAction(CGameObject *item, GlyphActionMode mode) : CGlyphAction(mode), _item(item) {} }; diff --git a/engines/titanic/pet_control/pet_load.cpp b/engines/titanic/pet_control/pet_load.cpp index 8e2afc727f..3d67cf6d71 100644 --- a/engines/titanic/pet_control/pet_load.cpp +++ b/engines/titanic/pet_control/pet_load.cpp @@ -30,7 +30,7 @@ namespace Titanic { bool CPetLoad::reset() { CPetLoadSave::reset(); - + CPetControl *pet = getPetControl(); if (pet) { setName("PetLoad", pet); diff --git a/engines/titanic/pet_control/pet_load.h b/engines/titanic/pet_control/pet_load.h index 421531974d..5669991b59 100644 --- a/engines/titanic/pet_control/pet_load.h +++ b/engines/titanic/pet_control/pet_load.h @@ -33,7 +33,7 @@ public: * Reset the glyph */ virtual bool reset(); - + /** * Handles mouse button up messages */ diff --git a/engines/titanic/pet_control/pet_load_save.cpp b/engines/titanic/pet_control/pet_load_save.cpp index aebe43551e..136953cab7 100644 --- a/engines/titanic/pet_control/pet_load_save.cpp +++ b/engines/titanic/pet_control/pet_load_save.cpp @@ -76,7 +76,7 @@ void CPetLoadSave::draw2(CScreenManager *screenManager) { bool CPetLoadSave::MouseButtonDownMsg(const Point &pt) { if (_btnLoadSave.MouseButtonDownMsg(pt)) return true; - + checkSlotsHighlight(pt); return false; } @@ -95,7 +95,7 @@ bool CPetLoadSave::KeyCharMsg(int key) { case Common::KEYCODE_UP: case Common::KEYCODE_KP8: if (_savegameSlotNum != -1) { - int slotNum = --_savegameSlotNum; + int slotNum = --_savegameSlotNum; highlightSlot((slotNum == -1) ? SAVEGAME_SLOTS_COUNT - 1 : slotNum); getPetControl()->makeDirty(); } diff --git a/engines/titanic/pet_control/pet_quit.cpp b/engines/titanic/pet_control/pet_quit.cpp index 218ed89812..a6fb22d7e1 100644 --- a/engines/titanic/pet_control/pet_quit.cpp +++ b/engines/titanic/pet_control/pet_quit.cpp @@ -41,7 +41,7 @@ bool CPetQuit::setup(CPetControl *petControl, CPetGlyphs *owner) { Rect btnRect(0, 0, 68, 52); btnRect.moveTo(496, 388); _btnYes.setBounds(btnRect); - + return true; } @@ -52,7 +52,7 @@ bool CPetQuit::reset() { setName("PetExit", pet); - uint col = getPetSection()->getColor(0); + uint col = getPetSection()->getColor(0); _text.setText("Are you sure you want to quit?"); _text.setLineColor(0, col); diff --git a/engines/titanic/pet_control/pet_quit.h b/engines/titanic/pet_control/pet_quit.h index 87d8aefbbf..b775000933 100644 --- a/engines/titanic/pet_control/pet_quit.h +++ b/engines/titanic/pet_control/pet_quit.h @@ -58,7 +58,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ diff --git a/engines/titanic/pet_control/pet_real_life.h b/engines/titanic/pet_control/pet_real_life.h index 40bc87d9b5..b359d285c8 100644 --- a/engines/titanic/pet_control/pet_real_life.h +++ b/engines/titanic/pet_control/pet_real_life.h @@ -53,7 +53,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -63,12 +63,12 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Get the bounds for the section */ virtual Rect getBounds() const { return Rect(); } - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area @@ -85,7 +85,7 @@ public: * Returns item a drag-drop operation has dropped on, if any */ virtual CGameObject *dragEnd(const Point &pt) const { return nullptr; } - + /** * Display a message */ @@ -115,7 +115,7 @@ public: * Called when a section is switched to */ virtual void enter(PetArea oldArea); - + /** * Called when a section is being left, to switch to another area */ diff --git a/engines/titanic/pet_control/pet_remote.cpp b/engines/titanic/pet_control/pet_remote.cpp index 9b43b8dab9..7e98308114 100644 --- a/engines/titanic/pet_control/pet_remote.cpp +++ b/engines/titanic/pet_control/pet_remote.cpp @@ -30,7 +30,7 @@ namespace Titanic { static const byte REMOTE_DATA[] = { - 0x00, 0x02, + 0x00, 0x02, GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY, 0x01, 0x02, GLYPH_SUMMON_PELLERATOR, GLYPH_SUCCUBUS_DELIVERY, @@ -83,7 +83,7 @@ static const byte REMOTE_DATA[] = { GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY, 0x1E, 0x0C, GLYPH_DEPLOY_FLORAL, GLYPH_DEPLOY_FULLY_RELAXATION, GLYPH_DEPLOY_COMFORT, - GLYPH_DEPLOY_MINOR_STORAGE, GLYPH_ENTERTAINMENT_DEVICE, + GLYPH_DEPLOY_MINOR_STORAGE, GLYPH_ENTERTAINMENT_DEVICE, GLYPH_DEPLOY_MAJOR_RELAXATION, GLYPH_INFLATE_RELAXATION, GLYPH_DEPLOY_MAINTENANCE, GLYPH_DEPLOY_WORK_SURFACE, GLYPH_DEPLOY_MINOR_RELAXATION, GLYPH_DEPLOY_SINK, diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp index 953428ff0c..aa756bc941 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.cpp +++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp @@ -68,7 +68,7 @@ void CBasicRemoteGlyph::draw2(CScreenManager *screenManager) { } bool CBasicRemoteGlyph::MouseButtonDownMsg(const Point &pt) { - return _gfxElement && _gfxElement->MouseButtonDownMsg(pt); + return _gfxElement && _gfxElement->MouseButtonDownMsg(pt); } bool CBasicRemoteGlyph::MouseButtonUpMsg(const Point &pt) { @@ -173,7 +173,7 @@ bool CTelevisionControlGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) _down = getElement(2); _onOff = getElement(4); } - + return true; } diff --git a/engines/titanic/pet_control/pet_remote_glyphs.h b/engines/titanic/pet_control/pet_remote_glyphs.h index d3541d6a94..6114c81a9f 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.h +++ b/engines/titanic/pet_control/pet_remote_glyphs.h @@ -90,7 +90,7 @@ private: CString _gfxName, _tooltip, _msgString; public: CBasicRemoteGlyph(const CString &gfxName, const CString &tooltip, - const CString &msgString) : CPetRemoteGlyph(), + const CString &msgString) : CPetRemoteGlyph(), _gfxName(gfxName), _tooltip(tooltip), _msgString(msgString) {} /** @@ -112,7 +112,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -144,7 +144,7 @@ public: /** * Called for mouse button up messages to the default element */ - bool elementMouseButtonUpMsg(const Point &pt, int petNum); + bool elementMouseButtonUpMsg(const Point &pt, int petNum); }; class CRemoteGotoGlyph : public CPetRemoteGlyph { @@ -154,7 +154,7 @@ protected: CString _gfxName, _tooltip; public: CRemoteGotoGlyph() : CPetRemoteGlyph(), _gfxElement(nullptr), _roomIndex(21) {} - CRemoteGotoGlyph(const CString &gfxName, const CString &tooltip) : + CRemoteGotoGlyph(const CString &gfxName, const CString &tooltip) : CPetRemoteGlyph(), _gfxElement(nullptr), _roomIndex(21), _gfxName(gfxName), _tooltip(tooltip) {} @@ -177,7 +177,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -223,7 +223,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -257,7 +257,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -318,7 +318,7 @@ public: virtual bool MouseButtonUpMsg(const Point &pt) { return elementMouseButtonUpMsg(pt, 0); } - + /** * Returns the tooltip text for when the glyph is selected */ diff --git a/engines/titanic/pet_control/pet_rooms.h b/engines/titanic/pet_control/pet_rooms.h index af1ea2ae4f..28d6553a33 100644 --- a/engines/titanic/pet_control/pet_rooms.h +++ b/engines/titanic/pet_control/pet_rooms.h @@ -76,7 +76,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -86,7 +86,7 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area @@ -101,7 +101,7 @@ public: * Check whether a drag drop can occur */ virtual bool checkDragEnd(CGameObject *item); - + /** * Display a message */ diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.h b/engines/titanic/pet_control/pet_rooms_glyphs.h index 5d0fec84f8..11de6c4a8e 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.h +++ b/engines/titanic/pet_control/pet_rooms_glyphs.h @@ -94,7 +94,7 @@ public: * Saves the data for the glyph */ virtual void saveGlyph(SimpleFile *file, int indent); - + virtual bool proc33(CPetGlyph *glyph); /** @@ -125,12 +125,12 @@ public: * Returns true if the room is either currently or previously assigned */ bool isAssigned() const { return _mode != RGM_UNASSIGNED; } - + /** * Returns true if the room is the one currently assigned to the player */ bool isCurrentlyAssigned() const { return _mode == RGM_ASSIGNED_ROOM; } - + /** * Returns true if the room was previously assigned to the player */ diff --git a/engines/titanic/pet_control/pet_save.cpp b/engines/titanic/pet_control/pet_save.cpp index 6d0733f534..d344c8cd14 100644 --- a/engines/titanic/pet_control/pet_save.cpp +++ b/engines/titanic/pet_control/pet_save.cpp @@ -28,7 +28,7 @@ namespace Titanic { bool CPetSave::reset() { CPetLoadSave::reset(); - + CPetControl *pet = getPetControl(); if (pet) { setName("PetSave", pet); diff --git a/engines/titanic/pet_control/pet_save.h b/engines/titanic/pet_control/pet_save.h index 54e91e4c76..e5e956403f 100644 --- a/engines/titanic/pet_control/pet_save.h +++ b/engines/titanic/pet_control/pet_save.h @@ -57,11 +57,11 @@ public: /** * Called on a highlighted item when PET area is entered */ - virtual bool enterHighlighted() { + virtual bool enterHighlighted() { highlightSave(_savegameSlotNum); return true; } - + /** * Called on a highlighted item when PET area is left */ diff --git a/engines/titanic/pet_control/pet_section.h b/engines/titanic/pet_control/pet_section.h index dc2f70b76f..9e9afe6c21 100644 --- a/engines/titanic/pet_control/pet_section.h +++ b/engines/titanic/pet_control/pet_section.h @@ -75,7 +75,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl) { return false; } - + /** * Reset the section */ @@ -85,17 +85,17 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager) {} - + /** * Get the bounds for the section */ virtual Rect getBounds() const { return Rect(); } - + /** * Called when a general change occurs */ virtual void changed(int changeType) {} - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area @@ -113,12 +113,12 @@ public: * Check whether a drag drop can occur */ virtual bool checkDragEnd(CGameObject *item) { return false; } - + /** * Returns item a drag-drop operation has dropped on, if any */ virtual CGameObject *dragEnd(const Point &pt) const { return nullptr; } - + /** * Display a message */ @@ -148,12 +148,12 @@ public: * Called when a section is switched to */ virtual void enter(PetArea oldArea) {} - + /** * Called when a section is being left, to switch to another area */ virtual void leave() {} - + virtual void proc23() {} /** @@ -175,7 +175,7 @@ public: * Removes text after a given duration */ virtual void removeText(int duration); - + /** * Removes text after a given duration */ @@ -217,7 +217,7 @@ public: * Show the text cursor */ virtual void showCursor() {} - + /** * Hide the text cursor */ @@ -237,7 +237,7 @@ public: * Get a specified color in the currently active UI color table */ uint getColor(uint index); - + /** * Get one of the game's three UI color tables. If the default * tableNum of -1 is used, the table is taken from the game state diff --git a/engines/titanic/pet_control/pet_slider.h b/engines/titanic/pet_control/pet_slider.h index 0bc9e825cd..be8c846a20 100644 --- a/engines/titanic/pet_control/pet_slider.h +++ b/engines/titanic/pet_control/pet_slider.h @@ -106,7 +106,7 @@ public: * Reset the slider */ virtual void reset(const CString &name) {} - + /** * Draw the slider */ @@ -116,7 +116,7 @@ public: * Reset the dirty area */ virtual Rect clearDirtyArea(); - + /** * Checks whether the slider is highlighted */ @@ -131,7 +131,7 @@ public: * Handles dragging the slider */ virtual bool MouseDragMoveMsg(const Point &pt); - + /** * Called when a slider drag ends */ @@ -144,8 +144,8 @@ public: virtual bool proc13() { return false; } virtual bool proc14() { return false; } - - + + virtual bool contains(const Point &pt) const; /** diff --git a/engines/titanic/pet_control/pet_sound.cpp b/engines/titanic/pet_control/pet_sound.cpp index 7bfeb25722..e9958c67be 100644 --- a/engines/titanic/pet_control/pet_sound.cpp +++ b/engines/titanic/pet_control/pet_sound.cpp @@ -111,7 +111,7 @@ bool CPetSound::reset() { void CPetSound::draw2(CScreenManager *screenManager) { _element.draw(screenManager); - + _musicVolume.draw(screenManager); _masterVolume.draw(screenManager); _parrotVolume.draw(screenManager); @@ -173,7 +173,7 @@ void CPetSound::sliderChanged(double offset, int sliderNum) { CPetControl *pet = getPetControl(); if (!pet) return; - + CGameManager *gameManager = pet->getGameManager(); if (!gameManager) return; diff --git a/engines/titanic/pet_control/pet_starfield.cpp b/engines/titanic/pet_control/pet_starfield.cpp index 3287f98817..dd953b592d 100644 --- a/engines/titanic/pet_control/pet_starfield.cpp +++ b/engines/titanic/pet_control/pet_starfield.cpp @@ -45,7 +45,7 @@ bool CPetStarfield::reset() { _btnSetDest.setup(MODE_UNSELECTED, "3PetSetDestin", _petControl); _btnSetDest.setup(MODE_SELECTED, "3PetSetDestin1", _petControl); _imgStarCtrl.setup(MODE_UNSELECTED, "3PetStarCtrl", _petControl); - + _leds[0].setup(MODE_UNSELECTED, "LEDOff1", _petControl); _leds[1].setup(MODE_UNSELECTED, "LEDOn1", _petControl); _leds[2].setup(MODE_UNSELECTED, "LEDOff2", _petControl); @@ -106,7 +106,7 @@ bool CPetStarfield::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { if (_petControl) { CStarControl *starControl = _petControl->getStarControl(); - + if (starControl && starControl->canSetStarDestination()) { CPETSetStarDestinationMsg starfieldMsg; starfieldMsg.execute(_petControl->_remoteTarget); diff --git a/engines/titanic/pet_control/pet_starfield.h b/engines/titanic/pet_control/pet_starfield.h index 9550e0acf9..6c47f47d67 100644 --- a/engines/titanic/pet_control/pet_starfield.h +++ b/engines/titanic/pet_control/pet_starfield.h @@ -66,7 +66,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -76,7 +76,7 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp index 2c20396cd9..1aa9b804ff 100644 --- a/engines/titanic/pet_control/pet_text.cpp +++ b/engines/titanic/pet_control/pet_text.cpp @@ -27,7 +27,7 @@ namespace Titanic { CPetText::CPetText(uint count) : _stringsMerged(false), _maxCharsPerLine(-1), _lineCount(0), _linesStart(-1), _unused1(0), _unused2(0), _unused3(0), - _backR(0xff), _backG(0xff), _backB(0xff), + _backR(0xff), _backG(0xff), _backB(0xff), _textR(0), _textG(0), _textB(200), _fontNumber(0), _npcFlag(0), _npcId(0), _hasBorder(true), _scrollTop(0), _textCursor(nullptr) { @@ -110,7 +110,7 @@ void CPetText::load(SimpleFile *file, int param) { _array[idx]._line = file->readString(); _array[idx]._rgb = file->readString(); _array[idx]._string3 = file->readString(); - } + } } } @@ -225,7 +225,7 @@ void CPetText::appendText(const CString &str) { // Only add part of the str up to the maximum allowed limit for line _array[_lineCount]._line += str.left(_maxCharsPerLine - lineSize); } - + updateStr3(_lineCount); _stringsMerged = false; } @@ -260,7 +260,7 @@ void CPetText::remapColors(uint count, uint *srcColors, uint *destColors) { } } } - + _stringsMerged = false; } @@ -277,7 +277,7 @@ void CPetText::updateStr3(int lineNum) { line[2] = _npcId; line[4] = '\0'; _array[lineNum]._string3 = CString(line); - + _stringsMerged = false; _npcFlag = _npcId = 0; } @@ -470,7 +470,7 @@ int CPetText::getNPCNum(uint npcId, uint startIndex) { strP += 4; } } - + return - 1; } diff --git a/engines/titanic/pet_control/pet_translation.h b/engines/titanic/pet_control/pet_translation.h index 2fcc758b44..26070d6e59 100644 --- a/engines/titanic/pet_control/pet_translation.h +++ b/engines/titanic/pet_control/pet_translation.h @@ -44,7 +44,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -54,7 +54,7 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area diff --git a/engines/titanic/sound/auto_music_player_base.cpp b/engines/titanic/sound/auto_music_player_base.cpp index ad8b848c03..49ae906e91 100644 --- a/engines/titanic/sound/auto_music_player_base.cpp +++ b/engines/titanic/sound/auto_music_player_base.cpp @@ -71,7 +71,7 @@ bool CAutoMusicPlayerBase::TimerMsg(CTimerMsg *msg) { bool CAutoMusicPlayerBase::LoadSuccessMsg(CLoadSuccessMsg *msg) { if (_isRepeated) playGlobalSound(_filename, _volumeMode, _initialMute, true, 0); - + return true; } diff --git a/engines/titanic/sound/enter_view_toggles_other_music.cpp b/engines/titanic/sound/enter_view_toggles_other_music.cpp index 2f0091a0a3..2d23043d83 100644 --- a/engines/titanic/sound/enter_view_toggles_other_music.cpp +++ b/engines/titanic/sound/enter_view_toggles_other_music.cpp @@ -28,7 +28,7 @@ BEGIN_MESSAGE_MAP(CEnterViewTogglesOtherMusic, CTriggerAutoMusicPlayer) ON_MESSAGE(EnterViewMsg) END_MESSAGE_MAP() -CEnterViewTogglesOtherMusic::CEnterViewTogglesOtherMusic() : +CEnterViewTogglesOtherMusic::CEnterViewTogglesOtherMusic() : CTriggerAutoMusicPlayer(), _value(2) { } diff --git a/engines/titanic/sound/proximity.cpp b/engines/titanic/sound/proximity.cpp index ee1cd3e741..796e344ae2 100644 --- a/engines/titanic/sound/proximity.cpp +++ b/engines/titanic/sound/proximity.cpp @@ -27,8 +27,8 @@ namespace Titanic { CProximity::CProximity() : _channelVolume(100), _balance(0), _priorSoundHandle(-1), _frequencyMultiplier(0.0), _frequencyAdjust(1.875), - _repeated(false), _channelMode(10), _positioningMode(POSMODE_NONE), - _azimuth(0.0), _range(0.5), _elevation(0), + _repeated(false), _channelMode(10), _positioningMode(POSMODE_NONE), + _azimuth(0.0), _range(0.5), _elevation(0), _posX(0.0), _posY(0.0), _posZ(0.0), _hasVelocity(false), _velocityX(0), _velocityY(0), _velocityZ(0), _disposeAfterUse(DisposeAfterUse::NO), _endTalkerFn(nullptr), _talker(nullptr), diff --git a/engines/titanic/sound/qmixer.cpp b/engines/titanic/sound/qmixer.cpp index c095b84e17..733164947e 100644 --- a/engines/titanic/sound/qmixer.cpp +++ b/engines/titanic/sound/qmixer.cpp @@ -31,7 +31,7 @@ QMixer::QMixer(Audio::Mixer *mixer) : _mixer(mixer) { bool QMixer::qsWaveMixInitEx(const QMIXCONFIG &config) { assert(_channels.empty()); assert(config.iChannels > 0 && config.iChannels < 256); - + _channels.resize(config.iChannels); return true; } @@ -71,7 +71,7 @@ void QMixer::qsWaveMixSetPanRate(int iChannel, uint flags, uint rate) { void QMixer::qsWaveMixSetVolume(int iChannel, uint flags, uint volume) { ChannelEntry &channel = _channels[iChannel]; - + // QMixer volumes go from 0-32767, but we need to convert to 0-255 for ScummVM assert(volume <= 32767); byte newVolume = (volume >= 32700) ? 255 : volume * 255 / 32767; @@ -149,7 +149,7 @@ void QMixer::qsWaveMixPump() { if (channel._volumeChangeEnd) { byte oldVolume = channel._volume; uint currentTicks = g_system->getMillis(); - + if (currentTicks >= channel._volumeChangeEnd) { // Reached end of transition period channel._volume = channel._volumeEnd; diff --git a/engines/titanic/sound/qmixer.h b/engines/titanic/sound/qmixer.h index 6a25484c29..9a0ea85ede 100644 --- a/engines/titanic/sound/qmixer.h +++ b/engines/titanic/sound/qmixer.h @@ -156,7 +156,7 @@ struct QMIXPLAYPARAMS { Audio::Mixer::SoundType _soundType; QMIXPLAYPARAMS() : dwSize(36), lpImage(nullptr), hwndNotify(0), callback(nullptr), - dwUser(nullptr), lStart(0), lStartLoop(0), lEndLoop(0), lEnd(0), + dwUser(nullptr), lStart(0), lStartLoop(0), lEndLoop(0), lEnd(0), lpChannelParams(nullptr), _soundType(Audio::Mixer::kPlainSoundType) {} }; @@ -165,7 +165,7 @@ struct QMIXPLAYPARAMS { * QSound Labs, Inc. Which itself is apparently based on Microsoft's * WaveMix API. * - * It does not currently have any actual code from the library, + * It does not currently have any actual code from the library, * and instead remaps calls to ScummVM's existing mixer where possible. * This means that advanced features of the QMixer library, like being * able to set up both the player and sounds at different positions are @@ -189,7 +189,7 @@ class QMixer { // Currently playing and any following queued sounds for the channel Common::List<SoundEntry> _sounds; // Current channel volume - byte _volume; + byte _volume; // Current time in milliseconds for paning (volume) changes uint _panRate; // Fields used to transition between volume levels diff --git a/engines/titanic/sound/room_trigger_auto_music_player.h b/engines/titanic/sound/room_trigger_auto_music_player.h index a57e133eb6..1c3394ce15 100644 --- a/engines/titanic/sound/room_trigger_auto_music_player.h +++ b/engines/titanic/sound/room_trigger_auto_music_player.h @@ -31,7 +31,7 @@ namespace Titanic { class CRoomTriggerAutoMusicPlayer : public CTriggerAutoMusicPlayer { DECLARE_MESSAGE_MAP; bool LeaveRoomMsg(CLeaveRoomMsg *msg); - bool EnterRoomMsg(CEnterRoomMsg *msg); + bool EnterRoomMsg(CEnterRoomMsg *msg); public: CLASSDEF; diff --git a/engines/titanic/sound/season_noises.cpp b/engines/titanic/sound/season_noises.cpp index ce045488ee..14689d5337 100644 --- a/engines/titanic/sound/season_noises.cpp +++ b/engines/titanic/sound/season_noises.cpp @@ -89,7 +89,7 @@ bool CSeasonNoises::ActMsg(CActMsg *msg) { default: break; } - + CSignalObject signalMsg; signalMsg._numValue = 2; signalMsg.execute(this); diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp index 3288c4f4dd..a8c4849f2b 100644 --- a/engines/titanic/sound/sound.cpp +++ b/engines/titanic/sound/sound.cpp @@ -26,7 +26,7 @@ namespace Titanic { -CSound::CSound(CGameManager *owner, Audio::Mixer *mixer) : +CSound::CSound(CGameManager *owner, Audio::Mixer *mixer) : _gameManager(owner), _soundManager(mixer) { g_vm->_movieManager.setSoundManager(&_soundManager); } diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp index 1fb0c7341c..c1a46e5103 100644 --- a/engines/titanic/sound/sound_manager.cpp +++ b/engines/titanic/sound/sound_manager.cpp @@ -304,7 +304,7 @@ void QSoundManager::setPolarPosition(int handle, double range, double azimuth, d Slot &slot = _slots[idx]; if (slot._handle == handle) { qsWaveMixSetPanRate(slot._channel, QMIX_USEONCE, panRate); - qsWaveMixSetPolarPosition(slot._channel, QMIX_USEONCE, + qsWaveMixSetPolarPosition(slot._channel, QMIX_USEONCE, QSPOLAR(azimuth, range, elevation)); break; } @@ -452,7 +452,7 @@ void QSoundManager::updateVolume(int channel, uint panRate) { default: break; } - + volume = (_musicPercent * volume) / 100; qsWaveMixSetPanRate(channel, 0, panRate); qsWaveMixSetVolume(channel, 0, (uint)volume); diff --git a/engines/titanic/sound/sound_manager.h b/engines/titanic/sound/sound_manager.h index d1afdb4ad4..a3074a8e57 100644 --- a/engines/titanic/sound/sound_manager.h +++ b/engines/titanic/sound/sound_manager.h @@ -45,7 +45,7 @@ protected: public: CSoundManager(); virtual ~CSoundManager() {} - + /** * Loads a sound * @param name Name of sound resource @@ -189,7 +189,7 @@ public: * Called after saving is complete */ virtual void postSave() {} - + /** * Sets the position and orientation for the listener (player) */ diff --git a/engines/titanic/sound/view_toggles_other_music.cpp b/engines/titanic/sound/view_toggles_other_music.cpp index 731f59bd53..ffca1caea7 100644 --- a/engines/titanic/sound/view_toggles_other_music.cpp +++ b/engines/titanic/sound/view_toggles_other_music.cpp @@ -28,7 +28,7 @@ BEGIN_MESSAGE_MAP(CViewTogglesOtherMusic, CEnterViewTogglesOtherMusic) ON_MESSAGE(LeaveViewMsg) END_MESSAGE_MAP() -CViewTogglesOtherMusic::CViewTogglesOtherMusic() : +CViewTogglesOtherMusic::CViewTogglesOtherMusic() : CEnterViewTogglesOtherMusic(), _value(1) { } diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp index 7ba160cd37..01318db774 100644 --- a/engines/titanic/star_control/star_control.cpp +++ b/engines/titanic/star_control/star_control.cpp @@ -58,7 +58,7 @@ void CStarControl::save(SimpleFile *file, int indent) { void CStarControl::load(SimpleFile *file) { int val = file->readNumber(); - + if (!val) { _starField.load(file); if (!_starField.initDocument()) @@ -74,7 +74,7 @@ void CStarControl::load(SimpleFile *file) { _fieldBC = 1; } - + CGameObject::load(file); } diff --git a/engines/titanic/star_control/star_control_sub12.cpp b/engines/titanic/star_control/star_control_sub12.cpp index 5840495d34..e8d49992bb 100644 --- a/engines/titanic/star_control/star_control_sub12.cpp +++ b/engines/titanic/star_control/star_control_sub12.cpp @@ -29,7 +29,7 @@ namespace Titanic { FMatrix *CStarControlSub12::_matrix1; FMatrix *CStarControlSub12::_matrix2; -CStarControlSub12::CStarControlSub12(void *val1, const CStar20Data *data) : +CStarControlSub12::CStarControlSub12(void *val1, const CStar20Data *data) : _currentIndex(-1), _handlerP(nullptr), _field108(0), _sub13(val1) { setupHandler(data); @@ -56,7 +56,7 @@ CStarControlSub12::~CStarControlSub12() { } void CStarControlSub12::proc2(const void *src) { - _sub13.copyFrom(src); + _sub13.copyFrom(src); } void CStarControlSub12::proc3(const CStar20Data *src) { diff --git a/engines/titanic/star_control/star_control_sub13.cpp b/engines/titanic/star_control/star_control_sub13.cpp index cc9e239194..490e6d0630 100644 --- a/engines/titanic/star_control/star_control_sub13.cpp +++ b/engines/titanic/star_control/star_control_sub13.cpp @@ -91,12 +91,12 @@ void CStarControlSub13::load(SimpleFile *file, int param) { _field14 = file->readFloat(); _field18 = file->readFloat(); _field1C = file->readFloat(); - + int widthHeight = file->readNumber(); _width = widthHeight & 0xff; _height = _width >> 16; _field24 = file->readNumber(); - + for (int idx = 0; idx < 5; ++idx) _valArray[idx] = file->readFloat(); diff --git a/engines/titanic/star_control/star_control_sub20.cpp b/engines/titanic/star_control/star_control_sub20.cpp index 5c6c243eaa..cc1029896a 100644 --- a/engines/titanic/star_control/star_control_sub20.cpp +++ b/engines/titanic/star_control/star_control_sub20.cpp @@ -43,7 +43,7 @@ CStarControlSub20::CStarControlSub20(const CStar20Data *src) { } } -CStarControlSub20::~CStarControlSub20() { +CStarControlSub20::~CStarControlSub20() { clear(); } diff --git a/engines/titanic/star_control/star_control_sub25.h b/engines/titanic/star_control/star_control_sub25.h index e943782e37..b61569c49d 100644 --- a/engines/titanic/star_control/star_control_sub25.h +++ b/engines/titanic/star_control/star_control_sub25.h @@ -35,7 +35,7 @@ public: CStarControlSub26 _sub1; CStarControlSub26 _sub2; public: - + }; } // End of namespace Titanic diff --git a/engines/titanic/star_control/star_field.cpp b/engines/titanic/star_control/star_field.cpp index c50e8466ec..0dbc5fd700 100644 --- a/engines/titanic/star_control/star_field.cpp +++ b/engines/titanic/star_control/star_field.cpp @@ -69,7 +69,7 @@ void CStarField::render(CVideoSurface *surface, CStarControlSub12 *sub12) { // TODO } -int CStarField::get1() const { +int CStarField::get1() const { return _val1; } @@ -102,7 +102,7 @@ void CStarField::set3(int val) { } void CStarField::toggle4() { - _val4 = !_val4; + _val4 = !_val4; } bool CStarField::set4(bool val) { diff --git a/engines/titanic/star_control/star_field.h b/engines/titanic/star_control/star_field.h index ef1ee29737..91cefbb457 100644 --- a/engines/titanic/star_control/star_field.h +++ b/engines/titanic/star_control/star_field.h @@ -73,12 +73,12 @@ public: void set54(int val); int get3() const; void set3(int val); - void toggle4(); + void toggle4(); bool set4(bool val); int get88() const; int get5() const; void update6(); - int get6() const; + int get6() const; }; } // End of namespace Titanic diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp index f5d1d36c49..437c0f0e52 100644 --- a/engines/titanic/star_control/star_view.cpp +++ b/engines/titanic/star_control/star_view.cpp @@ -29,7 +29,7 @@ namespace Titanic { CStarView::CStarView() : _sub12(nullptr, nullptr), _sub13((void *)nullptr), - _owner(nullptr), _starField(nullptr), _videoSurface(nullptr), _field118(0), + _owner(nullptr), _starField(nullptr), _videoSurface(nullptr), _field118(0), _videoSurface2(nullptr), _field210(0), _homePhotoMask(nullptr), _field218(0), _field21C(0) { CStar20Data data = { 0, 0, 0x47C35000, 0, 0x41A00000, @@ -53,7 +53,7 @@ void CStarView::load(SimpleFile *file, int param) { void CStarView::save(SimpleFile *file, int indent) { _sub12.save(file, indent); - + file->writeNumberLine(_field118, indent); if (_field118) _sub13.save(file, indent); diff --git a/engines/titanic/star_control/surface_fader_base.cpp b/engines/titanic/star_control/surface_fader_base.cpp index dfd7c4ab1d..fb17fb1f31 100644 --- a/engines/titanic/star_control/surface_fader_base.cpp +++ b/engines/titanic/star_control/surface_fader_base.cpp @@ -70,7 +70,7 @@ CVideoSurface *CSurfaceFaderBase::fade(CScreenManager *screenManager, CVideoSurf srcSurface->unlock(); _videoSurface->unlock(); - + ++_index; return _videoSurface; } diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index 2cc32971ae..9e465c705f 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -30,73 +30,46 @@ namespace Titanic { -Video::AVIDecoder::AVIVideoTrack &AVIDecoder::getVideoTrack() { - for (TrackListIterator it = getTrackListBegin(); it != getTrackListEnd(); it++) - if ((*it)->getTrackType() == Track::kTrackTypeVideo) - return *dynamic_cast<AVIVideoTrack *>(*it); - - error("Could not find video track"); -} - -/** - * Track filter for AVIDecoder that filters out any secondary - * video track some videos have to hold transparency masks - */ -static bool primaryTrackSelect(bool isVideo, int trackCounter) { - return !isVideo || trackCounter == 0; -} - -/** - * Track filter for AVIDecoder that only accepts the secondary - * transparency msak video track for a video, if present - */ -static bool secondaryTrackSelect(bool isVideo, int trackCounter) { - return isVideo && trackCounter > 0; +Video::AVIDecoder::AVIVideoTrack &AVIDecoder::getVideoTrack(uint idx) { + assert(idx < _videoTracks.size()); + AVIVideoTrack *track = static_cast<AVIVideoTrack *>(_videoTracks[idx].track); + return *track; } AVISurface::AVISurface(const CResourceKey &key) { _videoSurface = nullptr; _streamCount = 0; _movieFrameSurface[0] = _movieFrameSurface[1] = nullptr; + _framePixels = nullptr; - // Reset current frame. We need to keep track of frames separately from the decoders, + // Reset current frame. We need to keep track of frames separately from the decoder, // since it needs to be able to go beyond the frame count or to negative to allow // correct detection of when range playbacks have finished _currentFrame = -1; _isReversed = false; - // Create a decoder for the audio (if any) and primary video track - _decoders[0] = new AVIDecoder(Audio::Mixer::kPlainSoundType, primaryTrackSelect); - if (!_decoders[0]->loadFile(key.getString())) + // Create a decoder + _decoder = new AVIDecoder(Audio::Mixer::kPlainSoundType); + if (!_decoder->loadFile(key.getString())) error("Could not open video - %s", key.getString().c_str()); - _streamCount = 1; - - // Create a decoder for any secondary video track - AVIDecoder *decoder2 = new AVIDecoder(Audio::Mixer::kPlainSoundType, secondaryTrackSelect); - if (decoder2->loadFile(key.getString())) { - _decoders[1] = decoder2; - ++_streamCount; - } else { - delete decoder2; - _decoders[1] = nullptr; - } + _streamCount = _decoder->videoTrackCount(); } AVISurface::~AVISurface() { if (_videoSurface) - _videoSurface->_transBlitFlag = false; + _videoSurface->_flipVertically = false; + delete _framePixels; delete _movieFrameSurface[0]; delete _movieFrameSurface[1]; - delete _decoders[0]; - delete _decoders[1]; + delete _decoder; } bool AVISurface::play(uint flags, CGameObject *obj) { if (flags & MOVIE_REVERSE) - return play(_decoders[0]->getFrameCount() - 1, 0, flags, obj); + return play(_decoder->getFrameCount() - 1, 0, flags, obj); else - return play(0, _decoders[0]->getFrameCount() - 1, flags, obj); + return play(0, _decoder->getFrameCount() - 1, flags, obj); } bool AVISurface::play(int startFrame, int endFrame, uint flags, CGameObject *obj) { @@ -121,26 +94,23 @@ bool AVISurface::play(int startFrame, int endFrame, int initialFrame, uint flags me->_endFrame = endFrame; me->_initialFrame = 0; me->_gameObject = obj; - + info->addEvent(me); } _movieRangeInfo.push_back(info); - + if (_movieRangeInfo.size() == 1) { // First play call, so start the movie playing setReversed(info->_isReversed); return startAtFrame(initialFrame); } else { return true; - } + } } void AVISurface::stop() { - _decoders[0]->stop(); - if (_decoders[1]) - _decoders[1]->stop(); - + _decoder->stop(); _movieRangeInfo.destroyContents(); } @@ -158,19 +128,14 @@ bool AVISurface::startAtFrame(int frameNumber) { renderFrame(); // Start the playback - _decoders[0]->start(); - if (_decoders[1]) - _decoders[1]->start(); - + _decoder->start(); + return true; } void AVISurface::seekToFrame(uint frameNumber) { if ((int)frameNumber != getFrame()) { - _decoders[0]->seekToFrame(frameNumber); - if (_decoders[1]) - _decoders[1]->seekToFrame(frameNumber); - + _decoder->seekToFrame(frameNumber); _currentFrame = (int)frameNumber; } @@ -178,10 +143,7 @@ void AVISurface::seekToFrame(uint frameNumber) { } void AVISurface::setReversed(bool isReversed) { - _decoders[0]->setReverse(isReversed); - if (_decoders[1]) - _decoders[1]->setReverse(isReversed); - + _decoder->setReverse(isReversed); _isReversed = isReversed; } @@ -219,7 +181,7 @@ bool AVISurface::handleEvents(CMovieEventList &events) { setReversed(info->_isReversed); seekToFrame(newFrame); } - + // Get any events for the given position info->getMovieFrame(events, newFrame); return renderFrame(); @@ -232,8 +194,8 @@ void AVISurface::setVideoSurface(CVideoSurface *surface) { _videoSurface = surface; // Handling for secondary video stream - if (_decoders[1]) { - const Common::String &streamName = _decoders[1]->getVideoTrack().getName(); + if (_streamCount == 2) { + const Common::String &streamName = _decoder->getVideoTrack(1).getName(); if (streamName == "mask0") { _videoSurface->_transparencyMode = TRANS_MASK0; @@ -250,27 +212,56 @@ void AVISurface::setVideoSurface(CVideoSurface *surface) { } void AVISurface::setupDecompressor() { - for (int idx = 0; idx < 2; ++idx) { - if (!_decoders[idx]) - continue; - AVIDecoder &decoder = *_decoders[idx]; + if (!_decoder) + return; + for (int idx = 0; idx < _streamCount; ++idx) { // Setup frame surface - _movieFrameSurface[idx] = new Graphics::ManagedSurface(decoder.getWidth(), decoder.getHeight(), - g_system->getScreenFormat()); + _movieFrameSurface[idx] = new Graphics::ManagedSurface(_decoder->getWidth(), _decoder->getHeight(), + _decoder->getVideoTrack(idx).getPixelFormat()); + + bool flag = false; + if (idx == 0 && _videoSurface && + _videoSurface->getPitch() == _movieFrameSurface[idx]->pitch) { + const uint bitCount = _decoder->getVideoTrack(0).getBitCount(); + const int vDepth = _videoSurface->getPixelDepth(); + + switch (bitCount) { + case 15: + flag = vDepth == 1; + break; + + case 16: + flag = vDepth == 1 || vDepth == 2; + break; + + case 24: + flag = vDepth == 3; + break; + + default: + break; + } + } - // TODO: See whether this simplified form of original works - if (idx == 1) - _videoSurface->_transBlitFlag = true; + if (!flag) { + _framePixels = new Graphics::ManagedSurface(_decoder->getWidth(), _decoder->getHeight(), + _decoder->getVideoTrack(0).getPixelFormat()); + } else if (idx == 0) { + // The original developers used a vertical flipped playback to indicate + // an incompatibility between source video and dest surface bit-depths, + // which would result in poor playback performance + _videoSurface->_flipVertically = true; + } } } uint AVISurface::getWidth() const { - return _decoders[0]->getWidth(); + return _decoder->getWidth(); } uint AVISurface::getHeight() const { - return _decoders[0]->getHeight(); + return _decoder->getHeight(); } void AVISurface::setFrame(int frameNumber) { @@ -279,42 +270,49 @@ void AVISurface::setFrame(int frameNumber) { stop(); // Ensure the frame number is valid - if (frameNumber >= (int)_decoders[0]->getFrameCount()) - frameNumber = _decoders[0]->getFrameCount() - 1; + if (frameNumber >= (int)_decoder->getFrameCount()) + frameNumber = _decoder->getFrameCount() - 1; seekToFrame(frameNumber); renderFrame(); } bool AVISurface::isNextFrame() const { - return _decoders[0]->getTimeToNextFrame() == 0; + return _decoder->getTimeToNextFrame() == 0; } bool AVISurface::renderFrame() { // Check there's a frame ready for display - if (!_decoders[0]->needsUpdate()) + if (!_decoder->needsUpdate()) return false; - // Decode each decoder's video stream into the appropriate surface + // Make a copy of each decoder's video frame for (int idx = 0; idx < _streamCount; ++idx) { - const Graphics::Surface *frame = _decoders[idx]->decodeNextFrame(); - - if (_movieFrameSurface[idx]->format == frame->format) { - _movieFrameSurface[idx]->blitFrom(*frame); - } else { - // Format mis-match, so we need to convert the frame - Graphics::Surface *s = frame->convertTo(_movieFrameSurface[idx]->format, - _decoders[idx]->getPalette()); - _movieFrameSurface[idx]->blitFrom(*s); - s->free(); - delete s; - } + const Graphics::Surface *frame = (idx == 0) ? + _decoder->decodeNextFrame() : _decoder->decodeNextTransparency(); + + assert(_movieFrameSurface[idx]->format == frame->format); + _movieFrameSurface[idx]->blitFrom(*frame); } - // Blit the primary video frame onto the main overall surface - _videoSurface->lock(); - _videoSurface->getRawSurface()->blitFrom(*_movieFrameSurface[0]); - _videoSurface->unlock(); + if (!_framePixels) { + if (_videoSurface->lock()) { + // Blit the frame directly to the video surface + assert(_streamCount == 1); + _videoSurface->blitFrom(Point(0, 0), &_movieFrameSurface[0]->rawSurface()); + + _videoSurface->unlock(); + } + } else { + // Blit the primary video track's frame to the video surface + Graphics::Surface *s = _movieFrameSurface[0]->rawSurface().convertTo( + g_system->getScreenFormat(), _decoder->getPalette()); + _videoSurface->lock(); + _videoSurface->getRawSurface()->blitFrom(*s); + _videoSurface->unlock(); + s->free(); + delete s; + } return false; } @@ -340,9 +338,7 @@ bool AVISurface::addEvent(int frameNumber, CGameObject *obj) { } void AVISurface::setFrameRate(double rate) { - _decoders[0]->setRate(Common::Rational((int)rate)); - if (_decoders[1]) - _decoders[1]->setRate(Common::Rational((int)rate)); + _decoder->setRate(Common::Rational((int)rate)); } Graphics::ManagedSurface *AVISurface::getSecondarySurface() { @@ -368,7 +364,7 @@ void AVISurface::playCutscene(const Rect &r, uint startFrame, uint endFrame) { while (_currentFrame < (int)endFrame && !g_vm->shouldQuit()) { if (isNextFrame()) { renderFrame(); - _currentFrame = _decoders[0]->getCurFrame(); + _currentFrame = _decoder->getCurFrame(); if (isDifferent) { // Clear the destination area, and use the transBlitFrom method, diff --git a/engines/titanic/support/avi_surface.h b/engines/titanic/support/avi_surface.h index 0acf7ab23b..b6231a646f 100644 --- a/engines/titanic/support/avi_surface.h +++ b/engines/titanic/support/avi_surface.h @@ -40,21 +40,30 @@ enum MovieFlag { class AVIDecoder : public Video::AVIDecoder { public: - AVIDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType, SelectTrackFn trackFn = nullptr) : - Video::AVIDecoder(soundType, trackFn) {} - AVIDecoder(const Common::Rational &frameRateOverride, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType, - SelectTrackFn trackFn = nullptr) : Video::AVIDecoder(frameRateOverride, soundType, trackFn) {} - - Video::AVIDecoder::AVIVideoTrack &getVideoTrack(); + AVIDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType) : + Video::AVIDecoder(soundType) {} + AVIDecoder(const Common::Rational &frameRateOverride, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType) : + Video::AVIDecoder(frameRateOverride, soundType) {} + + /** + * Returns the number of video tracks the decoder has + */ + uint videoTrackCount() const { return _videoTracks.size(); } + + /** + * Returns the specified video track + */ + Video::AVIDecoder::AVIVideoTrack &getVideoTrack(uint idx); }; class AVISurface { private: - AVIDecoder *_decoders[2]; + AVIDecoder *_decoder; CVideoSurface *_videoSurface; CMovieRangeInfoList _movieRangeInfo; int _streamCount; Graphics::ManagedSurface *_movieFrameSurface[2]; + Graphics::ManagedSurface *_framePixels; bool _isReversed; int _currentFrame; private: @@ -113,7 +122,7 @@ public: /** * Return true if a video is currently playing */ - virtual bool isPlaying() const { return _decoders[0]->isPlaying(); } + virtual bool isPlaying() const { return _decoder->isPlaying(); } /** * Handle any movie events relevent for the frame diff --git a/engines/titanic/support/credit_text.cpp b/engines/titanic/support/credit_text.cpp index 009c3f4944..da6de6278e 100644 --- a/engines/titanic/support/credit_text.cpp +++ b/engines/titanic/support/credit_text.cpp @@ -67,7 +67,7 @@ void CCreditText::setup() { // Create a new group and line within it CCreditLineGroup *group = new CCreditLineGroup(); - CCreditLine *line = new CCreditLine(srcLine, + CCreditLine *line = new CCreditLine(srcLine, _screenManagerP->stringWidth(srcLine)); group->_lines.push_back(line); @@ -125,7 +125,7 @@ void CCreditText::handleDots(CCreditLineGroup *group) { // Figure out the maximum width of secondary lines for (CCreditLines::iterator i = second; i != group->_lines.end(); ++i) maxWidth = MAX(maxWidth, (*i)->_lineWidth); - + int charWidth = _screenManagerP->stringWidth("."); // Process the secondary lines diff --git a/engines/titanic/support/direct_draw.h b/engines/titanic/support/direct_draw.h index a7e9cc8d93..08ead6d798 100644 --- a/engines/titanic/support/direct_draw.h +++ b/engines/titanic/support/direct_draw.h @@ -70,7 +70,7 @@ public: * @param width Screen width * @param height Screen height * @param bpp Bits per pixel - * @param numBackSurfaces Number of back surfaces + * @param numBackSurfaces Number of back surfaces */ void initVideo(int width, int height, int bpp, int numBackSurfaces); diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp index 22bff275d2..2882b8da85 100644 --- a/engines/titanic/support/files_manager.cpp +++ b/engines/titanic/support/files_manager.cpp @@ -75,7 +75,7 @@ bool CFilesManager::scanForFile(const CString &name) { CString filename = name; filename.toLowercase(); - + if (filename[0] == 'y' || filename[0] == 'z') return true; else if (filename[0] < 'a' || filename[0] > 'c') diff --git a/engines/titanic/support/files_manager.h b/engines/titanic/support/files_manager.h index a980ef1b25..45b067e86e 100644 --- a/engines/titanic/support/files_manager.h +++ b/engines/titanic/support/files_manager.h @@ -39,7 +39,7 @@ class CFilesManager { struct ResourceEntry { uint _offset; uint _size; - + ResourceEntry() : _offset(0), _size(0) {} ResourceEntry(uint offset, uint size) : _offset(offset), _size(size) {} }; diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp index e519237c3b..625d03720b 100644 --- a/engines/titanic/support/font.cpp +++ b/engines/titanic/support/font.cpp @@ -80,7 +80,7 @@ int STFont::getTextBounds(const CString &str, int maxWidth, Point *sizeOut) cons if (_fontHeight == 0 || !_dataPtr) // No font, so return immediately return 0; - + // Loop through the characters of the string if (!str.empty()) { for (const char *strP = str.c_str(); *strP; ++strP) { @@ -296,8 +296,9 @@ void STFont::copyRect(CVideoSurface *surface, const Point &pt, Rect &rect) { for (int yp = rect.top; yp < rect.bottom; ++yp, lineP += surface->getWidth()) { uint16 *destP = lineP; for (int xp = rect.left; xp < rect.right; ++xp, ++destP) { - const byte *srcP = _dataPtr + yp * _dataWidth + xp; - surface->changePixel(destP, &color, *srcP >> 3, true); + const byte *transP = _dataPtr + yp * _dataWidth + xp; + surface->copyPixel(destP, &color, *transP >> 3, + surface->getRawSurface()->format, true); } } @@ -330,7 +331,7 @@ void STFont::checkLineWrap(Point &textSize, int maxWidth, const char *&str) cons flag = true; } } - + if ((textSize.x + totalWidth) >= maxWidth && totalWidth < maxWidth) { // Word wrap textSize.x = 0; diff --git a/engines/titanic/support/font.h b/engines/titanic/support/font.h index 6c4fe8e9c3..685ab8ad73 100644 --- a/engines/titanic/support/font.h +++ b/engines/titanic/support/font.h @@ -50,13 +50,13 @@ private: * Copys a rectangle representing a character in the font data to * a given destination position in the surface */ - void copyRect(CVideoSurface *surface, const Common::Point &destPos, + void copyRect(CVideoSurface *surface, const Common::Point &destPos, Rect &srcRect); /** * Write a character */ - WriteCharacterResult writeChar(CVideoSurface *surface, unsigned char c, + WriteCharacterResult writeChar(CVideoSurface *surface, unsigned char c, const Common::Point &pt, const Rect &destRect, const Rect *srcRect); /** diff --git a/engines/titanic/support/image_decoders.cpp b/engines/titanic/support/image_decoders.cpp index 495d1d0982..2dba66fbb3 100644 --- a/engines/titanic/support/image_decoders.cpp +++ b/engines/titanic/support/image_decoders.cpp @@ -32,9 +32,9 @@ void CJPEGDecode::decode(OSVideoSurface &surface, const CString &name) { // Use the ScucmmVM deoder to decode it loadStream(*file.readStream()); const Graphics::Surface *srcSurf = getSurface(); - + // Resize the surface if necessary - if (!surface.hasSurface() || surface.getWidth() != srcSurf->w + if (!surface.hasSurface() || surface.getWidth() != srcSurf->w || surface.getHeight() != srcSurf->h) surface.recreate(srcSurf->w, srcSurf->h); diff --git a/engines/titanic/support/mouse_cursor.cpp b/engines/titanic/support/mouse_cursor.cpp index 0cefc368fa..4dd1ab4366 100644 --- a/engines/titanic/support/mouse_cursor.cpp +++ b/engines/titanic/support/mouse_cursor.cpp @@ -20,18 +20,16 @@ * */ -#include "common/memstream.h" -#include "common/textconsole.h" #include "graphics/cursorman.h" #include "titanic/support/mouse_cursor.h" -#include "titanic/support/movie.h" -#include "titanic/support/screen_manager.h" +#include "titanic/support/transparency_surface.h" #include "titanic/support/video_surface.h" -#include "titanic/core/resource_key.h" #include "titanic/titanic.h" namespace Titanic { +#define CURSOR_SIZE 64 + static const int CURSOR_DATA[NUM_CURSORS][4] = { { 1, 136, 19, 18 }, { 2, 139, 1, 1 }, @@ -52,10 +50,10 @@ static const int CURSOR_DATA[NUM_CURSORS][4] = { CMouseCursor::CursorEntry::~CursorEntry() { delete _videoSurface; - delete _frameSurface; + delete _transSurface; } -CMouseCursor::CMouseCursor(CScreenManager *screenManager) : +CMouseCursor::CMouseCursor(CScreenManager *screenManager) : _screenManager(screenManager), _cursorId(CURSOR_HOURGLASS), _setCursorCount(0), _fieldE4(0), _fieldE8(0) { loadCursorImages(); @@ -75,16 +73,16 @@ void CMouseCursor::loadCursorImages() { CURSOR_DATA[idx][3]); // Create the surface - CVideoSurface *surface = _screenManager->createSurface(64, 64); + CVideoSurface *surface = _screenManager->createSurface(CURSOR_SIZE, CURSOR_SIZE); _cursors[idx]._videoSurface = surface; // Open the cursors video and move to the given frame OSMovie movie(key, surface); movie.setFrame(idx); - - Graphics::ManagedSurface *frameSurface = movie.duplicateFrame(); - _cursors[idx]._frameSurface = frameSurface; - surface->setTransparencySurface(frameSurface); + + Graphics::ManagedSurface *transSurface = movie.duplicateTransparency(); + _cursors[idx]._transSurface = transSurface; + surface->setTransparencySurface(transSurface); } } @@ -100,15 +98,35 @@ void CMouseCursor::setCursor(CursorId cursorId) { ++_setCursorCount; if (cursorId != _cursorId) { + // The original cursors supported partial alpha when rendering the cursor. + // Since we're using the ScummVM CursorMan, we can't do that, so we need + // to build up a surface of the cursor with even partially transparent + // pixels as wholy transparent CursorEntry &ce = _cursors[cursorId - 1]; - CVideoSurface &surface = *ce._videoSurface; - surface.lock(); + CVideoSurface &srcSurface = *ce._videoSurface; + srcSurface.lock(); + + Graphics::ManagedSurface surface(CURSOR_SIZE, CURSOR_SIZE, g_system->getScreenFormat()); + const uint16 *srcP = srcSurface.getPixels(); + CTransparencySurface transSurface(&ce._transSurface->rawSurface(), TRANS_DEFAULT); + uint16 *destP = (uint16 *)surface.getPixels(); - CursorMan.replaceCursor(surface.getPixels(), surface.getWidth(), surface.getHeight(), - ce._centroid.x, ce._centroid.y, 0, false, &g_vm->_screen->format); - surface.unlock(); + for (int y = 0; y < CURSOR_SIZE; ++y) { + transSurface.setRow(y); + transSurface.setCol(0); + for (int x = 0; x < CURSOR_SIZE; ++x, ++srcP, ++destP) { + *destP = transSurface.isPixelTransparent() ? srcSurface.getTransparencyColor() : *srcP; + transSurface.moveX(); + } + } + + srcSurface.unlock(); + + // Set the cursor _cursorId = cursorId; + CursorMan.replaceCursor(surface.getPixels(), CURSOR_SIZE, CURSOR_SIZE, + ce._centroid.x, ce._centroid.y, srcSurface.getTransparencyColor(), false, &g_vm->_screen->format); } } @@ -129,7 +147,7 @@ void CMouseCursor::unlockE4() { void CMouseCursor::setPosition(const Point &pt, double rate) { assert(rate >= 0.0 && rate <= 1.0); - + // TODO: Figure out use of the rate parameter g_system->warpMouse(pt.x, pt.y); } diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h index 74fb1f6113..08de28e29d 100644 --- a/engines/titanic/support/mouse_cursor.h +++ b/engines/titanic/support/mouse_cursor.h @@ -55,10 +55,10 @@ class CVideoSurface; class CMouseCursor { struct CursorEntry { CVideoSurface *_videoSurface; - Graphics::ManagedSurface *_frameSurface; + Graphics::ManagedSurface *_transSurface; Common::Point _centroid; - CursorEntry() : _videoSurface(nullptr), _frameSurface(nullptr) {} + CursorEntry() : _videoSurface(nullptr), _transSurface(nullptr) {} ~CursorEntry(); }; private: @@ -86,12 +86,12 @@ public: * Hide the mouse cursor */ void hide(); - + /** * Set the cursor */ void setCursor(CursorId cursorId); - + /** * Updates the mouse cursor */ diff --git a/engines/titanic/support/movie.cpp b/engines/titanic/support/movie.cpp index a605cc3465..aea51e1a1e 100644 --- a/engines/titanic/support/movie.cpp +++ b/engines/titanic/support/movie.cpp @@ -125,7 +125,7 @@ void OSMovie::play(uint startFrame, uint endFrame, uint initialFrame, uint flags void OSMovie::playCutscene(const Rect &drawRect, uint startFrame, uint endFrame) { if (!_movieSurface) _movieSurface = CScreenManager::_screenManagerPtr->createSurface(600, 340); - + bool widthLess = _videoSurface->getWidth() < 600; bool heightLess = _videoSurface->getHeight() < 340; Rect r(drawRect.left, drawRect.top, @@ -203,7 +203,7 @@ void OSMovie::setFrameRate(double rate) { _aviSurface.setFrameRate(rate); } -Graphics::ManagedSurface *OSMovie::duplicateFrame() const { +Graphics::ManagedSurface *OSMovie::duplicateTransparency() const { return _aviSurface.duplicateTransparency(); } diff --git a/engines/titanic/support/movie.h b/engines/titanic/support/movie.h index 8c89f9e6dd..acc647065f 100644 --- a/engines/titanic/support/movie.h +++ b/engines/titanic/support/movie.h @@ -72,7 +72,7 @@ public: * Starts playing the movie */ virtual void play(uint flags, CGameObject *obj) = 0; - + /** * Starts playing the movie */ @@ -82,13 +82,13 @@ public: * Starts playing the movie */ virtual void play(uint startFrame, uint endFrame, uint initialFrame, uint flags, CGameObject *obj) = 0; - + /** * Plays a sub-section of a movie, and doesn't return until either * the playback ends or a key has been pressed */ virtual void playCutscene(const Rect &drawRect, uint startFrame, uint endFrame) = 0; - + /** * Stops the movie */ @@ -103,12 +103,12 @@ public: * Set the current frame number */ virtual void setFrame(uint frameNumber) = 0; - + /** * Handle any pending movie events */ virtual bool handleEvents(CMovieEventList &events) = 0; - + /** * Return any movie range info associated with the movie */ @@ -130,9 +130,9 @@ public: virtual void setFrameRate(double rate) = 0; /** - * Creates a duplicate of the movie's frame - */ - virtual Graphics::ManagedSurface *duplicateFrame() const = 0; + * Creates a duplicate of the transparency surface + */ + virtual Graphics::ManagedSurface *duplicateTransparency() const = 0; /** * Removes the movie from the list of currently playing movies @@ -171,17 +171,17 @@ public: * Starts playing the movie */ virtual void play(uint flags, CGameObject *obj); - + /** * Starts playing the movie */ virtual void play(uint startFrame, uint endFrame, uint flags, CGameObject *obj); - + /** * Starts playing the movie */ virtual void play(uint startFrame, uint endFrame, uint initialFrame, uint flags, CGameObject *obj); - + /** * Plays a sub-section of a movie, and doesn't return until either * the playback ends or a key has been pressed @@ -192,7 +192,7 @@ public: * Stops the movie */ virtual void stop(); - + /** * Add a playback event */ @@ -202,7 +202,7 @@ public: * Set the current frame number */ virtual void setFrame(uint frameNumber); - + /** * Handle any pending movie events */ @@ -229,9 +229,9 @@ public: virtual void setFrameRate(double rate); /** - * Creates a duplicate of the frame info + * Creates a duplicate of the transparency surface */ - virtual Graphics::ManagedSurface *duplicateFrame() const; + virtual Graphics::ManagedSurface *duplicateTransparency() const; }; } // End of namespace Titanic diff --git a/engines/titanic/support/movie_clip.h b/engines/titanic/support/movie_clip.h index 513ed4a339..17c91b190c 100644 --- a/engines/titanic/support/movie_clip.h +++ b/engines/titanic/support/movie_clip.h @@ -27,7 +27,7 @@ namespace Titanic { -enum ClipFlag { +enum ClipFlag { CLIPFLAG_HAS_END_FRAME = 1, CLIPFLAG_4 = 4, CLIPFLAG_HAS_START_FRAME = 8, diff --git a/engines/titanic/support/movie_range_info.cpp b/engines/titanic/support/movie_range_info.cpp index d4d9fc0e2a..018ffd63b5 100644 --- a/engines/titanic/support/movie_range_info.cpp +++ b/engines/titanic/support/movie_range_info.cpp @@ -91,7 +91,7 @@ void CMovieRangeInfo::process(CGameObject *owner) { flags |= MOVIE_REPEAT; if (_startFrame) flags |= MOVIE_REVERSE; - + for (CMovieEventList::iterator i = _events.begin(); i != _events.end(); ++i) { CMovieEvent *movieEvent = *i; if (movieEvent->_type == MET_MOVIE_END) { diff --git a/engines/titanic/support/screen_manager.cpp b/engines/titanic/support/screen_manager.cpp index bcf43fc8cb..2e9bbcb6de 100644 --- a/engines/titanic/support/screen_manager.cpp +++ b/engines/titanic/support/screen_manager.cpp @@ -178,7 +178,7 @@ void OSScreenManager::blitFrom(SurfaceNum surfaceNum, CVideoSurface *src, destSurface = _backSurfaces[surfaceNum]._surface; if (!destSurface->hasSurface()) return; - + Point destPoint = destPos ? *destPos : Point(0, 0); Rect srcBounds = srcRect ? *srcRect : Rect(0, 0, src->getWidth(), src->getHeight()); Rect *bounds = &srcBounds; @@ -220,7 +220,7 @@ void OSScreenManager::blitFrom(SurfaceNum surfaceNum, const Rect *rect, CVideoSu destSurface->blitFrom(Point(rect->left, rect->top), src, rect); } -int OSScreenManager::writeString(int surfaceNum, const Rect &destRect, +int OSScreenManager::writeString(int surfaceNum, const Rect &destRect, int yOffset, const CString &str, CTextCursor *textCursor) { CVideoSurface *surface; Rect bounds; diff --git a/engines/titanic/support/screen_manager.h b/engines/titanic/support/screen_manager.h index cad6901b02..f88928af8b 100644 --- a/engines/titanic/support/screen_manager.h +++ b/engines/titanic/support/screen_manager.h @@ -78,7 +78,7 @@ public: virtual void setWindowHandle(int v); virtual bool resetWindowHandle(int v); - + /** * Sets the video mode */ @@ -88,17 +88,17 @@ public: * Handles drawing the cursors */ virtual void drawCursors() = 0; - + /** * Locks a specified surface number for access and returns a pointer to it */ virtual CVideoSurface *lockSurface(SurfaceNum surfaceNum) = 0; - + /** * Unlocks a previously locked surface */ virtual void unlockSurface(CVideoSurface *surface) = 0; - + /** * Gets a specified surface number */ @@ -108,7 +108,7 @@ public: * Return the front render surface */ virtual CVideoSurface *getFrontRenderSurface() const = 0; - + /** * Fill an area with a specific color */ @@ -191,7 +191,7 @@ public: * Creates a surface of a given size */ virtual CVideoSurface *createSurface(int w, int h) = 0; - + /** * Creates a surface from a specified resource */ @@ -213,7 +213,7 @@ public: * Show the mouse cursor */ virtual void showCursor() = 0; - + /** * Hide the mouse cursor */ @@ -272,12 +272,12 @@ public: * Locks a specified surface number for access and returns a pointer to it */ virtual CVideoSurface *lockSurface(SurfaceNum surfaceNum); - + /** * Unlocks a previously locked surface */ virtual void unlockSurface(CVideoSurface *surface); - + /** * Gets a specified surface number */ @@ -373,7 +373,7 @@ public: * Creates a surface of a given size */ virtual CVideoSurface *createSurface(int w, int h); - + /** * Creates a surface from a specified resource */ @@ -383,7 +383,7 @@ public: * Show the mouse cursor */ virtual void showCursor(); - + /** * Hide the mouse cursor */ diff --git a/engines/titanic/support/simple_file.cpp b/engines/titanic/support/simple_file.cpp index 35b2e28e4a..7e3cea35be 100644 --- a/engines/titanic/support/simple_file.cpp +++ b/engines/titanic/support/simple_file.cpp @@ -52,7 +52,7 @@ SimpleFile::~SimpleFile() { } void SimpleFile::open(Common::SeekableReadStream *stream) { - close(); + close(); _inStream = stream; } @@ -290,7 +290,7 @@ void SimpleFile::writeString(const CString &str) const { const char *msgP = str.c_str(); char c; - + while ((c = *msgP++) != '\0') { switch (c) { case '\r': @@ -422,8 +422,8 @@ bool SimpleFile::scanf(const char *format, ...) { while (!formatStr.empty()) { if (formatStr.hasPrefix(" ")) { formatStr.deleteChar(0); - - safeRead(&c, 1); + + safeRead(&c, 1); if (!Common::isSpace(c)) return false; @@ -434,7 +434,7 @@ bool SimpleFile::scanf(const char *format, ...) { formatStr = CString(formatStr.c_str() + 2); int *param = (int *)va_arg(va, int *); *param = readNumber(); - + if (!eos()) _inStream->seek(-1, SEEK_CUR); } else if (formatStr.hasPrefix("%s")) { @@ -488,7 +488,7 @@ bool StdCWadFile::open(const Common::String &filename) { CString resStr = name.mid(idx + 1, extPos - idx - 1); int resIndex = resStr.readInt(); - // Open up the index for access + // Open up the index for access f.open(fname); int indexSize = f.readUint32LE() / 4; assert(resIndex < indexSize); diff --git a/engines/titanic/support/string.cpp b/engines/titanic/support/string.cpp index 9961cfce59..cf1b29b6ec 100644 --- a/engines/titanic/support/string.cpp +++ b/engines/titanic/support/string.cpp @@ -41,7 +41,7 @@ CString CString::left(uint count) const { CString CString::right(uint count) const { uint strSize = size(); - return (count > strSize) ? CString() : + return (count > strSize) ? CString() : CString(c_str() + strSize - count, c_str() + strSize); } @@ -85,7 +85,7 @@ FileType CString::fileTypeSuffix() const { return FILETYPE_WAV; else if (ext == "2" || ext == "3") return FILETYPE_MOVIE; - + ext = right(3); if (ext == "tga" || ext == "jpg") return FILETYPE_IMAGE; diff --git a/engines/titanic/support/text_cursor.cpp b/engines/titanic/support/text_cursor.cpp index ad3fe4ed26..5c7593ba68 100644 --- a/engines/titanic/support/text_cursor.cpp +++ b/engines/titanic/support/text_cursor.cpp @@ -27,7 +27,7 @@ namespace Titanic { -CTextCursor::CTextCursor(CScreenManager *screenManager) : +CTextCursor::CTextCursor(CScreenManager *screenManager) : _screenManager(screenManager), _active(false), _blinkVisible(false), _backRenderSurface(nullptr), _frontRenderSurface(nullptr), _blinkDelay(300), _size(2, 10), _priorBlinkTime(0), @@ -70,7 +70,7 @@ void CTextCursor::draw() { if (_blinkVisible) { Rect cursorRect = getCursorBounds(); _surface->blitFrom(Common::Point(0, 0), _backRenderSurface, &cursorRect); - + if (!_screenBounds.isEmpty()) // Limit the cursor rect to only within designated screen area cursorRect.constrain(_screenBounds); @@ -80,7 +80,7 @@ void CTextCursor::draw() { _backRenderSurface->_ddSurface->fillRect(&cursorRect, _cursorR, _cursorG, _cursorB); } - + //_screenManager->blitFrom(SURFACE_BACKBUFFER, _surface, &_pos); } } diff --git a/engines/titanic/support/time_event_info.cpp b/engines/titanic/support/time_event_info.cpp index 0226223f1a..e088a8e0c2 100644 --- a/engines/titanic/support/time_event_info.cpp +++ b/engines/titanic/support/time_event_info.cpp @@ -90,7 +90,7 @@ void CTimeEventInfoList::setPersisent(uint id, bool flag) { uint CTimeEventInfo::_nextId; -CTimeEventInfo::CTimeEventInfo() : ListItem(), _lockCounter(0), +CTimeEventInfo::CTimeEventInfo() : ListItem(), _lockCounter(0), _repeated(false), _firstDuration(0), _repeatDuration(0), _target(nullptr), _actionVal(0), _timerCtr(0), _done(false), _lastTimerTicks(0), _relativeTicks(0), _persisent(true) { @@ -147,7 +147,7 @@ void CTimeEventInfo::load(SimpleFile *file) { void CTimeEventInfo::postLoad(uint ticks, CProjectItem *project) { if (!_persisent || _targetName.empty()) _done = true; - + // Get the timer's target if (project) _target = project->findByName(_targetName); diff --git a/engines/titanic/support/transparency_surface.cpp b/engines/titanic/support/transparency_surface.cpp new file mode 100644 index 0000000000..5ffa8b99b1 --- /dev/null +++ b/engines/titanic/support/transparency_surface.cpp @@ -0,0 +1,73 @@ +/* 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 "titanic/support/transparency_surface.h" +#include "common/algorithm.h" +#include "common/textconsole.h" + +namespace Titanic { + +CTransparencySurface::CTransparencySurface(const Graphics::Surface *surface, + TransparencyMode transMode) : _surface(surface) { + _pitch = 0; + _runLength = 0; + _flag = false; + _flag1 = false; + _flag2 = true; + + switch (transMode) { + case TRANS_MASK0: + case TRANS_ALPHA0: + _flag2 = false; + _flag1 = true; + break; + case TRANS_MASK255: + case TRANS_ALPHA255: + _flag2 = true; + _flag1 = false; + break; + case TRANS_DEFAULT: + if (*(byte *)surface->getPixels() < 0x80) { + _flag1 = true; + _flag2 = false; + } + break; + default: + break; + } +} + +int CTransparencySurface::moveX() { + if (++_pos.x >= _surface->w) { + _pos.x = 0; + ++_pos.y; + } + + return 1; +} + +uint CTransparencySurface::getPixel() const { + const byte *pixelP = (const byte *)_surface->getBasePtr(_pos.x, _pos.y); + return *pixelP; +} + +} // End of namespace Titanic diff --git a/engines/titanic/support/transparency_surface.h b/engines/titanic/support/transparency_surface.h new file mode 100644 index 0000000000..0391b6d5b7 --- /dev/null +++ b/engines/titanic/support/transparency_surface.h @@ -0,0 +1,84 @@ +/* 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 TITANIC_TRANSPARENCY_SURFACE_H +#define TITANIC_TRANSPARENCY_SURFACE_H + +#include "common/rect.h" +#include "graphics/surface.h" + +namespace Titanic { + +enum TransparencyMode { + TRANS_MASK0 = 0, TRANS_MASK255 = 1, TRANS_ALPHA0 = 2, + TRANS_ALPHA255 = 3, TRANS_DEFAULT = 4 +}; + +class CTransparencySurface { +private: + const Graphics::Surface *_surface; + Common::Point _pos; + int _pitch; + int _runLength; + bool _flag; + bool _flag1; + bool _flag2; +public: + /** + * Constructor + */ + CTransparencySurface(const Graphics::Surface *surface, TransparencyMode transMode); + + /** + * Sets the row to get transparencies from + */ + void setRow(int yp) { _pos.y = yp; } + + /** + * Sets the column to get transparencies from + */ + void setCol(int xp) { _pos.x = xp; } + + /** + * Moves reading position horizontally by a single pixel + */ + int moveX(); + + /** + * Returns a byte from the transparency surface + */ + uint getPixel() const; + + /** + * Returns the alpha value for the pixel (0-31) + */ + uint getAlpha() const { return 31 - (getPixel() >> 3); } + + /** + * Returns true if the pixel is completely transparent + */ + bool isPixelTransparent() const { return getAlpha() == 31; } +}; + +} // End of namespace Titanic + +#endif /* TITANIC_TRANSPARENCY_SURFACE_H */ diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp index 63ad782722..45813bb740 100644 --- a/engines/titanic/support/video_surface.cpp +++ b/engines/titanic/support/video_surface.cpp @@ -23,16 +23,19 @@ #include "titanic/support/video_surface.h" #include "titanic/support/image_decoders.h" #include "titanic/support/screen_manager.h" +#include "titanic/support/transparency_surface.h" #include "titanic/titanic.h" namespace Titanic { int CVideoSurface::_videoSurfaceCounter = 0; +byte CVideoSurface::_palette1[32][32]; +byte CVideoSurface::_palette2[32][32]; CVideoSurface::CVideoSurface(CScreenManager *screenManager) : _screenManager(screenManager), _rawSurface(nullptr), _movie(nullptr), - _pendingLoad(false), _transBlitFlag(false), _fastBlitFlag(false), - _transparencySurface(nullptr), _transparencyMode(TRANS_DEFAULT), + _pendingLoad(false), _flipVertically(false), _fastBlitFlag(false), + _transparencySurface(nullptr), _transparencyMode(TRANS_DEFAULT), _freeTransparencySurface(DisposeAfterUse::NO), _hasFrame(true), _lockCount(0) { _videoSurfaceNum = _videoSurfaceCounter++; } @@ -46,6 +49,19 @@ CVideoSurface::~CVideoSurface() { delete _transparencySurface; } +void CVideoSurface::setupPalette(byte palette[32][32], byte val) { + for (uint idx1 = 0; idx1 < 32; ++idx1) { + for (uint idx2 = 0, base = 0; idx2 < 32; ++idx2, base += idx1) { + uint v = base / 31; + palette[idx1][idx2] = (byte)v; + + if (val != 0xff && v != idx2) { + assert(0); + } + } + } +} + void CVideoSurface::setSurface(CScreenManager *screenManager, DirectDrawSurface *surface) { _screenManager = screenManager; _ddSurface = surface; @@ -56,10 +72,10 @@ void CVideoSurface::blitFrom(const Point &destPos, CVideoSurface *src, const Rec Rect srcBounds, destBounds; clipBounds(srcBounds, destBounds, src, srcRect, &destPos); - if (src->_transBlitFlag) - blitRect2(srcBounds, destBounds, src); + if (src->_flipVertically) + flippedBlitRect(srcBounds, destBounds, src); else - blitRect1(srcBounds, destBounds, src); + blitRect(srcBounds, destBounds, src); } } @@ -132,44 +148,118 @@ void CVideoSurface::clipBounds(Rect &srcRect, Rect &destRect, error("Invalid rect"); } -void CVideoSurface::blitRect1(const Rect &srcRect, const Rect &destRect, CVideoSurface *src) { +void CVideoSurface::blitRect(const Rect &srcRect, const Rect &destRect, CVideoSurface *src) { src->lock(); lock(); if (src->_fastBlitFlag) { _rawSurface->blitFrom(*src->_rawSurface, srcRect, Point(destRect.left, destRect.top)); - } else if (getTransparencySurface()) { - transBlitRect(srcRect, destRect, src); - } else { - _rawSurface->transBlitFrom(*src->_rawSurface, srcRect, destRect, src->getTransparencyColor()); - } + } else if (src->getTransparencySurface()) { + transBlitRect(srcRect, destRect, src, false); + } else if (lock()) { + if (src->lock()) { + const Graphics::ManagedSurface *srcSurface = src->_rawSurface; + Graphics::ManagedSurface *destSurface = _rawSurface; + Graphics::Surface destArea = destSurface->getSubArea(destRect); + const uint transColor = src->getTransparencyColor(); + + const uint16 *srcPtr = (const uint16 *)srcSurface->getBasePtr( + srcRect.left, srcRect.top); + uint16 *destPtr = (uint16 *)destArea.getBasePtr(0, 0); + + for (int yCtr = 0; yCtr < srcRect.height(); ++yCtr, + srcPtr += src->getPitch() / 2, + destPtr += destArea.pitch / 2) { + // Prepare for copying the line + const uint16 *lineSrcP = srcPtr; + uint16 *lineDestP = destPtr; + + for (int srcX = srcRect.left; srcX < srcRect.right; ++srcX, ++lineSrcP, ++lineDestP) { + if (*lineSrcP != transColor) + *lineDestP = *lineSrcP; + } + } - src->unlock(); - unlock(); + src->unlock(); + } + + unlock(); + } } -void CVideoSurface::blitRect2(const Rect &srcRect, const Rect &destRect, CVideoSurface *src) { - if (getTransparencySurface()) { - transBlitRect(srcRect, destRect, src); - } else { - src->lock(); - lock(); +void CVideoSurface::flippedBlitRect(const Rect &srcRect, const Rect &destRect, CVideoSurface *src) { + if (src->getTransparencySurface()) { + transBlitRect(srcRect, destRect, src, true); + } else if (lock()) { + if (src->lock()) { + const Graphics::ManagedSurface *srcSurface = src->_rawSurface; + Graphics::ManagedSurface *destSurface = _rawSurface; + Graphics::Surface destArea = destSurface->getSubArea(destRect); + const uint transColor = src->getTransparencyColor(); + + const uint16 *srcPtr = (const uint16 *)srcSurface->getBasePtr( + srcRect.left, srcRect.top); + uint16 *destPtr = (uint16 *)destArea.getBasePtr(0, destArea.h - 1); + + for (int yCtr = 0; yCtr < srcRect.height(); ++yCtr, + srcPtr += src->getPitch() / 2, + destPtr -= destArea.pitch / 2) { + // Prepare for copying the line + const uint16 *lineSrcP = srcPtr; + uint16 *lineDestP = destPtr; + + for (int srcX = srcRect.left; srcX < srcRect.right; ++srcX, ++lineSrcP, ++lineDestP) { + if (*lineSrcP != transColor) + *lineDestP = *lineSrcP; + } + } - _rawSurface->blitFrom(*src->_rawSurface, srcRect, Point(destRect.left, destRect.top)); + src->unlock(); + } - src->unlock(); unlock(); } } -void CVideoSurface::transBlitRect(const Rect &srcRect, const Rect &destRect, CVideoSurface *src) { +void CVideoSurface::transBlitRect(const Rect &srcRect, const Rect &destRect, CVideoSurface *src, bool flipFlag) { + assert(srcRect.width() == destRect.width() && srcRect.height() == destRect.height()); + if (lock()) { if (src->lock()) { Graphics::ManagedSurface *srcSurface = src->_rawSurface; Graphics::ManagedSurface *destSurface = _rawSurface; - - // TODO: Handle the transparency mode correctly - destSurface->blitFrom(*srcSurface, srcRect, Point(srcRect.left, srcRect.top)); + Graphics::Surface destArea = destSurface->getSubArea(destRect); + + const uint16 *srcPtr = (const uint16 *)srcSurface->getBasePtr( + srcRect.left, flipFlag ? srcRect.top : srcRect.bottom - 1); + uint16 *destPtr = (uint16 *)destArea.getBasePtr(0, destArea.h - 1); + bool isAlpha = src->_transparencyMode == TRANS_ALPHA0 || + src->_transparencyMode == TRANS_ALPHA255; + + CTransparencySurface transSurface(src->getTransparencySurface(), src->_transparencyMode); + + for (int yCtr = 0; yCtr < srcRect.height(); ++yCtr) { + // Prepare for copying the line + const uint16 *lineSrcP = srcPtr; + uint16 *lineDestP = destPtr; + transSurface.setRow(flipFlag ? srcRect.top + yCtr : srcRect.bottom - yCtr - 1); + transSurface.setCol(srcRect.left); + + for (int srcX = srcRect.left; srcX < srcRect.right; ++srcX) { + if (!transSurface.isPixelTransparent()) { + copyPixel(lineDestP, lineSrcP, transSurface.getAlpha(), srcSurface->format, isAlpha); + } + + ++lineSrcP; + ++lineDestP; + transSurface.moveX(); + } + + // Move to next line + srcPtr = flipFlag ? srcPtr + (src->getPitch() / 2) : + srcPtr - (src->getPitch() / 2); + destPtr -= destArea.pitch / 2; + } src->unlock(); } @@ -196,10 +286,40 @@ bool CVideoSurface::hasFrame() { } } -/*------------------------------------------------------------------------*/ +#define RGB_SHIFT 3 +void CVideoSurface::copyPixel(uint16 *destP, const uint16 *srcP, byte alpha, + const Graphics::PixelFormat &srcFormat, bool isAlpha) { + const Graphics::PixelFormat destFormat = _ddSurface->getFormat(); + alpha &= 0xff; + assert(alpha < 32); + + // Get the source color + byte r, g, b; + srcFormat.colorToRGB(*srcP, r, g, b); + r >>= RGB_SHIFT; + g >>= RGB_SHIFT; + b >>= RGB_SHIFT; + + if (isAlpha) { + r = _palette1[31 - alpha][r]; + g = _palette1[31 - alpha][g]; + b = _palette1[31 - alpha][b]; + } -byte OSVideoSurface::_palette1[32][32]; -byte OSVideoSurface::_palette2[32][32]; + byte r2, g2, b2; + destFormat.colorToRGB(*destP, r2, g2, b2); + r2 >>= RGB_SHIFT; + g2 >>= RGB_SHIFT; + b2 >>= RGB_SHIFT; + r2 = _palette1[alpha][r2]; + g2 = _palette1[alpha][g2]; + b2 = _palette1[alpha][b2]; + + *destP = destFormat.RGBToColor((r + r2) << RGB_SHIFT, + (g + g2) << RGB_SHIFT, (b + b2) << RGB_SHIFT); +} + +/*------------------------------------------------------------------------*/ OSVideoSurface::OSVideoSurface(CScreenManager *screenManager, DirectDrawSurface *surface) : CVideoSurface(screenManager) { @@ -210,7 +330,7 @@ OSVideoSurface::OSVideoSurface(CScreenManager *screenManager, const CResourceKey CVideoSurface(screenManager) { _ddSurface = nullptr; _pendingLoad = pendingLoad; - + if (_pendingLoad) { loadResource(key); } else { @@ -219,24 +339,6 @@ OSVideoSurface::OSVideoSurface(CScreenManager *screenManager, const CResourceKey } } -void OSVideoSurface::setupPalette(byte palette[32][32], byte val) { - for (uint idx1 = 0; idx1 < 32; ++idx1) { - for (uint idx2 = 0, base = 0; idx2 < 32; ++idx2, base += idx1) { - int64 v = 0x84210843; - v *= base; - uint v2 = (v >> 36); - v = ((v2 >> 31) + v2) & 0xff; - palette[idx1][idx2] = v << 3; - - if (val != 0xff && v != idx2) { - v = 0x80808081 * v * val; - v2 = v >> 39; - palette[idx1][idx2] = ((v2 >> 31) + v2) << 3; - } - } - } -} - void OSVideoSurface::loadResource(const CResourceKey &key) { _resourceKey = key; _pendingLoad = true; @@ -351,7 +453,7 @@ void OSVideoSurface::recreate(int width, int height) { } void OSVideoSurface::resize(int width, int height) { - if (!_ddSurface || _ddSurface->getWidth() != width || + if (!_ddSurface || _ddSurface->getWidth() != width || _ddSurface->getHeight() != height) recreate(width, height); } @@ -365,7 +467,7 @@ int OSVideoSurface::getPixelDepth() { error("Could not load resource"); lock(); - + int result = _rawSurface->format.bytesPerPixel; if (result == 1) // Paletted 8-bit images don't store the color directly in the pixels @@ -408,8 +510,13 @@ uint16 OSVideoSurface::getPixel(const Common::Point &pt) { if (pt.x >= 0 && pt.y >= 0 && pt.x < getWidth() && pt.y < getHeight()) { if (_transparencySurface) { - const byte *pixelP = (const byte *)_transparencySurface->getBasePtr(pt.x, pt.y); - if (*pixelP != 0xF0) + // WORKAROUND: Original had the setRow _flipVertically check in reverse. + // Pretty sure putting it the way is below is the correct way + CTransparencySurface transSurface(&_transparencySurface->rawSurface(), _transparencyMode); + transSurface.setRow(_flipVertically ? getHeight() - pt.y - 1 : pt.y); + transSurface.setCol(pt.x); + + if (transSurface.isPixelTransparent()) return getTransparencyColor(); } @@ -429,29 +536,6 @@ void OSVideoSurface::setPixel(const Point &pt, uint pixel) { *pixelP = pixel; } -void OSVideoSurface::changePixel(uint16 *pixelP, uint16 *color, byte srcVal, bool remapFlag) { - assert(getPixelDepth() == 2); - const Graphics::PixelFormat &destFormat = _ddSurface->getFormat(); - const Graphics::PixelFormat srcFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); - - // Get the color - byte r, g, b; - srcFormat.colorToRGB(*color, r, g, b); - if (remapFlag) { - r = _palette1[31 - srcVal][r >> 3]; - g = _palette1[31 - srcVal][g >> 3]; - b = _palette1[31 - srcVal][b >> 3]; - } - - byte r2, g2, b2; - destFormat.colorToRGB(*pixelP, r2, g2, b2); - r2 = _palette1[srcVal][r2 >> 3]; - g2 = _palette1[srcVal][g2 >> 3]; - b2 = _palette1[srcVal][b2 >> 3]; - - *pixelP = destFormat.RGBToColor(r + r2, g + g2, b + b2); -} - void OSVideoSurface::shiftColors() { if (!loadIfReady()) return; @@ -510,7 +594,7 @@ const CMovieRangeInfoList *OSVideoSurface::getMovieRangeInfo() const { } void OSVideoSurface::flipVertically(bool needsLock) { - if (!loadIfReady() || !_transBlitFlag) + if (!loadIfReady() || !_flipVertically) return; if (needsLock) @@ -529,7 +613,7 @@ void OSVideoSurface::flipVertically(bool needsLock) { Common::copy(lineBuffer, lineBuffer + pitch, line1P); } - _transBlitFlag = false; + _flipVertically = false; if (needsLock) unlock(); } @@ -576,8 +660,8 @@ void OSVideoSurface::transPixelate() { unlock(); } -Graphics::ManagedSurface *OSVideoSurface::dupMovieFrame() const { - return _movie ? _movie->duplicateFrame() : nullptr; +Graphics::ManagedSurface *OSVideoSurface::dupMovieTransparency() const { + return _movie ? _movie->duplicateTransparency() : nullptr; } int OSVideoSurface::freeSurface() { diff --git a/engines/titanic/support/video_surface.h b/engines/titanic/support/video_surface.h index c21149333d..690669b79b 100644 --- a/engines/titanic/support/video_surface.h +++ b/engines/titanic/support/video_surface.h @@ -31,16 +31,12 @@ #include "titanic/support/movie.h" #include "titanic/support/movie_range_info.h" #include "titanic/support/rect.h" +#include "titanic/support/transparency_surface.h" #include "titanic/core/list.h" #include "titanic/core/resource_key.h" namespace Titanic { -enum TransparencyMode { - TRANS_MASK0 = 0, TRANS_MASK255 = 1, TRANS_ALPHA0 = 2, - TRANS_ALPHA255 = 3, TRANS_DEFAULT = 4 -}; - class CScreenManager; class CJPEGDecode; class CTargaDecode; @@ -49,15 +45,38 @@ class CVideoSurface : public ListItem { friend class CJPEGDecode; friend class CTargaDecode; private: + static byte _palette1[32][32]; + static byte _palette2[32][32]; + + /** + * Setup the shading palettes + */ + static void setupPalette(byte palette[32][32], byte val); +public: + /** + * Setup statics + */ + static void setup() { + setupPalette(_palette1, 0xff); + } +private: /** * Calculates blitting bounds */ void clipBounds(Rect &srcRect, Rect &destRect, CVideoSurface *srcSurface, const Rect *subRect = nullptr, const Point *destPos = nullptr); - void blitRect1(const Rect &srcRect, const Rect &destRect, CVideoSurface *src); - void blitRect2(const Rect &srcRect, const Rect &destRect, CVideoSurface *src); - void transBlitRect(const Rect &srcRect, const Rect &destRect, CVideoSurface *src); + /** + * Copies a rect from a given source surface + */ + void blitRect(const Rect &srcRect, const Rect &destRect, CVideoSurface *src); + + /** + * Copies a rect from a given source surface and draws it vertically flipped + */ + void flippedBlitRect(const Rect &srcRect, const Rect &destRect, CVideoSurface *src); + + void transBlitRect(const Rect &srcRect, const Rect &destRect, CVideoSurface *src, bool flipFlag); protected: static int _videoSurfaceCounter; protected: @@ -73,7 +92,7 @@ public: CMovie *_movie; DirectDrawSurface *_ddSurface; bool _fastBlitFlag; - bool _transBlitFlag; + bool _flipVertically; CResourceKey _resourceKey; TransparencyMode _transparencyMode; public: @@ -186,11 +205,6 @@ public: virtual void setPixel(const Point &pt, uint pixel) = 0; /** - * Change a pixel - */ - virtual void changePixel(uint16 *pixelP, uint16 *color, byte srcVal, bool remapFlag = true) = 0; - - /** * Shifts the colors of the surface.. maybe greys it out? */ virtual void shiftColors() = 0; @@ -270,9 +284,9 @@ public: virtual bool hasFrame(); /** - * Duplicates movie frame surface + * Duplicates movie transparency surface */ - virtual Graphics::ManagedSurface *dupMovieFrame() const = 0; + virtual Graphics::ManagedSurface *dupMovieTransparency() const = 0; /** * Frees the underlying surface @@ -302,7 +316,9 @@ public: /** * Get the previously set transparency mask surface */ - Graphics::ManagedSurface *getTransparencySurface() const { return _transparencySurface; } + const Graphics::Surface *getTransparencySurface() const { + return _transparencySurface ? &_transparencySurface->rawSurface() : nullptr; + } /** * Get the pixels associated with the surface. Only valid when the @@ -320,26 +336,23 @@ public: * Returns the transparent color */ uint getTransparencyColor(); + + /** + * Copies a pixel, handling transparency + * @param destP Dest pointer to 16-bit pixel + * @param srcP Source pointer to 16-bit pixel + * @param alpha Alpha (0-31). At 0, it's completely opaque, + * and overwrites the dest pixel. Through to 31, which is completely + * transparent, and ignores the source pixel. + * @param srcFormat The source surface format + * @param isAlpha If true, has alpha channel + */ + void copyPixel(uint16 *destP, const uint16 *srcP, byte alpha, + const Graphics::PixelFormat &srcFormat, bool isAlpha); }; class OSVideoSurface : public CVideoSurface { friend class OSMovie; -private: - static byte _palette1[32][32]; - static byte _palette2[32][32]; - - /** - * Setup the shading palettes - */ - static void setupPalette(byte palette[32][32], byte val); -public: - /** - * Setup statics - */ - static void setup() { - setupPalette(_palette1, 0xff); - setupPalette(_palette2, 0xe0); - } public: OSVideoSurface(CScreenManager *screenManager, DirectDrawSurface *surface); OSVideoSurface(CScreenManager *screenManager, const CResourceKey &key, bool flag = false); @@ -437,11 +450,6 @@ public: virtual void setPixel(const Point &pt, uint pixel); /** - * Change a pixel - */ - virtual void changePixel(uint16 *pixelP, uint16 *color, byte srcVal, bool remapFlag = true); - - /** * Shifts the colors of the surface.. maybe greys it out? */ virtual void shiftColors(); @@ -516,10 +524,9 @@ public: virtual void transPixelate(); /** - * Duplicates movie frame surface + * Duplicates movie transparency surface */ - virtual Graphics::ManagedSurface *dupMovieFrame() const; - + virtual Graphics::ManagedSurface *dupMovieTransparency() const; /** * Frees the underlying surface diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp index 375908a814..2566a36d7c 100644 --- a/engines/titanic/titanic.cpp +++ b/engines/titanic/titanic.cpp @@ -100,8 +100,8 @@ void TitanicEngine::initialize() { CExitPellerator::init(); CEnterExitSecClassMiniLift::init(); CTelevision::init(); + CVideoSurface::setup(); TTnpcScript::init(); - OSVideoSurface::setup(); _events = new Events(this); _screen = new Graphics::Screen(0, 0); diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp index b327c3647e..76f28540ea 100644 --- a/engines/titanic/true_talk/barbot_script.cpp +++ b/engines/titanic/true_talk/barbot_script.cpp @@ -107,7 +107,7 @@ int BarbotScript::chooseResponse(const TTroomScript *roomScript, const TTsentenc applyResponse(); return 2; - + } else if (tag == MKTAG('B', 'A', 'R', 'U') && getRandomNumber(100) > 50) { selectResponse(250025); switch (getDialsBitset()) { @@ -120,7 +120,7 @@ int BarbotScript::chooseResponse(const TTroomScript *roomScript, const TTsentenc } applyResponse(); - return 2; + return 2; } if (tag == MKTAG('T', 'H', 'R', 'T') || tag == MKTAG('S', 'L', 'O', 'W') || @@ -165,7 +165,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent dialogueId = ARRAY2[_arrIndex++]; } else if (getRandomNumber(100) > 35) { dialogueId = ARRAY2[0]; - _arrIndex = 1; + _arrIndex = 1; } else if (getRandomNumber(100) > 60) { switch (sentence->_field2C) { case 2: @@ -204,7 +204,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent CTrueTalkManager::setFlags(32, getValue(32) - 1); CTrueTalkManager::setFlags(33, getValue(33) - 1); CTrueTalkManager::setFlags(34, getValue(34) - 1); - + TTtreeResult treeResult; int val34 = getState(); setState(0); @@ -314,7 +314,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent return applySentenceIds(50382); } else if (flag2) { return applySentenceIds(51423); - } + } // Deliberate fall-through case 16: @@ -523,7 +523,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent CTrueTalkManager::triggerAction(30, 0); return 2; } - + return applySentenceIds(50320); case 58: if (val2C == 6 || val2C == 10) @@ -935,7 +935,7 @@ int BarbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence * break; case MKTAG('P', 'H', 'I', 'L'): case MKTAG('R', 'C', 'K', 'T'): - case MKTAG('S', 'C', 'I', 'E'): + case MKTAG('S', 'C', 'I', 'E'): tagId = MKTAG('S', 'C', 'I', 'E'); break; case MKTAG('T', 'R', 'A', '2'): @@ -1011,7 +1011,7 @@ uint BarbotScript::getDialsBitset() const { bits |= 2; if (!getDialRegion(2)) bits |= 4; - + return bits; } @@ -1098,7 +1098,7 @@ int BarbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScrip } break; } - + case 10: { uint val = CTrueTalkManager::getStateValue(3); bool bit0 = (val & 1) != 0; diff --git a/engines/titanic/true_talk/barbot_script.h b/engines/titanic/true_talk/barbot_script.h index 1820d77216..a8c92b2927 100644 --- a/engines/titanic/true_talk/barbot_script.h +++ b/engines/titanic/true_talk/barbot_script.h @@ -74,7 +74,7 @@ public: virtual int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence, uint val, uint tagId, uint remainder); - + /** * Handles updating NPC state based on specified dialogue Ids and dial positions */ diff --git a/engines/titanic/true_talk/bellbot_script.cpp b/engines/titanic/true_talk/bellbot_script.cpp index b773e8af30..038285ec8d 100644 --- a/engines/titanic/true_talk/bellbot_script.cpp +++ b/engines/titanic/true_talk/bellbot_script.cpp @@ -245,7 +245,7 @@ int BellbotScript::process(const TTroomScript *roomScript, const TTsentence *sen && sentence->localWord("we") && sentence->localWord("in")) || (sentence->_field2C == 3 && sentence->localWord("rom") && sentence->localWord("is") && sentence->localWord("this")) - ) { + ) { uint id = getRangeValue(getRoomDialogueId(roomScript)); addResponse(getDialogueId(id ? id : 201384)); applyResponse(); @@ -258,7 +258,7 @@ int BellbotScript::process(const TTroomScript *roomScript, const TTsentence *sen result = processEntries(&_sentences[2], 0, roomScript, sentence); } else if (getValue(1) == 1) { result = processEntries(&_sentences[3], 0, roomScript, sentence); - + if (sentence->contains("shrinkbot")) { addResponse(getDialogueId(200583)); applyResponse(); @@ -521,7 +521,7 @@ int BellbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence default: break; } - + return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder); } @@ -835,7 +835,7 @@ int BellbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * applyFlag = true; } break; - + case 5: if (sentence->_field2C == 11 || sentence->_field2C == 13) { addResponse(getDialogueId(200492)); @@ -1497,7 +1497,7 @@ stateFlag = false; case 84: if (sentence->_field2C == 12) { addResponse(getDialogueId(202119)); - + switch (getValue(1)) { case 1: addResponse(getDialogueId(202024)); @@ -1631,7 +1631,7 @@ bool BellbotScript::randomResponse1(const TTroomScript *roomScript, uint id) { randomResponse3(roomScript, id); applyResponse(); } - + return false; } @@ -1729,7 +1729,7 @@ bool BellbotScript::checkCommonWords(const TTroomScript *roomScript, const TTsen addResponse(getDialogueId(200847)); } else if (sentence->localWord("canal")) { addResponse(getDialogueId(getValue(1) == 1 ? 200846 : 200847)); - } else if (sentence->localWord("firstclass") && + } else if (sentence->localWord("firstclass") && (sentence->localWord("stateroom") || sentence->localWord("room"))) { addResponse(getDialogueId(getValue(1) == 1 ? 200840 : 200306)); } else if (sentence->localWord("secondclass") && sentence->localWord("stateroom") && sentence->localWord("room")) { @@ -1790,12 +1790,12 @@ bool BellbotScript::checkCommonWords(const TTroomScript *roomScript, const TTsen } else { addResponse(getDialogueId(200686)); } - } else if (sentence->localWord("embarklobby") + } else if (sentence->localWord("embarklobby") || sentence->localWord("lobby")) { addResponse(getDialogueId(200850)); } else if (sentence->localWord("pellerator")) { addResponse(getDialogueId(200862)); - } else if (sentence->localWord("servicelift") + } else if (sentence->localWord("servicelift") || (sentence->localWord("service") && sentence->localWord("elevator"))) { addResponse(getDialogueId(200855)); } else if (sentence->localWord("elevator")) { diff --git a/engines/titanic/true_talk/bellbot_script.h b/engines/titanic/true_talk/bellbot_script.h index 6f57ee718f..7edb182301 100644 --- a/engines/titanic/true_talk/bellbot_script.h +++ b/engines/titanic/true_talk/bellbot_script.h @@ -78,7 +78,7 @@ private: bool checkCommonWords(const TTroomScript *roomScript, const TTsentence *sentence); uint getRoomDialogueId(const TTroomScript *roomScript); - + /** * Adds a description of the room to the conversation response */ diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp index f3a997e218..4df47e0af1 100644 --- a/engines/titanic/true_talk/deskbot_script.cpp +++ b/engines/titanic/true_talk/deskbot_script.cpp @@ -276,7 +276,7 @@ int DeskbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence default: break; } - + return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder); } @@ -324,7 +324,7 @@ int DeskbotScript::updateState(uint oldId, uint newId, int index) { newId = getStateDialogueId(); if (newId == 240464 && getValue(1) != 1) newId = 240462; - + if (newId == 241635 && isDial1Medium()) { addResponse(getDialogueId(241556)); newId = getRangeValue(241632); @@ -408,7 +408,7 @@ int DeskbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri default: break; } - + return 0; } @@ -480,7 +480,7 @@ uint DeskbotScript::addAssignedRoomDialogue2() { void DeskbotScript::addAssignedRoomDialogue3() { addResponse(getDialogueId(241513)); addResponse(getDialogueId(241510)); - + CTrueTalkManager::setFlags(1, 2); setDialRegion(0, 0); setDialRegion(1, 0); @@ -618,7 +618,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * if (isDial1Low() && getValue(1) == 4) { if (sentence->_field2C == 12 || sentence->_field2C == 13 || sentence->contains("do not")) { - + addResponse(getDialogueId(240447)); setDialRegion(0, 0); setDialRegion(1, 0); @@ -1148,7 +1148,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * addResponse(getDialogueId(241267)); break; } - + add241716(); applyFlag = true; stateFlag = false; @@ -1223,7 +1223,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * addResponse(getDialogueId(241711)); } - + applyFlag = true; stateFlag = false; break; @@ -1244,7 +1244,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * } } - + applyFlag = true; stateFlag = false; break; @@ -1254,7 +1254,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * || sentence->contains("balcony") || sentence->contains("neither") || sentence->contains("the 1") || sentence->contains("the 2") || sentence->contains("former") || sentence->contains("latter") - || sentence->contains("either")) { + || sentence->contains("either")) { addResponse(getDialogueId(241700)); addResponse(getDialogueId(241687)); } else { @@ -1299,7 +1299,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * || sentence->contains("princess") || sentence->contains("small") || sentence->contains("the 1") || sentence->contains("the 2") || sentence->contains("the 3") || sentence->contains("the 4") - || sentence->contains("big") || sentence->contains("large")) { + || sentence->contains("big") || sentence->contains("large")) { addResponse(getDialogueId(241700)); addResponse(getDialogueId(241739)); } else { @@ -1317,7 +1317,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * if (sentence->contains("constitutional") || sentence->contains("const") || sentence->contains("absolute") || sentence->contains("small") || sentence->contains("the 1") || sentence->contains("the 2") - || sentence->contains("big") || sentence->contains("large")) { + || sentence->contains("big") || sentence->contains("large")) { addResponse(getDialogueId(241700)); addResponse(getDialogueId(241739)); } else { @@ -1334,7 +1334,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * case 91: if (sentence->contains("benev") || sentence->contains("dict") || sentence->contains("small") || sentence->contains("the 1") - || sentence->contains("the 2") || sentence->contains("big") + || sentence->contains("the 2") || sentence->contains("big") || sentence->contains("large") || sentence->contains("former") || sentence->contains("latter")) { addResponse(getDialogueId(241700)); @@ -1384,7 +1384,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * || sentence->contains("suite") || sentence->contains("next door") || sentence->contains("the 1") || sentence->contains("the 2") || sentence->contains("former") || sentence->contains("latter") - || sentence->contains("same room")) { + || sentence->contains("same room")) { addAssignedRoom(); setState(0); CTrueTalkManager::setFlags(17, 0); @@ -1424,7 +1424,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * stateFlag = false; } break; - + default: break; } diff --git a/engines/titanic/true_talk/dialogue_file.cpp b/engines/titanic/true_talk/dialogue_file.cpp index cbd3685315..e5438c5825 100644 --- a/engines/titanic/true_talk/dialogue_file.cpp +++ b/engines/titanic/true_talk/dialogue_file.cpp @@ -34,7 +34,7 @@ void DialogueIndexEntry::load(Common::SeekableReadStream &s) { CDialogueFile::CDialogueFile(const CString &filename, uint count) { if (!_file.open(filename)) error("Could not locate dialogue file - %s", filename.c_str()); - + _cache.resize(count); _file.readUint32LE(); // Skip over file Id diff --git a/engines/titanic/true_talk/doorbot_script.cpp b/engines/titanic/true_talk/doorbot_script.cpp index 1ca1ab13e5..5c7403f187 100644 --- a/engines/titanic/true_talk/doorbot_script.cpp +++ b/engines/titanic/true_talk/doorbot_script.cpp @@ -70,7 +70,7 @@ void DoorbotScript::setupSentences() { _mappings.load("Mappings/Doorbot", 4); _entries.load("Sentences/Doorbot"); - + static const int SENTENCE_NUMS[11] = { 2, 100, 101, 102, 107, 110, 111, 124, 129, 131, 132 }; @@ -364,7 +364,7 @@ int DoorbotScript::process(const TTroomScript *roomScript, const TTsentence *sen case 32: return setResponse(10110, 0); - + case 33: if (sentence->contains("sieve") || sentence->contains("colander") || sentence->contains("vegetable") || sentence->contains("ground") @@ -497,7 +497,7 @@ int DoorbotScript::process(const TTroomScript *roomScript, const TTsentence *sen return setResponse(getDialogueId(220000)); break; } - + return 2; } @@ -672,7 +672,7 @@ int DoorbotScript::updateState(uint oldId, uint newId, int index) { bool flag39 = getValue(39) != 0; CTrueTalkManager::setFlags(38, 0); CTrueTalkManager::setFlags(39, 0); - + if (newId > 220890) { switch (newId) { case 221064: @@ -897,7 +897,7 @@ int DoorbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri case 29: if (sentence->localWord("another") || sentence->localWord("more") || sentence->localWord("additional") || sentence->contains("another") || - sentence->contains("more") || sentence->contains("additional")) { + sentence->contains("more") || sentence->contains("additional")) { addResponse(getDialogueId(220058)); applyResponse(); return 2; diff --git a/engines/titanic/true_talk/maitred_script.cpp b/engines/titanic/true_talk/maitred_script.cpp index e0636d045f..e902169ed0 100644 --- a/engines/titanic/true_talk/maitred_script.cpp +++ b/engines/titanic/true_talk/maitred_script.cpp @@ -106,7 +106,7 @@ int MaitreDScript::process(const TTroomScript *roomScript, const TTsentence *sen applyResponse(); } - return 2; + return 2; } if (++_answerCtr > 50 || sentence->localWord("stop") || sentence->localWord("enough") diff --git a/engines/titanic/true_talk/parrot_script.h b/engines/titanic/true_talk/parrot_script.h index ec7bec7629..530eed09fd 100644 --- a/engines/titanic/true_talk/parrot_script.h +++ b/engines/titanic/true_talk/parrot_script.h @@ -32,7 +32,7 @@ private: /** * Setup sentence data */ - void setupSentences(); + void setupSentences(); public: ParrotScript(int val1, const char *charClass, int v2, const char *charName, int v3, int val2, int v4, int v5, int v6, int v7); diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp index 2741e6b640..802e2b4ba6 100644 --- a/engines/titanic/true_talk/script_handler.cpp +++ b/engines/titanic/true_talk/script_handler.cpp @@ -78,7 +78,7 @@ int CScriptHandler::processInput(TTroomScript *roomScript, TTnpcScript *npcScrip const TTstring &line) { if (!roomScript || !line.isValid()) return SS_5; - + TTsentence *sentence = new TTsentence(_inputCtr++, line, this, roomScript, npcScript); int result = _parser.preprocess(sentence); roomScript->scriptPreprocess(sentence); diff --git a/engines/titanic/true_talk/script_handler.h b/engines/titanic/true_talk/script_handler.h index 01aa2ef1c5..e28eeed1ac 100644 --- a/engines/titanic/true_talk/script_handler.h +++ b/engines/titanic/true_talk/script_handler.h @@ -58,7 +58,7 @@ public: /** * Set the character and room */ - ScriptChangedResult scriptChanged(TTroomScript *roomScript, + ScriptChangedResult scriptChanged(TTroomScript *roomScript, TTnpcScript *npcScript, uint dialogueId); int processInput(TTroomScript *roomScript, TTnpcScript *npcScript, diff --git a/engines/titanic/true_talk/script_support.cpp b/engines/titanic/true_talk/script_support.cpp index c24e275827..14560e2d9f 100644 --- a/engines/titanic/true_talk/script_support.cpp +++ b/engines/titanic/true_talk/script_support.cpp @@ -36,7 +36,7 @@ int TTnpcScriptResponse::size() const { /*------------------------------------------------------------------------*/ -TTscriptRange::TTscriptRange(uint id, const Common::Array<uint> &values, +TTscriptRange::TTscriptRange(uint id, const Common::Array<uint> &values, bool isRandom, bool isSequential) : _id(id), _nextP(nullptr) { _mode = SF_NONE; diff --git a/engines/titanic/true_talk/script_support.h b/engines/titanic/true_talk/script_support.h index a41673bd5c..bdaec6e7c9 100644 --- a/engines/titanic/true_talk/script_support.h +++ b/engines/titanic/true_talk/script_support.h @@ -55,7 +55,7 @@ struct TTscriptRange { TTscriptRange() : _id(0), _nextP(nullptr), _priorIndex(0), _mode(SF_NONE) {} - TTscriptRange(uint id, const Common::Array<uint> &values, bool isRandom, + TTscriptRange(uint id, const Common::Array<uint> &values, bool isRandom, bool isSequential); }; diff --git a/engines/titanic/true_talk/succubus_script.h b/engines/titanic/true_talk/succubus_script.h index d5cea7e66f..782e3eeb04 100644 --- a/engines/titanic/true_talk/succubus_script.h +++ b/engines/titanic/true_talk/succubus_script.h @@ -34,7 +34,7 @@ private: /** * Setup sentence data */ - void setupSentences(); + void setupSentences(); /** * Add a response and optionally set the state diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp index be9ca667de..ed45ab26a0 100644 --- a/engines/titanic/true_talk/true_talk_manager.cpp +++ b/engines/titanic/true_talk/true_talk_manager.cpp @@ -45,7 +45,7 @@ CTrueTalkNPC *CTrueTalkManager::_currentNPC; /*------------------------------------------------------------------------*/ -CTrueTalkManager::CTrueTalkManager(CGameManager *owner) : +CTrueTalkManager::CTrueTalkManager(CGameManager *owner) : _gameManager(owner), _scripts(&_titleEngine), _currentCharId(0), _dialogueFile(nullptr), _dialogueId(0) { _titleEngine.setup(3, 3); @@ -209,7 +209,7 @@ void CTrueTalkManager::preLoad() { void CTrueTalkManager::removeCompleted() { for (TTtalkerList::iterator i = _talkers.begin(); i != _talkers.end(); ) { TTtalker *talker = *i; - + if (talker->_done) { i = _talkers.erase(i); delete talker; @@ -222,7 +222,7 @@ void CTrueTalkManager::removeCompleted() { void CTrueTalkManager::start(CTrueTalkNPC *npc, uint id, CViewItem *view) { TTnpcScript *npcScript = getNpcScript(npc); TTroomScript *roomScript = getRoomScript(); - + _titleEngine.reset(); uint charId = npcScript->charId(); loadAssets(npc, charId); @@ -337,7 +337,7 @@ void CTrueTalkManager::processInput(CTrueTalkNPC *npc, CTextInputMsg *msg, CView loadAssets(npc, npcScript->charId()); setDialogue(npc, roomScript, view); } - + _currentNPC = nullptr; } @@ -376,7 +376,7 @@ CString CTrueTalkManager::readDialogueString() { size_t entrySize = textRes->size(); byte *tempBuffer = (entrySize < STRING_BUFFER_SIZE) ? buffer : new byte[entrySize + 1]; - + _dialogueFile->read(textRes, tempBuffer, entrySize); buffer[entrySize] = '\0'; @@ -406,7 +406,7 @@ uint CTrueTalkManager::readDialogueSpeech() { for (uint idx = 0; idx < _titleEngine._indexes.size(); ++idx) { CWaveFile *waveFile = _gameManager->_sound.getTrueTalkSound( _dialogueFile, _titleEngine._indexes[idx] - _dialogueId); - if (waveFile) { + if (waveFile) { _speechDuration += waveFile->getDuration(); } } diff --git a/engines/titanic/true_talk/tt_action.h b/engines/titanic/true_talk/tt_action.h index 29e2bc4e4a..c6f49af16d 100644 --- a/engines/titanic/true_talk/tt_action.h +++ b/engines/titanic/true_talk/tt_action.h @@ -29,7 +29,7 @@ namespace Titanic { class TTaction : public TTmajorWord { private: - static bool _staticFlag; + static bool _staticFlag; protected: int _field30; public: diff --git a/engines/titanic/true_talk/tt_concept.cpp b/engines/titanic/true_talk/tt_concept.cpp index c614e14dae..3c52c9f13b 100644 --- a/engines/titanic/true_talk/tt_concept.cpp +++ b/engines/titanic/true_talk/tt_concept.cpp @@ -27,7 +27,7 @@ namespace Titanic { -TTconcept::TTconcept() : _string1(" "), _string2(" "), +TTconcept::TTconcept() : _string1(" "), _string2(" "), _scriptP(nullptr), _wordP(nullptr) { if (setStatus()) setScriptType(ST_UNKNOWN_SCRIPT); @@ -51,7 +51,7 @@ TTconcept::TTconcept(TTscriptBase *script, ScriptType scriptType) : TTconcept::TTconcept(TTword *word, ScriptType scriptType) : _string1(" "), _string2(" "), _wordP(nullptr), _scriptP(nullptr) { - + if (!word || !setStatus() || word->getStatus()) { _status = SS_5; } else { @@ -74,7 +74,7 @@ TTconcept::TTconcept(TTconcept &src) : if (setStatus()) { _status = SS_VALID; _scriptP = src._scriptP; - + if (src._wordP) { _status = initializeWordRef(src._wordP); initialize(src); @@ -177,7 +177,7 @@ void TTconcept::initialize(TTconcept &src) { _field30 = src._field30; _field34 = src._field34; - + if (src._flag) { g_vm->_exeResources._owner->setParserConcept(this, &src); src.setFlag(true); @@ -225,7 +225,7 @@ int TTconcept::setOwner(TTconcept *src) { int TTconcept::setOwner(TTword *src, bool dontDup) { TTword *word = dontDup ? src : src->copy(); - + if (word) { if (!_word2P) { _word2P = word; diff --git a/engines/titanic/true_talk/tt_concept.h b/engines/titanic/true_talk/tt_concept.h index 88afb6f28b..430b3b6a8c 100644 --- a/engines/titanic/true_talk/tt_concept.h +++ b/engines/titanic/true_talk/tt_concept.h @@ -125,8 +125,8 @@ public: /** * Returns true if the word is of the specified class */ - bool isWordClass(WordClass wordClass) const { - return _wordP && _wordP->isClass(wordClass); + bool isWordClass(WordClass wordClass) const { + return _wordP && _wordP->isClass(wordClass); } void setFlag(bool val) { _flag = val; } diff --git a/engines/titanic/true_talk/tt_node.cpp b/engines/titanic/true_talk/tt_node.cpp index cbbb1dd756..fece3b8889 100644 --- a/engines/titanic/true_talk/tt_node.cpp +++ b/engines/titanic/true_talk/tt_node.cpp @@ -78,7 +78,7 @@ TTnode *TTnode::getHead() { TTnode *TTnode::getTail() { if (_nextP == nullptr) return this; - + TTnode *node = _nextP; while (node->_nextP) node = node->_nextP; diff --git a/engines/titanic/true_talk/tt_npc_script.h b/engines/titanic/true_talk/tt_npc_script.h index b9afdfad8a..bdca568b09 100644 --- a/engines/titanic/true_talk/tt_npc_script.h +++ b/engines/titanic/true_talk/tt_npc_script.h @@ -259,7 +259,7 @@ public: * and adds it to the response */ virtual void selectResponse(int id); - + /** * Handles scanning the word list for a given Id, and if * found adds it to the sentence concept list @@ -275,7 +275,7 @@ public: * either a random value, or each value in turn */ virtual uint getRangeValue(uint id); - + /** * Resets the prior used index for the specified range */ @@ -295,7 +295,7 @@ public: * Returns a bitset of the dials being off or not */ virtual uint getDialsBitset() const { return 0; } - + virtual const TTscriptMapping *getMapping(int index); virtual int doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence); @@ -303,7 +303,7 @@ public: * Handles any post-response NPC processing */ virtual void postResponse(int v1, const TTsentenceEntry *entry, const TTroomScript *roomScript, const TTsentence *sentence) {} - + virtual void save(SimpleFile *file); virtual void load(SimpleFile *file); virtual void saveBody(SimpleFile *file); @@ -337,7 +337,7 @@ public: * Handles a randomzied response */ virtual bool randomResponse(uint index); - + virtual uint translateId(uint id) const; void preLoad(); diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp index 95a302d53c..d67f5235c4 100644 --- a/engines/titanic/true_talk/tt_parser.cpp +++ b/engines/titanic/true_talk/tt_parser.cpp @@ -147,16 +147,16 @@ int TTparser::normalize(TTsentence *sentence) { case '!': sentence->set38(3); break; - + case '\'': if (!normalizeContraction(srcLine, index, *destLine)) flag = true; break; - + case '.': sentence->set38(1); break; - + case ':': commandVal = isEmoticon(srcLine, index); if (commandVal) { @@ -166,7 +166,7 @@ int TTparser::normalize(TTsentence *sentence) { flag = true; } break; - + case ';': commandVal = isEmoticon(srcLine, index); if (commandVal == 6) { @@ -177,7 +177,7 @@ int TTparser::normalize(TTsentence *sentence) { index += 2; } break; - + case '<': ++index; commandVal = isEmoticon(srcLine, index); @@ -315,7 +315,7 @@ bool TTparser::normalizeContraction(const TTstring &srcLine, int srcIndex, TTstr destLine.deleteLastChar(); destLine.deleteLastChar(); destLine += "m"; - } else if (srcLine.hasSuffix(" sha") || + } else if (srcLine.hasSuffix(" sha") || (srcIndex == 4 && srcLine.hasSuffix("sha"))) { // shan't -> shall not destLine.deleteLastChar(); @@ -726,7 +726,7 @@ int TTparser::loadRequests(TTword *word) { int TTparser::considerRequests(TTword *word) { if (!_nodesP || !word) return 0; - + TTconcept *concept = nullptr; int status = 0; bool flag = false; @@ -802,7 +802,7 @@ int TTparser::considerRequests(TTword *word) { } else { status = _sentenceConcept->createConcept(0, 2, word); } - + if (!status && !_sentenceConcept->_concept4P && _sentenceConcept->_concept0P) { TTconcept *oldConcept = _sentenceConcept->_concept2P; flag = filterConcepts(5, 2); @@ -814,14 +814,14 @@ int TTparser::considerRequests(TTword *word) { } } break; - + case SEEK_OBJECT_OVERRIDE: if ((word->_wordClass == WC_THING || word->_wordClass == WC_PRONOUN) && _sentence->fn2(2, TTstring("thePlayer"), _sentenceConcept) && !_sentenceConcept->_concept3P) { _sentenceConcept->_concept3P = _sentenceConcept->_concept2P; _sentenceConcept->_concept2P = nullptr; - + flag = filterConcepts(5, 2); if (!flag) { status = _sentenceConcept->createConcept(0, 2, word); @@ -893,7 +893,7 @@ int TTparser::considerRequests(TTword *word) { if (word->_id == 601) { if (_conceptP->findByWordClass(WC_THING)) status = _conceptP->setOwner(word, false); - + flag = true; } break; @@ -992,11 +992,11 @@ int TTparser::considerRequests(TTword *word) { oldNode->_field1C = 2; _sentenceConcept = oldNode->addSibling(); concept = nullptr; - + _sentenceConcept->_concept1P = oldNode->_concept1P; _sentenceConcept->_concept5P = oldNode->_concept5P; _sentenceConcept->_concept2P = oldNode->_concept2P; - + if (seekVal) { seekVal = 0; @@ -1107,7 +1107,7 @@ int TTparser::considerRequests(TTword *word) { if (!_sentenceConcept->_concept0P) { newPictP = new TTpicture(TTstring("?"), WC_THING, 0, 0, 0, 0, 0); newConceptP = new TTconcept(newPictP); - + _sentenceConcept->_concept0P = newConceptP; delete newPictP; addNode(4); @@ -1195,7 +1195,7 @@ int TTparser::considerRequests(TTword *word) { case MKTAG('H', 'E', 'L', 'P'): if (_sentence->_field2C == 1) _sentence->_field2C = 18; - + flag = true; break; @@ -1273,7 +1273,7 @@ int TTparser::considerRequests(TTword *word) { break; } - TTparserNode *nextP = dynamic_cast<TTparserNode *>(nodeP->_nextP); + TTparserNode *nextP = dynamic_cast<TTparserNode *>(nodeP->_nextP); if (flag) delete nodeP; nodeP = nextP; @@ -1288,7 +1288,7 @@ int TTparser::processRequests(TTword *word) { switch (status) { case 0: status = considerRequests(word); - + // Iterate through the words while (_currentWordP) { considerRequests(_currentWordP); @@ -1388,7 +1388,7 @@ int TTparser::checkForAction() { if (_conceptP && _currentWordP) { // Firstly we need to get the next word to process, and remove it from // the list pointed to by _currentWordP - TTword *word = _currentWordP; + TTword *word = _currentWordP; if (word->_nextP) { // Chain of words, so we need to find the last word of the chain, // and set the last-but-one's _nextP to nullptr to detach the last one @@ -1410,7 +1410,7 @@ int TTparser::checkForAction() { word->_text == "done") { TTstring doStr("do"); TTaction *action = new TTaction(doStr, WC_ACTION, 112, 0, _sentenceConcept->get18()); - + if (!action->isValid()) { status = SS_4; } else { diff --git a/engines/titanic/true_talk/tt_parser.h b/engines/titanic/true_talk/tt_parser.h index 201de7eb0e..5fd997a985 100644 --- a/engines/titanic/true_talk/tt_parser.h +++ b/engines/titanic/true_talk/tt_parser.h @@ -90,7 +90,7 @@ private: * spaces and lowercasing everything */ int normalize(TTsentence *sentence); - + /** * Submethod called by normalize to handle expanding contacted word pairs * like can't, should've, and so on. @@ -118,7 +118,7 @@ private: * @param startIndex Starting index in the start to check * @param strings List of strings to check for. Strings come in pairs, with the * first being the string to match, and the second the replacement - * @returns Index of the start of the following word + * @returns Index of the start of the following word */ static int searchAndReplace(TTstring &line, int startIndex, const StringArray &strings); diff --git a/engines/titanic/true_talk/tt_picture.h b/engines/titanic/true_talk/tt_picture.h index 18cb88278f..988f2a7437 100644 --- a/engines/titanic/true_talk/tt_picture.h +++ b/engines/titanic/true_talk/tt_picture.h @@ -53,7 +53,7 @@ public: * Checks whether the word's tag is a known type */ virtual bool checkTag() const; - + /** * Compare the word's tag to a given tag value */ @@ -63,7 +63,7 @@ public: * Return the tag associated with the word */ virtual uint getTag() const; - + virtual bool proc9(int val) const; virtual int proc10() const; diff --git a/engines/titanic/true_talk/tt_pronoun.h b/engines/titanic/true_talk/tt_pronoun.h index ccc077152c..f7d61780fa 100644 --- a/engines/titanic/true_talk/tt_pronoun.h +++ b/engines/titanic/true_talk/tt_pronoun.h @@ -29,7 +29,7 @@ namespace Titanic { class TTpronoun : public TTmajorWord { private: - static bool _staticFlag; + static bool _staticFlag; protected: int _field30; public: @@ -48,7 +48,7 @@ public: */ virtual TTword *copy() const; - virtual bool comparePronounTo(int val) const { + virtual bool comparePronounTo(int val) const { return _field30 == val; } diff --git a/engines/titanic/true_talk/tt_quotes_tree.cpp b/engines/titanic/true_talk/tt_quotes_tree.cpp index 1f073b83f2..16453a10ae 100644 --- a/engines/titanic/true_talk/tt_quotes_tree.cpp +++ b/engines/titanic/true_talk/tt_quotes_tree.cpp @@ -33,12 +33,12 @@ static uint TABLE_INDEXES[3] = { 922, 1015, 1018 }; void TTquotesTree::load() { Common::SeekableReadStream *r = g_vm->_filesManager->getResource("TEXT/TREE"); - + for (int idx = 0; idx < QUOTES_TREE_COUNT; ++idx) { TTquotesTreeEntry &rec = _entries[idx]; assert(r->pos() < r->size()); - - rec._id = r->readUint32LE(); + + rec._id = r->readUint32LE(); if (rec._id == 0) { // Nothing needed } else { @@ -64,14 +64,14 @@ int TTquotesTree::search(const char *str, QuoteTreeNum treeNum, const TTquotesTreeEntry *bTree = &_entries[TABLE_INDEXES[treeNum]]; if (!search1(&str, bTree, buffer, tagId) || !buffer->_treeItemP) return -1; - + if (remainder) { while (*str) { if (*str >= 'a' && *str != 's') *remainder += *str; } } - + return buffer->_treeItemP->_id & 0xffffff; } @@ -83,7 +83,7 @@ bool TTquotesTree::search1(const char **str, const TTquotesTreeEntry *bTree, const char *strP = *str; bool flag = false; - for (uint mode = bTree->_id >> 24; mode != 0; + for (uint mode = bTree->_id >> 24; mode != 0; ++bTree, mode = bTree->_id >> 24) { switch (mode) { @@ -91,11 +91,11 @@ bool TTquotesTree::search1(const char **str, const TTquotesTreeEntry *bTree, if (compareWord(str, bTree->_string.c_str())) flag = true; break; - + case 2: compareWord(str, bTree->_string.c_str()); break; - + case 5: if (READ_LE_UINT32(bTree->_string.c_str()) == tagId) flag = true; diff --git a/engines/titanic/true_talk/tt_response.cpp b/engines/titanic/true_talk/tt_response.cpp index f007f98f97..1c784ad320 100644 --- a/engines/titanic/true_talk/tt_response.cpp +++ b/engines/titanic/true_talk/tt_response.cpp @@ -32,7 +32,7 @@ TTresponse::TTresponse(int dialogueId, int val2) : _field0(val2), _text(" "), _dialogueId(dialogueId), _nextP(nullptr), _linkP(nullptr) { } -TTresponse::TTresponse(const TTresponse *src) : _field0(src->_field0), +TTresponse::TTresponse(const TTresponse *src) : _field0(src->_field0), _text(src->_text), _dialogueId(src->_dialogueId), _nextP(src->_nextP), _linkP(src->_linkP) { } @@ -52,7 +52,7 @@ TTresponse::~TTresponse() { TTresponse *TTresponse::copyChain() const { TTresponse *returnResponseP = new TTresponse(this); - for (TTresponse *srcP = _nextP, *destP = returnResponseP; + for (TTresponse *srcP = _nextP, *destP = returnResponseP; srcP; srcP = srcP->_nextP, destP = destP->_nextP) { destP->_nextP = new TTresponse(*srcP); } diff --git a/engines/titanic/true_talk/tt_room_script.cpp b/engines/titanic/true_talk/tt_room_script.cpp index a49a5a5bd1..9b7be0a976 100644 --- a/engines/titanic/true_talk/tt_room_script.cpp +++ b/engines/titanic/true_talk/tt_room_script.cpp @@ -49,7 +49,7 @@ void TTroomScript::proc9(int v) { ScriptChangedResult TTroomScript::scriptChanged(TTscriptBase *npcScript, int id) { if (id == 1) _field54 = 1; - + return SCR_1; } diff --git a/engines/titanic/true_talk/tt_room_script.h b/engines/titanic/true_talk/tt_room_script.h index 39a50ac30d..0f47830a12 100644 --- a/engines/titanic/true_talk/tt_room_script.h +++ b/engines/titanic/true_talk/tt_room_script.h @@ -49,12 +49,12 @@ public: virtual bool proc8() const = 0; virtual void proc9(int v) = 0; - + /** * Called when the script changes */ virtual ScriptChangedResult scriptChanged(TTscriptBase *npcScript, int id) = 0; - + virtual bool proc11() const = 0; }; diff --git a/engines/titanic/true_talk/tt_script_base.h b/engines/titanic/true_talk/tt_script_base.h index 869b0beb64..30a296a444 100644 --- a/engines/titanic/true_talk/tt_script_base.h +++ b/engines/titanic/true_talk/tt_script_base.h @@ -60,7 +60,7 @@ protected: * Delete any responses set up for the script */ void deleteResponses(); - + /** * Creates and appends a new response fragment to the script specified by * the given conversation Id @@ -83,7 +83,7 @@ protected: * Set the script state */ void setState(int state) { _state = state; } - + /** * Get the current state */ diff --git a/engines/titanic/true_talk/tt_scripts.cpp b/engines/titanic/true_talk/tt_scripts.cpp index f8ea65a475..4c01fd1ead 100644 --- a/engines/titanic/true_talk/tt_scripts.cpp +++ b/engines/titanic/true_talk/tt_scripts.cpp @@ -32,7 +32,7 @@ #include "titanic/true_talk/succubus_script.h" namespace Titanic { - + TTnpcScript *TTnpcScriptList::findById(int charId) const { for (TTnpcScriptList::const_iterator i = begin(); i != end(); ++i) { const TTnpcScriptListItem *item = *i; diff --git a/engines/titanic/true_talk/tt_string.h b/engines/titanic/true_talk/tt_string.h index 5b12d93418..69a94f6bf6 100644 --- a/engines/titanic/true_talk/tt_string.h +++ b/engines/titanic/true_talk/tt_string.h @@ -39,7 +39,7 @@ struct TTstringData { }; enum TTstringStatus { - SS_VALID = 0, SS_1 = 1, SS_2 = 2, SS_3 = 3, SS_4 = 4, + SS_VALID = 0, SS_1 = 1, SS_2 = 2, SS_3 = 3, SS_4 = 4, SS_5 = 5, SS_7 = 7, SS_8 = 8, SS_11 = 11, SS_13 = 13 }; @@ -127,7 +127,7 @@ public: * Get a char * pointer to the string data */ const char *c_str() const { return _data->_string.c_str(); } - + /** * Automatic operator to convert to a const char * */ diff --git a/engines/titanic/true_talk/tt_synonym.cpp b/engines/titanic/true_talk/tt_synonym.cpp index b476efefcb..bb78e734ca 100644 --- a/engines/titanic/true_talk/tt_synonym.cpp +++ b/engines/titanic/true_talk/tt_synonym.cpp @@ -24,7 +24,7 @@ namespace Titanic { -TTsynonym::TTsynonym() : TTstringNode(), _file(HANDLE_STDIN), +TTsynonym::TTsynonym() : TTstringNode(), _file(HANDLE_STDIN), _mode(0), _field1C(0) { } @@ -72,7 +72,7 @@ int TTsynonym::save(SimpleFile *file) { } file->writeFormat("%c", ' '); - + if (synP->_file) { file->writeFormat("%2.0d", synP->_file); } else { diff --git a/engines/titanic/true_talk/tt_title_script.cpp b/engines/titanic/true_talk/tt_title_script.cpp index 85b56d0e1e..2effb96cc7 100644 --- a/engines/titanic/true_talk/tt_title_script.cpp +++ b/engines/titanic/true_talk/tt_title_script.cpp @@ -25,7 +25,7 @@ namespace Titanic { TTTitleScript::TTTitleScript() : TTscriptBase(1, "", 0, "", 0, -1, -1, -1, 0), - _field50(0), _field5C(-1), _field60(0) { + _field50(0), _field5C(-1), _field60(0) { } } // End of namespace Titanic diff --git a/engines/titanic/true_talk/tt_word.h b/engines/titanic/true_talk/tt_word.h index 7fd61c38ac..7a42614f43 100644 --- a/engines/titanic/true_talk/tt_word.h +++ b/engines/titanic/true_talk/tt_word.h @@ -32,7 +32,7 @@ namespace Titanic { /** * Types of words */ -enum WordClass { +enum WordClass { WC_UNKNOWN = 0, WC_ACTION = 1, WC_THING = 2, WC_ABSTRACT = 3, WC_ARTICLE = 4, WC_CONJUNCTION = 5, WC_PRONOUN = 6, WC_PREPOSITION = 7, WC_ADJECTIVE = 8, WC_ADVERB = 9 @@ -155,7 +155,7 @@ public: * Creates a copy of the word */ virtual TTword *copy() const; - + virtual bool proc2(int val) const { return false; } virtual int proc3() const { return -1; } virtual void proc4() {} @@ -165,7 +165,7 @@ public: * Checks whether the word's tag is a known type */ virtual bool checkTag() const { return false; } - + /** * Compare the word's tag to a given tag value */ @@ -175,7 +175,7 @@ public: * Return the tag associated with the word */ virtual uint getTag() const { return 0; } - + virtual bool proc9(int val) const { return false; } virtual int proc10() const { return 0; } virtual void proc11() {} diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp index 4788ba61a9..c0f0638740 100644 --- a/engines/toon/anim.cpp +++ b/engines/toon/anim.cpp @@ -218,7 +218,7 @@ void Animation::drawFrameWithMask(Graphics::Surface &surface, int32 frame, int16 void Animation::drawFrameWithMaskAndScale(Graphics::Surface &surface, int32 frame, int16 xx, int16 yy, int32 zz, Picture *mask, int32 scale) { debugC(5, kDebugAnim, "drawFrameWithMaskAndScale(surface, %d, %d, %d, %d, mask, %d)", frame, xx, yy, zz, scale); - + int16 dataFrame = frame; if (_frames[frame]._ref != -1) diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index 7b7b41f0aa..2dd03ab9c3 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -240,7 +240,7 @@ GfxSurface::GfxSurface() : Graphics::Screen(0, 0), _bounds(0, 0, SCREEN_WIDTH, S GfxSurface::GfxSurface(const GfxSurface &s): Graphics::Screen(0, 0) { free(); // Free the 0x0 surface allocated by Graphics::Screen _lockSurfaceCtr = 0; - + operator=(s); } diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp index b94b82f423..9b393132d9 100644 --- a/engines/tsage/tsage.cpp +++ b/engines/tsage/tsage.cpp @@ -115,7 +115,7 @@ void TSageEngine::initialize() { #ifdef TSAGE_SHERLOCK_ENABLED g_resourceManager->addLib("SF3.RLB"); g_globals = new Globals(); - + return; #endif } diff --git a/engines/voyeur/configure.engine b/engines/voyeur/configure.engine index c53530a9ed..647e20267f 100644 --- a/engines/voyeur/configure.engine +++ b/engines/voyeur/configure.engine @@ -1,4 +1,3 @@ - # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] add_engine voyeur "Voyeur" yes diff --git a/engines/voyeur/screen.cpp b/engines/voyeur/screen.cpp index 62f609c5c7..ca9248398f 100644 --- a/engines/voyeur/screen.cpp +++ b/engines/voyeur/screen.cpp @@ -334,7 +334,7 @@ void Screen::sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, destP += width2 + widthDiff2; } - addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, + addDirtyRect(Common::Rect(offset.x, offset.y, offset.x + width2, offset.y + height1)); } } diff --git a/engines/wage/dialog.cpp b/engines/wage/dialog.cpp index ffb4f9c93d..a8500a7ebe 100644 --- a/engines/wage/dialog.cpp +++ b/engines/wage/dialog.cpp @@ -48,6 +48,7 @@ #include "common/system.h" #include "common/events.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" #include "wage/wage.h" @@ -92,7 +93,7 @@ Dialog::~Dialog() { } const Graphics::Font *Dialog::getDialogFont() { - return _gui->_wm.getFont(_gui->_wm.getFontName(0, 12), Graphics::FontManager::kBigGUIFont); // Default is Chicago + return _gui->_wm._fontMan->getFont(Graphics::MacFont(Graphics::kMacFontChicago, 12)); } void Dialog::paint() { diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp index 5ec54493a7..90247a5b21 100644 --- a/engines/wage/entities.cpp +++ b/engines/wage/entities.cpp @@ -54,6 +54,7 @@ #include "common/memstream.h" #include "graphics/managed_surface.h" +#include "graphics/macgui/macfontmanager.h" namespace Wage { @@ -86,8 +87,7 @@ Scene::Scene() { _script = NULL; _design = NULL; _textBounds = NULL; - _fontSize = 0; - _fontType = 0; + _font = NULL; for (int i = 0; i < 4; i++) _blocked[i] = false; @@ -111,8 +111,7 @@ Scene::Scene(Common::String name, Common::SeekableReadStream *data) { _script = NULL; _textBounds = NULL; - _fontSize = 0; - _fontType = 0; + _font = NULL; setDesignBounds(readRect(data)); _worldY = data->readSint16BE(); @@ -138,6 +137,7 @@ Scene::Scene(Common::String name, Common::SeekableReadStream *data) { Scene::~Scene() { delete _script; delete _textBounds; + delete _font; } void Scene::paint(Graphics::ManagedSurface *surface, int x, int y) { @@ -157,15 +157,6 @@ void Scene::paint(Graphics::ManagedSurface *surface, int x, int y) { } } -const char *Scene::getFontName() { - const char *name = ((WageEngine *)g_engine)->_gui->_wm.getFontName(_fontType, _fontSize); - - if (!name) - return "Unknown"; - - return name; -} - Designed *Scene::lookUpEntity(int x, int y) { for (ObjList::const_iterator it = _objs.end(); it != _objs.begin(); ) { it--; diff --git a/engines/wage/entities.h b/engines/wage/entities.h index b7cafb2294..a755af5360 100644 --- a/engines/wage/entities.h +++ b/engines/wage/entities.h @@ -50,6 +50,7 @@ namespace Graphics { class ManagedSurface; + class MacFont; } namespace Wage { @@ -308,8 +309,7 @@ public: Script *_script; Common::String _text; Common::Rect *_textBounds; - int _fontSize; - int _fontType; // 3 => Geneva, 22 => Courier, param to TextFont() function + Graphics::MacFont *_font; bool _blocked[4]; Common::String _messages[4]; int _soundFrequency; // times a minute, max 3600 @@ -334,7 +334,7 @@ public: void paint(Graphics::ManagedSurface *screen, int x, int y); - const char *getFontName(); + const Graphics::MacFont *getFont() { return _font; } }; } // End of namespace Wage diff --git a/engines/wage/gui-console.cpp b/engines/wage/gui-console.cpp index a5e71463f7..37031f0dd9 100644 --- a/engines/wage/gui-console.cpp +++ b/engines/wage/gui-console.cpp @@ -51,6 +51,7 @@ #include "graphics/cursorman.h" #include "graphics/fonts/bdf.h" #include "graphics/palette.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindow.h" #include "graphics/macgui/macmenu.h" @@ -65,7 +66,7 @@ namespace Wage { const Graphics::Font *Gui::getConsoleFont() { Scene *scene = _engine->_world->_player->_currentScene; - return _wm.getFont(scene->getFontName(), Graphics::FontManager::kConsoleFont); + return _wm._fontMan->getFont(*scene->getFont()); } void Gui::clearOutput() { diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp index 3e56c0daa7..90d689720e 100644 --- a/engines/wage/world.cpp +++ b/engines/wage/world.cpp @@ -46,6 +46,7 @@ */ #include "common/file.h" +#include "graphics/macgui/macfontmanager.h" #include "wage/wage.h" #include "wage/entities.h" @@ -203,8 +204,9 @@ bool World::loadWorld(Common::MacResManager *resMan) { res = resMan->getResource(MKTAG('A','T','X','T'), *iter); if (res != NULL) { scene->_textBounds = readRect(res); - scene->_fontType = res->readUint16BE(); - scene->_fontSize = res->readUint16BE(); + int fontType = res->readUint16BE(); + int fontSize = res->readUint16BE(); + scene->_font = new Graphics::MacFont(fontType, fontSize, Graphics::kMacFontRegular, Graphics::FontManager::kConsoleFont); Common::String text; while (res->pos() < res->size()) { diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp index 1af7e2b56d..ef3cc2d84f 100644 --- a/engines/wintermute/base/base_game.cpp +++ b/engines/wintermute/base/base_game.cpp @@ -70,6 +70,7 @@ #include "common/keyboard.h" #include "common/system.h" #include "common/file.h" +#include "graphics/scaler.h" #if EXTENDED_DEBUGGER_ENABLED #include "engines/wintermute/base/scriptables/debuggable/debuggable_script_engine.h" @@ -171,7 +172,12 @@ BaseGame::BaseGame(const Common::String &targetName) : BaseObject(this), _target _forceNonStreamedSounds = false; - _thumbnailWidth = _thumbnailHeight = 0; + // These are NOT the actual engine defaults (they are 0, 0), + // but we have a use for thumbnails even for games that don't + // use them in-game, hence we set a default that is suitably + // sized for the GMM (expecting 4:3 ratio) + _thumbnailWidth = kThumbnailWidth; + _thumbnailHeight = kThumbnailHeight2; _localSaveDir = "saves"; diff --git a/engines/wintermute/detection_tables.h b/engines/wintermute/detection_tables.h index ca30204462..68985d8d0c 100644 --- a/engines/wintermute/detection_tables.h +++ b/engines/wintermute/detection_tables.h @@ -138,114 +138,118 @@ static const PlainGameDescriptor wintermuteGames[] = { static const WMEGameDescription gameDescriptions[] = { // Five Lethal Demons - WME_WINENTRY("5ld", "", + WME_WINENTRY("5ld", "", WME_ENTRY1s("data.dcp", "1037a77cbd001e0644898addc022322c", 15407750), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Five Magical Amulets (Czech) - WME_WINENTRY("5ma", "", + WME_WINENTRY("5ma", "", WME_ENTRY2s("czech.dcp", "7b2515a8ceb955c72bc14f0f1fca869e", 184, "data.dcp", "0134e92bcd5fd2837df3971087e96067", 163316498), Common::CZ_CZE, ADGF_UNSTABLE, WME_1_7_0), // Five Magical Amulets (English) WME_WINENTRY("5ma", "", WME_ENTRY2s("english.dcp", "2f97bca09260ba23b645da9f0855ce7f", 893681, "data.dcp", "0134e92bcd5fd2837df3971087e96067", 163316498), Common::EN_ANY, ADGF_UNSTABLE, WME_1_7_0), + // Five Magical Amulets (German) + WME_WINENTRY("5ma", "", + WME_ENTRY2s("german.dcp", "bfa74aae81672803d0d0748ac0a532b7", 885150, + "data.dcp", "0134e92bcd5fd2837df3971087e96067", 163316498), Common::DE_DEU, ADGF_UNSTABLE, WME_1_7_0), // Five Magical Amulets (Polish) WME_WINENTRY("5ma", "", WME_ENTRY2s("polish.dcp", "bb877d48795471a17f25b0b5109100d1", 1132197, "data.dcp", "0134e92bcd5fd2837df3971087e96067", 163316498), Common::PL_POL, ADGF_UNSTABLE, WME_1_7_0), // Actual Destination - WME_WINENTRY("actualdest", "", + WME_WINENTRY("actualdest", "", WME_ENTRY1s("data.dcp", "6926f44b26f21ceb1d840eaab9aeb510", 9081740), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Boredom of Agustin Cordes - WME_WINENTRY("agustin", "", + WME_WINENTRY("agustin", "", WME_ENTRY1s("data.dcp", "abb79c16c9b92e9b06525a4c7c3f5861", 2461949), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Beyond the Threshold - WME_WINENTRY("bthreshold", "", + WME_WINENTRY("bthreshold", "", WME_ENTRY1s("data.dcp", "d49bf9ccb2e74507447c82d6ad3e2bc4", 12773712), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Bickadoodle - WME_WINENTRY("bickadoodle", "", + WME_WINENTRY("bickadoodle", "", WME_ENTRY1s("data.dcp", "84db4d1594cac95e25614985775d10a8", 35303844), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Bickadoodle (Ver 1.1) - WME_WINENTRY("bickadoodle", "Version 1.1", + WME_WINENTRY("bickadoodle", "Version 1.1", WME_ENTRY1s("data.dcp", "8bb52ac9a9ee129c5059e8e808b669d7", 35337760), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Bickadoodle (Ver 1.2) WME_WINENTRY("bickadoodle", "Version 1.2", WME_ENTRY1s("data.dcp", "1796a48f3ed72dd785ce93334ab883cc", 35337760), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Bickadoodle (download from http://aethericgames.com/games/bickadoodle/download-bickadoodle/) - WME_WINENTRY("bickadoodle", "", + WME_WINENTRY("bickadoodle", "", WME_ENTRY1s("data.dcp", "1584d83577c32add0fce27fae91141a2", 35337728), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Book of Gron Part One - WME_WINENTRY("bookofgron", "", + WME_WINENTRY("bookofgron", "", WME_ENTRY1s("data.dcp", "e61b2ebee044a82fa0f8ca0fce2c8946", 83129531), Common::RU_RUS, ADGF_UNSTABLE, LATEST_VERSION), // Carol Reed 4 - East Side Story (Demo) - WME_WINENTRY("carolreed4", "Demo", + WME_WINENTRY("carolreed4", "Demo", WME_ENTRY1s("data.dcp", "b3f8b09bb4b05ee3e9d14697525257f9", 59296246), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Carol Reed 4 - East Side Story - WME_WINENTRY("carolreed4", "", + WME_WINENTRY("carolreed4", "", WME_ENTRY1s("data.dcp", "b26377797f060afc2d440d820100c1ce", 529320536), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Carol Reed 5 - The Colour of Murder - WME_WINENTRY("carolreed5", "", + WME_WINENTRY("carolreed5", "", WME_ENTRY1s("data.dcp", "3fcfca44209545d0e26774156427b494", 603660415), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Carol Reed 5 - The Colour of Murder (1.0 Demo) WME_WINENTRY("carolreed5", "Demo", WME_ENTRY1s("data.dcp", "27b3efc018ade5ee8f4adf08b4e3c0dd", 92019500), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Carol Reed 6 - Black Circle - WME_WINENTRY("carolreed6", "", + WME_WINENTRY("carolreed6", "", WME_ENTRY1s("data.dcp", "0e4c532beecf23d85012168753f41189", 456258147), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Carol Reed 7 - Blue Madonna (Demo) - WME_WINENTRY("carolreed7", "Demo", + WME_WINENTRY("carolreed7", "Demo", WME_ENTRY1s("data.dcp", "0372ad0c775266f6355e9e8ae397a2f1", 103719442), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Carol Reed 7 - Blue Madonna - WME_WINENTRY("carolreed7", "", + WME_WINENTRY("carolreed7", "", WME_ENTRY1s("data.dcp", "24e3db3e2fabfc956713796d87a3efb0", 495471147), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Carol Reed 8 - Amber's Blood - WME_WINENTRY("carolreed8", "", + WME_WINENTRY("carolreed8", "", WME_ENTRY1s("data.dcp", "859d16b0d5b9b255e470cbded2c6cedc", 502714557), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Carol Reed 9 - Cold Case Summer - WME_WINENTRY("carolreed9", "", + WME_WINENTRY("carolreed9", "", WME_ENTRY1s("data.dcp", "2b343b48a7aee508d728a546b414a255", 620005266), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Chivalry is Not Dead - WME_WINENTRY("chivalry", "", - WME_ENTRY1s("data.dcp", "ebd0915d9a12df5224be22f53bb23eb6", 7278306), Common::EN_ANY, ADGF_TESTING, LATEST_VERSION), + WME_WINENTRY("chivalry", "", + WME_ENTRY1s("data.dcp", "ebd0915d9a12df5224be22f53bb23eb6", 7278306), Common::EN_ANY, ADGF_NO_FLAGS, LATEST_VERSION), // Chivalry is Not Dead (Version from deirdrakai.com) - WME_WINENTRY("chivalry", "", - WME_ENTRY1s("data.dcp", "ae6d91b9517f4d2851a8ad94c96951c8", 7278302), Common::EN_ANY, ADGF_TESTING, LATEST_VERSION), + WME_WINENTRY("chivalry", "", + WME_ENTRY1s("data.dcp", "ae6d91b9517f4d2851a8ad94c96951c8", 7278302), Common::EN_ANY, ADGF_NO_FLAGS, LATEST_VERSION), // Conspiracao Dumont - WME_WINENTRY("conspiracao", "", + WME_WINENTRY("conspiracao", "", WME_ENTRY1s("ConspiracaoDumont.exe", "106f3f2c8f18bb5ffffeed634ace256c", 32908032), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Corrosion: Cold Winter Waiting - WME_WINENTRY("corrosion", "", - WME_ENTRY1s("data.dcp", "ae885b1a8faa0b27f43c0e8f0df02fc9", 525931618), Common::EN_ANY, ADGF_TESTING, LATEST_VERSION), + WME_WINENTRY("corrosion", "", + WME_ENTRY1s("data.dcp", "ae885b1a8faa0b27f43c0e8f0df02fc9", 525931618), Common::EN_ANY, ADGF_NO_FLAGS, LATEST_VERSION), // Dead City (Czech) // The Czech data are in data.dcp, so in this case we'll have to // just detect the english version twice, to give the user a choice. WME_WINENTRY("deadcity", "", - WME_ENTRY2s("english.dcp", "c591046d6de7e381d76f70e0787b2b1f", 415935, + WME_ENTRY2s("english.dcp", "c591046d6de7e381d76f70e0787b2b1f", 415935, "data.dcp", "7ebfd50d1a22370ed7b079bcaa631d62", 9070205), Common::CZ_CZE, ADGF_UNSTABLE, LATEST_VERSION), // Dead City (English) WME_WINENTRY("deadcity", "", - WME_ENTRY2s("english.dcp", "c591046d6de7e381d76f70e0787b2b1f", 415935, + WME_ENTRY2s("english.dcp", "c591046d6de7e381d76f70e0787b2b1f", 415935, "data.dcp", "7ebfd50d1a22370ed7b079bcaa631d62", 9070205), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Dead City (Italian) WME_WINENTRY("deadcity", "", - WME_ENTRY2s("italian.dcp", "92d8efb94436bec7bd1b7fe0b548192e", 454037, + WME_ENTRY2s("italian.dcp", "92d8efb94436bec7bd1b7fe0b548192e", 454037, "data.dcp", "7ebfd50d1a22370ed7b079bcaa631d62", 9070205), Common::IT_ITA, ADGF_UNSTABLE, LATEST_VERSION), // Dead City (Russian) WME_WINENTRY("deadcity", "", - WME_ENTRY2s("russian.dcp", "a0ae71e9e1185596fffb07ad2c951eb9", 653317, + WME_ENTRY2s("russian.dcp", "a0ae71e9e1185596fffb07ad2c951eb9", 653317, "data.dcp", "7ebfd50d1a22370ed7b079bcaa631d62", 9070205), Common::RU_RUS, ADGF_UNSTABLE, LATEST_VERSION), // Dirty Split (Czech) WME_WINENTRY("dirtysplit", "", - WME_ENTRY2s("czech.dcp", "08a71446467cf8f9444cfea446b46ad6", 127697934, + WME_ENTRY2s("czech.dcp", "08a71446467cf8f9444cfea446b46ad6", 127697934, "data.dcp", "8b4b81b718bf65f30a67fc0b1e329eb5", 88577623), Common::CZ_CZE, ADGF_UNSTABLE, LATEST_VERSION), // Dirty Split (English) - WME_WINENTRY("dirtysplit", "", + WME_WINENTRY("dirtysplit", "", WME_ENTRY1s("data.dcp", "8f3dae199361ece0f59fb20cfff6eed3", 88577621), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Dirty Split (French) WME_WINENTRY("dirtysplit", "", - WME_ENTRY2s("french.dcp", "a0508dedebd0fe478d0158fa4c2a1136", 125534323, + WME_ENTRY2s("french.dcp", "a0508dedebd0fe478d0158fa4c2a1136", 125534323, "data.dcp", "e6d70c7f5d181b761cfcf974adf9186a", 88577623), Common::FR_FRA, ADGF_UNSTABLE, LATEST_VERSION), // Dirty Split (German) - WME_WINENTRY("dirtysplit", "", + WME_WINENTRY("dirtysplit", "", WME_ENTRY1s("data.dcp", "139d8a25579e969f8b37d20e6e3de5f9", 92668291), Common::DE_DEU, ADGF_UNSTABLE, LATEST_VERSION), // Dirty Split (Italian) WME_WINENTRY("dirtysplit", "", @@ -256,36 +260,36 @@ static const WMEGameDescription gameDescriptions[] = { WME_ENTRY2s("spanish.dcp", "b3982c0a5e85b42e1e38240fef004aa4", 164428596, "data.dcp", "63766d6c68b9f00b632ea1736fc8a95c", 88577621), Common::ES_ESP, ADGF_UNSTABLE, LATEST_VERSION), // Des Reves Elastiques Avec Mille Insectes Nommes Georges - WME_WINENTRY("dreaming", "", + WME_WINENTRY("dreaming", "", WME_ENTRY1s("data.dcp", "4af26d97ea063fc1277ce30ae431de90", 8804073), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Dreamscape - WME_WINENTRY("dreamscape", "", + WME_WINENTRY("dreamscape", "", WME_ENTRY1s("data.dcp", "7a5752ed4446c862be9f02d7932acf54", 17034377), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Escape from the Mansion - WME_WINENTRY("escapemansion", "Beta 1", + WME_WINENTRY("escapemansion", "Beta 1", WME_ENTRY1s("data.dcp", "d8e348b2312cc36a929cad75f12e0b3a", 21452380), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Escape from the Mansion - WME_WINENTRY("escapemansion", "Beta 2", + WME_WINENTRY("escapemansion", "Beta 2", WME_ENTRY1s("data.dcp", "ded5fa6c5f2afdaf2cafb53e52cd3dd8", 21455763), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Escape from the Mansion - WME_WINENTRY("escapemansion", "1.3", + WME_WINENTRY("escapemansion", "1.3", WME_ENTRY1s("data.dcp", "1e5d231b56c8a228cd15cb690f50253e", 29261972), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Four - WME_WINENTRY("four", "", + WME_WINENTRY("four", "", WME_ENTRY1s("data.dcp", "ec05cd5e37c9a524053b8859635a4234", 62599855), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Framed - WME_WINENTRY("framed", "", + WME_WINENTRY("framed", "", WME_ENTRY1s("data.dcp", "e7259fb36f2c6f9f28242291e0c3de98", 34690568), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Ghost in the Sheet WME_WINENTRY("ghostsheet", "", WME_ENTRY2s("english.dcp", "e6d0aad2c89996bcabe416105a3d6d3a", 12221017, "data.dcp", "b2f8b05328e4881e15e98e845b63f451", 168003), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Ghost in the Sheet (Demo) - WME_WINENTRY("ghostsheet", "Demo", + WME_WINENTRY("ghostsheet", "Demo", WME_ENTRY1s("data.dcp", "dc1f6595f412ac25a52eaf47dad4ab81", 169083), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Hamlet or the last game without MMORPS features, shaders and product placement - WME_WINENTRY("hamlet", "", - + WME_WINENTRY("hamlet", "", + WME_ENTRY1s("data.dcp", "f624add957a77c9930529fb28cc2450f", 88183022), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Helga Deep In Trouble (English) WME_WINENTRY("helga", "", @@ -296,37 +300,37 @@ static const WMEGameDescription gameDescriptions[] = { WME_ENTRY2s("english.dcp", "b3a93e678f0ef97200f691cd1724643f", 135864, "data.dcp", "45134ed93bc391edf148b79cdcbf2a09", 154266028), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // James Peris: No License Nor Control (English) - WME_WINENTRY("jamesperis", "", + WME_WINENTRY("jamesperis", "", WME_ENTRY1s("data.dcp", "a420961e170cb7d168a0d2bae2fe5218", 225294032), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // James Peris: No License Nor Control (Spanish) - WME_WINENTRY("jamesperis", "", + WME_WINENTRY("jamesperis", "", WME_ENTRY1s("data.dcp", "a420961e170cb7d168a0d2bae2fe5218", 225294032), Common::ES_ESP, ADGF_UNSTABLE, LATEST_VERSION), // James Peris: No License Nor Control (Demo) (English) - WME_WINENTRY("jamesperis", "Demo", + WME_WINENTRY("jamesperis", "Demo", WME_ENTRY1s("data.dcp", "edb9f9c7a08993c1e28f4e477b5f9830", 116113507), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // James Peris: No License Nor Control (Demo) (Spanish) - WME_WINENTRY("jamesperis", "Demo", + WME_WINENTRY("jamesperis", "Demo", WME_ENTRY1s("data.dcp", "edb9f9c7a08993c1e28f4e477b5f9830", 116113507), Common::ES_ESP, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // J.U.L.I.A. (English) - WME_WINENTRY("julia", "", + WME_WINENTRY("julia", "", WME_ENTRY1s("data.dcp", "c2264b4f8fcd132d2913ff5b6076a24f", 10109741), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // J.U.L.I.A. (English, Bundle in a box-version) - WME_WINENTRY("julia", "Version 1.2", + WME_WINENTRY("julia", "Version 1.2", WME_ENTRY1s("data.dcp", "fe90023ccc22f35185b40b910e0d03a2", 10101373), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // J.U.L.I.A. (English) (Demo) - WME_WINENTRY("julia", "Demo", + WME_WINENTRY("julia", "Demo", WME_ENTRY1s("data.dcp", "f0bbc3394555a9811f6050dae428cab6", 7655237), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // J.U.L.I.A. (English) (Greenlight Demo) - WME_WINENTRY("julia", "Greenlight Demo", + WME_WINENTRY("julia", "Greenlight Demo", WME_ENTRY1s("data.dcp", "4befd448d36b0dae9c3ab1aa7cb8b78d", 7271886), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Kulivocko (Czech) - WME_WINENTRY("kulivocko", "", + WME_WINENTRY("kulivocko", "", WME_ENTRY1s("data.dcp", "44306dc470e9b27474043932eccee02f", 155106392), Common::CZ_CZE, ADGF_UNSTABLE, LATEST_VERSION), // Kulivocko (Czech) (Demo) - WME_WINENTRY("kulivocko", "Demo", + WME_WINENTRY("kulivocko", "Demo", WME_ENTRY1s("data.dcp", "63b164bdfadecbb0deb5da691afb8154", 48362234), Common::CZ_CZE, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Life In 3 Minutes - WME_WINENTRY("lifein3minutes", "", + WME_WINENTRY("lifein3minutes", "", WME_ENTRY1s("data.dcp", "c6368950e37a95bf098b02b4eaa5b929", 141787214), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Looky Demo (English) WME_WINENTRY("looky", "Demo", @@ -341,10 +345,10 @@ static const WMEGameDescription gameDescriptions[] = { WME_ENTRY2s("german.dcp", "bf4c2b8c26342342441a6d64934ab832", 107027865, "data.dcp", "50de0beaa5ad621aa9f020df901d1e74", 1342214), Common::DE_DEU, ADGF_UNSTABLE, LATEST_VERSION), // Mirage - WME_WINENTRY("mirage", "", + WME_WINENTRY("mirage", "", WME_ENTRY1s("data.dcp", "d230b0b99c0aa77b9ecd094d8ee5573b", 17844056), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Oknytt - WME_WINENTRY("oknytt", "Version 1.0", + WME_WINENTRY("oknytt", "Version 1.0", WME_ENTRY1s("data.dcp", "6456cf8f429905c83f07509f9da536dd", 109502959), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Oknytt (Version 1.13 English) (These are detected along with d_sounds.dcp to avoid mass-detecting in the languages-subfolder.) WME_WINENTRY("oknytt", "Version 1.13", @@ -363,25 +367,25 @@ static const WMEGameDescription gameDescriptions[] = { WME_ENTRY2s("spanish.dcp", "10c46152cb29581671f3b6b7c229c957", 319406572, "d_sounds.dcp", "7d04dff8ca11174486bd4b7a80fdcabb", 154943401), Common::ES_ESP, ADGF_UNSTABLE, LATEST_VERSION), // Night Train Demo - WME_WINENTRY("nighttrain", "", + WME_WINENTRY("nighttrain", "", WME_ENTRY1s("data.dcp", "5a027ef84b083a730c9a4c85ec1d3a32", 131760816), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Paintaria - WME_WINENTRY("paintaria", "", + WME_WINENTRY("paintaria", "", WME_ENTRY1s("data.dcp", "354c08440c98150ff0d4008dd2865880", 48326040), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Pigeons in the Park - WME_WINENTRY("pigeons", "", + WME_WINENTRY("pigeons", "", WME_ENTRY1s("data.dcp", "9143a5b6ff8206aefe3c4c643add3ec7", 2611100), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Project: Doom - WME_WINENTRY("projectdoom", "", + WME_WINENTRY("projectdoom", "", WME_ENTRY1s("data.dcp", "d5894b65a40706845434b99870bcab92", 99223761), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Project Joe - WME_WINENTRY("projectjoe", "", + WME_WINENTRY("projectjoe", "", WME_ENTRY1s("data.dcp", "ada3c08542901295076b5349e655e73f", 160780037), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Project Lonely Robot - WME_WINENTRY("lonelyrobot", "beta", + WME_WINENTRY("lonelyrobot", "beta", WME_ENTRY1s("data.dcp", "a0cf7ad5bab957416dcda454e9f28ef0", 3420120), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Reversion: The Escape Version 1.0 - WME_WINENTRY("reversion1", "Version 1.0", + WME_WINENTRY("reversion1", "Version 1.0", WME_ENTRY1s("data.dcp", "cd616f98ebfd047e0c540b50b4b70761", 254384531), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Reversion: The Escape Version 1.1 (Chinese) WME_WINENTRY("reversion1", "Version 1.1", @@ -472,7 +476,7 @@ static const WMEGameDescription gameDescriptions[] = { WME_ENTRY2s("xlanguage_en.dcp", "ca357d86618d1ab76a21c913f4403cbd", 8414976, "data.dcp", "f7938cbfdc48f07934550245a3286921", 255672016), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Reversion: The Meeting (Spanish) - WME_WINENTRY("reversion2", "", + WME_WINENTRY("reversion2", "", WME_ENTRY1s("data.dcp", "f7938cbfdc48f07934550245a3286921", 255672016), Common::ES_ESP, ADGF_UNSTABLE, LATEST_VERSION), // Reversion: The Meeting Version 2.0.2412 (Chinese) WME_PLATENTRY("reversion2", "Version 2.0.2412", @@ -485,79 +489,79 @@ static const WMEGameDescription gameDescriptions[] = { "xlanguage_en.dcp", "0598bf752ce93b42bcaf1094df537c7b", 8533057, "Linux.dcp", "21858bd77dc86b03f701fd47900e2f51", 984535), Common::EN_ANY, Common::kPlatformLinux, ADGF_UNSTABLE, LATEST_VERSION), // Rhiannon: Curse of the four Branches - WME_WINENTRY("rhiannon", "", + WME_WINENTRY("rhiannon", "", WME_ENTRY1s("data.dcp", "870f348900b735f1cc79c0608ce32b0e", 1046169851), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Rhiannon: Curse of the four Branches (English PC DVD) - WME_WINENTRY("rhiannon", "DVD", + WME_WINENTRY("rhiannon", "DVD", WME_ENTRY1s("data.dcp", "6736bbc921bb6ce5161b3ad095a97bd4", 1053441028), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // 1 1/2 Ritter: Auf der Suche nach der hinreissenden Herzelinde - WME_WINENTRY("ritter", "", + WME_WINENTRY("ritter", "", WME_ENTRY1s("data.dcp", "5ac416cee605d3a30f4d59687b1cdab2", 364260278), Common::DE_DEU, ADGF_UNSTABLE, LATEST_VERSION), // Satan and Son - WME_WINENTRY("satanandson", "", + WME_WINENTRY("satanandson", "", WME_ENTRY1s("data.dcp", "16a6ba8174b697bbba9299619d1e20c4", 67539054), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Rosemary - WME_WINENTRY("rosemary", "", + WME_WINENTRY("rosemary", "", WME_ENTRY1s("data.dcp", "4f2631138bd4d27587d9043f8aeff3df", 29483643), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Securanote - WME_PLATENTRY("securanote", "", + WME_PLATENTRY("securanote", "", WME_ENTRY1s("data.dcp", "5213d3e59b9e95b7fbd5c56f7de5341a", 2625554), Common::EN_ANY, Common::kPlatformIOS, ADGF_UNSTABLE, LATEST_VERSION), // Shaban - WME_WINENTRY("shaban", "", + WME_WINENTRY("shaban", "", WME_ENTRY1s("data.dcp", "35f702ca9baabc5c620e0be230195c8a", 755388466), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // The Shine of a Star - WME_WINENTRY("shinestar", "", + WME_WINENTRY("shinestar", "", WME_ENTRY1s("data.dcp", "f05abe9e2427a5e4f73648fa09c4ba8e", 94113060), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Sofia's Debt - WME_WINENTRY("sofiasdebt", "", + WME_WINENTRY("sofiasdebt", "", WME_ENTRY1s("SD.exe", "e9515f9ba1a2925bb6733476a826a650", 9915047), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Space Invaders (Demo) - WME_WINENTRY("spaceinvaders", "Demo", + WME_WINENTRY("spaceinvaders", "Demo", WME_ENTRY1s("data.dcp", "3f27adefdf72f2c1601cf555c80a509f", 1308361), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // Space Madness - WME_WINENTRY("spacemadness", "1.0.2", + WME_WINENTRY("spacemadness", "1.0.2", WME_ENTRY1s("data.dcp", "b9b83135dc7a9e1b4b5f50195dbeb630", 39546622), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // The Ancient Mark - Episode 1 - WME_WINENTRY("theancientmark1", "", + WME_WINENTRY("theancientmark1", "", WME_ENTRY1s("data.dcp", "ca04c26f03b2bd307368b306b297ddd7", 364664692), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // The Box - WME_WINENTRY("thebox", "", + WME_WINENTRY("thebox", "", WME_ENTRY1s("data.dcp", "ec5f0c7e8174e307701447b53afe7e2f", 108372483), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // The Kite (Version 1.1) - WME_WINENTRY("thekite", "Version 1.1", + WME_WINENTRY("thekite", "Version 1.1", WME_ENTRY1s("data.dcp", "92d29428f464469bda2d81b03d4d5c3e", 47332296), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // The Kite (Version 1.2.e) - WME_WINENTRY("thekite", "Version 1.2.e", + WME_WINENTRY("thekite", "Version 1.2.e", WME_ENTRY1s("data.dcp", "92451578b1bdd2b32a1db592a4f6d5fc", 47360539), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // The Kite (Version 1.2.i) (Italian) - WME_WINENTRY("thekite", "Version 1.2.i", + WME_WINENTRY("thekite", "Version 1.2.i", WME_ENTRY1s("data.dcp", "d3435b106a1b3b4c1df8ad596d271586", 47509274), Common::IT_ITA, ADGF_UNSTABLE, LATEST_VERSION), // The Kite (Version 1.2.r) (Russian) - WME_WINENTRY("thekite", "Version 1.2.r", + WME_WINENTRY("thekite", "Version 1.2.r", WME_ENTRY1s("data.dcp", "d531e097dd884737469da014ed882cde", 47554582 ), Common::RU_RUS, ADGF_UNSTABLE, LATEST_VERSION), // The Kite (Version 1.3.e) - WME_WINENTRY("thekite", "Version 1.3.e", + WME_WINENTRY("thekite", "Version 1.3.e", WME_ENTRY1s("data.dcp", "9761827b51370263b7623721545d7627", 47382987), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Fairy Tales About Toshechka and Boshechka - WME_WINENTRY("tib", "", + WME_WINENTRY("tib", "", WME_ENTRY1s("data.dcp", "87d296ef3f46570ed18f000d3885db77", 340264526), Common::RU_RUS, ADGF_UNSTABLE, LATEST_VERSION), // The Trader of Stories - WME_WINENTRY("tradestory", "Demo", + WME_WINENTRY("tradestory", "Demo", WME_ENTRY1s("data.dcp", "0a0b51191636cc8ead89b905281c3218", 40401902), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // the white chamber (multi-language) - WME_WINENTRY("twc", "", + WME_WINENTRY("twc", "", WME_ENTRY1s("data.dcp", "0011d01142547c61e51ba24dc42b579e", 186451273), Common::UNK_LANG, ADGF_UNSTABLE, LATEST_VERSION), // Vsevolod Prologue (Demo) - WME_WINENTRY("vsevolod", "Prologue", + WME_WINENTRY("vsevolod", "Prologue", WME_ENTRY1s("data.dcp", "f2dcffd2692dbfcc9371fa1a87970fe7", 388669493), Common::EN_ANY, ADGF_UNSTABLE | ADGF_DEMO, LATEST_VERSION), // War - WME_WINENTRY("war", "", + WME_WINENTRY("war", "", WME_ENTRY1s("data.dcp", "003e317cda6d0137bbd5e5d7f089ee4d", 32591890), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Wilma Tetris - WME_WINENTRY("wtetris", "", + WME_WINENTRY("wtetris", "", WME_ENTRY1s("data.dcp", "946e3a0496e6c12fb344c9ed861ff015", 2780093), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), // Zilm: A Game of Reflex 1.0 - WME_WINENTRY("Zilm", "1.0", + WME_WINENTRY("Zilm", "1.0", WME_ENTRY1s("data.dcp", "098dffaf03d8adbb4cb5633e4733e63c", 351726), Common::EN_ANY, ADGF_UNSTABLE, LATEST_VERSION), { AD_TABLE_END_MARKER, diff --git a/engines/wintermute/ui/ui_edit.cpp b/engines/wintermute/ui/ui_edit.cpp index ffe8d66b4d..81030e09c3 100644 --- a/engines/wintermute/ui/ui_edit.cpp +++ b/engines/wintermute/ui/ui_edit.cpp @@ -899,7 +899,7 @@ int UIEdit::deleteChars(int start, int end) { ////////////////////////////////////////////////////////////////////////// int UIEdit::insertChars(int pos, const byte *chars, int num) { - if ((int)strlen(_text) + num > _maxLength) { + if ((_maxLength != -1) && (int)strlen(_text) + num > _maxLength) { num -= (strlen(_text) + num - _maxLength); } diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp index 4d791b9c7b..dc2b65885e 100644 --- a/engines/xeen/character.cpp +++ b/engines/xeen/character.cpp @@ -149,7 +149,7 @@ bool InventoryItems::discardItem(int itemIndex) { sort(); return true; - } + } } return true; @@ -277,7 +277,7 @@ Common::String WeaponItems::getFullDescription(int itemIndex, int displayNum) { displayNum, Res.WEAPON_NAMES[i._id], !i._bonusFlags ? "" : Res.BONUS_NAMES[i._bonusFlags & ITEMFLAG_BONUS_MASK], - (i._bonusFlags & (ITEMFLAG_BROKEN | ITEMFLAG_CURSED)) || + (i._bonusFlags & (ITEMFLAG_BROKEN | ITEMFLAG_CURSED)) || !i._bonusFlags ? "\b " : "" ); } @@ -315,7 +315,7 @@ Common::String WeaponItems::getAttributes(XeenItem &item, const Common::String & maxVal += Res.METAL_DAMAGE[item._material - 37]; toHit = Common::String::format("%+d", Res.METAL_DAMAGE_PERCENT[item._material - 37]); } - + physDamage = Common::String::format(Res.DAMAGE_X_TO_Y, minVal, maxVal); // Next handle elemental/attribute damage @@ -471,7 +471,7 @@ Common::String ArmorItems::getAttributes(XeenItem &item, const Common::String &c int eCategory = ELEM_FIRE; while (eCategory < ELEM_MAGIC && Res.ELEMENTAL_CATEGORIES[eCategory] < item._material) ++eCategory; - + elemResist = Common::String::format(Res.ATTR_XY_BONUS, resistence, Res.ELEMENTAL_NAMES[eCategory]); } @@ -617,7 +617,7 @@ Common::String MiscItems::getAttributes(XeenItem &item, const Common::String &cl } return Common::String::format(Res.ITEM_DETAILS, classes.c_str(), - Res.FIELD_NONE, Res.FIELD_NONE, Res.FIELD_NONE, Res.FIELD_NONE, Res.FIELD_NONE, + Res.FIELD_NONE, Res.FIELD_NONE, Res.FIELD_NONE, Res.FIELD_NONE, Res.FIELD_NONE, Res.FIELD_NONE, specialPower.c_str()); } /*------------------------------------------------------------------------*/ @@ -743,7 +743,7 @@ void Character::synchronize(Common::Serializer &s) { _level.synchronize(s); s.syncAsByte(_birthDay); s.syncAsByte(_tempAge); - + // Synchronize the skill list for (int idx = 0; idx < 18; ++idx) s.syncAsByte(_skills[idx]); @@ -760,7 +760,7 @@ void Character::synchronize(Common::Serializer &s) { // Synchronize spell list for (int i = 0; i < MAX_SPELLS_PER_CLASS - 1; ++i) - s.syncAsByte(_spells[i]); + s.syncAsByte(_spells[i]); s.syncAsByte(_lloydMap); s.syncAsByte(_lloydPosition.x); s.syncAsByte(_lloydPosition.y); @@ -784,7 +784,7 @@ void Character::synchronize(Common::Serializer &s) { _poisonResistence.synchronize(s); _energyResistence.synchronize(s); _magicResistence.synchronize(s); - + for (int i = 0; i < 16; ++i) s.syncAsByte(_conditions[i]); @@ -1025,7 +1025,7 @@ bool Character::noActions() { case IN_LOVE: case DRUNK: { Common::String msg = Common::String::format(Res.IN_NO_CONDITION, _name.c_str()); - ErrorScroll::show(Party::_vm, msg, + ErrorScroll::show(Party::_vm, msg, Party::_vm->_mode == 17 ? WT_2 : WT_NONFREEZED_WAIT); return true; } @@ -1170,7 +1170,7 @@ int Character::itemScan(int itemId) const { if (itemId > 10 && item._material < 37) { int mIndex = item.getElementalCategory() + 11; - + if (mIndex == itemId) result += Res.ELEMENTAL_RESISTENCES[item._material]; } @@ -1754,7 +1754,7 @@ int Character::makeItem(int p1, int itemIndex, int p3) { void Character::addHitPoints(int amount) { Interface &intf = *Party::_vm->_interface; Common::fill(&intf._charFX[0], &intf._charFX[MAX_ACTIVE_PARTY], 0); - + if (!isDead()) { int maxHp = getMaxHP(); if (_currentHp <= maxHp) { @@ -1824,11 +1824,11 @@ int Character::getClassCategory() const { case CLASS_ARCHER: case CLASS_SORCERER: return 1; - + case CLASS_DRUID: case CLASS_RANGER: return 2; - + default: return 0; } diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index 9282b4e75b..bc01e87618 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -139,7 +139,7 @@ void Combat::giveCharDamage(int damage, DamageType attackType, int charIndex) { bool breakFlag = false; screen.closeWindows(); - + int idx = (int)party._activeParty.size(); if (!scripts._v2) { for (idx = 0; idx < (int)party._activeParty.size(); ++idx) { @@ -611,7 +611,7 @@ void Combat::monstersAttack() { intf.draw3d(true); events.pollEventsAndWait(); } while (!_vm->shouldQuit() && intf._isAttacking); - + endAttack(); if (_vm->_mode != MODE_COMBAT) { @@ -645,7 +645,7 @@ void Combat::setupMonsterAttack(int monsterDataIndex, const Common::Point &pt) { for (int idx = 0; idx < 36; ++idx) { if (_gmonHit[idx] != -1) { int result = stopAttack(pt - party._mazePosition); - if (result) { + if (result) { _monstersAttacking = true; _gmonHit[idx] = monsterDataIndex; @@ -877,7 +877,7 @@ void Combat::doMonsterTurn(int monsterId) { if (cond >= PARALYZED && cond <= ERADICATED) { Common::Array<int> ableChars; bool skip = false; - + for (uint idx = 0; idx < _combatParty.size() && !skip; ++idx) { switch (_combatParty[idx]->worstCondition()) { case PARALYZED: @@ -976,7 +976,7 @@ int Combat::stopAttack(const Common::Point &diffPt) { } } return dir == DIR_WEST ? diffPt.x * -1 + 1 : 1; - + } else if (diffPt.y <= 0) { for (int y = diffPt.y; y < 0; ++y) { int v = map.mazeLookup(Common::Point(mazePos.x, mazePos.y + y), 4); @@ -1032,7 +1032,7 @@ int Combat::stopAttack(const Common::Point &diffPt) { return 0; } return dir == DIR_WEST ? diffPt.x * -1 + 1 : 1; - + } else if (diffPt.y <= 0) { for (int y = diffPt.y; y < 0; ++y) { int v = map.mazeLookup(Common::Point(mazePos.x, mazePos.y + y), 0, 0x8000); @@ -1256,7 +1256,7 @@ void Combat::attack(Character &c, RangeType rangeType) { break; } } - } + } } else { Common::fill(&_elemPow[0], &_elemPow[PARTY_AND_MONSTERS], ELEM_FIRE); damage = 0; @@ -1392,7 +1392,7 @@ void Combat::attack2(int damage, RangeType rangeType) { damage += 100; if (monster._damageType == DT_SLEEP || monster._damageType == DT_DRAGONSLEEP) monster._damageType = DT_PHYSICAL; - + if ((!rangeType || !_damageType) && _attackWeaponId != 34) { if (monsterData._phsyicalResistence != 0) { if (monsterData._phsyicalResistence == 100) { @@ -1446,14 +1446,14 @@ void Combat::attack2(int damage, RangeType rangeType) { break; } } - + if (damage < 1) { sound.playSound(_missVoc, 1); sound.playFX(6); } else { _monsterScale[_monsterIndex] = getDamageScale(damage); intf.draw3d(true); - + sound.stopSound(); File powVoc(Common::String::format("pow%d.voc", POW_WEAPON_VOCS[_attackWeaponId])); @@ -1506,7 +1506,7 @@ void Combat::attack2(int damage, RangeType rangeType) { if (MONSTER_ITEM_RANGES[itemDrop] >= _vm->getRandomNumber(1, 100)) { Character tempChar; int category = tempChar.makeItem(itemDrop, 0, 0); - + switch (category) { case CATEGORY_WEAPON: for (int idx = 0; idx < MAX_TREASURE_ITEMS; ++idx) { @@ -1609,7 +1609,7 @@ bool Combat::hitMonster(Character &c, RangeType rangeType) { getWeaponDamage(c, rangeType); int chance = c.statBonus(c.getStat(ACCURACY)) + _hitChanceBonus; int divisor = 0; - + switch (c._class) { case CLASS_KNIGHT: case CLASS_BARBARIAN: @@ -1758,7 +1758,7 @@ int Combat::getMonsterResistence(RangeType rangeType) { else if (material < 34) resistence = monsterData._energyResistence; else - resistence = monsterData._magicResistence; + resistence = monsterData._magicResistence; } } @@ -1767,7 +1767,7 @@ int Combat::getMonsterResistence(RangeType rangeType) { return 0; else return ((100 - resistence) * damage) / 100; - } + } return damage; } @@ -1840,7 +1840,7 @@ void Combat::multiAttack(int powNum) { int monsterIndex = _monsterIndex; int monster2Attack = _monster2Attack; bool attackedFlag = false; - + Common::Array<int> attackMonsters; for (int idx = 0; idx < 3; ++idx) { if (_attackMonsters[idx] != -1) diff --git a/engines/xeen/dialogs.cpp b/engines/xeen/dialogs.cpp index 1924c69cf4..3304689416 100644 --- a/engines/xeen/dialogs.cpp +++ b/engines/xeen/dialogs.cpp @@ -45,7 +45,7 @@ void ButtonContainer::restoreButtons() { _buttons = _savedButtons.pop(); } -void ButtonContainer::addButton(const Common::Rect &bounds, int val, +void ButtonContainer::addButton(const Common::Rect &bounds, int val, SpriteResource *sprites) { _buttons.push_back(UIButton(bounds, val, sprites, true)); } @@ -80,7 +80,7 @@ bool ButtonContainer::checkEvents(XeenEngine *vm) { } else if (events.isKeyPending()) { Common::KeyState keyState; events.getKey(keyState); - + _buttonValue = keyState.keycode; if (_buttonValue == Common::KEYCODE_KP8) _buttonValue = Common::KEYCODE_UP; @@ -137,7 +137,7 @@ void CreditsScreen::show(XeenEngine *vm) { void CreditsScreen::execute() { Screen &screen = *_vm->_screen; EventsManager &events = *_vm->_events; - + // Handle drawing the credits screen doScroll(true, false); screen._windows[GAME_WINDOW].close(); @@ -145,7 +145,7 @@ void CreditsScreen::execute() { screen.loadBackground("marb.raw"); screen._windows[0].writeString(Res.CREDITS); doScroll(false, false); - + events.setCursor(0); screen._windows[0].update(); clearButtons(); diff --git a/engines/xeen/dialogs_automap.cpp b/engines/xeen/dialogs_automap.cpp index 652494742a..16ce225515 100644 --- a/engines/xeen/dialogs_automap.cpp +++ b/engines/xeen/dialogs_automap.cpp @@ -76,7 +76,7 @@ void AutoMapDialog::execute() { // MazeData &mazeData = map.mazeDataCurrent(); bool drawFlag = true; int v; - + events.updateGameCounter(); do { if (drawFlag) @@ -106,7 +106,7 @@ void AutoMapDialog::execute() { } } - + for (int yp = 38, yDiff = pt.y + 7; yp < 166; yp += 8, --yDiff) { for (int xp = 80, xDiff = -7; xp < 240; xp += 10, ++xDiff) { v = map.mazeLookup(Common::Point(xDiff, yDiff), 8); @@ -128,7 +128,7 @@ void AutoMapDialog::execute() { map._tileSprites.draw(screen, 0, Common::Point(xp, yp)); } } - + // Draw thinner ground tiles on the left edge of the map for (int yp = 43, yDiff = pt.y + 7; yp < 171; yp += 8, --yDiff) { v = map.mazeLookup(Common::Point(pt.x - 8, yDiff), 0, 0xffff); @@ -137,13 +137,13 @@ void AutoMapDialog::execute() { map._tileSprites.draw(screen, 36 + map.mazeData()._surfaceTypes[ map._currentSurfaceId], Common::Point(75, yp)); } - + // Draw thin tile portion on top-left corner of map v = map.mazeLookup(Common::Point(pt.x - 8, pt.y + 8), 0, 0xffff); if (v != INVALID_CELL && map._currentSurfaceId != 0 && map._currentSteppedOn) map._tileSprites.draw(screen, 36 + map.mazeData()._surfaceTypes[ map._currentSurfaceId], Common::Point(75, 35)); - + // Draw any thin tiles at the very top of the map for (int xp = 85, xDiff = pt.x - 7; xp < 245; xp += 10, ++xDiff) { v = map.mazeLookup(Common::Point(xDiff, pt.y + 8), 0, 0xffff); @@ -165,7 +165,7 @@ void AutoMapDialog::execute() { } // Draw walls on left and top edges of map - for (int xp = 80, yp = 158, xDiff = pt.x - 7, yDiff = pt.y - 8; xp < 250; + for (int xp = 80, yp = 158, xDiff = pt.x - 7, yDiff = pt.y - 8; xp < 250; xp += 10, yp -= 8, ++xDiff, ++yDiff) { // Draw walls on left edge of map v = map.mazeLookup(Common::Point(pt.x - 8, yDiff), 12); @@ -385,7 +385,7 @@ void AutoMapDialog::execute() { map._tileSprites.draw(screen, frame, Common::Point(xp, yp)); } } - + // Draw overlay on cells that haven't been stepped on yet for (int yDiff = pt.y + 7, yp = 38; yp < 166; --yDiff, yp += 8) { for (int xp = 80, xDiff = pt.x - 7; xp < 240; xp += 10, ++xDiff) { diff --git a/engines/xeen/dialogs_char_info.cpp b/engines/xeen/dialogs_char_info.cpp index 6dd79618ed..23f089b93e 100644 --- a/engines/xeen/dialogs_char_info.cpp +++ b/engines/xeen/dialogs_char_info.cpp @@ -206,7 +206,7 @@ void CharacterInfo::execute(int charIndex) { goto exit; } } while (!_vm->shouldQuit()); -exit: +exit: w.close(); intf.unhighlightChar(); _vm->_mode = oldMode; @@ -400,7 +400,7 @@ bool CharacterInfo::expandStat(int attrib, const Character &c) { stat1, stat2); bounds.setHeight(42); break; - + case 11: // Spell Points stat1 = c._currentSp; diff --git a/engines/xeen/dialogs_error.h b/engines/xeen/dialogs_error.h index 56e30bc9de..3657cd01be 100644 --- a/engines/xeen/dialogs_error.h +++ b/engines/xeen/dialogs_error.h @@ -28,7 +28,7 @@ namespace Xeen { -enum ErrorWaitType { WT_FREEZE_WAIT = 0, WT_NONFREEZED_WAIT = 1, +enum ErrorWaitType { WT_FREEZE_WAIT = 0, WT_NONFREEZED_WAIT = 1, WT_2 = 2, WT_3 = 3 }; class ErrorDialog : public ButtonContainer { @@ -43,7 +43,7 @@ public: class ErrorScroll { public: - static void show(XeenEngine *vm, const Common::String &msg, + static void show(XeenEngine *vm, const Common::String &msg, ErrorWaitType waitType = WT_FREEZE_WAIT); }; diff --git a/engines/xeen/dialogs_info.cpp b/engines/xeen/dialogs_info.cpp index 945567c9b2..d0cd7c5243 100644 --- a/engines/xeen/dialogs_info.cpp +++ b/engines/xeen/dialogs_info.cpp @@ -37,7 +37,7 @@ void InfoDialog::execute() { EventsManager &events = *_vm->_events; Interface &intf = *_vm->_interface; Party &party = *_vm->_party; - + protectionText(); Common::String statusText = ""; for (uint idx = 0; idx < _lines.size(); ++idx) diff --git a/engines/xeen/dialogs_input.cpp b/engines/xeen/dialogs_input.cpp index 943b038d09..5376fb7c46 100644 --- a/engines/xeen/dialogs_input.cpp +++ b/engines/xeen/dialogs_input.cpp @@ -26,7 +26,7 @@ namespace Xeen { -int Input::show(XeenEngine *vm, Window *window, Common::String &line, +int Input::show(XeenEngine *vm, Window *window, Common::String &line, uint maxLen, int maxWidth, bool isNumeric) { Input *dlg = new Input(vm, window); int result = dlg->getString(line, maxLen, maxWidth, isNumeric); @@ -129,7 +129,7 @@ int StringInput::show(XeenEngine *vm, bool type, const Common::String &msg1, return result; } -int StringInput::execute(bool type, const Common::String &expected, +int StringInput::execute(bool type, const Common::String &expected, const Common::String &title, int opcode) { Interface &intf = *_vm->_interface; Screen &screen = *_vm->_screen; @@ -211,7 +211,7 @@ int Choose123::execute(int numOptions) { Interface &intf = *_vm->_interface; Screen &screen = *_vm->_screen; Town &town = *_vm->_town; - + Mode oldMode = _vm->_mode; _vm->_mode = MODE_DIALOG_123; diff --git a/engines/xeen/dialogs_input.h b/engines/xeen/dialogs_input.h index ce159c77a3..8221320b22 100644 --- a/engines/xeen/dialogs_input.h +++ b/engines/xeen/dialogs_input.h @@ -45,7 +45,7 @@ protected: Input(XeenEngine *vm, Window *window) : ButtonContainer(vm), _window(window) {} public: - static int show(XeenEngine *vm, Window *window, Common::String &line, + static int show(XeenEngine *vm, Window *window, Common::String &line, uint maxLen, int maxWidth, bool isNumeric = false); }; @@ -53,10 +53,10 @@ class StringInput : public Input { protected: StringInput(XeenEngine *vm); - int execute(bool type, const Common::String &expected, + int execute(bool type, const Common::String &expected, const Common::String &title, int opcode); public: - static int show(XeenEngine *vm, bool type, const Common::String &msg1, + static int show(XeenEngine *vm, bool type, const Common::String &msg1, const Common::String &msg2, int opcode); }; diff --git a/engines/xeen/dialogs_items.cpp b/engines/xeen/dialogs_items.cpp index 56de6a5b17..227b5708e7 100644 --- a/engines/xeen/dialogs_items.cpp +++ b/engines/xeen/dialogs_items.cpp @@ -42,9 +42,9 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { Interface &intf = *_vm->_interface; Party &party = *_vm->_party; Screen &screen = *_vm->_screen; - + Character *startingChar = c; - ItemCategory category = mode == ITEMMODE_RECHARGE || mode == ITEMMODE_COMBAT ? + ItemCategory category = mode == ITEMMODE_RECHARGE || mode == ITEMMODE_COMBAT ? CATEGORY_MISC : CATEGORY_WEAPON; int varA = mode == ITEMMODE_COMBAT ? 1 : 0; if (varA != 0) @@ -88,7 +88,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { Res.BTN_SELL, Res.BTN_IDENTIFY, Res.BTN_FIX); } else if (mode != ITEMMODE_ENCHANT && mode != ITEMMODE_RECHARGE && mode != ITEMMODE_TO_GOLD) { msg = Common::String::format(Res.ITEMS_DIALOG_TEXT1, - category == 3 ? Res.BTN_USE : Res.BTN_EQUIP, + category == 3 ? Res.BTN_USE : Res.BTN_EQUIP, Res.BTN_REMOVE, Res.BTN_DISCARD, Res.BTN_QUEST); } else if (mode == ITEMMODE_ENCHANT) { msg = Common::String::format(Res.ITEMS_DIALOG_TEXT2, Res.BTN_ENCHANT); @@ -138,7 +138,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { _itemsDrawList[idx]._y = 10 + idx * 9; switch (category) { - case CATEGORY_WEAPON: + case CATEGORY_WEAPON: case CATEGORY_ARMOR: case CATEGORY_ACCESSORY: { XeenItem &i = (category == CATEGORY_WEAPON) ? c->_weapons[idx] : @@ -147,7 +147,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { if (i._id) { if (mode == ITEMMODE_CHAR_INFO || mode == ITEMMODE_8 || mode == ITEMMODE_ENCHANT || mode == ITEMMODE_RECHARGE) { - lines.push_back(Common::String::format(Res.ITEMS_DIALOG_LINE1, + lines.push_back(Common::String::format(Res.ITEMS_DIALOG_LINE1, arr[idx], idx + 1, c->_items[category].getFullDescription(idx, arr[idx]).c_str())); } else { @@ -225,7 +225,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { // Original uses var in this block that's never set?! const int v1 = 0; screen._windows[30].writeString(Common::String::format(Res.AVAILABLE_GOLD_COST, - Res.CATEGORY_NAMES[category], + Res.CATEGORY_NAMES[category], v1 ? "" : "s", party._gold, lines[0].c_str(), lines[1].c_str(), lines[2].c_str(), lines[3].c_str(), lines[4].c_str(), lines[5].c_str(), lines[6].c_str(), lines[7].c_str(), @@ -287,8 +287,8 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { default: break; } - } - + } + // If it's time to do an item action, take care of it if (actionIndex >= 0) { int result = doItemOptions(*c, actionIndex, itemIndex, category, mode); @@ -307,7 +307,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { // Otherwise, result and continue showing dialog actionIndex = -1; } - + // Wait for a selection _buttonValue = 0; while (!_vm->shouldQuit() && !_buttonValue) { @@ -332,11 +332,11 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { case Common::KEYCODE_F4: case Common::KEYCODE_F5: case Common::KEYCODE_F6: - if (!varA && mode != ITEMMODE_3 && mode != ITEMMODE_ENCHANT + if (!varA && mode != ITEMMODE_3 && mode != ITEMMODE_ENCHANT && mode != ITEMMODE_RECHARGE && mode != ITEMMODE_TO_GOLD && party._mazeId != 0) { _buttonValue -= Common::KEYCODE_F1; - + if (_buttonValue < (int)(_vm->_mode == MODE_COMBAT ? combat._combatParty.size() : party._activeParty.size())) { // Character number is valid @@ -391,7 +391,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { // Select an item if (mode == ITEMMODE_3) break; - + _buttonValue -= Common::KEYCODE_1; if (_buttonValue != itemIndex) { // Check whether the new selection has an associated item @@ -431,7 +431,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { if (mode == ITEMMODE_CHAR_INFO) actionIndex = 3; break; - + case Common::KEYCODE_e: if (mode == ITEMMODE_CHAR_INFO || mode == ITEMMODE_ENCHANT || mode == ITEMMODE_TO_GOLD) { @@ -447,7 +447,7 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { mode = ITEMMODE_REPAIR; c = startingChar; redrawFlag = REDRAW_TEXT; - } + } break; case Common::KEYCODE_g: @@ -653,7 +653,7 @@ void ItemsDialog::setEquipmentIcons() { i._frame = 11; break; } - + default: break; } @@ -684,7 +684,7 @@ int ItemsDialog::calcItemCost(Character *c, int itemIndex, ItemsMode mode, default: break; } - + switch (category) { case CATEGORY_WEAPON: case CATEGORY_ARMOR: @@ -694,7 +694,7 @@ int ItemsDialog::calcItemCost(Character *c, int itemIndex, ItemsMode mode, (mode == 1 ? c->_armor[itemIndex] : c->_accessories[itemIndex]); amount1 = (mode == 0) ? Res.WEAPON_BASE_COSTS[i._id] : (mode == 1 ? Res.ARMOR_BASE_COSTS[i._id] : Res.ACCESSORY_BASE_COSTS[i._id]); - + if (i._material > 36 && i._material < 59) { switch (i._material) { case 37: @@ -719,7 +719,7 @@ int ItemsDialog::calcItemCost(Character *c, int itemIndex, ItemsMode mode, amount2 = Res.ELEMENTAL_DAMAGE[i._material] * 100; else if (i._material > 58) amount3 = Res.ELEMENTAL_DAMAGE[i._material - 59 + 7] * 100; - + switch (mode) { case ITEMMODE_BLACKSMITH: case ITEMMODE_2: @@ -741,7 +741,7 @@ int ItemsDialog::calcItemCost(Character *c, int itemIndex, ItemsMode mode, XeenItem &i = c->_misc[itemIndex]; amount1 = Res.MISC_MATERIAL_COSTS[i._material]; amount4 = Res.MISC_BASE_COSTS[i._id]; - + switch (mode) { case ITEMMODE_BLACKSMITH: case ITEMMODE_2: diff --git a/engines/xeen/dialogs_items.h b/engines/xeen/dialogs_items.h index c161b0721b..cfa6818843 100644 --- a/engines/xeen/dialogs_items.h +++ b/engines/xeen/dialogs_items.h @@ -31,7 +31,7 @@ namespace Xeen { enum ItemsMode { ITEMMODE_CHAR_INFO = 0, ITEMMODE_BLACKSMITH = 1, ITEMMODE_2 = 2, ITEMMODE_3 = 3, - ITEMMODE_RECHARGE = 4, ITEMMODE_5 = 5, ITEMMODE_ENCHANT = 6, ITEMMODE_COMBAT = 7, ITEMMODE_8 = 8, + ITEMMODE_RECHARGE = 4, ITEMMODE_5 = 5, ITEMMODE_ENCHANT = 6, ITEMMODE_COMBAT = 7, ITEMMODE_8 = 8, ITEMMODE_REPAIR = 9, ITEMMODE_IDENTIFY = 10, ITEMMODE_TO_GOLD = 11 }; @@ -73,10 +73,10 @@ private: /** * Calculate the cost of an item */ - int calcItemCost(Character *c, int itemIndex, ItemsMode mode, int skillLevel, + int calcItemCost(Character *c, int itemIndex, ItemsMode mode, int skillLevel, ItemCategory category); - int doItemOptions(Character &c, int actionIndex, int itemIndex, + int doItemOptions(Character &c, int actionIndex, int itemIndex, ItemCategory category, ItemsMode mode); void itemToGold(Character &c, int itemIndex, ItemCategory category, ItemsMode mode); diff --git a/engines/xeen/dialogs_party.cpp b/engines/xeen/dialogs_party.cpp index 9457173e0e..3dc47d1e9b 100644 --- a/engines/xeen/dialogs_party.cpp +++ b/engines/xeen/dialogs_party.cpp @@ -32,7 +32,7 @@ namespace Xeen { -PartyDialog::PartyDialog(XeenEngine *vm) : ButtonContainer(vm), +PartyDialog::PartyDialog(XeenEngine *vm) : ButtonContainer(vm), PartyDrawer(vm), _vm(vm) { initDrawStructs(); } @@ -264,7 +264,7 @@ void PartyDialog::execute() { startingCharChanged(startingChar); } break; - + default: break; } @@ -579,11 +579,11 @@ void PartyDialog::createChar() { _buttons[destAttrib + 10]._bounds.left, _buttons[destAttrib + 10]._bounds.top)); w.update(); - + SWAP(attribs[srcAttrib], attribs[destAttrib]); checkClass(attribs, allowedClasses); classId = -1; - selectedClass = newCharDetails(attribs, allowedClasses, + selectedClass = newCharDetails(attribs, allowedClasses, race, sex, classId, selectedClass, msg); } else { icons.draw(w, srcAttrib * 2 + 10, Common::Point( @@ -642,7 +642,7 @@ void PartyDialog::createChar() { if (_buttonValue != Common::KEYCODE_PAGEDOWN) { selectedClass = newCharDetails(attribs, allowedClasses, race, sex, classId, selectedClass, msg); - + for (int idx = 0; idx < 7; ++idx) icons.draw(w, 10 + idx * 2, Common::Point(168, 19 + idx * 24)); for (int idx = 0; idx < 10; ++idx) @@ -656,7 +656,7 @@ void PartyDialog::createChar() { icons.draw(w, 61, Common::Point(220, 19)); icons.draw(w, 64, Common::Point(220, 155)); icons.draw(w, 65, Common::Point(220, 170)); - + party._roster[freeCharList[charIndex]]._faceSprites->draw(w, 0, Common::Point(27, 102)); @@ -675,7 +675,7 @@ void PartyDialog::createChar() { } } - // Move to next available class, or if the code block above resulted in + // Move to next available class, or if the code block above resulted in // selectedClass being -1, move to select the first available class for (int tempClass = selectedClass + 1; tempClass <= CLASS_RANGER; ++tempClass) { if (allowedClasses[tempClass]) { @@ -686,7 +686,7 @@ void PartyDialog::createChar() { printSelectionArrow(icons, selectedClass); } while (!_vm->shouldQuit() && _buttonValue != Common::KEYCODE_ESCAPE); - + _vm->_mode = oldMode; } @@ -707,7 +707,7 @@ int PartyDialog::selectCharacter(bool isDelete, int firstDisplayChar) { w.update(); saveButtons(); - addButton(Common::Rect(225, isDelete ? 120 : 84, 249, isDelete ? 140 : 104), + addButton(Common::Rect(225, isDelete ? 120 : 84, 249, isDelete ? 140 : 104), Common::KEYCODE_ESCAPE, &iconSprites); addButton(Common::Rect(16, 16, 48, 48), Common::KEYCODE_1); addButton(Common::Rect(117, 16, 149, 48), Common::KEYCODE_2); @@ -755,7 +755,7 @@ int PartyDialog::selectCharacter(bool isDelete, int firstDisplayChar) { default: break; } - } + } w.close(); restoreButtons(); @@ -802,7 +802,7 @@ void PartyDialog::checkClass(const uint attribs[TOTAL_ATTRIBUTES], bool allowedC } int PartyDialog::newCharDetails(const uint attribs[TOTAL_ATTRIBUTES], - bool allowedClasses[TOTAL_CLASSES], Race race, Sex sex, int classId, + bool allowedClasses[TOTAL_CLASSES], Race race, Sex sex, int classId, int selectedClass, Common::String &msg) { int foundClass = -1; Common::String skillStr, classStr, raceSkillStr; diff --git a/engines/xeen/dialogs_party.h b/engines/xeen/dialogs_party.h index 17ec4fd300..84b98579e1 100644 --- a/engines/xeen/dialogs_party.h +++ b/engines/xeen/dialogs_party.h @@ -78,7 +78,7 @@ private: /** * Return details of the generated character */ - int newCharDetails(const uint attribs[TOTAL_ATTRIBUTES], + int newCharDetails(const uint attribs[TOTAL_ATTRIBUTES], bool allowedClasses[TOTAL_CLASSES], Race race, Sex sex, int classId, int selectedClass, Common::String &msg); diff --git a/engines/xeen/dialogs_query.cpp b/engines/xeen/dialogs_query.cpp index d8dfea116a..76083a8170 100644 --- a/engines/xeen/dialogs_query.cpp +++ b/engines/xeen/dialogs_query.cpp @@ -127,7 +127,7 @@ bool YesNo::execute(bool type, bool townFlag) { while (!_vm->shouldQuit()) { events.updateGameCounter(); - + if (town.isActive()) { town.drawTownAnim(townFlag); //numFrames = 3; diff --git a/engines/xeen/dialogs_spells.cpp b/engines/xeen/dialogs_spells.cpp index 47125c4fa7..f5dfe65b00 100644 --- a/engines/xeen/dialogs_spells.cpp +++ b/engines/xeen/dialogs_spells.cpp @@ -30,7 +30,7 @@ namespace Xeen { -Character *SpellsDialog::show(XeenEngine *vm, ButtonContainer *priorDialog, +Character *SpellsDialog::show(XeenEngine *vm, ButtonContainer *priorDialog, Character *c, int isCasting) { SpellsDialog *dlg = new SpellsDialog(vm); Character *result = dlg->execute(priorDialog, c, isCasting); @@ -228,7 +228,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int int spellCost = spells.calcSpellCost(spellId, expenseFactor); if (isCasting) { - selection = newSelection; + selection = newSelection; } else { Common::String spellName = _spells[newSelection]._name; Common::String msg = (castingCopy & 0x80) ? @@ -499,7 +499,7 @@ int CastSpell::execute(Character *&c) { int spCost = spells.calcSpellPoints(spellId, c->getCurrentLevel()); w.writeString(Common::String::format(Res.CAST_SPELL_DETAILS, - c->_name.c_str(), spells._spellNames[spellId].c_str(), + c->_name.c_str(), spells._spellNames[spellId].c_str(), spCost, gemCost, c->_currentSp)); drawButtons(&screen); w.update(); @@ -586,7 +586,7 @@ Character *SpellOnWho::show(XeenEngine *vm, int spellId) { if (result == -1) return nullptr; - + Combat &combat = *vm->_combat; Party &party = *vm->_party; return combat._combatMode == 2 ? combat._combatParty[result] : @@ -851,7 +851,7 @@ bool LloydsBeacon::execute() { c._lloydMap = party._mazeId; c._lloydPosition = party._mazePosition; c._lloydSide = isDarkCc ? 1 : 0; - + _buttonValue = Common::KEYCODE_ESCAPE; break; } @@ -959,7 +959,7 @@ int TownPortal::execute() { townNames[3].c_str(), townNames[4].c_str() )); w.update(); - + // Get the town number int townNumber; Common::String num; diff --git a/engines/xeen/dialogs_spells.h b/engines/xeen/dialogs_spells.h index 3ccdb836a3..c1aeadc68d 100644 --- a/engines/xeen/dialogs_spells.h +++ b/engines/xeen/dialogs_spells.h @@ -53,7 +53,7 @@ private: const char *setSpellText(Character *c, int isCasting); public: - static Character *show(XeenEngine *vm, ButtonContainer *priorDialog, + static Character *show(XeenEngine *vm, ButtonContainer *priorDialog, Character *c, int isCasting); }; diff --git a/engines/xeen/files.cpp b/engines/xeen/files.cpp index ff4a56fcb0..06dd3d12a7 100644 --- a/engines/xeen/files.cpp +++ b/engines/xeen/files.cpp @@ -118,14 +118,14 @@ int BaseCCArchive::listMembers(Common::ArchiveMemberList &list) const { /*------------------------------------------------------------------------*/ -CCArchive::CCArchive(const Common::String &filename, bool encoded): +CCArchive::CCArchive(const Common::String &filename, bool encoded): BaseCCArchive(), _filename(filename), _encoded(encoded) { File f(filename); loadIndex(&f); } -CCArchive::CCArchive(const Common::String &filename, const Common::String &prefix, - bool encoded): BaseCCArchive(), _filename(filename), +CCArchive::CCArchive(const Common::String &filename, const Common::String &prefix, + bool encoded): BaseCCArchive(), _filename(filename), _prefix(prefix), _encoded(encoded) { _prefix.toLowercase(); File f(filename); diff --git a/engines/xeen/files.h b/engines/xeen/files.h index d73eb281c6..ffb703374b 100644 --- a/engines/xeen/files.h +++ b/engines/xeen/files.h @@ -32,7 +32,7 @@ namespace Xeen { -enum ArchiveType { +enum ArchiveType { ANY_ARCHIVE = -1, GAME_ARCHIVE = 0, ALTSIDE_ARCHIVE = 1, INTRO_ARCHIVE = 2 }; diff --git a/engines/xeen/font.cpp b/engines/xeen/font.cpp index 459a334da0..ae2f37fa2d 100644 --- a/engines/xeen/font.cpp +++ b/engines/xeen/font.cpp @@ -26,7 +26,7 @@ namespace Xeen { -FontSurface::FontSurface() : XSurface(), _fontData(nullptr), _bgColor(DEFAULT_BG_COLOR), +FontSurface::FontSurface() : XSurface(), _fontData(nullptr), _bgColor(DEFAULT_BG_COLOR), _fontReduced(false),_fontJustify(JUSTIFY_NONE), _msgWraps(false) { setTextColor(0); } @@ -60,7 +60,7 @@ const char *FontSurface::writeString(const Common::String &s, const Common::Rect for (;;) { const char *msgStartP = _displayString; _msgWraps = false; - + // Get the size of the string that can be displayed on the line int xp = _fontJustify == JUSTIFY_CENTER ? bounds.left : _writePos.x; while (!getNextCharWidth(xp)) { @@ -94,7 +94,7 @@ const char *FontSurface::writeString(const Common::String &s, const Common::Rect break; } } else { - // Found word break, find end of previous word + // Found word break, find end of previous word while (endP > _displayString && (*endP & 0x7f) == ' ') --endP; @@ -136,7 +136,7 @@ const char *FontSurface::writeString(const Common::String &s, const Common::Rect // Main character display loop while (_displayString <= displayEnd) { char c = getNextChar(); - + if (c == ' ') { _writePos.x += _fontReduced ? 3 : 4; } else if (c == '\r') { @@ -281,7 +281,7 @@ bool FontSurface::newLine(const Common::Rect &bounds) { _msgWraps = false; _writePos.x = bounds.left; - + int hv = _fontReduced ? 9 : 10; _writePos.y += hv; diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 3c3b572518..d95f613241 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -60,7 +60,7 @@ void PartyDrawer::drawParty(bool updateFlag) { Character &ps = inCombat ? *combat._combatParty[idx] : party._activeParty[idx]; Condition charCondition = ps.worstCondition(); int charFrame = Res.FACE_CONDITION_FRAMES[charCondition]; - + SpriteResource *sprites = (charFrame > 4) ? &_dseFace : ps._faceSprites; if (charFrame > 4) charFrame -= 5; @@ -130,7 +130,7 @@ void PartyDrawer::resetHighlight() { } /*------------------------------------------------------------------------*/ -Interface::Interface(XeenEngine *vm) : ButtonContainer(vm), InterfaceMap(vm), +Interface::Interface(XeenEngine *vm) : ButtonContainer(vm), InterfaceMap(vm), PartyDrawer(vm), _vm(vm) { _buttonsLoaded = false; _intrIndex1 = 0; @@ -285,7 +285,7 @@ void Interface::perform() { return; if (_buttonValue == Common::KEYCODE_SPACE) { - int lookupId = map.mazeLookup(party._mazePosition, + int lookupId = map.mazeLookup(party._mazePosition, Res.WALL_SHIFTS[party._mazeDirection][2]); bool eventsFlag = true; @@ -497,7 +497,7 @@ void Interface::perform() { case Common::KEYCODE_b: chargeStep(); - + if (map.getCell(2) < map.mazeData()._difficulties._wallNoPass && !map._isOutdoors) { switch (party._mazeDirection) { @@ -623,7 +623,7 @@ void Interface::stepTime() { Party &party = *_vm->_party; Sound &sound = *_vm->_sound; doStepCode(); - + if (++party._ctr24 == 24) party._ctr24 = 0; @@ -652,11 +652,11 @@ void Interface::doStepCode() { switch (surfaceId) { case SURFTYPE_SPACE: - // Wheeze.. can't breathe in space! Explosive decompression, here we come + // Wheeze.. can't breathe in space! Explosive decompression, here we come party._partyDead = true; break; case SURFTYPE_LAVA: - // It burns, it burns! + // It burns, it burns! damage = 100; party._damageType = DT_FIRE; break; @@ -740,8 +740,8 @@ void Interface::startFalling(bool flag) { map._isOutdoors) { map.getNewMaze(); } - } - + } + if (isDarkCc) { switch (party._mazeId - 25) { case 0: @@ -944,7 +944,7 @@ bool Interface::checkMoveDirection(int key) { default: break; } - + map.getCell(7); int startSurfaceId = map._currentSurfaceId; int surfaceId; @@ -1064,7 +1064,7 @@ void Interface::rest() { for (int idx = 0; idx < 10; ++idx) { chargeStep(); draw3d(true); - + if (_vm->_mode == MODE_1) { _vm->_mode = oldMode; return; @@ -1178,7 +1178,7 @@ void Interface::bash(const Common::Point &pt, Direction direction) { } party._activeParty[charNum1 - 1].subtractHitPoints(2); - _charPowSprites.draw(screen._windows[0], 0, + _charPowSprites.draw(screen._windows[0], 0, Common::Point(Res.CHAR_FACES_X[charNum1 - 1], 150)); screen._windows[0].update(); @@ -1246,7 +1246,7 @@ void Interface::draw3d(bool updateFlag, bool skipDelay) { Party &party = *_vm->_party; Screen &screen = *_vm->_screen; Scripts &scripts = *_vm->_scripts; - + if (screen._windows[11]._enabled) return; @@ -1286,7 +1286,7 @@ void Interface::draw3d(bool updateFlag, bool skipDelay) { if (combat._attackMonsters[0] != -1 || combat._attackMonsters[1] != -1 || combat._attackMonsters[2] != -1) { - if ((_vm->_mode == MODE_1 || _vm->_mode == MODE_SLEEPING) && + if ((_vm->_mode == MODE_1 || _vm->_mode == MODE_SLEEPING) && !combat._monstersAttacking && !_charsShooting && combat._moveMonsters) { doCombat(); if (scripts._eventSkipped) @@ -1862,7 +1862,7 @@ void Interface::doCombat() { Sound &sound = *_vm->_sound; bool upDoorText = _upDoorText; bool reloadMap = false; - + _upDoorText = false; combat._combatMode = COMBATMODE_2; _vm->_mode = MODE_COMBAT; @@ -1974,7 +1974,7 @@ void Interface::doCombat() { combat.block(); nextChar(); break; - + case Common::KEYCODE_c: { // Cast spell int spellId = CastSpell::show(_vm); @@ -2005,7 +2005,7 @@ void Interface::doCombat() { FightOptions::show(_vm); highlightChar(combat._whosTurn); break; - + case Common::KEYCODE_q: // Quick Reference dialog QuickReferenceDialog::show(_vm); @@ -2054,7 +2054,7 @@ void Interface::doCombat() { case Common::KEYCODE_RIGHT: // Rotate party direction left or right if (_buttonValue == Common::KEYCODE_LEFT) { - party._mazeDirection = (party._mazeDirection == DIR_NORTH) ? + party._mazeDirection = (party._mazeDirection == DIR_NORTH) ? DIR_WEST : (Direction)((int)party._mazeDirection - 1); } else { party._mazeDirection = (party._mazeDirection == DIR_WEST) ? diff --git a/engines/xeen/interface_map.cpp b/engines/xeen/interface_map.cpp index 0244e3e081..1ada1c6e77 100644 --- a/engines/xeen/interface_map.cpp +++ b/engines/xeen/interface_map.cpp @@ -27,7 +27,7 @@ namespace Xeen { -OutdoorDrawList::OutdoorDrawList() : _sky1(_data[0]), _sky2(_data[1]), +OutdoorDrawList::OutdoorDrawList() : _sky1(_data[0]), _sky2(_data[1]), _groundSprite(_data[2]), _attackImgs1(&_data[124]), _attackImgs2(&_data[95]), _attackImgs3(&_data[76]), _attackImgs4(&_data[53]), _groundTiles(&_data[3]) { _data[0] = DrawStruct(0, 8, 8); @@ -166,21 +166,21 @@ OutdoorDrawList::OutdoorDrawList() : _sky1(_data[0]), _sky2(_data[1]), /*------------------------------------------------------------------------*/ -IndoorDrawList::IndoorDrawList() : +IndoorDrawList::IndoorDrawList() : _sky1(_data[0]), _sky2(_data[1]), _ground(_data[2]), _horizon(_data[28]), - _swl_0F1R(_data[146]), _swl_0F1L(_data[144]), _swl_1F1R(_data[134]), - _swl_1F1L(_data[133]), _swl_2F2R(_data[110]), _swl_2F1R(_data[109]), - _swl_2F1L(_data[108]), _swl_2F2L(_data[107]), _swl_3F1R(_data[ 78]), + _swl_0F1R(_data[146]), _swl_0F1L(_data[144]), _swl_1F1R(_data[134]), + _swl_1F1L(_data[133]), _swl_2F2R(_data[110]), _swl_2F1R(_data[109]), + _swl_2F1L(_data[108]), _swl_2F2L(_data[107]), _swl_3F1R(_data[ 78]), _swl_3F2R(_data[ 77]), _swl_3F3R(_data[ 76]), _swl_3F4R(_data[ 75]), - _swl_3F1L(_data[ 74]), _swl_3F2L(_data[ 73]), _swl_3F3L(_data[ 72]), - _swl_3F4L(_data[ 71]), _swl_4F4R(_data[ 33]), _swl_4F3R(_data[ 34]), + _swl_3F1L(_data[ 74]), _swl_3F2L(_data[ 73]), _swl_3F3L(_data[ 72]), + _swl_3F4L(_data[ 71]), _swl_4F4R(_data[ 33]), _swl_4F3R(_data[ 34]), _swl_4F2R(_data[ 35]), _swl_4F1R(_data[ 36]), _swl_4F1L(_data[ 32]), _swl_4F2L(_data[ 31]), _swl_4F3L(_data[ 30]), _swl_4F4L(_data[ 29]), - _fwl_4F4R(_data[ 45]), _fwl_4F3R(_data[ 44]), _fwl_4F2R(_data[ 43]), - _fwl_4F1R(_data[ 42]), _fwl_4F( _data[ 41]), _fwl_4F1L(_data[ 40]), + _fwl_4F4R(_data[ 45]), _fwl_4F3R(_data[ 44]), _fwl_4F2R(_data[ 43]), + _fwl_4F1R(_data[ 42]), _fwl_4F( _data[ 41]), _fwl_4F1L(_data[ 40]), _fwl_4F2L(_data[ 39]), _fwl_4F3L(_data[ 38]), _fwl_4F4L(_data[ 37]), - _fwl_2F1R(_data[121]), _fwl_2F( _data[120]), _fwl_2F1L(_data[119]), - _fwl_3F2R(_data[ 91]), _fwl_3F1R(_data[ 90]), _fwl_3F( _data[ 89]), + _fwl_2F1R(_data[121]), _fwl_2F( _data[120]), _fwl_2F1L(_data[119]), + _fwl_3F2R(_data[ 91]), _fwl_3F1R(_data[ 90]), _fwl_3F( _data[ 89]), _fwl_3F1L(_data[ 88]), _fwl_3F2L(_data[ 87]), _fwl_1F( _data[147]), _fwl_1F1R(_data[145]), _fwl_1F1L(_data[143]), _groundTiles(&_data[3]), @@ -2608,7 +2608,7 @@ void InterfaceMap::setIndoorsMonsters() { } } -void InterfaceMap::setMonsterSprite(DrawStruct &drawStruct, MazeMonster &monster, SpriteResource *sprites, +void InterfaceMap::setMonsterSprite(DrawStruct &drawStruct, MazeMonster &monster, SpriteResource *sprites, int frame, int defaultY) { MonsterStruct &monsterData = *monster._monsterData; bool flying = monsterData._flying; @@ -3533,7 +3533,7 @@ void InterfaceMap::drawIndoors() { drawStruct._sprites = sprites.empty() ? (SpriteResource *)nullptr : &sprites; surfaceId = map.mazeData()._surfaceTypes[map._currentSurfaceId]; - if (surfaceId == SURFTYPE_WATER || surfaceId == SURFTYPE_LAVA || + if (surfaceId == SURFTYPE_WATER || surfaceId == SURFTYPE_LAVA || surfaceId == SURFTYPE_SEWER) { drawStruct._frame = Res.DRAW_FRAMES[cellIndex][_flipWater ? 1 : 0]; drawStruct._flags = _flipWater ? SPRFLAG_HORIZ_FLIPPED : 0; @@ -4343,7 +4343,7 @@ void InterfaceMap::drawIndoors() { _vm->_party->_mazeDirection][_vm->_party->_mazePosition.y] ); map.cellFlagLookup(pt); - + _indoorList._sky2._sprites = &map._skySprites[0]; } else { _indoorList._sky2._sprites = _indoorList[0]._sprites; @@ -4362,7 +4362,7 @@ void InterfaceMap::drawIndoors() { if (_vm->_combat->_shooting[idx]) _isAttacking = true; } - + _charsShooting = _isAttacking; } diff --git a/engines/xeen/interface_map.h b/engines/xeen/interface_map.h index 2189aacec1..47a7bad963 100644 --- a/engines/xeen/interface_map.h +++ b/engines/xeen/interface_map.h @@ -44,9 +44,9 @@ public: public: OutdoorDrawList(); - DrawStruct &operator[](int idx) { + DrawStruct &operator[](int idx) { assert(idx < size()); - return _data[idx]; + return _data[idx]; } int size() const { return 132; } @@ -80,9 +80,9 @@ public: public: IndoorDrawList(); - DrawStruct &operator[](int idx) { + DrawStruct &operator[](int idx) { assert(idx < size()); - return _data[idx]; + return _data[idx]; } int size() const { return 170; } @@ -99,7 +99,7 @@ private: * Helper method for setIndoorsMonsters to set a draw structure * with the deatils for a given monster */ - void setMonsterSprite(DrawStruct &drawStruct, MazeMonster &monster, + void setMonsterSprite(DrawStruct &drawStruct, MazeMonster &monster, SpriteResource *sprites, int frame, int defaultY); protected: int8 _wp[20]; diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp index a7be48af8f..f904344206 100644 --- a/engines/xeen/map.cpp +++ b/engines/xeen/map.cpp @@ -80,13 +80,13 @@ MonsterStruct::MonsterStruct(Common::String name, int experience, int hp, int ac bool flying, int imageNumber, int loopAnimation, int animationEffect, int fx, Common::String attackVoc): _name(name), _experience(experience), _hp(hp), _accuracy(accuracy), - _speed(speed), _numberOfAttacks(numberOfAttacks), _hatesClass(hatesClass), - _strikes(strikes), _dmgPerStrike(dmgPerStrike), _attackType(attackType), - _specialAttack(specialAttack), _hitChance(hitChance), _rangeAttack(rangeAttack), - _monsterType(monsterType), _fireResistence(fireResistence), + _speed(speed), _numberOfAttacks(numberOfAttacks), _hatesClass(hatesClass), + _strikes(strikes), _dmgPerStrike(dmgPerStrike), _attackType(attackType), + _specialAttack(specialAttack), _hitChance(hitChance), _rangeAttack(rangeAttack), + _monsterType(monsterType), _fireResistence(fireResistence), _electricityResistence(electricityResistence), _coldResistence(coldResistence), _poisonResistence(poisonResistence), _energyResistence(energyResistence), - _magicResistence(magicResistence), _phsyicalResistence(phsyicalResistence), + _magicResistence(magicResistence), _phsyicalResistence(phsyicalResistence), _field29(field29), _gold(gold), _gems(gems), _itemDrop(itemDrop), _flying(flying), _imageNumber(imageNumber), _loopAnimation(loopAnimation), _animationEffect(animationEffect), _fx(fx), _attackVoc(attackVoc) { @@ -127,7 +127,7 @@ void MonsterStruct::synchronize(Common::SeekableReadStream &s) { _loopAnimation = s.readByte(); _animationEffect = s.readByte(); _fx = s.readByte(); - + char attackVoc[10]; s.read(attackVoc, 9); attackVoc[9] = '\0'; @@ -640,7 +640,7 @@ MazeObject::MazeObject() { _direction = DIR_NORTH; _flipped = false; _sprites = nullptr; -} +} /*------------------------------------------------------------------------*/ @@ -1040,7 +1040,7 @@ void Map::load(int mapId) { } // TODO: Switch setting flags that don't seem to ever be used - + // Reload the monster data for the main maze that we're loading mapId = _vm->_party->_mazeId; Common::String filename = Common::String::format("maze%c%03d.mob", @@ -1062,7 +1062,7 @@ void Map::load(int mapId) { filename = "085.obj"; _mobData._objectSprites[0]._spriteId = 85; } else { - filename = Common::String::format("%03d.%cbj", + filename = Common::String::format("%03d.%cbj", _mobData._objectSprites[i]._spriteId, _mobData._objectSprites[i]._spriteId >= 100 ? '0' : 'o'); } @@ -1074,7 +1074,7 @@ void Map::load(int mapId) { // Load sprites for the monsters for (uint i = 0; i < _mobData._monsterSprites.size(); ++i) { - ArchiveType archiveType = + ArchiveType archiveType = _mobData._monsterSprites[i]._spriteId == 91 && _vm->getGameID() == GType_WorldOfXeen ? ALTSIDE_ARCHIVE : GAME_ARCHIVE; @@ -1101,7 +1101,7 @@ void Map::load(int mapId) { outdoorList._sky1._sprites = &_skySprites[0]; outdoorList._sky2._sprites = &_skySprites[0]; outdoorList._groundSprite._sprites = &_groundSprites; - + for (int i = 0; i < TOTAL_SURFACES; ++i) { _wallSprites._surfaces[i].clear(); @@ -1195,7 +1195,7 @@ void Map::load(int mapId) { indoorList._fwl_1F._sprites = &_wallSprites._fwl1; indoorList._fwl_1F1R._sprites = &_wallSprites._fwl1; - indoorList._fwl_1F1L._sprites = &_wallSprites._fwl1; + indoorList._fwl_1F1L._sprites = &_wallSprites._fwl1; indoorList._horizon._sprites = &_wallSprites._fwl1; indoorList._ground._sprites = &_groundSprites; @@ -1384,7 +1384,7 @@ void Map::setCellSurfaceFlags(const Common::Point &pt, int bits) { void Map::setWall(const Common::Point &pt, Direction dir, int v) { const int XOR_MASKS[4] = { 0xFFF, 0xF0FF, 0xFF0F, 0xFFF0 }; mazeLookup(pt, 0, 0); - + Common::Point mapPos(pt.x & 15, pt.y & 15); MazeWallLayers &wallLayer = _mazeData[_mazeDataIndex]._wallData[mapPos.y][mapPos.x]; wallLayer._data &= XOR_MASKS[dir]; @@ -1412,7 +1412,7 @@ int Map::getCell(int idx) { } _currentWall = INVALID_CELL; return INVALID_CELL; - } + } _mazeDataIndex = 0; while (_mazeData[_mazeDataIndex]._mazeId != mapId) @@ -1447,7 +1447,7 @@ int Map::getCell(int idx) { _currentWall = INVALID_CELL; return INVALID_CELL; } - + _mazeDataIndex = 0; while (_mazeData[_mazeDataIndex]._mazeId != mapId) ++_mazeDataIndex; @@ -1503,7 +1503,7 @@ int Map::getCell(int idx) { _currentTile = 0; } } else { - if (!mapId) + if (!mapId) return 0; if (pt.x > 31 || pt.y > 31) @@ -1523,7 +1523,7 @@ void Map::loadSky() { party._isNight = party._minutes < (5 * 60) || party._minutes >= (21 * 60); _skySprites[0].load(((party._mazeId >= 89 && party._mazeId <= 112) || - party._mazeId == 128 || party._mazeId == 129) || !party._isNight + party._mazeId == 128 || party._mazeId == 129) || !party._isNight ? "sky.sky" : "night.sky"); } diff --git a/engines/xeen/map.h b/engines/xeen/map.h index 2c02e6ed2f..d0b63ec146 100644 --- a/engines/xeen/map.h +++ b/engines/xeen/map.h @@ -138,7 +138,7 @@ public: enum MazeFlags { OUTFLAG_GRATE = 0x80, OUTFLAG_DRAIN = 0x20, OUTFLAG_OBJECT_EXISTS = 0x08, INFLAG_INSIDE = 0x08, FLAG_AUTOEXECUTE_EVENT = 0x10, - RESTRICTION_ETHERIALIZE = 0x40, RESTRICTION_80 = 0x80, + RESTRICTION_ETHERIALIZE = 0x40, RESTRICTION_80 = 0x80, RESTRICTION_TOWN_PORTAL = 0x100, RESTRICTION_SUPER_SHELTER = 0x200, RESTRICTION_TIME_DISTORTION = 0x400, RESTRICTION_LLOYDS_BEACON = 0x800, RESTRICTION_TELPORT = 0x1000, RESTRICTION_2000 = 0x2000, @@ -150,7 +150,7 @@ enum MazeFlags { enum MazeFlags2 { FLAG_IS_OUTDOORS = 0x8000, FLAG_IS_DARK = 0x4000 }; enum SurfaceType { - SURFTYPE_DEFAULT = 0, + SURFTYPE_DEFAULT = 0, SURFTYPE_WATER = 0, SURFTYPE_DIRT = 1, SURFTYPE_GRASS = 2, SURFTYPE_SNOW = 3, SURFTYPE_SWAMP = 4, SURFTYPE_LAVA = 5, SURFTYPE_DESERT = 6, SURFTYPE_ROAD = 7, SURFTYPE_DWATER = 8, diff --git a/engines/xeen/music.h b/engines/xeen/music.h index bf77398885..207ec991a3 100644 --- a/engines/xeen/music.h +++ b/engines/xeen/music.h @@ -361,7 +361,7 @@ public: * Plays a song */ void playSong(const Common::String &name, int param = 0); - + /** * Plays a song */ diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp index 292ac01d2c..abf2c5cfed 100644 --- a/engines/xeen/party.cpp +++ b/engines/xeen/party.cpp @@ -364,7 +364,7 @@ void Party::changeTime(int numMinutes) { if (player._conditions[PARALYZED] && _vm->getRandomNumber(4) == 1) player._conditions[PARALYZED]--; } - + if (killed) _vm->_interface->drawParty(true); @@ -375,7 +375,7 @@ void Party::changeTime(int numMinutes) { void Party::addTime(int numMinutes) { int day = _day; _minutes += numMinutes; - + // If the total minutes has exceeded a day, move to next one while (_minutes >= (24 * 60)) { _minutes -= 24 * 60; @@ -464,7 +464,7 @@ void Party::handleLight() { } } - _vm->_interface->_intrIndex1 = _lightCount || + _vm->_interface->_intrIndex1 = _lightCount || (map.mazeData()._mazeFlags2 & FLAG_IS_DARK) == 0 ? 4 : 0; } @@ -599,7 +599,7 @@ void Party::giveTreasure() { // Important item, so clear a slot for it _activeParty[0]._weapons[INV_ITEMS_TOTAL - 1].clear(); } else { - // Otherwise, clear all the remaining treasure items, + // Otherwise, clear all the remaining treasure items, // since all the party's packs are full for (int idx = 0; idx < MAX_TREASURE_ITEMS; ++idx) { _treasure._weapons[idx].clear(); @@ -657,7 +657,7 @@ void Party::giveTreasure() { while (!events.isKeyMousePressed() && events.timeElapsed() < 1) events.pollEventsAndWait(); } while (!_vm->shouldQuit() && events.timeElapsed() == 1); - + if (_vm->_mode != MODE_COMBAT) _vm->_mode = MODE_1; @@ -666,7 +666,7 @@ void Party::giveTreasure() { _gems += _treasure._gems; _treasure._gold = 0; _treasure._gems = 0; - + _treasure._hasItems = false; for (int idx = 0; idx < MAX_TREASURE_ITEMS; ++idx) { _treasure._weapons[idx].clear(); @@ -698,7 +698,7 @@ void Party::giveTreasureToCharacter(Character &c, ItemCategory category, int ite Window &w = screen._windows[10]; XeenItem &treasureItem = _treasure._categories[category][itemIndex]; sound.playFX(20); - + if (treasureItem._id < 82) { // Copy item into the character's inventory c._items[category][INV_ITEMS_TOTAL - 1] = treasureItem; diff --git a/engines/xeen/party.h b/engines/xeen/party.h index d753b75801..3febf5bfe1 100644 --- a/engines/xeen/party.h +++ b/engines/xeen/party.h @@ -34,7 +34,7 @@ namespace Xeen { -enum Direction { +enum Direction { DIR_NORTH = 0, DIR_EAST = 1, DIR_SOUTH = 2, DIR_WEST = 3, DIR_ALL = 4 }; diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp index b2d8c6d495..4f576835f6 100644 --- a/engines/xeen/resources.cpp +++ b/engines/xeen/resources.cpp @@ -87,7 +87,7 @@ const char *const Resources::CREDITS = "\t190Clayton Retzer\n" "\t190David Vela\003""c"; -const char *const Resources::OPTIONS_TITLE = +const char *const Resources::OPTIONS_TITLE = "\x0D\x01\003""c\014""dMight and Magic Options\n" "World of Xeen\x02\n" "\v117Copyright (c) 1993 NWC, Inc.\n" @@ -316,13 +316,13 @@ const char *const Resources::SEX_NAMES[2] = { "Male", "Female" }; const char *const Resources::SKILL_NAMES[18] = { "Thievery", "Arms Master", "Astrologer", "Body Builder", "Cartographer", - "Crusader", "Direction Sense", "Linguist", "Merchant", "Mountaineer", + "Crusader", "Direction Sense", "Linguist", "Merchant", "Mountaineer", "Navigator", "Path Finder", "Prayer Master", "Prestidigitator", "Swimmer", "Tracker", "Spot Secret Door", "Danger Sense" }; const char *const Resources::CLASS_NAMES[11] = { - "Knight", "Paladin", "Archer", "Cleric", "Sorcerer", "Robber", + "Knight", "Paladin", "Archer", "Cleric", "Sorcerer", "Robber", "Ninja", "Barbarian", "Druid", "Ranger", nullptr }; @@ -331,8 +331,8 @@ const uint Resources::CLASS_EXP_LEVELS[10] = { }; const char *const Resources::CONDITION_NAMES[17] = { - "Cursed", "Heart Broken", "Weak", "Poisoned", "Diseased", - "Insane", "In Love", "Drunk", "Asleep", "Depressed", "Confused", + "Cursed", "Heart Broken", "Weak", "Poisoned", "Diseased", + "Insane", "In Love", "Drunk", "Asleep", "Depressed", "Confused", "Paralyzed", "Unconscious", "Dead", "Stone", "Eradicated", "Good" }; @@ -353,28 +353,28 @@ const char *const Resources::HEROISM = "\n\t020Heroism\t095%+d"; const char *const Resources::IN_PARTY = "\014""15In Party\014""d"; const char *const Resources::PARTY_DETAILS = "\015\003l\002\014""00" - "\013""001""\011""035%s" - "\013""009""\011""035%s" - "\013""017""\011""035%s" - "\013""025""\011""035%s" - "\013""001""\011""136%s" - "\013""009""\011""136%s" - "\013""017""\011""136%s" - "\013""025""\011""136%s" - "\013""044""\011""035%s" - "\013""052""\011""035%s" - "\013""060""\011""035%s" - "\013""068""\011""035%s" - "\013""044""\011""136%s" - "\013""052""\011""136%s" - "\013""060""\011""136%s" + "\013""001""\011""035%s" + "\013""009""\011""035%s" + "\013""017""\011""035%s" + "\013""025""\011""035%s" + "\013""001""\011""136%s" + "\013""009""\011""136%s" + "\013""017""\011""136%s" + "\013""025""\011""136%s" + "\013""044""\011""035%s" + "\013""052""\011""035%s" + "\013""060""\011""035%s" + "\013""068""\011""035%s" + "\013""044""\011""136%s" + "\013""052""\011""136%s" + "\013""060""\011""136%s" "\013""068""\011""136%s"; const char *const Resources::PARTY_DIALOG_TEXT = "%s\x2\x3""c\v106\t013Up\t048Down\t083\f37D\fdel\t118\f37R\fdem" "\t153\f37C\fdreate\t188E\f37x\fdit\x1"; -const int Resources::FACE_CONDITION_FRAMES[17] = { - 2, 2, 2, 1, 1, 4, 4, 4, 3, 2, 4, 3, 3, 5, 6, 7, 0 +const int Resources::FACE_CONDITION_FRAMES[17] = { + 2, 2, 2, 1, 1, 4, 4, 4, 3, 2, 4, 3, 3, 5, 6, 7, 0 }; const int Resources::CHAR_FACES_X[6] = { 10, 45, 81, 117, 153, 189 }; @@ -386,7 +386,7 @@ const char *const Resources::NO_ONE_TO_ADVENTURE_WITH = "You have no one to adve const char *const Resources::YOUR_ROSTER_IS_FULL = "Your Roster is full!"; const byte Resources::BACKGROUND_XLAT[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF9, 0xFF, 0x07, 0x00, 0x00, 0x00, @@ -409,7 +409,7 @@ const int8 Resources::SCREEN_POSITIONING_X[4][48] = { { -1, 0, 0, 0, 1, -1, 0, 0, 0, 1, -2, -1, -1, 0, 0, 0, 1, 1, 2, -4, -3, -3, -2, -2, - -1, -1, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, + -1, -1, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, -3, -2, -1, 0, 0, 1, 2, 3, -4, 4, 0, 0 }, { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, @@ -422,7 +422,7 @@ const int8 Resources::SCREEN_POSITIONING_X[4][48] = { 1, 1, 0, 0, 0, -1, -1, -2, -2, -3, -3, -4, 3, 2, 1, 0, 0, -1, -2, -3, 4, -4, 0, 0 }, { - 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -2, -2, + 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 0, -1 @@ -513,9 +513,9 @@ const byte Resources::WALL_SHIFTS[4][48] = { }; const int Resources::DRAW_NUMBERS[25] = { - 36, 37, 38, 43, 42, 41, - 39, 20, 22, 24, 33, 31, - 29, 26, 10, 11, 18, 16, + 36, 37, 38, 43, 42, 41, + 39, 20, 22, 24, 33, 31, + 29, 26, 10, 11, 18, 16, 13, 5, 9, 6, 0, 4, 1 }; @@ -578,8 +578,8 @@ const int Resources::AGE_RANGES_ADJUST[2][10] = { }; const uint Resources::STAT_VALUES[24] = { - 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 25, 30, 35, 40, - 50, 75, 100, 125, 150, 175, 200, 225, 250, + 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 25, 30, 35, 40, + 50, 75, 100, 125, 150, 175, 200, 225, 250, }; const int Resources::STAT_BONUSES[24] = { @@ -777,7 +777,7 @@ const char *const Resources::TEMPLE_TEXT = "\x03l\x09""000\x0B""090Gold\x03r\x09""000%s" "\x02\x03""c\x0B""122\x09""040ESC\x01"; -const char *const Resources::EXPERIENCE_FOR_LEVEL = +const char *const Resources::EXPERIENCE_FOR_LEVEL = "%s needs %lu experience for level %u."; const char *const Resources::LEARNED_ALL = "%s has learned all we can teach!"; @@ -832,7 +832,7 @@ const char *const Resources::BUY_SPELLS = "\x09""012\x0C""37B\x0C""duy Spells\n" "\x09""012\x0C""37S\x0C""dpell Info"; -const char *const Resources::GUILD_OPTIONS = +const char *const Resources::GUILD_OPTIONS = "\x0D\x0C""00\x03""c\x0B""000\x09""000Guild Options for%s" "\x03l\x09""000\x0B""090Gold" "\x03r\x09""000%s\x02\x03""c\x0B""122\x09""040ESC\x01"; @@ -870,8 +870,8 @@ const int Resources::SPELL_COSTS[77] = { }; const int Resources::DARK_SPELL_RANGES[12][2] = { - { 0, 20 }, { 16, 35 }, { 27, 37 }, { 29, 39 }, - { 0, 17 }, { 14, 34 }, { 26, 37 }, { 29, 39 }, + { 0, 20 }, { 16, 35 }, { 27, 37 }, { 29, 39 }, + { 0, 17 }, { 14, 34 }, { 26, 37 }, { 29, 39 }, { 0, 20 }, { 16, 35 }, { 27, 37 }, { 29, 39 } }; @@ -948,7 +948,7 @@ const char *const Resources::SPELLS_PRESS_A_KEY = const char *const Resources::SPELLS_PURCHASE = "\x3l\xB""000\x9""000\xC""d%s Do you wish to purchase " - "\xC""09%s\xC""d for %u?"; + "\xC""09%s\xC""d for %u?"; const char *const Resources::MAP_TEXT = "\x3""c\xB""000\x9""000%s\x3l\xB""139" @@ -970,7 +970,7 @@ const char *const Resources::LEVITATE_TEXT = "%c%sLevitate%s"; const char *const Resources::WALK_ON_WATER_TEXT = "%c%sWalk on Water"; -const char *const Resources::GAME_INFORMATION = +const char *const Resources::GAME_INFORMATION = "\xD\x3""c\x9""000\xB""001\xC""37%s of Xeen\xC""d\n" "Game Information\n" "\n" @@ -1043,7 +1043,7 @@ const char *const Resources::LEVEL_TEXT = "\x3r\x9""054%u\x3l\x9""058/ %u\n" "\x3""c%u Attack%s/Round\x1"; -const char *const Resources::RESISTENCES_TEXT = +const char *const Resources::RESISTENCES_TEXT = "\x2\x3""c%s\x3l\n" "\x9""020Fire\x9""100%u\n" "\x9""020Cold\x9""100%u\n" @@ -1072,7 +1072,7 @@ const char *const Resources::FOOD_TEXT = const char *const Resources::EXCHANGE_WITH_WHOM = "\t010\v005Exchange with whom?"; -const char *const Resources::QUICK_REF_LINE = +const char *const Resources::QUICK_REF_LINE = "\xB%3d\x9""007%u)\x9""027%s\x9""110%c%c%c\x3r\x9""160\xC%02u%u\xC""d" "\x3l\x9""170\xC%02u%d\xC""d\x9""208\xC%02u%u\xC""d\x9""247\xC" "%02u%u\xC""d\x9""270\xC%02u%c%c%c%c\xC""d"; @@ -1118,11 +1118,11 @@ const char *const Resources::BONUS_NAMES[7] = { }; const char *const Resources::WEAPON_NAMES[35] = { - nullptr, "long sword ", "short sword ", "broad sword ", "scimitar ", - "cutlass ", "sabre ", "club ", "hand axe ", "katana ", "nunchakas ", - "wakazashi ", "dagger ", "mace ", "flail ", "cudgel ", "maul ", "spear ", + nullptr, "long sword ", "short sword ", "broad sword ", "scimitar ", + "cutlass ", "sabre ", "club ", "hand axe ", "katana ", "nunchakas ", + "wakazashi ", "dagger ", "mace ", "flail ", "cudgel ", "maul ", "spear ", "bardiche ", "glaive ", "halberd ", "pike ", "flamberge ", "trident ", - "staff ", "hammer ", "naginata ", "battle axe ", "grand axe ", "great axe ", + "staff ", "hammer ", "naginata ", "battle axe ", "grand axe ", "great axe ", "short bow ", "long bow ", "crossbow ", "sling ", "Xeen Slayer Sword" }; @@ -1139,8 +1139,8 @@ const char *const Resources::ACCESSORY_NAMES[11] = { const char *const Resources::MISC_NAMES[22] = { nullptr, "rod ", "jewel ", "gem ", "box ", "orb ", "horn ", "coin ", - "wand ", "whistle ", "potion ", "scroll ", "RogueVM", - "bogusg", "bogus", "bogus", "bogus", "bogus", + "wand ", "whistle ", "potion ", "scroll ", "RogueVM", + "bogusg", "bogus", "bogus", "bogus", "bogus", "bogus", "bogus", "bogus", "bogus" }; @@ -1283,10 +1283,10 @@ const int Resources::ITEM_SKILL_DIVISORS[4] = { 1, 2, 100, 10 }; const int Resources::RESTRICTION_OFFSETS[4] = { 0, 35, 49, 60 }; const int Resources::ITEM_RESTRICTIONS[86] = { - 0, 86, 86, 86, 86, 86, 86, 0, 6, 239, 239, 239, 2, 4, 4, 4, 4, - 6, 70, 70, 70, 70, 94, 70, 0, 4, 239, 86, 86, 86, 70, 70, 70, 70, - 0, 0, 0, 68, 100, 116, 125, 255, 255, 85, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 86, 86, 86, 86, 86, 86, 0, 6, 239, 239, 239, 2, 4, 4, 4, 4, + 6, 70, 70, 70, 70, 94, 70, 0, 4, 239, 86, 86, 86, 70, 70, 70, 70, + 0, 0, 0, 68, 100, 116, 125, 255, 255, 85, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -1326,7 +1326,7 @@ const char *const Resources::WHICH_ITEM = "\t010\v005%s which item?"; const char *const Resources::WHATS_YOUR_HURRY = "\v007What's your hurry?\n" "Wait till you get out of here!"; -const char *const Resources::USE_ITEM_IN_COMBAT = +const char *const Resources::USE_ITEM_IN_COMBAT = "\v007To use an item in Combat, invoke the Use command on your turn!"; const char *const Resources::NO_SPECIAL_ABILITIES = "\v005\x3""c%s\fdhas no special abilities!"; @@ -1422,7 +1422,7 @@ const char *const Resources::QUEST_ITEMS_DATA = "\f04 * \fd%s\n" "\f04 * \fd%s\n" "\f04 * \fd%s"; -const char *const Resources::CURRENT_QUESTS_DATA = +const char *const Resources::CURRENT_QUESTS_DATA = "\r\x1\fd\x3""c\t000\v000Current Quests\x3l\x2\n" "%s\n" "\n" @@ -1441,7 +1441,7 @@ const char *const Resources::AUTO_NOTES_DATA = "%s\x3l\n" "%s\x3l"; -const char *const Resources::REST_COMPLETE = +const char *const Resources::REST_COMPLETE = "\v000\t0008 hours pass. Rest complete.\n" "%s\n" "%d food consumed."; @@ -1460,10 +1460,10 @@ const char *const Resources::YOUR_PARTY_IS_FULL = "\v007Your party is full!"; const char *const Resources::HAS_SLAYER_SWORD = "\v000\t000This character has the Xeen Slayer Sword and cannot be deleted!"; -const char *const Resources::SURE_TO_DELETE_CHAR = +const char *const Resources::SURE_TO_DELETE_CHAR = "Are you sure you want to delete %s the %s?"; -const char *const Resources::CREATE_CHAR_DETAILS = +const char *const Resources::CREATE_CHAR_DETAILS = "\f04\x3""c\x2\t144\v119\f37R\f04oll\t144\v149\f37C\f04reate" "\t144\v179\f37ESC\f04\x3l\x1\t195\v021\f37M\f04gt" "\t195\v045\f37I\f04nt\t195\v069\f37P\f04er\t195\v093\f37E\f04nd" @@ -1514,7 +1514,7 @@ const char *const Resources::COMBAT_DETAILS = "\r\f00\x3""c\v000\t000\x2""Combat const char *Resources::NOT_ENOUGH_TO_CAST = "\x3""c\v010Not enough %s to Cast %s"; const char *Resources::SPELL_CAST_COMPONENTS[2] = { "Spell Points", "Gems" }; -const char *const Resources::CAST_SPELL_DETAILS = +const char *const Resources::CAST_SPELL_DETAILS = "\r\x2\x3""c\v122\t013\f37C\fdast\t040\f37N\fdew" "\t067ESC\x1\t000\v000\x3""cCast Spell\n" "\n" @@ -1586,7 +1586,7 @@ const int Resources::TOWN_MAP_NUMBERS[2][5] = { { 28, 29, 30, 31, 32 }, { 29, 31, 33, 35, 37 } }; -const char *const Resources::MONSTER_DETAILS = +const char *const Resources::MONSTER_DETAILS = "\x3l\n" "%s\x3""c\t100%s\t140%u\t180%u\x3r\t000%s"; diff --git a/engines/xeen/saves.cpp b/engines/xeen/saves.cpp index 9fd2d19a9b..4df4b3727c 100644 --- a/engines/xeen/saves.cpp +++ b/engines/xeen/saves.cpp @@ -45,7 +45,7 @@ void OutFile::finalize() { /*------------------------------------------------------------------------*/ -SavesManager::SavesManager(XeenEngine *vm, Party &party) : +SavesManager::SavesManager(XeenEngine *vm, Party &party) : BaseCCArchive(), _vm(vm), _party(party) { SearchMan.add("saves", this, 0, false); _data = nullptr; @@ -82,7 +82,7 @@ void SavesManager::syncBitFlags(Common::Serializer &s, bool *startP, bool *endP) Common::SeekableReadStream *SavesManager::createReadStreamForMember(const Common::String &name) const { CCEntry ccEntry; - // If the given resource has already been perviously "written" to the + // If the given resource has already been perviously "written" to the // save manager, then return that new resource uint16 id = BaseCCArchive::convertNameToId(name); if (_newData.contains(id)) { diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp index 32a08b24e5..85c4df5590 100644 --- a/engines/xeen/screen.cpp +++ b/engines/xeen/screen.cpp @@ -47,9 +47,9 @@ Window::Window(const Window &src) : XSurface(), _enabled(src._enabled), create(*_vm->_screen, Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); } -Window::Window(const Common::Rect &bounds, int a, int border, +Window::Window(const Common::Rect &bounds, int a, int border, int xLo, int ycL, int xHi, int ycH): XSurface(), - _enabled(false), _a(a), _border(border), + _enabled(false), _a(a), _border(border), _xLo(xLo), _ycL(ycL), _xHi(xHi), _ycH(ycH) { setBounds(bounds); create(*_vm->_screen, Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); @@ -196,7 +196,7 @@ void Window::drawList(DrawStruct *items, int count) { for (int i = 0; i < count; ++i, ++items) { if (items->_frame == -1 || items->_scale == -1 || items->_sprites == nullptr) continue; - + Common::Point pt(items->_x, items->_y); pt.x += _innerBounds.left; pt.y += _innerBounds.top; @@ -296,7 +296,7 @@ void Screen::update() { } void Screen::addDirtyRect(const Common::Rect &r) { - assert(r.isValidRect() && r.width() > 0 && r.height() > 0 + assert(r.isValidRect() && r.width() > 0 && r.height() > 0 && r.left >= 0 && r.top >= 0 && r.right <= SCREEN_WIDTH && r.bottom <= SCREEN_HEIGHT); _dirtyRects.push_back(r); diff --git a/engines/xeen/screen.h b/engines/xeen/screen.h index 8df15b22d6..338a231ce6 100644 --- a/engines/xeen/screen.h +++ b/engines/xeen/screen.h @@ -96,7 +96,7 @@ public: void frame(); /** - * Fill the content area of a window with the current background color + * Fill the content area of a window with the current background color */ void fill(); diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index 1393c6eccf..4e0363120c 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -126,7 +126,7 @@ int Scripts::checkEvents() { Mode oldMode = _vm->_mode; Common::fill(&intf._charFX[0], &intf._charFX[MAX_ACTIVE_PARTY], 0); //int items = _treasureItems; - + if (party._treasure._gold & party._treasure._gems) { // Backup any current treasure data party._savedTreasure = party._treasure; @@ -162,7 +162,7 @@ int Scripts::checkEvents() { for (eventIndex = 0; eventIndex < map._events.size(); ++eventIndex) { MazeEvent &event = map._events[eventIndex]; - if (event._position == _currentPos && party._mazeDirection != + if (event._position == _currentPos && party._mazeDirection != (_currentPos.x | _currentPos.y) && event._line == _lineNum) { if (event._direction == party._mazeDirection || event._direction == DIR_ALL) { _vm->_mode = MODE_9; @@ -366,7 +366,7 @@ void Scripts::cmdDoorTextSml(Common::Array<byte> ¶ms) { Interface &intf = *_vm->_interface; Common::String paramText = _vm->_map->_events._text[_event->_parameters[0]]; - intf._screenText = Common::String::format("\x02\f""08\x03""c\t116\v025%s\x03""l\fd""\x01", + intf._screenText = Common::String::format("\x02\f""08\x03""c\t116\v025%s\x03""l\fd""\x01", paramText.c_str()); intf._upDoorText = true; intf.draw3d(true); @@ -523,7 +523,7 @@ void Scripts::cmdIf(Common::Array<byte> ¶ms) { cmdNoAction(params); } -void Scripts::cmdMoveObj(Common::Array<byte> ¶ms) { +void Scripts::cmdMoveObj(Common::Array<byte> ¶ms) { MazeObject &mazeObj = _vm->_map->_mobData._objects[params[0]]; if (mazeObj._position.x == params[1] && mazeObj._position.y == params[2]) { @@ -662,7 +662,7 @@ void Scripts::cmdTakeOrGive(Common::Array<byte> ¶ms) { for (uint idx = 0; idx < party._activeParty.size(); ++idx) { if (_charIndex == 0 || (_charIndex == 8 && (int)idx != _v2)) { party.giveTake(mode1, mask1, mode1, mask2, idx); - + switch (mode1) { case 8: mode1 = 0; @@ -684,7 +684,7 @@ void Scripts::cmdTakeOrGive(Common::Array<byte> ¶ms) { case 106: if (param2) continue; - + // Break out of character loop idx = party._activeParty.size(); break; @@ -748,7 +748,7 @@ void Scripts::cmdNoAction(Common::Array<byte> ¶ms) { _lineNum = _vm->_party->_partyDead ? -1 : _lineNum + 1; } -void Scripts::cmdRemove(Common::Array<byte> ¶ms) { +void Scripts::cmdRemove(Common::Array<byte> ¶ms) { Interface &intf = *_vm->_interface; Map &map = *_vm->_map; @@ -761,7 +761,7 @@ void Scripts::cmdRemove(Common::Array<byte> ¶ms) { cmdMakeNothingHere(params); } -void Scripts::cmdSetChar(Common::Array<byte> ¶ms) { +void Scripts::cmdSetChar(Common::Array<byte> ¶ms) { if (params[0] != 7) { _charIndex = WhoWill::show(_vm, 22, 3, false); if (_charIndex == 0) { @@ -802,11 +802,11 @@ void Scripts::cmdDoTownEvent(Common::Array<byte> ¶ms) { cmdExit(params); } -void Scripts::cmdExit(Common::Array<byte> ¶ms) { +void Scripts::cmdExit(Common::Array<byte> ¶ms) { _lineNum = -1; } -void Scripts::cmdAlterMap(Common::Array<byte> ¶ms) { +void Scripts::cmdAlterMap(Common::Array<byte> ¶ms) { Map &map = *_vm->_map; if (params[2] == DIR_ALL) { @@ -819,7 +819,7 @@ void Scripts::cmdAlterMap(Common::Array<byte> ¶ms) { cmdNoAction(params); } -void Scripts::cmdGiveExtended(Common::Array<byte> ¶ms) { +void Scripts::cmdGiveExtended(Common::Array<byte> ¶ms) { Party &party = *_vm->_party; uint32 mask; int newLineNum; @@ -862,7 +862,7 @@ void Scripts::cmdGiveExtended(Common::Array<byte> ¶ms) { cmdNoAction(params); } -void Scripts::cmdConfirmWord(Common::Array<byte> ¶ms) { +void Scripts::cmdConfirmWord(Common::Array<byte> ¶ms) { Map &map = *_vm->_map; Party &party = *_vm->_party; Common::String msg1 = params[2] ? map._events._text[params[2]] : @@ -893,7 +893,7 @@ void Scripts::cmdConfirmWord(Common::Array<byte> ¶ms) { } else if (result == 61 && !_vm->_files->_isDarkCc) { doWorldEnd(); - } else { + } else { if (result == 59 && !_vm->_files->_isDarkCc) { for (int idx = 0; idx < MAX_TREASURE_ITEMS; ++idx) { XeenItem &item = party._treasure._weapons[idx]; @@ -902,7 +902,7 @@ void Scripts::cmdConfirmWord(Common::Array<byte> ¶ms) { item._material = 0; item._bonusFlags = 0; party._treasure._hasItems = true; - + cmdExit(params); return; } @@ -910,7 +910,7 @@ void Scripts::cmdConfirmWord(Common::Array<byte> ¶ms) { } _lineNum = result == -1 ? params[3] : params[1]; - + return; } } @@ -957,7 +957,7 @@ void Scripts::cmdAlterEvent(Common::Array<byte> ¶ms) { cmdNoAction(params); } -void Scripts::cmdCallEvent(Common::Array<byte> ¶ms) { +void Scripts::cmdCallEvent(Common::Array<byte> ¶ms) { _stack.push(StackEntry(_currentPos, _lineNum)); _currentPos = Common::Point(params[0], params[1]); _lineNum = params[2] - 1; @@ -973,7 +973,7 @@ void Scripts::cmdReturn(Common::Array<byte> ¶ms) { cmdNoAction(params); } -void Scripts::cmdSetVar(Common::Array<byte> ¶ms) { +void Scripts::cmdSetVar(Common::Array<byte> ¶ms) { Party &party = *_vm->_party; uint val; _refreshIcons = true; @@ -1011,7 +1011,7 @@ void Scripts::cmdSetVar(Common::Array<byte> ¶ms) { void Scripts::cmdCutsceneEndClouds(Common::Array<byte> ¶ms) { error("TODO"); } -void Scripts::cmdWhoWill(Common::Array<byte> ¶ms) { +void Scripts::cmdWhoWill(Common::Array<byte> ¶ms) { _charIndex = WhoWill::show(_vm, params[0], params[1], true); if (_charIndex == 0) @@ -1020,7 +1020,7 @@ void Scripts::cmdWhoWill(Common::Array<byte> ¶ms) { cmdNoAction(params); } -void Scripts::cmdRndDamage(Common::Array<byte> ¶ms) { +void Scripts::cmdRndDamage(Common::Array<byte> ¶ms) { Combat &combat = *_vm->_combat; Interface &intf = *_vm->_interface; @@ -1049,7 +1049,7 @@ void Scripts::cmdAlterCellFlag(Common::Array<byte> ¶ms) { MazeWallLayers &wallData = map.mazeDataCurrent()._wallData[pt.y][pt.x]; wallData._data = (wallData._data & 0xFFF0) | params[2]; } else { - pt.x &= 0xF; + pt.x &= 0xF; pt.y &= 0xF; MazeCell &cell = map.mazeDataCurrent()._cells[pt.y][pt.x]; cell._surfaceId = params[2]; @@ -1082,7 +1082,7 @@ void Scripts::cmdDisplayStat(Common::Array<byte> ¶ms) { cmdNoAction(params); } -void Scripts::cmdSeatTextSml(Common::Array<byte> ¶ms) { +void Scripts::cmdSeatTextSml(Common::Array<byte> ¶ms) { Interface &intf = *_vm->_interface; intf._screenText = Common::String::format("\x2\f08\x3""c\t116\v090%s\x3l\fd\x1", @@ -1270,12 +1270,12 @@ void Scripts::cmdFallToMap(Common::Array<byte> ¶ms) { _lineNum = -1; } -void Scripts::cmdDisplayMain(Common::Array<byte> ¶ms) { +void Scripts::cmdDisplayMain(Common::Array<byte> ¶ms) { display(false, 0); cmdNoAction(params); } -void Scripts::cmdGoto(Common::Array<byte> ¶ms) { +void Scripts::cmdGoto(Common::Array<byte> ¶ms) { Map &map = *_vm->_map; map.getCell(1); if (params[0] == map._currentSurfaceId) @@ -1284,12 +1284,12 @@ void Scripts::cmdGoto(Common::Array<byte> ¶ms) { cmdNoAction(params); } -void Scripts::cmdGotoRandom(Common::Array<byte> ¶ms) { +void Scripts::cmdGotoRandom(Common::Array<byte> ¶ms) { _lineNum = params[_vm->getRandomNumber(1, params[0])] - 1; cmdNoAction(params); } -void Scripts::cmdCutsceneEndDarkside(Common::Array<byte> ¶ms) { +void Scripts::cmdCutsceneEndDarkside(Common::Array<byte> ¶ms) { Party &party = *_vm->_party; _vm->_saves->_wonDarkSide = true; party._questItems[53] = 1; @@ -1301,13 +1301,13 @@ void Scripts::cmdCutsceneEndDarkside(Common::Array<byte> ¶ms) { doEndGame2(); } -void Scripts::cmdCutsceneEdWorld(Common::Array<byte> ¶ms) { +void Scripts::cmdCutsceneEdWorld(Common::Array<byte> ¶ms) { _vm->_saves->_wonWorld = true; _vm->_party->_worldEnd = true; doWorldEnd(); } -void Scripts::cmdFlipWorld(Common::Array<byte> ¶ms) { +void Scripts::cmdFlipWorld(Common::Array<byte> ¶ms) { _vm->_map->_loadDarkSide = params[0] != 0; } @@ -1342,7 +1342,7 @@ void Scripts::doWorldEnd() { void Scripts::doEnding(const Common::String &endStr, int v2) { _vm->_saves->saveChars(); - + warning("TODO: doEnding"); } diff --git a/engines/xeen/scripts.h b/engines/xeen/scripts.h index f41be1b7c6..98f93e7e75 100644 --- a/engines/xeen/scripts.h +++ b/engines/xeen/scripts.h @@ -132,7 +132,7 @@ struct MirrorEntry { int _direction; MirrorEntry() : _mapId(0), _direction(DIR_ALL) {} - + bool synchronize(Common::SeekableReadStream &s); }; @@ -174,7 +174,7 @@ private: * Displays a door text message using the large font */ void cmdDoorTextLrg(Common::Array<byte> ¶ms); - + /** * Show a sign text on-screen */ diff --git a/engines/xeen/spells.cpp b/engines/xeen/spells.cpp index 23fb947aef..b3471df96c 100644 --- a/engines/xeen/spells.cpp +++ b/engines/xeen/spells.cpp @@ -81,7 +81,7 @@ void Spells::executeSpell(MagicSpell spellId) { &Spells::starBurst, &Spells::stoneToFlesh, &Spells::sunRay, &Spells::superShelter, &Spells::suppressDisease, &Spells::suppressPoison, &Spells::teleport, &Spells::timeDistortion, &Spells::townPortal, - &Spells::toxicCloud, &Spells::turnUndead, &Spells::walkOnWater, + &Spells::toxicCloud, &Spells::turnUndead, &Spells::walkOnWater, &Spells::wizardEye }; @@ -170,7 +170,7 @@ int Spells::castSpell(Character *c, MagicSpell spellId) { int oldTillMove = intf._tillMove; int result = 1; combat._oldCharacter = c; - + // Try and subtract the SP and gem requirements for the spell int resultError = subSpellCost(*c, spellId); if (resultError) { @@ -180,7 +180,7 @@ int Spells::castSpell(Character *c, MagicSpell spellId) { // Some spells have special handling switch (spellId) { case MS_EnchantItem: - case MS_Etheralize: + case MS_Etheralize: case MS_Jump: case MS_LloydsBeacon: case MS_SuperShelter: @@ -305,7 +305,7 @@ void Spells::coldRay() { combat.multiAttack(8); } -void Spells::createFood() { +void Spells::createFood() { Party &party = *_vm->_party; Sound &sound = *_vm->_sound; @@ -451,7 +451,7 @@ void Spells::detectMonster() { if (monster._position == pt) { if (++grid[yDiff][xDiff] > 3) grid[yDiff][xDiff] = 3; - + sprites.draw(w, grid[yDiff][xDiff], Common::Point(xDiff * 9 + 244, yDiff * 7 + 81)); } @@ -806,7 +806,7 @@ void Spells::levitate() { _vm->_sound->playFX(20); } -void Spells::light() { +void Spells::light() { Interface &intf = *_vm->_interface; Party &party = *_vm->_party; Sound &sound = *_vm->_sound; @@ -837,7 +837,7 @@ void Spells::lloydsBeacon() { } } -void Spells::magicArrow() { +void Spells::magicArrow() { Combat &combat = *_vm->_combat; combat._monsterDamage = 0; combat._damageType = DT_MAGIC_ARROW; @@ -966,7 +966,7 @@ void Spells::protectionFromElements() { Sound &sound = *_vm->_sound; Character &c = *combat._oldCharacter; int resist = MIN(c.getCurrentLevel() * 2 + 5, (uint)200); - + int elementType = SelectElement::show(_vm, MS_ProtFromElements); if (elementType != -1) { switch (elementType) { @@ -1040,7 +1040,7 @@ void Spells::resurrection() { sound.playFX(30); c->addHitPoints(0); c->_conditions[ERADICATED] = 0; - + if (--c->_endurance._permanent < 1) c->_endurance._permanent = 1; if ((c->_tempAge + 5) >= 250) @@ -1235,12 +1235,12 @@ void Spells::townPortal() { if (map.mazeData()._mazeFlags & RESTRICTION_TOWN_PORTAL) { spellFailed(); return; - } + } int townNumber = TownPortal::show(_vm); if (!townNumber) return; - + sound.playFX(51); map._loadDarkSide = map._sideTownPortal; _vm->_files->_isDarkCc = map._sideTownPortal > 0; @@ -1318,7 +1318,7 @@ void Spells::wizardEye() { void Spells::frostbite2() { Combat &combat = *_vm->_combat; Sound &sound = *_vm->_sound; - + combat._monsterDamage = 35; combat._damageType = DT_COLD; combat._rangeType = RT_SINGLE; diff --git a/engines/xeen/sprites.cpp b/engines/xeen/sprites.cpp index 7327317156..68382abc67 100644 --- a/engines/xeen/sprites.cpp +++ b/engines/xeen/sprites.cpp @@ -54,7 +54,7 @@ SpriteResource::~SpriteResource() { SpriteResource &SpriteResource::operator=(const SpriteResource &src) { delete[] _data; _index.clear(); - + _filesize = src._filesize; _data = new byte[_filesize]; Common::copy(src._data, src._data + _filesize, _data); @@ -100,9 +100,9 @@ void SpriteResource::clear() { _filesize = 0; } -void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Point &pt, +void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Point &pt, const Common::Rect &clipRect, int flags, int scale) { - static const uint SCALE_TABLE[] = { + static const uint SCALE_TABLE[] = { 0xFFFF, 0xFFEF, 0xEFEF, 0xEFEE, 0xEEEE, 0xEEAE, 0xAEAE, 0xAEAA, 0xAAAA, 0xAA8A, 0x8A8A, 0x8A88, 0x8888, 0x8880, 0x8080, 0x8000 }; @@ -126,9 +126,9 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi Common::Point destPos; destPos.x = pt.x + getScaledVal(xOffset, scaleMaskX); destPos.x += (width - getScaledVal(width, scaleMaskX)) / 2; - + destPos.y = pt.y + getScaledVal(yOffset, scaleMaskY); - + // If the flags allow the dest surface to be resized, ensure dest surface is big enough Common::Rect bounds = clipRect; if (flags & SPRFLAG_RESIZE) { @@ -136,7 +136,7 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi dest.create(xOffset + width, yOffset + height); bounds = Common::Rect(0, 0, dest.w, dest.h); } - + uint16 scaleMaskXCopy = scaleMaskX; Common::Rect drawBounds; drawBounds.left = SCREEN_WIDTH; @@ -156,10 +156,10 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi continue; } - // Roll the scale mask + // Roll the scale mask uint bit = (scaleMaskY >> 15) & 1; scaleMaskY = ((scaleMaskY & 0x7fff) << 1) + bit; - + if (!bit) { // Not a line to be drawn due to scaling down f.skip(lineLength); @@ -170,7 +170,7 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi } else { scaleMaskX = scaleMaskXCopy; xOffset = f.readByte(); - + // Initialize the array to hold the temporary data for the line. We do this to make it simpler // to handle both deciding which pixels to draw in a scaled image, as well as when images // have been horizontally flipped. Note that we allocate an extra line for before and after our @@ -308,7 +308,7 @@ void SpriteResource::draw(Window &dest, int frame, const Common::Point &destPos, draw(dest, frame, destPos, dest.getBounds(), flags, scale); } -void SpriteResource::draw(XSurface &dest, int frame, const Common::Point &destPos, +void SpriteResource::draw(XSurface &dest, int frame, const Common::Point &destPos, const Common::Rect &bounds, int flags, int scale) { drawOffset(dest, _index[frame]._offset1, destPos, bounds, flags, scale); @@ -330,7 +330,7 @@ uint SpriteResource::getScaledVal(int xy, uint16 &scaleMask) { scaleMask = ((scaleMask & 0x7fff) << 1) + bit; result += bit; } - + return result; } diff --git a/engines/xeen/sprites.h b/engines/xeen/sprites.h index 17c745f26e..b61ec83cd6 100644 --- a/engines/xeen/sprites.h +++ b/engines/xeen/sprites.h @@ -66,7 +66,7 @@ private: /** * Draw a sprite frame based on a passed offset into the data stream */ - void drawOffset(XSurface &dest, uint16 offset, const Common::Point &pt, + void drawOffset(XSurface &dest, uint16 offset, const Common::Point &pt, const Common::Rect &clipRect, int flags, int scale); /** @@ -99,7 +99,7 @@ public: */ void clear(); - void draw(XSurface &dest, int frame, const Common::Point &destPos, + void draw(XSurface &dest, int frame, const Common::Point &destPos, int flags = 0, int scale = 0); void draw(Window &dest, int frame, const Common::Point &destPos, diff --git a/engines/xeen/town.cpp b/engines/xeen/town.cpp index c0ecf5cf6f..13a631aa47 100644 --- a/engines/xeen/town.cpp +++ b/engines/xeen/town.cpp @@ -104,7 +104,7 @@ int Town::townAction(int actionId) { sound.stopSound(); vocName = isDarkCc ? "bank1.voc" : "banker.voc"; break; - + case 1: // Blacksmith _icons1.load("esc.icn"); @@ -215,7 +215,7 @@ int Town::townAction(int actionId) { Character *charP = &party._activeParty[0]; Common::String title = createTownText(*charP); intf._face1UIFrame = intf._face2UIFrame = 0; - intf._dangerSenseUIFrame = 0; + intf._dangerSenseUIFrame = 0; intf._spotDoorsUIFrame = 0; intf._levitateUIFrame = 0; @@ -525,7 +525,7 @@ Character *Town::doBankOptions(Character *c) { Character *Town::doBlacksmithOptions(Character *c) { Interface &intf = *_vm->_interface; Party &party = *_vm->_party; - + if (_buttonValue >= Common::KEYCODE_F1 && _buttonValue <= Common::KEYCODE_F6) { // Switch character _buttonValue -= Common::KEYCODE_F1; @@ -782,7 +782,7 @@ Character *Town::doTempleOptions(Character *c) { Interface &intf = *_vm->_interface; Party &party = *_vm->_party; Sound &sound = *_vm->_sound; - + switch (_buttonValue) { case Common::KEYCODE_F1: case Common::KEYCODE_F2: @@ -808,7 +808,7 @@ Character *Town::doTempleOptions(Character *c) { if (_dayOfWeek == (party._day / 10)) { party._clairvoyanceActive = true; party._lightCount = 1; - + int amt = _dayOfWeek ? _dayOfWeek : 10; party._heroism = amt; party._holyBonus = amt; @@ -916,7 +916,7 @@ Character *Town::doTrainingOptions(Character *c) { sound.stopSound(); sound.playSound(isDarkCc ? "prtygd.voc" : "trainin2.voc", 1); - c->_experience -= c->nextExperienceLevel() - + c->_experience -= c->nextExperienceLevel() - (c->getCurrentExperience() - c->_experience); c->_level._permanent++; @@ -987,7 +987,7 @@ void Town::depositWithdrawl(int choice) { default: continue; } - + if ((choice && !party._bankGems && flag) || (choice && !party._bankGold && !flag) || (!choice && !party._gems && flag) || @@ -1261,7 +1261,7 @@ bool TownMessage::execute(int portrait, const Common::String &name, const Common break; if (!msgEnd) { - if (confirm || _buttonValue == Common::KEYCODE_ESCAPE || + if (confirm || _buttonValue == Common::KEYCODE_ESCAPE || _buttonValue == Common::KEYCODE_n) result = 0; else if (_buttonValue == Common::KEYCODE_y) diff --git a/engines/xeen/town.h b/engines/xeen/town.h index 0767638f8a..25faa38c76 100644 --- a/engines/xeen/town.h +++ b/engines/xeen/town.h @@ -117,7 +117,7 @@ private: TownMessage(XeenEngine *vm) : ButtonContainer(vm) {} - bool execute(int portrait, const Common::String &name, + bool execute(int portrait, const Common::String &name, const Common::String &text, int confirm); void loadButtons(); diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.cpp b/engines/xeen/worldofxeen/clouds_cutscenes.cpp index fc7c99d407..32209a766b 100644 --- a/engines/xeen/worldofxeen/clouds_cutscenes.cpp +++ b/engines/xeen/worldofxeen/clouds_cutscenes.cpp @@ -154,7 +154,7 @@ bool CloudsCutscenes::showCloudsIntro() { lake3.draw(screen, lakeCtr, Common::Point(0, yCtr)); } } - + xeen.draw(screen, 0); screen.update(); WAIT(1); @@ -218,7 +218,7 @@ bool CloudsCutscenes::showCloudsIntro() { groupo.draw(screen, 1, Common::Point(160, 0)); crodo.draw(screen, 0, Common::Point(0, -5)); screen._windows[0].writeString(Res.CLOUDS_INTRO1); - + // Unroll a scroll if (doScroll(false, true)) return false; @@ -273,10 +273,10 @@ bool CloudsCutscenes::showCloudsIntro() { } group.draw(screen, ctr4 + 5, Common::Point(0, 99)); - group.draw(screen, ctr2 + 24, Common::Point(202, 12)); + group.draw(screen, ctr2 + 24, Common::Point(202, 12)); if ((++totalCtr % 30) == 0) group.draw(screen, 43, Common::Point(178, 134)); - + switch (lineCtr) { case 2: case 4: diff --git a/engines/xeen/worldofxeen/darkside_cutscenes.cpp b/engines/xeen/worldofxeen/darkside_cutscenes.cpp index e40fee680f..9aad9b1d18 100644 --- a/engines/xeen/worldofxeen/darkside_cutscenes.cpp +++ b/engines/xeen/worldofxeen/darkside_cutscenes.cpp @@ -135,7 +135,7 @@ bool DarkSideCutscenes::showDarkSideTitle() { screen.loadBackground("jvc.raw"); screen.draw(); screen.fadeIn(); - + WAIT(60); return true; } @@ -262,7 +262,7 @@ bool DarkSideCutscenes::showDarkSideIntro() { title.clear(); pyraTop.clear(); pyramid.clear(); - + // SpriteResource dragon("dragon.int"); const int XLIST3[10] = { 102, 103, 104, 104, 104, 103, 102, 101, 101, 101 }; @@ -574,7 +574,7 @@ bool DarkSideCutscenes::showDarkSideEnding() { sc08.draw(screen, 0); showSubtitles(); } while (_subtitleSize); - + sc08.clear(); // Nowhere to run to @@ -600,7 +600,7 @@ bool DarkSideCutscenes::showDarkSideEnding() { screen.restoreBackground(); showSubtitles(); } while (_subtitleSize); - + sc09.clear(); // Nor do you! @@ -760,7 +760,7 @@ bool DarkSideCutscenes::showDarkSideEnding() { screen.loadBackground("sc170001.raw"); screen.saveBackground(); screen.horizMerge(0); - sc16.draw(screen, 0, Common::Point(7, 29)); + sc16.draw(screen, 0, Common::Point(7, 29)); showSubtitles(); sound.playSound("fail1.voc"); @@ -834,7 +834,7 @@ bool DarkSideCutscenes::showDarkSideEnding() { for (int idx = 0; idx < 4; ++idx) sc18[idx].clear(); - + // Closeup of Corak bleeding SpriteResource sc19("sc19.end"); screen.loadBackground("sc190001.raw"); @@ -1013,7 +1013,7 @@ bool DarkSideCutscenes::showDarkSideEnding() { screen.saveBackground(); sc25.draw(screen, 0, Common::Point(27, 30)); screen.update(); - + for (int struggleNum = 0; struggleNum < 2; ++struggleNum) { for (int idx = 0; idx < 9; ++idx) { if (struggleNum == 0 && idx == 2) @@ -1220,7 +1220,7 @@ void DarkSideCutscenes::showPharaohEndText(const char *msg1, const char *msg2, c idx = (idx + 1) % 32; screen.update(); - + events.pollEventsAndWait(); } while (!_vm->shouldQuit() && !events.isKeyMousePressed()); diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp index f4d8fdbc94..93a0005088 100644 --- a/engines/xeen/worldofxeen/worldofxeen.cpp +++ b/engines/xeen/worldofxeen/worldofxeen.cpp @@ -30,7 +30,7 @@ namespace Xeen { namespace WorldOfXeen { WorldOfXeenEngine::WorldOfXeenEngine(OSystem *syst, const XeenGameDescription *gameDesc) - : XeenEngine(syst, gameDesc), CloudsCutscenes(this), + : XeenEngine(syst, gameDesc), CloudsCutscenes(this), DarkSideCutscenes(this) { _seenDarkSideIntro = false; } diff --git a/engines/xeen/worldofxeen/worldofxeen.h b/engines/xeen/worldofxeen/worldofxeen.h index 41fe4b3b83..7dbb710430 100644 --- a/engines/xeen/worldofxeen/worldofxeen.h +++ b/engines/xeen/worldofxeen/worldofxeen.h @@ -36,11 +36,11 @@ enum WOXGameAction { }; /** - * Implements a descendant of the base Xeen engine to handle + * Implements a descendant of the base Xeen engine to handle * Clouds of Xeen, Dark Side of Xeen, and Worlds of Xeen specific * game code */ -class WorldOfXeenEngine: public XeenEngine, public CloudsCutscenes, +class WorldOfXeenEngine: public XeenEngine, public CloudsCutscenes, public DarkSideCutscenes { protected: /** diff --git a/engines/xeen/worldofxeen/worldofxeen_menu.cpp b/engines/xeen/worldofxeen/worldofxeen_menu.cpp index d3f273784b..ff73cab4bb 100644 --- a/engines/xeen/worldofxeen/worldofxeen_menu.cpp +++ b/engines/xeen/worldofxeen/worldofxeen_menu.cpp @@ -53,7 +53,7 @@ void WorldOfXeenMenu::execute() { SpriteResource special("special.icn"); Screen &screen = *_vm->_screen; EventsManager &events = *_vm->_events; - + File newBright("newbrigh.m"); _vm->_sound->playSong(newBright); @@ -210,7 +210,7 @@ void WorldOptionsMenu::showContents(SpriteResource &title1, bool waitFlag) { Screen &screen = *_vm->_screen; EventsManager &events = *_vm->_events; events.updateGameCounter(); - + // Draw the background frame in a continous cycle _bgFrame = (_bgFrame + 1) % 5; title1.draw(screen._windows[0], _bgFrame); diff --git a/engines/xeen/worldofxeen/worldofxeen_menu.h b/engines/xeen/worldofxeen/worldofxeen_menu.h index 9b507b7ed1..49553dd10f 100644 --- a/engines/xeen/worldofxeen/worldofxeen_menu.h +++ b/engines/xeen/worldofxeen/worldofxeen_menu.h @@ -87,7 +87,7 @@ protected: virtual void showContents(SpriteResource &title1, bool mode); public: WorldOptionsMenu(XeenEngine *vm) : DarkSideOptionsMenu(vm), _bgFrame(0) {} - + virtual ~WorldOptionsMenu() {} }; diff --git a/engines/zvision/video/zork_avi_decoder.cpp b/engines/zvision/video/zork_avi_decoder.cpp index 1d23546551..412cd456ef 100644 --- a/engines/zvision/video/zork_avi_decoder.cpp +++ b/engines/zvision/video/zork_avi_decoder.cpp @@ -50,7 +50,7 @@ void ZorkAVIDecoder::ZorkAVIAudioTrack::createAudioStream() { _audioStream = _queueStream; } -void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *stream) { +void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *stream) { RawChunkStream::RawChunk chunk = _decoder.readNextChunk(stream); delete stream; diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 9aed3301fa..3dd9c86f45 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -850,7 +850,7 @@ blitSubSurfaceClip(const Graphics::Surface *source, const Common::Rect &r, const } template<typename PixelType> -void VectorRendererSpec<PixelType>:: +void VectorRendererSpec<PixelType>:: blitKeyBitmap(const Graphics::Surface *source, const Common::Rect &r) { int16 x = r.left; int16 y = r.top; @@ -3125,7 +3125,7 @@ drawBorderRoundedSquareAlgClip(int x1, int y1, int r, int w, int h, PixelType co PixelType color1 = color; PixelType color2 = color; - + while (sw++ < Base::_strokeWidth) { blendFillClip(ptr_fill + sp + r, ptr_fill + w + 1 + sp - r, color1, alpha_t, x1 + r, y1 + sp/pitch); // top @@ -3297,7 +3297,7 @@ drawInteriorRoundedSquareAlgClip(int x1, int y1, int r, int w, int h, PixelType x1 + r - x, y1 + h - r + y); gradientFillClip(ptr_bl - y + px, w - 2 * r + 2 * y, x1 + r - y - x, long_h - r + x, x1 + r - y, y1 + h - r + x); - + BE_DRAWCIRCLE_XCOLOR_CLIP(ptr_tr, ptr_tl, ptr_bl, ptr_br, x, y, px, py, x1 + w - r, y1 + r, x1 + r, y1 + r, x1 + r, y1 + h - r, x1 + w - r, y1 + h - r); } diff --git a/graphics/fonts/bdf.cpp b/graphics/fonts/bdf.cpp index 3476838911..93b64d8225 100644 --- a/graphics/fonts/bdf.cpp +++ b/graphics/fonts/bdf.cpp @@ -41,13 +41,27 @@ BdfFont::~BdfFont() { delete[] _data.bitmaps; delete[] _data.advances; delete[] _data.boxes; + delete[] _data.familyName; + delete[] _data.slant; } } +const char *BdfFont::getFamilyName() const { + return _data.familyName; +} + +const char *BdfFont::getFontSlant() const { + return _data.slant; +} + int BdfFont::getFontHeight() const { return _data.height; } +int BdfFont::getFontSize() const { + return _data.size; +} + int BdfFont::getMaxCharWidth() const { return _data.maxAdvance; } @@ -285,6 +299,7 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { memset(bitmaps, 0, sizeof(byte *) * font.numCharacters); byte *advances = new byte[font.numCharacters]; BdfBoundingBox *boxes = new BdfBoundingBox[font.numCharacters]; + char *familyName, *slant; int descent = -1; @@ -297,6 +312,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } @@ -310,6 +327,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } @@ -317,6 +336,17 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { font.defaultBox.height = height; font.defaultBox.xOffset = xOffset; font.defaultBox.yOffset = yOffset; + } else if (line.hasPrefix("PIXEL_SIZE ")) { + if (sscanf(line.c_str(), "PIXEL_SIZE %d", &font.size) != 1) { + warning("BdfFont::loadFont: Invalid PIXEL_SIZE"); + freeBitmaps(bitmaps, font.numCharacters); + delete[] bitmaps; + delete[] advances; + delete[] boxes; + delete[] familyName; + delete[] slant; + return 0; + } } else if (line.hasPrefix("FONT_ASCENT ")) { if (sscanf(line.c_str(), "FONT_ASCENT %d", &font.ascent) != 1) { warning("BdfFont::loadFont: Invalid FONT_ASCENT"); @@ -324,6 +354,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } } else if (line.hasPrefix("FONT_DESCENT ")) { @@ -333,6 +365,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } } else if (line.hasPrefix("DEFAULT_CHAR ")) { @@ -342,6 +376,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } } else if (line.hasPrefix("STARTCHAR ")) { @@ -366,6 +402,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } @@ -374,6 +412,40 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { advances[encoding] = advance; boxes[encoding] = box; } + } else if (line.hasPrefix("FAMILY_NAME \"")) { + familyName = new char[line.size()]; // We will definitely fit here + Common::strlcpy(familyName, &line.c_str()[13], line.size()); + char *p = &familyName[strlen(familyName)]; + while (p != familyName && *p != '"') + p--; + if (p == familyName) { + warning("BdfFont::loadFont: Invalid FAMILY_NAME"); + freeBitmaps(bitmaps, font.numCharacters); + delete[] bitmaps; + delete[] advances; + delete[] boxes; + delete[] familyName; + delete[] slant; + return 0; + } + *p = '\0'; // Remove last quote + } else if (line.hasPrefix("SLANT \"")) { + slant = new char[line.size()]; // We will definitely fit here + Common::strlcpy(slant, &line.c_str()[7], line.size()); + char *p = &slant[strlen(slant)]; + while (p != slant && *p != '"') + p--; + if (p == slant) { + warning("BdfFont::loadFont: Invalid SLANT"); + freeBitmaps(bitmaps, font.numCharacters); + delete[] bitmaps; + delete[] advances; + delete[] boxes; + delete[] familyName; + delete[] slant; + return 0; + } + *p = '\0'; // Remove last quote } else if (line == "ENDFONT") { break; } @@ -385,6 +457,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] bitmaps; delete[] advances; delete[] boxes; + delete[] familyName; + delete[] slant; return 0; } @@ -393,6 +467,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { font.bitmaps = bitmaps; font.advances = advances; font.boxes = boxes; + font.familyName = familyName; + font.slant = slant; int firstCharacter = font.numCharacters; int lastCharacter = -1; @@ -425,6 +501,8 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) { delete[] font.bitmaps; delete[] font.advances; delete[] font.boxes; + delete[] familyName; + delete[] slant; return 0; } @@ -622,4 +700,68 @@ BdfFont *BdfFont::loadFromCache(Common::SeekableReadStream &stream) { return new BdfFont(data, DisposeAfterUse::YES); } +BdfFont *BdfFont::scaleFont(BdfFont *src, int newSize) { + if (!src) { + warning("Emtpy font reference in scale font"); + return NULL; + } + + if (src->getFontSize() == 0) { + warning("Requested to scale 0 size font"); + return NULL; + } + + float scale = newSize / src->getFontSize(); + + BdfFontData data; + + data.maxAdvance = src->_data.maxAdvance; + data.height = src->_data.height; + data.defaultBox.width = src->_data.defaultBox.width; + data.defaultBox.height = src->_data.defaultBox.height; + data.defaultBox.xOffset = src->_data.defaultBox.xOffset; + data.defaultBox.yOffset = src->_data.defaultBox.yOffset; + data.ascent = src->_data.ascent; + data.firstCharacter = src->_data.firstCharacter; + data.defaultCharacter = src->_data.defaultCharacter; + data.numCharacters = src->_data.numCharacters; + data.familyName = strdup(src->_data.familyName); + data.slant = strdup(src->_data.slant); + + BdfBoundingBox *boxes = new BdfBoundingBox[data.numCharacters]; + for (int i = 0; i < data.numCharacters; ++i) { + boxes[i].width = src->_data.boxes[i].width; + boxes[i].height = src->_data.boxes[i].height; + boxes[i].xOffset = src->_data.boxes[i].xOffset; + boxes[i].yOffset = src->_data.boxes[i].yOffset; + } + data.boxes = boxes; + + byte *advances = new byte[data.numCharacters]; + for (int i = 0; i < data.numCharacters; ++i) { + advances[i] = src->_data.advances[i]; + } + data.advances = advances; + + byte **bitmaps = new byte *[data.numCharacters]; + + for (int i = 0; i < data.numCharacters; ++i) { + const BdfBoundingBox &box = data.boxes ? data.boxes[i] : data.defaultBox; + if (src->_data.bitmaps[i]) { + const int bytes = ((box.width + 7) / 8) * box.height; + bitmaps[i] = new byte[bytes]; + + for (int j = 0; j < bytes; j++) + bitmaps[i][j] = src->_data.bitmaps[i][j]; + + } else { + bitmaps[i] = 0; + } + } + + data.bitmaps = bitmaps; + + return new BdfFont(data, DisposeAfterUse::YES); +} + } // End of namespace Graphics diff --git a/graphics/fonts/bdf.h b/graphics/fonts/bdf.h index b91834785f..d99b5fd401 100644 --- a/graphics/fonts/bdf.h +++ b/graphics/fonts/bdf.h @@ -40,8 +40,12 @@ struct BdfBoundingBox { }; struct BdfFontData { + const char *familyName; + const char *slant; + int maxAdvance; int height; + int size; BdfBoundingBox defaultBox; int ascent; @@ -65,9 +69,14 @@ public: virtual int getCharWidth(uint32 chr) const; virtual void drawChar(Surface *dst, uint32 chr, int x, int y, uint32 color) const; + const char *getFamilyName() const; + const char *getFontSlant() const; + int getFontSize() const; + static BdfFont *loadFont(Common::SeekableReadStream &stream); static bool cacheFontData(const BdfFont &font, const Common::String &filename); static BdfFont *loadFromCache(Common::SeekableReadStream &stream); + static BdfFont *scaleFont(BdfFont *src, int newSize); private: int mapToIndex(uint32 ch) const; diff --git a/graphics/fonts/consolefont.cpp b/graphics/fonts/consolefont.cpp index 748aa08a5c..6a84cdeaee 100644 --- a/graphics/fonts/consolefont.cpp +++ b/graphics/fonts/consolefont.cpp @@ -5850,8 +5850,11 @@ const byte *const bitmapTable[] = { // Font structure static const BdfFontData desc = { + "Fixed", // Family name + "R", // Slant 5, // Max advance 8, // Height + 8, // Size { 5, 8, 0, -1 }, // Bounding box 7, // Ascent diff --git a/graphics/fonts/newfont.cpp b/graphics/fonts/newfont.cpp index 4922e24676..8d1ce8b905 100644 --- a/graphics/fonts/newfont.cpp +++ b/graphics/fonts/newfont.cpp @@ -7634,8 +7634,11 @@ const byte *const bitmapTable[] = { // Font structure static const BdfFontData desc = { + "Schumacher", // Family name + "R", // Slant 6, // Max advance 12, // Height + 12, // Size { 6, 12, 0, -3 }, // Bounding box 9, // Ascent diff --git a/graphics/fonts/newfont_big.cpp b/graphics/fonts/newfont_big.cpp index 550d6dbfa9..28a1162434 100644 --- a/graphics/fonts/newfont_big.cpp +++ b/graphics/fonts/newfont_big.cpp @@ -5829,8 +5829,11 @@ static const BdfBoundingBox boxes[] = { // Font structure static const BdfFontData desc = { + "Helvetica", // Family name + "R", // Slant 13, // Max advance 14, // Height + 12, // Size { 13, 15, -1, -3 }, // Bounding box 11, // Ascent diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp new file mode 100644 index 0000000000..21f9c08160 --- /dev/null +++ b/graphics/macgui/macfontmanager.cpp @@ -0,0 +1,282 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "common/archive.h" +#include "common/stream.h" +#include "common/unzip.h" +#include "graphics/fonts/bdf.h" + +#include "graphics/macgui/macfontmanager.h" + +namespace Graphics { + +// Source: Apple IIGS Technical Note #41, "Font Family Numbers" +// http://apple2.boldt.ca/?page=til/tn.iigs.041 +static const char *const fontNames[] = { + "Chicago", // system font + "Geneva", // application font + "New York", + "Geneva", + + "Monaco", + "Venice", + "London", + "Athens", + + "San Francisco", + "Toronto", + NULL, + "Cairo", + "Los Angeles", // 12 + + "Zapf Dingbats", + "Bookman", + "Helvetica Narrow", + "Palatino", + NULL, + "Zapf Chancery", + NULL, + + "Times", // 20 + "Helvetica", + "Courier", + "Symbol", + "Taliesin", // mobile? + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // 30 + NULL, + NULL, + "Avant Garde", + "New Century Schoolbook" +}; + +MacFontManager::MacFontManager() { + for (uint i = 0; i < ARRAYSIZE(fontNames); i++) + if (fontNames[i]) + _fontNames.setVal(fontNames[i], i); + + loadFonts(); +} + +void MacFontManager::loadFonts() { + Common::Archive *dat; + + dat = Common::makeZipArchive("classicmacfonts.dat"); + + if (!dat) { + warning("Could not find classicmacfonts.dat. Falling back to built-in fonts"); + _builtInFonts = true; + + return; + } + + Common::ArchiveMemberList list; + dat->listMembers(list); + + for (Common::ArchiveMemberList::iterator it = list.begin(); it != list.end(); ++it) { + Common::SeekableReadStream *stream = dat->createReadStreamForMember((*it)->getName()); + + Graphics::BdfFont *font = Graphics::BdfFont::loadFont(*stream); + + delete stream; + + Common::String fontName; + MacFont *macfont; + + if (font->getFamilyName() && *font->getFamilyName()) { + fontName = Common::String::format("%s-%s-%d", font->getFamilyName(), font->getFontSlant(), font->getFontSize()); + + macfont = new MacFont(_fontNames.getVal(font->getFamilyName(), kMacFontNonStandard), font->getFontSize(), parseFontSlant(font->getFontSlant())); + } else { // Get it from the file name + fontName = (*it)->getName(); + + // Trim the .bdf extension + for (int i = fontName.size() - 1; i >= 0; --i) { + if (fontName[i] == '.') { + while ((uint)i < fontName.size()) { + fontName.deleteLastChar(); + } + break; + } + } + + macfont = new MacFont(kMacFontNonStandard); + macfont->setName(fontName); + } + + FontMan.assignFontToName(fontName, font); + macfont->setBdfFont(font); + _fontRegistry.setVal(fontName, macfont); + + debug(2, " %s", fontName.c_str()); + } + + _builtInFonts = false; + + delete dat; +} + +const Font *MacFontManager::getFont(MacFont macFont) { + const Font *font = 0; + + if (!_builtInFonts) { + if (macFont.getName().empty()) + macFont.setName(getFontName(macFont.getId(), macFont.getSize(), macFont.getSlant())); + + if (!_fontRegistry.contains(macFont.getName())) + generateFontSubstitute(macFont); + + font = FontMan.getFontByName(macFont.getName()); + + if (!font) { + warning("Cannot load font '%s'", macFont.getName().c_str()); + + font = FontMan.getFontByName(MacFont(kMacFontChicago, 12).getName()); + } + } + + if (_builtInFonts || !font) + font = FontMan.getFontByUsage(macFont.getFallback()); + + return font; +} + +int MacFontManager::parseFontSlant(Common::String slant) { + slant.toUppercase(); + + if (slant == "I") + return kMacFontItalic; + if (slant == "B") + return kMacFontBold; + if (slant == "R") + return kMacFontRegular; + + warning("Unknown font slant '%s'", slant.c_str()); + + return kMacFontRegular; +} + +const char *MacFontManager::getFontName(int id, int size, int slant) { + static char name[128]; + const char *sslant; + + switch (slant) { + case kMacFontItalic: + sslant = "I"; + break; + case kMacFontBold: + sslant = "B"; + break; + case kMacFontRegular: + default: + sslant = "R"; + break; + } + + if (id > ARRAYSIZE(fontNames)) + return NULL; + + snprintf(name, 128, "%s-%s-%d", fontNames[id], sslant, size); + + return name; +} + +const char *MacFontManager::getFontName(MacFont &font) { + return getFontName(font.getId(), font.getSize(), font.getSlant()); +} + +void MacFontManager::generateFontSubstitute(MacFont &macFont) { + Common::String name; + + // First we try twice size + name = getFontName(macFont.getId(), macFont.getSize() * 2, macFont.getSlant()); + if (_fontRegistry.contains(name) && !_fontRegistry[name]->isGenerated()) { + generateFont(macFont, *_fontRegistry[name]); + + return; + } + + // Now half size + name = getFontName(macFont.getId(), macFont.getSize() / 2, macFont.getSlant()); + if (_fontRegistry.contains(name) && !_fontRegistry[name]->isGenerated()) { + generateFont(macFont, *_fontRegistry[name]); + + return; + } + + // No simple substitute was found. Looking for neighborhood fonts + + // First we gather all font sizes for this font + Common::Array<int> sizes; + for (Common::HashMap<Common::String, MacFont *>::iterator i = _fontRegistry.begin(); i != _fontRegistry.end(); ++i) { + if (i->_value->getId() == macFont.getId() && i->_value->getSlant() == macFont.getSlant() && !i->_value->isGenerated()) + sizes.push_back(i->_value->getSize()); + } + + if (sizes.empty()) { + warning("No viable substitute found for font %s", getFontName(macFont)); + return; + } + + // Now looking next larger font, and store the largest one for next check + int candidate = 1000; + int maxSize = sizes[0]; + for (uint i = 0; i < sizes.size(); i++) { + if (sizes[i] > macFont.getSize() && sizes[i] < candidate) + candidate = sizes[i]; + + if (sizes[i] > maxSize) + maxSize = sizes[i]; + } + + if (candidate != 1000) { + generateFont(macFont, *_fontRegistry[getFontName(macFont.getId(), candidate, macFont.getSlant())]); + return; + } + + // Now next smaller font, which is the biggest we have + generateFont(macFont, *_fontRegistry[getFontName(macFont.getId(), maxSize, macFont.getSlant())]); +} + +void MacFontManager::generateFont(MacFont &toFont, MacFont &fromFont) { + debugN("Found font substitute for font '%s' ", getFontName(toFont)); + debug("as '%s'", getFontName(fromFont)); + + Graphics::BdfFont *font = Graphics::BdfFont::scaleFont(fromFont.getBdfFont(), toFont.getSize()); + + if (!font) { + warning("Failed to generate font '%s'", getFontName(toFont)); + } + + toFont.setGenerated(true); + toFont.setBdfFont(font); + + FontMan.assignFontToName(getFontName(toFont), font); + _fontRegistry.setVal(getFontName(toFont), new MacFont(toFont)); + + debug("Generated font '%s'", getFontName(toFont)); +} + +} // End of namespace Graphics diff --git a/graphics/macgui/macfontmanager.h b/graphics/macgui/macfontmanager.h new file mode 100644 index 0000000000..38ea3f342c --- /dev/null +++ b/graphics/macgui/macfontmanager.h @@ -0,0 +1,120 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GRAPHICS_MACGUI_MACFONTMANAGER_H +#define GRAPHICS_MACGUI_MACFONTMANAGER_H + +#include "graphics/fontman.h" + +namespace Graphics { + +enum { + kMacFontNonStandard = -1, + kMacFontChicago = 0 +}; + +enum { + kMacFontRegular, + kMacFontBold, + kMacFontItalic +}; + +class BdfFont; + +class MacFont { +public: + MacFont(int id = kMacFontChicago, int size = 12, int slant = kMacFontRegular, FontManager::FontUsage fallback = Graphics::FontManager::kBigGUIFont) { + _id = id; + _size = size; + _slant = slant; + _fallback = fallback; + _generated = false; + _bdfFont = NULL; + } + + int getId() { return _id; }; + int getSize() { return _size; } + int getSlant() { return _slant; } + Common::String getName() { return _name; } + void setName(Common::String &name) { _name = name; } + void setName(const char *name) { _name = name; } + FontManager::FontUsage getFallback() { return _fallback; } + bool isGenerated() { return _generated; } + void setGenerated(bool gen) { _generated = gen; } + BdfFont *getBdfFont() { return _bdfFont; } + void setBdfFont(BdfFont *bdfFont) { _bdfFont = bdfFont; } + +private: + int _id; + int _size; + int _slant; + Common::String _name; + FontManager::FontUsage _fallback; + + bool _generated; + BdfFont *_bdfFont; +}; + +class MacFontManager { +public: + MacFontManager(); + + /** + * Accessor method to check the presence of built-in fonts. + * @return True if there are bult-in fonts. + */ + bool hasBuiltInFonts() { return _builtInFonts; } + /** + * Retrieve a font from the available ones. + * @param name Name of the desired font. + * @param fallback Fallback policy in case the desired font isn't there. + * @return The requested font or the fallback. + */ + const Font *getFont(MacFont macFont); + +private: + void loadFonts(); + + /** + * Return font name from standard ID + * @param id ID of the font + * @param size size of the font + * @return the font name or NULL if ID goes beyond the mapping + */ + const char *getFontName(int id, int size, int slant = kMacFontRegular); + const char *getFontName(MacFont &font); + + void generateFontSubstitute(MacFont &macFont); + void generateFont(MacFont &toFont, MacFont &fromFont); + +private: + bool _builtInFonts; + Common::HashMap<Common::String, MacFont *> _fontRegistry; + + Common::HashMap<Common::String, int> _fontNames; + + int parseFontSlant(Common::String slant); +}; + +} // End of namespace Graphics + +#endif diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index 4f8c6f32b9..449cf58335 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -25,6 +25,7 @@ #include "graphics/primitives.h" #include "graphics/font.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" #include "graphics/macgui/macwindow.h" #include "graphics/macgui/macmenu.h" @@ -112,7 +113,7 @@ Menu::~Menu() { } void Menu::addStaticMenus(const MenuData *data) { - MenuItem *about = new MenuItem(_wm->hasBuiltInFonts() ? "\xa9" : "\xf0"); // (c) Symbol as the most resembling apple + MenuItem *about = new MenuItem(_wm->_fontMan->hasBuiltInFonts() ? "\xa9" : "\xf0"); // (c) Symbol as the most resembling apple _items.push_back(about); for (int i = 0; data[i].menunum; i++) { @@ -154,7 +155,7 @@ void Menu::calcDimensions() { _items[i]->bbox.left = x - kMenuLeftMargin; _items[i]->bbox.top = y; _items[i]->bbox.right = x + w + kMenuSpacing - kMenuLeftMargin; - _items[i]->bbox.bottom = y + _font->getFontHeight() + (_wm->hasBuiltInFonts() ? 3 : 2); + _items[i]->bbox.bottom = y + _font->getFontHeight() + (_wm->_fontMan->hasBuiltInFonts() ? 3 : 2); } calcMenuBounds(_items[i]); @@ -244,7 +245,7 @@ void Menu::createSubMenuFromString(int id, const char *str) { } const Font *Menu::getMenuFont() { - return _wm->getFont("Chicago-12", FontManager::kBigGUIFont); + return _wm->_fontMan->getFont(Graphics::MacFont(kMacFontChicago, 12)); } const char *Menu::getAcceleratorString(MenuSubItem *item, const char *prefix) { @@ -252,7 +253,7 @@ const char *Menu::getAcceleratorString(MenuSubItem *item, const char *prefix) { *res = 0; if (item->shortcut != 0) - sprintf(res, "%s%c%c", prefix, (_wm->hasBuiltInFonts() ? '^' : '\x11'), item->shortcut); + sprintf(res, "%s%c%c", prefix, (_wm->_fontMan->hasBuiltInFonts() ? '^' : '\x11'), item->shortcut); return res; } @@ -339,7 +340,7 @@ bool Menu::draw(ManagedSurface *g, bool forceRedraw) { renderSubmenu(it); } - _font->drawString(&_screen, it->name, it->bbox.left + kMenuLeftMargin, it->bbox.top + (_wm->hasBuiltInFonts() ? 2 : 1), it->bbox.width(), color); + _font->drawString(&_screen, it->name, it->bbox.left + kMenuLeftMargin, it->bbox.top + (_wm->_fontMan->hasBuiltInFonts() ? 2 : 1), it->bbox.width(), color); } g->transBlitFrom(_screen, kColorGreen); @@ -372,7 +373,7 @@ void Menu::renderSubmenu(MenuItem *menu) { int color = kColorBlack; if (i == (uint)_activeSubItem && !text.empty() && menu->subitems[i]->enabled) { color = kColorWhite; - Common::Rect trect(r->left, y - (_wm->hasBuiltInFonts() ? 1 : 0), r->right, y + _font->getFontHeight()); + Common::Rect trect(r->left, y - (_wm->_fontMan->hasBuiltInFonts() ? 1 : 0), r->right, y + _font->getFontHeight()); _screen.fillRect(trect, kColorBlack); } diff --git a/graphics/macgui/macwindow.cpp b/graphics/macgui/macwindow.cpp index 2a6e191ded..0fce19e482 100644 --- a/graphics/macgui/macwindow.cpp +++ b/graphics/macgui/macwindow.cpp @@ -23,6 +23,7 @@ #include "graphics/font.h" #include "graphics/primitives.h" #include "common/events.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" #include "graphics/macgui/macwindow.h" #include "image/bmp.h" @@ -67,7 +68,7 @@ MacWindow::~MacWindow() { } const Font *MacWindow::getTitleFont() { - return _wm->getFont("Chicago-12", FontManager::kBigGUIFont); + return _wm->_fontMan->getFont(Graphics::MacFont(kMacFontChicago, 12)); } void MacWindow::setActive(bool active) { @@ -276,7 +277,7 @@ void MacWindow::drawSimpleBorder(ManagedSurface *g) { if (drawTitle) { const Graphics::Font *font = getTitleFont(); - int yOff = _wm->hasBuiltInFonts() ? 3 : 1; + int yOff = _wm->_fontMan->hasBuiltInFonts() ? 3 : 1; int w = font->getStringWidth(_title) + 10; int maxWidth = width - size * 2 - 7; diff --git a/graphics/macgui/macwindow.h b/graphics/macgui/macwindow.h index 5d06da383d..5446b65678 100644 --- a/graphics/macgui/macwindow.h +++ b/graphics/macgui/macwindow.h @@ -23,6 +23,8 @@ #ifndef GRAPHICS_MACGUI_MACWINDOW_H #define GRAPHICS_MACGUI_MACWINDOW_H +#include "common/stream.h" + #include "graphics/managed_surface.h" #include "graphics/transparent_surface.h" #include "graphics/nine_patch.h" diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index 9e40c368dc..42cab7cf8e 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -22,16 +22,14 @@ #include "common/array.h" #include "common/events.h" #include "common/list.h" -#include "common/unzip.h" #include "common/system.h" -#include "common/stream.h" #include "graphics/cursorman.h" -#include "graphics/fonts/bdf.h" #include "graphics/managed_surface.h" #include "graphics/palette.h" #include "graphics/primitives.h" #include "graphics/macgui/macwindowmanager.h" +#include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindow.h" #include "graphics/macgui/macmenu.h" @@ -100,15 +98,13 @@ MacWindowManager::MacWindowManager() { _fullRefresh = true; - _builtInFonts = true; - for (int i = 0; i < ARRAYSIZE(fillPatterns); i++) _patterns.push_back(fillPatterns[i]); - loadFonts(); - g_system->getPaletteManager()->setPalette(palette, 0, ARRAYSIZE(palette) / 3); + _fontMan = new MacFontManager(); + CursorMan.replaceCursorPalette(palette, 0, ARRAYSIZE(palette) / 3); CursorMan.replaceCursor(macCursorArrow, 11, 16, 1, 1, 3); _cursorIsArrow = true; @@ -118,6 +114,8 @@ MacWindowManager::MacWindowManager() { MacWindowManager::~MacWindowManager() { for (int i = 0; i < _lastId; i++) delete _windows[i]; + + delete _fontMan; } MacWindow *MacWindowManager::addWindow(bool scrollable, bool resizable, bool editable) { @@ -322,124 +320,6 @@ void MacWindowManager::removeFromWindowList(BaseMacWindow *target) { _windows.remove_at(ndx); } -////////////////////// -// Font stuff -////////////////////// -void MacWindowManager::loadFonts() { - Common::Archive *dat; - - dat = Common::makeZipArchive("classicmacfonts.dat"); - - if (!dat) { - warning("Could not find classicmacfonts.dat. Falling back to built-in fonts"); - _builtInFonts = true; - - return; - } - - Common::ArchiveMemberList list; - dat->listMembers(list); - - for (Common::ArchiveMemberList::iterator it = list.begin(); it != list.end(); ++it) { - Common::SeekableReadStream *stream = dat->createReadStreamForMember((*it)->getName()); - - Graphics::BdfFont *font = Graphics::BdfFont::loadFont(*stream); - - delete stream; - - Common::String fontName = (*it)->getName(); - - // Trim the .bdf extension - for (int i = fontName.size() - 1; i >= 0; --i) { - if (fontName[i] == '.') { - while ((uint)i < fontName.size()) { - fontName.deleteLastChar(); - } - break; - } - } - - FontMan.assignFontToName(fontName, font); - - debug(2, " %s", fontName.c_str()); - } - - _builtInFonts = false; - - delete dat; -} - -const Graphics::Font *MacWindowManager::getFont(const char *name, Graphics::FontManager::FontUsage fallback) { - const Graphics::Font *font = 0; - - if (!_builtInFonts) { - font = FontMan.getFontByName(name); - - if (!font) - warning("Cannot load font %s", name); - } - - if (_builtInFonts || !font) - font = FontMan.getFontByUsage(fallback); - - return font; -} - -// Source: Apple IIGS Technical Note #41, "Font Family Numbers" -// http://apple2.boldt.ca/?page=til/tn.iigs.041 -static const char *const fontNames[] = { - "Chicago", // system font - "Geneva", // application font - "New York", - "Geneva", - - "Monaco", - "Venice", - "London", - "Athens", - - "San Francisco", - "Toronto", - NULL, - "Cairo", - "Los Angeles", // 12 - - "Zapf Dingbats", - "Bookman", - "Helvetica Narrow", - "Palatino", - NULL, - "Zapf Chancery", - NULL, - - "Times", // 20 - "Helvetica", - "Courier", - "Symbol", - "Taliesin", // mobile? - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, // 30 - NULL, - NULL, - "Avant Garde", - "New Century Schoolbook" -}; - -const char *MacWindowManager::getFontName(int id, int size) { - static char name[128]; - - if (id > ARRAYSIZE(fontNames)) - return NULL; - - snprintf(name, 128, "%s-%d", fontNames[id], size); - - return name; -} - ///////////////// // Cursor stuff ///////////////// diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h index 96cc1e73a5..3449ab13c2 100644 --- a/graphics/macgui/macwindowmanager.h +++ b/graphics/macgui/macwindowmanager.h @@ -26,7 +26,6 @@ #include "common/array.h" #include "common/list.h" #include "common/events.h" -#include "common/archive.h" #include "graphics/fontman.h" #include "graphics/macgui/macwindow.h" @@ -62,6 +61,8 @@ class ManagedSurface; class Menu; +class MacFontManager; + typedef Common::Array<byte *> MacPatterns; /** @@ -80,27 +81,6 @@ public: */ void setScreen(ManagedSurface *screen) { _screen = screen; } /** - * Accessor method to check the presence of built-in fonts. - * @return True if there are bult-in fonts. - */ - bool hasBuiltInFonts() { return _builtInFonts; } - /** - * Retrieve a font from the available ones. - * @param name Name of the desired font. - * @param fallback Fallback policy in case the desired font isn't there. - * @return The requested font or the fallback. - */ - const Font *getFont(const char *name, FontManager::FontUsage fallback); - - /** - * Return font name from standard ID - * @param id ID of the font - * @param size size of the font - * @return the font name or NULL if ID goes beyond the mapping - */ - const char *getFontName(int id, int size); - - /** * Create a window with the given parameters. * Note that this method allocates the necessary memory for the window. * @param scrollable True if the window has to be scrollable. @@ -168,9 +148,11 @@ public: void pushArrowCursor(); void popCursor(); +public: + MacFontManager *_fontMan; + private: void drawDesktop(); - void loadFonts(); void removeMarked(); void removeFromStack(BaseMacWindow *target); @@ -194,7 +176,6 @@ private: Menu *_menu; - bool _builtInFonts; bool _cursorIsArrow; }; diff --git a/graphics/managed_surface.cpp b/graphics/managed_surface.cpp index 273b15de55..0b9fa11181 100644 --- a/graphics/managed_surface.cpp +++ b/graphics/managed_surface.cpp @@ -28,7 +28,7 @@ namespace Graphics { const int SCALE_THRESHOLD = 0x100; -ManagedSurface::ManagedSurface() : +ManagedSurface::ManagedSurface() : w(_innerSurface.w), h(_innerSurface.h), pitch(_innerSurface.pitch), format(_innerSurface.format), _disposeAfterUse(DisposeAfterUse::NO), _owner(nullptr) { } @@ -104,7 +104,7 @@ void ManagedSurface::create(uint16 width, uint16 height, const PixelFormat &pixe 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; @@ -164,7 +164,7 @@ void ManagedSurface::blitFrom(const Surface &src, const Common::Point &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(), + Common::Rect destBounds(destPos.x, destPos.y, destPos.x + srcRect.width(), destPos.y + srcRect.height()); assert(src.format.bytesPerPixel == format.bytesPerPixel); diff --git a/graphics/managed_surface.h b/graphics/managed_surface.h index 8cbd463266..422b4610be 100644 --- a/graphics/managed_surface.h +++ b/graphics/managed_surface.h @@ -95,12 +95,12 @@ public: * 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 */ @@ -211,7 +211,7 @@ public: const Common::Rect getBounds() const { return Common::Rect(0, 0, this->w, this->h); } - + /** * Copies another surface into this one */ diff --git a/graphics/module.mk b/graphics/module.mk index 1c87e74ba7..b6e704bc29 100644 --- a/graphics/module.mk +++ b/graphics/module.mk @@ -12,6 +12,7 @@ MODULE_OBJS := \ fonts/ttf.o \ fonts/winfont.o \ maccursor.o \ + macgui/macfontmanager.o \ macgui/macmenu.o \ macgui/macwindow.o \ macgui/macwindowborder.o \ diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index 9dd06241b7..7b966a8a15 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -215,6 +215,10 @@ struct PixelFormat { return (8 - aLoss); } + inline byte bpp() const { + return rBits() + gBits() + bBits() + aBits(); + } + //////////////////////////////////////////////////////////////////////// // Convenience functions for getting color components' maximum values // //////////////////////////////////////////////////////////////////////// diff --git a/graphics/screen.h b/graphics/screen.h index b3bb2d3eb2..a727936f5c 100644 --- a/graphics/screen.h +++ b/graphics/screen.h @@ -36,7 +36,7 @@ namespace Graphics { /** * 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 + * calls, and provides an update that method that blits the affected * areas to the physical screen */ class Screen : public ManagedSurface { @@ -72,7 +72,7 @@ public: bool isDirty() const { return !_dirtyRects.empty(); } /** - * Marks the whole screen as dirty. This forces the next call to update + * Marks the whole screen as dirty. This forces the next call to update * to copy the entire screen contents */ void makeAllDirty(); diff --git a/graphics/transparent_surface.cpp b/graphics/transparent_surface.cpp index 81b7f3d647..7ef7d00286 100644 --- a/graphics/transparent_surface.cpp +++ b/graphics/transparent_surface.cpp @@ -346,7 +346,7 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p TransparentSurface srcImage(*this, false); // TODO: Is the data really in the screen format? if (format.bytesPerPixel != 4) { - warning("TransparentSurface can only blit 32bpp images, but got %d", format.bytesPerPixel * 8); + warning("TransparentSurface can only blit 32bpp images, but got %d", format.bytesPerPixel * 8); return retSize; } diff --git a/gui/browser_osx.mm b/gui/browser_osx.mm index 18cbd134f3..cfb70a3f65 100644 --- a/gui/browser_osx.mm +++ b/gui/browser_osx.mm @@ -52,7 +52,7 @@ - (id) init { self = [super init]; _panel = 0; - + return self; } diff --git a/gui/options.cpp b/gui/options.cpp index 35c9864718..1f6683d388 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -238,11 +238,10 @@ void OptionsDialog::open() { #ifdef GUI_ONLY_FULLSCREEN _fullscreenCheckbox->setState(true); _fullscreenCheckbox->setEnabled(false); - _aspectCheckbox->setState(ConfMan.getBool("aspect_ratio", _domain)); - _aspectCheckbox->setEnabled(false); #else // !GUI_ONLY_FULLSCREEN // Fullscreen setting _fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain)); +#endif // GUI_ONLY_FULLSCREEN // Aspect ratio setting if (_guioptions.contains(GUIO_NOASPECT)) { @@ -252,7 +251,6 @@ void OptionsDialog::open() { _aspectCheckbox->setEnabled(true); _aspectCheckbox->setState(ConfMan.getBool("aspect_ratio", _domain)); } -#endif // GUI_ONLY_FULLSCREEN } @@ -435,13 +433,13 @@ void OptionsDialog::close() { if (gfxError & OSystem::kTransactionAspectRatioFailed) { ConfMan.setBool("aspect_ratio", g_system->getFeatureState(OSystem::kFeatureAspectRatioCorrection), _domain); message += "\n"; - message += _("the fullscreen setting could not be changed"); + message += _("the aspect ratio setting could not be changed"); } if (gfxError & OSystem::kTransactionFullscreenFailed) { ConfMan.setBool("fullscreen", g_system->getFeatureState(OSystem::kFeatureFullscreenMode), _domain); message += "\n"; - message += _("the aspect ratio setting could not be changed"); + message += _("the fullscreen setting could not be changed"); } // And display the error diff --git a/gui/storagewizarddialog.cpp b/gui/storagewizarddialog.cpp index 22b87f5244..085f901fc4 100644 --- a/gui/storagewizarddialog.cpp +++ b/gui/storagewizarddialog.cpp @@ -69,7 +69,7 @@ StorageWizardDialog::StorageWizardDialog(uint32 storageId): _openUrlWidget = new ButtonWidget(container, "GlobalOptions_Cloud_ConnectionWizard_Container.OpenUrlButton", _("Open URL"), 0, kOpenUrlCmd); _pasteCodeWidget = new ButtonWidget(container, "GlobalOptions_Cloud_ConnectionWizard_Container.PasteCodeButton", _("Paste"), _("Pastes clipboard contents into fields"), kPasteCodeCmd); _connectWidget = new ButtonWidget(container, "GlobalOptions_Cloud_ConnectionWizard_Container.ConnectButton", _("Connect"), 0, kConnectCmd); - + // Initialy the code is empty, so disable the connect button _connectWidget->setEnabled(false); @@ -78,7 +78,7 @@ StorageWizardDialog::StorageWizardDialog(uint32 storageId): _returnLine1->setLabel(_("You will be directed to ScummVM's page where")); _returnLine2->setLabel(_("you should allow it to access your storage.")); } - + _picture = new GraphicsWidget(container, "GlobalOptions_Cloud_ConnectionWizard_Container.Picture"); #ifndef DISABLE_FANCY_THEMES if (g_gui.theme()->supportsImages()) { diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex e942dc8602..6da33d49d0 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat diff --git a/image/codecs/indeo/indeo.h b/image/codecs/indeo/indeo.h index 696b7d0260..336685f625 100644 --- a/image/codecs/indeo/indeo.h +++ b/image/codecs/indeo/indeo.h @@ -24,8 +24,8 @@ #include "graphics/surface.h" #include "image/codecs/codec.h" -/* Common structures, macros, and base class shared by both Indeo4 and - * Indeo5 decoders, derived from ffmpeg. We don't currently support Indeo5 +/* Common structures, macros, and base class shared by both Indeo4 and + * Indeo5 decoders, derived from ffmpeg. We don't currently support Indeo5 * decoding, but just in case we eventually need it, this is kept as a separate * file like it is in ffmpeg. * @@ -343,7 +343,7 @@ struct AVFrame { * Constructor */ AVFrame(); - + /** * Destructor */ @@ -564,7 +564,7 @@ protected: virtual int decodeMbInfo(IVIBandDesc *band, IVITile *tile) = 0; /** - * Decodes the Indeo frame from the bit reader already + * Decodes the Indeo frame from the bit reader already * loaded into the context */ int decodeIndeoFrame(); diff --git a/image/codecs/indeo4.cpp b/image/codecs/indeo4.cpp index feee811cf0..6ceb3b2aa5 100644 --- a/image/codecs/indeo4.cpp +++ b/image/codecs/indeo4.cpp @@ -610,7 +610,7 @@ int Indeo4Decoder::decodePlaneSubdivision() { if (_ctx._gb->getBits(2) != 3) return 0; return 4; - + default: return 0; } diff --git a/image/codecs/indeo5.cpp b/image/codecs/indeo5.cpp index 522722f73a..e3f424957e 100644 --- a/image/codecs/indeo5.cpp +++ b/image/codecs/indeo5.cpp @@ -459,7 +459,7 @@ int Indeo5Decoder::decode_gop_header() { mbSize = _ctx._gb->getBit(); blkSize = 8 >> _ctx._gb->getBit(); mbSize = blkSize << (!mbSize ? 1 : 0); - + if (p == 0 && blkSize == 4) { warning("4x4 luma blocks are unsupported!"); return -2; diff --git a/image/codecs/qtrle.cpp b/image/codecs/qtrle.cpp index 8a83cfa2bd..700e2e1756 100644 --- a/image/codecs/qtrle.cpp +++ b/image/codecs/qtrle.cpp @@ -535,7 +535,7 @@ void QTRLEDecoder::createSurface() { if (_surface) { _surface->free(); delete _surface; - } + } _surface = new Graphics::Surface(); _surface->create(_paddedWidth, _height, getPixelFormat()); diff --git a/po/POTFILES b/po/POTFILES index 5d937eea42..ac4866032e 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -57,6 +57,7 @@ backends/events/openpandora/op-events.cpp backends/events/symbiansdl/symbiansdl-events.cpp backends/events/webossdl/webossdl-events.cpp backends/graphics/opengl/opengl-graphics.cpp +backends/graphics/openglsdl/openglsdl-graphics.cpp backends/graphics/surfacesdl/surfacesdl-graphics.cpp backends/graphics/wincesdl/wincesdl-graphics.cpp backends/keymapper/remap-dialog.cpp diff --git a/po/be_BY.po b/po/be_BY.po index b1350a99be..54eaca64b6 100644 --- a/po/be_BY.po +++ b/po/be_BY.po @@ -6,9 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.8.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" -"PO-Revision-Date: 2016-05-22 17:05+0300\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" +"PO-Revision-Date: 2016-10-07 19:14+0300\n" "Last-Translator: Ivan Lukyanov <greencis@mail.ru>\n" "Language-Team: Ivan Lukyanov <greencis@mail.ru>\n" "Language: Belarusian\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Poedit 1.8.7\n" +"X-Generator: Poedit 1.8.9\n" #: gui/about.cpp:94 #, c-format @@ -78,9 +78,8 @@ msgid "Choose" msgstr "Абраць" #: gui/downloaddialog.cpp:48 -#, fuzzy msgid "Select directory where to download game data" -msgstr "Абярыце дырэкторыю з файламі гульні" +msgstr "Абярыце дырэкторыю для спампавання дадзеных гульні" #: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:472 gui/launcher.cpp:173 msgid "Select directory with game data" @@ -88,30 +87,31 @@ msgstr "Абярыце дырэкторыю з файламі гульні" #: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263 msgid "From: " -msgstr "" +msgstr "Ад:" #: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264 msgid "To: " -msgstr "" +msgstr "Да:" #: gui/downloaddialog.cpp:63 msgid "Cancel download" -msgstr "" +msgstr "Адмяніць загрузку" #: gui/downloaddialog.cpp:65 msgctxt "lowres" msgid "Cancel download" -msgstr "" +msgstr "Адмяніць" #: gui/downloaddialog.cpp:67 msgid "Hide" -msgstr "" +msgstr "Схаваць" #: gui/downloaddialog.cpp:117 msgid "" "It looks like your connection is limited. Do you really want to download " "files with it?" msgstr "" +"Здаецца, што ваша злучэнне абмежавана. Вы сапраўды жадаеце загрузіць файлы?" #: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152 #: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217 @@ -146,6 +146,8 @@ msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" +"Не атрымалася стварыць дырэкторыю для загрузкі, бо азначаная дырэкторыя ўжо " +"мае файл з тым жа імем." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:501 @@ -173,16 +175,18 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" +"\"%s\" ужо існуе ў азначанай дырэкторыі.\n" +"Вы сапраўды жадаеце загрузіць файлы ў гэту дырэкторыю?" #: gui/downloaddialog.cpp:251 #, c-format msgid "Downloaded %s %s / %s %s" -msgstr "" +msgstr "Загружана %s %s / %s %s" #: gui/downloaddialog.cpp:258 -#, fuzzy, c-format +#, c-format msgid "Download speed: %s %s" -msgstr "Пошук скончаны!" +msgstr "Хуткасць загрузкі: %s %s" #: gui/editgamedialog.cpp:132 msgid "Game" @@ -411,6 +415,9 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"Сінхранізацыя захаванняў гульняў не працуе з дырэкторыямі не па змаўчанні. " +"Калі вы жадаеце, каб вашы захаванні гульняў сінхранізаваліся, " +"выкарыстоўвайце дырэкторыю па змаўчанні." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." @@ -696,6 +703,8 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" msgstr "" +"Гэта дырэкторыя пакуль не можа выкарыстоўвацца, у яе цяпер загружаюцца " +"дадзеныя!" #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -843,7 +852,7 @@ msgid "Special dithering modes supported by some games" msgstr "Спецыяльныя рэжымы рэндэрынгу, падтрымоўваныя некаторымі гульнямі" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Поўнаэкранны рэжым" @@ -1145,24 +1154,24 @@ msgstr "Праверыць цяпер" #: gui/options.cpp:1284 msgid "Cloud" -msgstr "" +msgstr "Воблака" #: gui/options.cpp:1286 msgctxt "lowres" msgid "Cloud" -msgstr "" +msgstr "Воблака" #: gui/options.cpp:1297 msgid "Storage:" -msgstr "" +msgstr "Воблака:" #: gui/options.cpp:1297 msgid "Active cloud storage" -msgstr "" +msgstr "Актыўнае воблачнае сховішча" #: gui/options.cpp:1304 gui/options.cpp:1855 msgid "<none>" -msgstr "" +msgstr "<няма>" #: gui/options.cpp:1308 backends/platform/wii/options.cpp:114 msgid "Username:" @@ -1170,101 +1179,96 @@ msgstr "Карыстач:" #: gui/options.cpp:1308 msgid "Username used by this storage" -msgstr "" +msgstr "Імя карыстача ў гэтым воблаку" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "" +msgstr "Карыстаны аб'ём" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "" +msgstr "Аб'ём, заняты захаваннямі гульняў ScummVM на гэтым воблаку" #: gui/options.cpp:1314 msgid "Last sync time:" -msgstr "" +msgstr "Апошняя сінхранізацыя:" #: gui/options.cpp:1314 msgid "When the last saved games sync for this storage occured" -msgstr "" +msgstr "Калі рабілася апошняя сінхранізацыя з гэтым воблакам" #: gui/options.cpp:1317 gui/storagewizarddialog.cpp:71 msgid "Connect" -msgstr "" +msgstr "Далучыць" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" -msgstr "" +msgstr "Адкрывае дыялог для налады далучэння да воблака" #: gui/options.cpp:1318 msgid "Refresh" -msgstr "" +msgstr "Абнавіць" #: gui/options.cpp:1318 msgid "Refresh current cloud storage information (username and usage)" -msgstr "" +msgstr "Абнаўляе бягучую інфармацыю пра воблака (імя карыстача і аб'ём)" #: gui/options.cpp:1319 -#, fuzzy msgid "Download" -msgstr "Уніз" +msgstr "Загрузіць" #: gui/options.cpp:1319 msgid "Open downloads manager dialog" -msgstr "" +msgstr "Адкрывае менеджар загрузак" #: gui/options.cpp:1321 msgid "Run server" -msgstr "" +msgstr "Запусціць сервер" #: gui/options.cpp:1321 msgid "Run local webserver" -msgstr "" +msgstr "Запускае лакальны вэб-сервер" #: gui/options.cpp:1322 gui/options.cpp:1965 -#, fuzzy msgid "Not running" -msgstr "Памылка запуску гульні:" +msgstr "Не запушчаны" #: gui/options.cpp:1326 -#, fuzzy msgid "/root/ Path:" -msgstr "Дад. шлях:" +msgstr "Каранёвая дырэкторыя:" #: gui/options.cpp:1326 gui/options.cpp:1328 gui/options.cpp:1329 -#, fuzzy msgid "Specifies which directory the Files Manager can access" -msgstr "Паказвае шлях да захаванняў гульні" +msgstr "Паказвае шлях да дырэкторыі, куды будзе мець доступ Менеджар файлаў" #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "Дад. шлях:" +msgstr "Корань" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "Сервер:" +msgstr "Порт сервера:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"Нумар порта, выкарыстоўваны серверам\n" +"Усталяванне доступу працуе толькі з портам па змаўчанні" #: gui/options.cpp:1498 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Вы павінны перазапусціць ScummVM, каб ужыць змены." #: gui/options.cpp:1521 -#, fuzzy msgid "Failed to change cloud storage!" -msgstr "Не атрымалася захаваць гульню" +msgstr "Не атрымалася змяніць воблака!" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "Ужо актыўна іншае воблачнае сховішча." #: gui/options.cpp:1562 msgid "The chosen directory cannot be written to. Please select another one." @@ -1283,9 +1287,8 @@ msgid "Select directory for plugins" msgstr "Абярыце дырэкторыю з плагінамі" #: gui/options.cpp:1604 -#, fuzzy msgid "Select directory for Files Manager /root/" -msgstr "Абярыце дырэкторыю з дадатковымі файламі" +msgstr "Абярыце дырэкторыю для кораня ў Менеджары файлаў" #: gui/options.cpp:1666 msgid "" @@ -1298,31 +1301,31 @@ msgstr "" #: gui/options.cpp:1862 #, c-format msgid "%llu bytes" -msgstr "" +msgstr "%llu байтаў" #: gui/options.cpp:1870 msgid "<right now>" -msgstr "" +msgstr "<зараз>" #: gui/options.cpp:1872 -#, fuzzy msgid "<never>" -msgstr "Ніколі" +msgstr "<ніколі>" #: gui/options.cpp:1956 -#, fuzzy msgid "Stop server" -msgstr "Сервер:" +msgstr "Спыніць сервер" #: gui/options.cpp:1957 msgid "Stop local webserver" -msgstr "" +msgstr "Спыняе лакальны вэб-сервер" #: gui/options.cpp:2046 msgid "" "Request failed.\n" "Check your Internet connection." msgstr "" +"Памылка запыту.\n" +"Праверце ваша Інтэрнэт-злучэнне." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1396,9 +1399,8 @@ msgid "Unknown Author" msgstr "Невядомы аўтар" #: gui/remotebrowser.cpp:128 -#, fuzzy msgid "ScummVM could not access the directory!" -msgstr "ScummVM не можа адкрыць азначаную дырэкторыю!" +msgstr "ScummVM не мае доступу да азначанай дырэкторыі!" #: gui/saveload-dialog.cpp:334 msgid "List view" @@ -1468,73 +1470,73 @@ msgstr "Увядзіце апісанне слота %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "Дыялог далучэння да воблака %s" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "Перайдзіце па наступным URL:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "Атрымайце код ад воблака, а потым увядзіце яго" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "ў палі, размешчаныя ніжэй, і націсніце 'Далучыць'" #: gui/storagewizarddialog.cpp:69 -#, fuzzy msgid "Open URL" -msgstr "OpenGL" +msgstr "Адкрыць URL" #: gui/storagewizarddialog.cpp:70 msgid "Paste" -msgstr "" +msgstr "Уставіць" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "Устаўляе змесціва буфера абмену ў палі" #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "Зараз вы будзеце перанакіраваны на старонку ScummVM," #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "дзе вам трэба будзе дазволіць доступ да вашага воблака." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "Іншае воблака ўжо актыўна. Вы жадаеце перапыніць працэс?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "" +msgstr "Пачакайце, пакуль бягучае воблака скончыць работу, і паспрабуйце зноў." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "Поле %s мае памылку." #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "Палі %s маюць памылкі." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" -msgstr "" +msgstr "Усё OK!" #: gui/storagewizarddialog.cpp:201 -#, fuzzy msgid "Invalid code" -msgstr "Неверный путь" +msgstr "Код няправільны" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"Не атрымалася адкрыць URL!\n" +"Калі ласка, перайдзіце на старонку ручна." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -1785,7 +1787,8 @@ msgstr "Г~а~лоўнае меню" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1802,8 +1805,8 @@ msgstr "Захаваць гульню:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2014,19 +2017,20 @@ msgid "C64 Audio Emulator" msgstr "Эмулятар гуку C64" #: backends/cloud/storage.cpp:210 -#, fuzzy msgid "Saved games sync complete." -msgstr "Пошук скончаны!" +msgstr "Сінхранізацыя захаванняў гульняў скончана." #: backends/cloud/storage.cpp:221 msgid "Saved games sync was cancelled." -msgstr "" +msgstr "Сінхранізацыя захаванняў гульняў была перапынена." #: backends/cloud/storage.cpp:223 msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" +"Памылка сінхранізацыі захаванняў гульняў.\n" +"Праверце ваша злучэнне з Інтэрнэтам." #: backends/cloud/storage.cpp:327 #, c-format @@ -2034,16 +2038,16 @@ msgid "" "Download complete.\n" "Failed to download %u files." msgstr "" +"Загрузка скончана.\n" +"Не атрымалася загрузіць %u файлаў." #: backends/cloud/storage.cpp:329 -#, fuzzy msgid "Download complete." -msgstr "Пошук скончаны!" +msgstr "Загрузка скончана." #: backends/cloud/storage.cpp:339 -#, fuzzy msgid "Download failed." -msgstr "Загрузіць файл" +msgstr "Памылка загрузкі." #: backends/events/default/default-events.cpp:196 msgid "Do you really want to return to the Launcher?" @@ -2146,11 +2150,11 @@ msgstr "Рэжым аўтадрэгу зараз" msgid "Swipe three fingers to the right to toggle." msgstr "Правядзіце трыма пальцамі направа для пераключэння." -#: backends/graphics/opengl/opengl-graphics.cpp:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (без фільтраў)" @@ -2165,19 +2169,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Без павелічэння" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Карэкцыя суадносін бакоў уключана" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Карэкцыя суадносін бакоў выключана" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Актыўны графічны фільтр:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Аконны рэжым" @@ -2703,22 +2707,20 @@ msgid "Check for Updates..." msgstr "Правяраю абнаўленні..." #: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55 -#, fuzzy msgid "Color mode" -msgstr "Рэжым без колеру" +msgstr "Рэжым колеру" #: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56 msgid "Use color graphics" -msgstr "" +msgstr "Выкарыстоўваць каляровую графіку" #: engines/adl/detection.cpp:65 msgid "Scanlines" -msgstr "" +msgstr "Скан-лініі" #: engines/adl/detection.cpp:66 -#, fuzzy msgid "Show scanlines" -msgstr "Паказваць радок аб'ектаў" +msgstr "Паказваць скан-лініі" #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48 @@ -2785,7 +2787,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2795,7 +2798,8 @@ msgstr "Узнавіць гульню:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3103,6 +3107,10 @@ msgstr "Галоўнае мен~ю~" msgid "~W~ater Effect Enabled" msgstr "~Э~фекты вады ўключаны" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Гульня спынена. Націсніце любую кнопку, каб працягнуць." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Прапусціць сцэны з Галерэі Гісторыі" @@ -3239,13 +3247,13 @@ msgid "Enable high resolution graphics/content" msgstr "Уключыць графіку і кантэнт высокага адрознення" #: engines/sci/detection.cpp:410 -#, fuzzy msgid "Enable black-lined video" -msgstr "Уключыць рэжым Roland GS" +msgstr "Уключыць відэа з лініямі" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" msgstr "" +"Малюе чорныя лініі па-над відэа, павялічваючы такім чынам бачную выразнасць" #: engines/sci/detection.cpp:420 msgid "Prefer digital sound effects" diff --git a/po/ca_ES.po b/po/ca_ES.po index 2b8308bd7c..ef97cc7c66 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.6.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\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" +"Language-Team: Catalan <scummvm-devel@lists.scummvm.org>\n" "Language: Catalan\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" @@ -851,7 +851,7 @@ msgid "Special dithering modes supported by some games" msgstr "Modes de tramat especials suportats per alguns jocs" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Mode pantalla completa" @@ -1797,7 +1797,8 @@ msgstr "~R~etorna al Llanчador" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1814,8 +1815,8 @@ msgstr "Desa la partida:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2156,12 +2157,12 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 #, fuzzy msgid "OpenGL" msgstr "Obre" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "" @@ -2176,19 +2177,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (no escalat)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "S'ha activat la correcciѓ de la relaciѓ d'aspecte" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "S'ha desactivat la correcciѓ de la relaciѓ d'aspecte" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Filtre de grрfics actiu:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Mode de finestra" @@ -2790,7 +2791,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2800,7 +2802,8 @@ msgstr "Recupera la partida:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3098,6 +3101,11 @@ msgstr "~M~enњ Principal" msgid "~W~ater Effect Enabled" msgstr "~E~fecte de l'aigua activat" +#: engines/mohawk/mohawk.cpp:61 +#, fuzzy +msgid "The game is paused. Press any key to continue." +msgstr "Joc pausat. Premeu ESPAI per continuar." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "" diff --git a/po/cs_CZ.po b/po/cs_CZ.po index 403b7fe7a5..55c8635df0 100644 --- a/po/cs_CZ.po +++ b/po/cs_CZ.po @@ -6,9 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.7.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" -"PO-Revision-Date: 2016-02-03 22:59+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" +"PO-Revision-Date: 2016-10-09 11:46+0200\n" "Last-Translator: Zbynьk Schwarz <zbynek.schwarz@gmail.com>\n" "Language-Team: \n" "Language: Cesky\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" "X-Poedit-SourceCharset: iso-8859-2\n" -"X-Generator: Poedit 1.8.7\n" +"X-Generator: Poedit 1.8.7.1\n" "X-Poedit-Basepath: ..\n" #: gui/about.cpp:94 @@ -79,9 +79,8 @@ msgid "Choose" msgstr "Zvolit" #: gui/downloaddialog.cpp:48 -#, fuzzy msgid "Select directory where to download game data" -msgstr "Vyberte adresсј s daty hry" +msgstr "Vyberte adresсј kam data her stсhnout" #: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:472 gui/launcher.cpp:173 msgid "Select directory with game data" @@ -89,30 +88,32 @@ msgstr "Vyberte adresсј s daty hry" #: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263 msgid "From: " -msgstr "" +msgstr "Z:" #: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264 msgid "To: " -msgstr "" +msgstr "Do:" #: gui/downloaddialog.cpp:63 msgid "Cancel download" -msgstr "" +msgstr "ZruЙit stahovсnэ" #: gui/downloaddialog.cpp:65 msgctxt "lowres" msgid "Cancel download" -msgstr "" +msgstr "ZruЙit stahovсnэ" #: gui/downloaddialog.cpp:67 msgid "Hide" -msgstr "" +msgstr "Skr§t" #: gui/downloaddialog.cpp:117 msgid "" "It looks like your connection is limited. Do you really want to download " "files with it?" msgstr "" +"Zdс se, Оe vaЙe pјipojenэ je omezeno. Opravdu chcete pomocэ nьj soubory " +"stсhnout?" #: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152 #: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217 @@ -147,6 +148,8 @@ msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" +"Nelze vytvoјit adresсј pro stahovсnэ - zadan§ adresсј mс soubor se stejn§m " +"nсzvem." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:501 @@ -174,16 +177,18 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" +"\"%s\" jiО v zadanщm adresсјi existuje.\n" +"Opravdu chcete soubory do tohoto adresсјe stсhnout?" #: gui/downloaddialog.cpp:251 #, c-format msgid "Downloaded %s %s / %s %s" -msgstr "" +msgstr "StaОeno %s %s / %s %s" #: gui/downloaddialog.cpp:258 -#, fuzzy, c-format +#, c-format msgid "Download speed: %s %s" -msgstr "Hledсnэ dokonшeno!" +msgstr "Rychlost stahovсnэ: %s %s" #: gui/editgamedialog.cpp:132 msgid "Game" @@ -410,6 +415,8 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"Funkce synchronizace uloОen§ch her nefunguje s nestandardnэmi adresсјi. " +"Pokud chcete vaЙe hry synchronizovat, je nutnщ pouОэt v§chozэ adresсј." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." @@ -489,7 +496,7 @@ msgstr "Sinus" #: gui/fluidsynth-dialog.cpp:136 msgid "Triangle" -msgstr "Trojњhrlnэk" +msgstr "Trojњhelnэk" #: gui/fluidsynth-dialog.cpp:138 gui/options.cpp:1199 msgid "Misc" @@ -696,7 +703,7 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" -msgstr "" +msgstr "Tento adresсј prozatэm nejde pouОэt, je do nьj stahovсno!" #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -844,7 +851,7 @@ msgid "Special dithering modes supported by some games" msgstr "Speciсlnэ reОimy chvьnэ podporovanщ nьkter§mi hrami" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "ReОim celщ obrazovky" @@ -1130,36 +1137,36 @@ msgstr "Jazyk GUI ScummVM" #: gui/options.cpp:1264 msgid "Update check:" -msgstr "" +msgstr "Kontrola aktualizacэ:" #: gui/options.cpp:1264 msgid "How often to check ScummVM updates" -msgstr "" +msgstr "Jak шasto ScummVM kontroluje aktualizace" #: gui/options.cpp:1276 msgid "Check now" -msgstr "" +msgstr "Zkontrolovat nynэ" #: gui/options.cpp:1284 msgid "Cloud" -msgstr "" +msgstr "Cloud" #: gui/options.cpp:1286 msgctxt "lowres" msgid "Cloud" -msgstr "" +msgstr "Cloud" #: gui/options.cpp:1297 msgid "Storage:" -msgstr "" +msgstr "кloОiЙtь:" #: gui/options.cpp:1297 msgid "Active cloud storage" -msgstr "" +msgstr "Aktivnэ cloudovщ њloОiЙtь" #: gui/options.cpp:1304 gui/options.cpp:1855 msgid "<none>" -msgstr "" +msgstr "<Осdnщ>" #: gui/options.cpp:1308 backends/platform/wii/options.cpp:114 msgid "Username:" @@ -1167,101 +1174,99 @@ msgstr "UОivatelskщ jmщno" #: gui/options.cpp:1308 msgid "Username used by this storage" -msgstr "" +msgstr "UОivatelskс jmщna kterс toto њloОiЙtь vyuОэvajэ" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "" +msgstr "VyuОit§ prostor:" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "" +msgstr "Prostor vyuОit§ uloОen§mi hrami ScummVM v tomto њloОiЙti" #: gui/options.cpp:1314 msgid "Last sync time:" -msgstr "" +msgstr "Datum poslednэ synchronizace:" #: gui/options.cpp:1314 msgid "When the last saved games sync for this storage occured" -msgstr "" +msgstr "Kdy byla provedena poslednэ synchronizace uloОen§ch her" #: gui/options.cpp:1317 gui/storagewizarddialog.cpp:71 msgid "Connect" -msgstr "" +msgstr "Pјipojit" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" msgstr "" +"Otevјэt dialogovщ okno prљvodce pro pјipojenэ k vaЙemu њшtu cloudovщho " +"њloОiЙtь" #: gui/options.cpp:1318 msgid "Refresh" -msgstr "" +msgstr "Obnovit" #: gui/options.cpp:1318 msgid "Refresh current cloud storage information (username and usage)" msgstr "" +"Obnovit souшasnщ њdaje cloudovщho њloОiЙtь (uОivatelskщ jmщno a vyuОitэ)" #: gui/options.cpp:1319 -#, fuzzy msgid "Download" -msgstr "Dolљ" +msgstr "Stсhnout" #: gui/options.cpp:1319 msgid "Open downloads manager dialog" -msgstr "" +msgstr "Otevјэt dialogovщ okno sprсvce stahovanэ" #: gui/options.cpp:1321 msgid "Run server" -msgstr "" +msgstr "Spustit server" #: gui/options.cpp:1321 msgid "Run local webserver" -msgstr "" +msgstr "Spustit mэstnэ internetov§ server" #: gui/options.cpp:1322 gui/options.cpp:1965 -#, fuzzy msgid "Not running" -msgstr "Chyba pјi spuЙtьnэ hry:" +msgstr "NespuЙtьno" #: gui/options.cpp:1326 -#, fuzzy msgid "/root/ Path:" -msgstr "Dodateшnс Cesta:" +msgstr "Cesta /root/:" #: gui/options.cpp:1326 gui/options.cpp:1328 gui/options.cpp:1329 -#, fuzzy msgid "Specifies which directory the Files Manager can access" -msgstr "Stanovuje, kam jsou umэstьny vaЙe uloОenщ hry" +msgstr "Urшuje do kterщho adresсјe mс Sprсvce souborљ pјэstup" #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "Dodateшnс Cesta:" +msgstr "Cesta /root/:" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "Server:" +msgstr "Port serveru:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"Kter§ port server pouОэvс\n" +"PјihlсЙenэ pomocэ serveru nenэ dostupnщ pјi pouОitэ nestandardnэho portu" #: gui/options.cpp:1498 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:1521 -#, fuzzy msgid "Failed to change cloud storage!" -msgstr "Nelze uloОit hru." +msgstr "Nelze zmьnit cloudovщ њloОiЙtь!" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "Jinщ cloudovщ њloОiЙtь jiО je aktivnэ." #: gui/options.cpp:1562 msgid "The chosen directory cannot be written to. Please select another one." @@ -1280,9 +1285,8 @@ msgid "Select directory for plugins" msgstr "Vyberte adresсј pro zсsuvnщ moduly" #: gui/options.cpp:1604 -#, fuzzy msgid "Select directory for Files Manager /root/" -msgstr "Vyberte adresсј pro dodateшnщ soubory" +msgstr "Vyberte adresсј pro koјen Sprсvce souborљ" #: gui/options.cpp:1666 msgid "" @@ -1295,31 +1299,31 @@ msgstr "" #: gui/options.cpp:1862 #, c-format msgid "%llu bytes" -msgstr "" +msgstr "%llu bajtљ" #: gui/options.cpp:1870 msgid "<right now>" -msgstr "" +msgstr "<prсvь nynэ>" #: gui/options.cpp:1872 -#, fuzzy msgid "<never>" -msgstr "Nikdy" +msgstr "<nikdy>" #: gui/options.cpp:1956 -#, fuzzy msgid "Stop server" -msgstr "Server:" +msgstr "Zastavit server" #: gui/options.cpp:1957 msgid "Stop local webserver" -msgstr "" +msgstr "Zastavit mэstnэ internetov§ server" #: gui/options.cpp:2046 msgid "" "Request failed.\n" "Check your Internet connection." msgstr "" +"Ўсdost selhala.\n" +"Zkontrolujte svщ internetovщ pјipojenэ." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1393,9 +1397,8 @@ msgid "Unknown Author" msgstr "Neznсm§ autor" #: gui/remotebrowser.cpp:128 -#, fuzzy msgid "ScummVM could not access the directory!" -msgstr "ScummVM nemohl tento adresсј otevјэt!" +msgstr "ScummVM nemс k tomuto adresсјi pјэstup!" #: gui/saveload-dialog.cpp:334 msgid "List view" @@ -1465,73 +1468,75 @@ msgstr "Zadejte popis pro pozici %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "Prљvodce pјipojenэm k њloОiЙti %s" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "Pјejdьte na nсsledujэcэ URL:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "Zэskejte kѓd z њloОiЙtь, zadejte ho" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "do nсsledujэcэho poel a kliknьte na 'Pјipojit':" #: gui/storagewizarddialog.cpp:69 -#, fuzzy msgid "Open URL" -msgstr "OpenGL" +msgstr "Otevјэt URL" #: gui/storagewizarddialog.cpp:70 msgid "Paste" -msgstr "" +msgstr "VloОit" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "VloОэ obsah schrсnky do polэ" #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "Budete pјesmьrovсni na strсnku ScummVM kde" #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "budete muset povolit pјэstup k vaЙemu њloОiЙti." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "Jinщ њloОiЙtь je aktivnэ. Chcete ho pјeruЙit?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." msgstr "" +"Vyшkejte, neО operace se souшasn§m њloОiЙtьm jsou dokonшeny, a pak to zkuste " +"znova." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "Pole %s obsahuje chybu." #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "Pole %s obsahujэ chybu." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" -msgstr "" +msgstr "VЙe v poјсdku!" #: gui/storagewizarddialog.cpp:201 -#, fuzzy msgid "Invalid code" -msgstr "Neplatnс Cesta" +msgstr "Neplatn§ kѓd" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"Nelze otevјэt URL!\n" +"Prosэm pјejdьte na tuto strсnku sami." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -1569,19 +1574,22 @@ msgid "" "\n" "Would you like to enable this feature?" msgstr "" +"ScummVM nynэ podporuje automatickou kontrolu\n" +"aktualizacэ kterс vyОaduje pјipojenэ k internetu.\n" +"\n" +"Chtьli byste tuto funkci nynэ zapnout?" #: gui/updates-dialog.cpp:55 msgid "(You can always enable it in the options dialog on the Misc tab)" -msgstr "" +msgstr "(Toto nastavenэ vОdy mљОete zmьnit ve Volbсch v kartь Rљznщ)" #: gui/updates-dialog.cpp:92 -#, fuzzy msgid "Check for updates automatically" -msgstr "Zkontrolovat Aktualizace..." +msgstr "Automaticky kontrolovat aktualizace" #: gui/updates-dialog.cpp:111 msgid "Proceed" -msgstr "" +msgstr "Pokraшovat" #: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376 msgid "Clear value" @@ -1712,20 +1720,19 @@ msgstr "Hercules Jantarovс" #: common/updates.cpp:58 msgid "Daily" -msgstr "" +msgstr "Dennь" #: common/updates.cpp:60 msgid "Weekly" -msgstr "" +msgstr "T§dnь" #: common/updates.cpp:62 msgid "Monthly" -msgstr "" +msgstr "Mьsэшnь" #: common/updates.cpp:64 -#, fuzzy msgid "<Bad value>" -msgstr "Vyшistit hodnotu" +msgstr "<Љpatnс hodnota>" #: engines/advancedDetector.cpp:334 #, c-format @@ -1779,7 +1786,8 @@ msgstr "~N~сvrat do SpouЙtьшe" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1796,8 +1804,8 @@ msgstr "UloОit hru:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2005,19 +2013,20 @@ msgid "C64 Audio Emulator" msgstr "Emulсtor zvuku C64" #: backends/cloud/storage.cpp:210 -#, fuzzy msgid "Saved games sync complete." -msgstr "Hledсnэ dokonшeno!" +msgstr "Synchronizace uloОen§ch her dokonшena." #: backends/cloud/storage.cpp:221 msgid "Saved games sync was cancelled." -msgstr "" +msgstr "Synchronizace uloОen§ch her byla zruЙena." #: backends/cloud/storage.cpp:223 msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" +"Synchronizace uloОen§ch her byla zruЙena.\n" +"Zkontrolujte svщ internetovщ pјipojenэ." #: backends/cloud/storage.cpp:327 #, c-format @@ -2025,16 +2034,16 @@ msgid "" "Download complete.\n" "Failed to download %u files." msgstr "" +"Stahovсnэ dokonшeno.\n" +"NeЙlo stсhnout %u souborљ." #: backends/cloud/storage.cpp:329 -#, fuzzy msgid "Download complete." -msgstr "Hledсnэ dokonшeno!" +msgstr "Stahovсnэ dokonшeno." #: backends/cloud/storage.cpp:339 -#, fuzzy msgid "Download failed." -msgstr "Nahrсt hru:" +msgstr "StaОenэ selhalo." #: backends/events/default/default-events.cpp:196 msgid "Do you really want to return to the Launcher?" @@ -2137,11 +2146,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (bez filtrovсnэ)" @@ -2156,19 +2165,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normсlnэ (bez zmьny velikosti)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Povolena korekce pomьru stran" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Zakсzсna korekce pomьru stran" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Aktivnэ grafick§ filtr:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "ReОim do okna" @@ -2696,22 +2705,20 @@ msgid "Check for Updates..." msgstr "Zkontrolovat Aktualizace..." #: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55 -#, fuzzy msgid "Color mode" -msgstr "ReОim pro barvoslepщ" +msgstr "Barevn§ reОim" #: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56 msgid "Use color graphics" -msgstr "" +msgstr "PouОэt barevnщ grafiky" #: engines/adl/detection.cpp:65 msgid "Scanlines" -msgstr "" +msgstr "Linie snэmсnэ" #: engines/adl/detection.cpp:66 -#, fuzzy msgid "Show scanlines" -msgstr "Zobrazit jmenovky objektљ" +msgstr "Zobrazit linie snэmсnэ" #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48 @@ -2751,29 +2758,31 @@ msgstr "" "nabэdek." #: engines/agi/detection.cpp:177 -#, fuzzy msgid "Use Hercules hires font" -msgstr "Hercules Zelenс" +msgstr "PouОэt Hercules pэsmo s vysok§m rozliЙenэm" #: engines/agi/detection.cpp:178 msgid "Uses Hercules hires font, when font file is available." -msgstr "" +msgstr "PouОэt pэsmo Hercules ve vysokщm rozliЙenэ, pokud je dostupnщ." #: engines/agi/detection.cpp:187 msgid "Pause when entering commands" -msgstr "" +msgstr "Pozastavit pјi zadсvсnэ pјэkazљ" #: 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 "" +"Zobrazэ okno s pјэkazovou јсdkou a pozastavэ hru (jako v hrсch SCI) mэsto " +"јсdku v reсlnщm шase" #: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888 #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2783,7 +2792,8 @@ msgstr "Obnovit hru" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3058,11 +3068,11 @@ msgstr "" #: engines/mohawk/detection.cpp:169 msgid "Play the Myst fly by movie" -msgstr "" +msgstr "Pјehrсt video pјeletu v the Myst" #: engines/mohawk/detection.cpp:170 msgid "The Myst fly by movie was not played by the original engine." -msgstr "" +msgstr "Video pјeletu v The Myst pљvodnэ jсdro nepјehrсvalo." #. I18N: Option for fast scene switching #: engines/mohawk/dialogs.cpp:181 engines/mohawk/dialogs.cpp:267 @@ -3079,19 +3089,21 @@ msgid "~D~rop Page" msgstr "~Z~ahodit Strсnku" #: engines/mohawk/dialogs.cpp:188 -#, fuzzy msgid "Show ~M~ap" -msgstr "~Z~obrazit Mapu" +msgstr "~Z~obrazit mapu" #: engines/mohawk/dialogs.cpp:194 -#, fuzzy msgid "Main Men~u~" -msgstr "~H~lavnэ Menu" +msgstr "~H~lavnэ nabэdka" #: engines/mohawk/dialogs.cpp:268 msgid "~W~ater Effect Enabled" msgstr "~E~fekt Vody Zapnut" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Hra je pozastavena. Pro pokraшovanэ stisknьte libovolnou klсvesu." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Pјeskoшit scщny v Sэni zсznamљ" @@ -3118,18 +3130,16 @@ msgstr "" "\n" #: engines/parallaction/saveload.cpp:194 -#, fuzzy msgid "Load file" -msgstr "Nahrсt hru:" +msgstr "Naшэst soubor" #: engines/parallaction/saveload.cpp:201 msgid "Loading game..." msgstr "Nahrсvсnэ hry..." #: engines/parallaction/saveload.cpp:209 -#, fuzzy msgid "Save file" -msgstr "Uklсdсnэ hry selhalo!" +msgstr "UloОit soubor" #: engines/parallaction/saveload.cpp:216 msgid "Saving game..." @@ -3229,13 +3239,12 @@ msgid "Enable high resolution graphics/content" msgstr "Povolit grafiku/obsah ve vysokщm rozliЙenэ" #: engines/sci/detection.cpp:410 -#, fuzzy msgid "Enable black-lined video" -msgstr "Zapnout reОim Roland GS" +msgstr "Povolit video s шern§mi шarami" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" -msgstr "" +msgstr "Vykreslovat u videэ шernщ шсry pro zv§Йenэ jejich zdсnlivщ ostrosti." #: engines/sci/detection.cpp:420 msgid "Prefer digital sound effects" @@ -3284,13 +3293,12 @@ msgid "" msgstr "PouОэt alternativnэ sadu stјэbrn§ch kurzorљ mэsto standardnэch zlat§ch" #: engines/scumm/detection.cpp:1341 -#, fuzzy msgid "Show Object Line" -msgstr "Zobrazit jmenovky objektљ" +msgstr "Zobrazit јсdek objektљ" #: engines/scumm/detection.cpp:1342 msgid "Show the names of objects at the bottom of the screen" -msgstr "" +msgstr "Zobrazit nсzvy objektљ v dolnэ шсsti obrazovky" #: engines/scumm/dialogs.cpp:172 #, c-format @@ -3993,58 +4001,61 @@ msgstr "" "jehoО majэ b§t naшteny hudebnэ nсstroje. Hudba bude zakсzсna." #: engines/sherlock/detection.cpp:71 -#, fuzzy msgid "Use original savegame dialog" -msgstr "PouОэt pљvodnэ obrazovky naшtenэ/uloОenэ" +msgstr "PouОэt pљvodnэ obrazovky uloОenэ hry" #: engines/sherlock/detection.cpp:72 msgid "" "Files button in-game shows original savegame dialog rather than the ScummVM " "menu" msgstr "" +"Tlaшэtko Files ve hјe zobrazэ pљvodnэ dialogovщ okno pro uloОenэ hry mэsto " +"nabэdky ScummVM" #: engines/sherlock/detection.cpp:81 msgid "Pixellated scene transitions" -msgstr "" +msgstr "Pixelovanщ pјechody scщn" #: engines/sherlock/detection.cpp:82 msgid "When changing scenes, a randomized pixel transition is done" -msgstr "" +msgstr "Pјi zmьnь scщny je proveden nсhodn§ pixelov§ pјechod" #: engines/sherlock/detection.cpp:91 msgid "Don't show hotspots when moving mouse" -msgstr "" +msgstr "Nezobarzovat aktivnэ body pјi pohybu myЙэ" #: engines/sherlock/detection.cpp:92 msgid "" "Only show hotspot names after you actually click on a hotspot or action " "button" msgstr "" +"Aktivnэ body zobrazovat pouze pјi kliknutэ na nь nebo tlaшэtko шinnosti" #: engines/sherlock/detection.cpp:101 -#, fuzzy msgid "Show character portraits" -msgstr "Zamьnit znaky" +msgstr "Zobrazit portrщty postav" #: engines/sherlock/detection.cpp:102 msgid "Show portraits for the characters when conversing" -msgstr "" +msgstr "Zobrazit portrщty postav kdyО mluvэ" #: engines/sherlock/detection.cpp:111 msgid "Slide dialogs into view" -msgstr "" +msgstr "Dialogovс okna vplujэ na obrazovku" #: engines/sherlock/detection.cpp:112 msgid "Slide UI dialogs into view, rather than simply showing them immediately" msgstr "" +"Dialohovс okna rozhranэ vplujэ na obrazovku, mэsto aby se zobrazovala " +"okamОitь" #: engines/sherlock/detection.cpp:121 msgid "Transparent windows" -msgstr "" +msgstr "Prљhlednс okna" #: engines/sherlock/detection.cpp:122 msgid "Show windows with a partially transparent background" -msgstr "" +msgstr "Zobrazit okna s шсsteшnь prљhledn§m pozadэm" #: engines/sky/compact.cpp:130 msgid "" @@ -4143,12 +4154,12 @@ msgstr "Zobrazit jmenovky objektљ pјi najetэ myЙi" #: engines/sword25/detection.cpp:46 msgid "Use English speech" -msgstr "" +msgstr "PouОэt anglickou јeш" #: engines/sword25/detection.cpp:47 msgid "" "Use English speech instead of German for every language other than German" -msgstr "" +msgstr "PouОэt anglickou јeш mэsto nьmeckщ pro kaОd§ jazyk kromь nьmшiny." #: engines/teenagent/resources.cpp:96 msgid "" diff --git a/po/da_DK.po b/po/da_DK.po index fd5b15e9c0..58b94e19f8 100644 --- a/po/da_DK.po +++ b/po/da_DK.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-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" "PO-Revision-Date: 2016-02-25 21:08+0100\n" "Last-Translator: Steffen Nyeland <steffen@nyeland.dk>\n" "Language-Team: Steffen Nyeland <steffen@nyeland.dk>\n" @@ -845,7 +845,7 @@ msgid "Special dithering modes supported by some games" msgstr "Speciel farvereduceringstilstand understјttet a nogle spil" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Fuldskцrms tilstand" @@ -1779,7 +1779,8 @@ msgstr "~R~etur til oversigt" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1796,8 +1797,8 @@ msgstr "Gemmer:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2137,11 +2138,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (Ingen filtrering)" @@ -2156,19 +2157,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (ingen skalering)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Aktivщr billedformat korrektion" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Deaktivщr billedformat korrektion" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Aktive grafik filtre:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Vindue tilstand" @@ -2772,7 +2773,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2782,7 +2784,8 @@ msgstr "Gendan spil:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3093,6 +3096,11 @@ msgstr "Hoved~m~enu" msgid "~W~ater Effect Enabled" msgstr "~V~andeffekter aktiveret" +#: engines/mohawk/mohawk.cpp:61 +#, fuzzy +msgid "The game is paused. Press any key to continue." +msgstr "Spil sat pх pause. Tryk MELLEMRUM for at fortsцtte." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Spring \"Hall of Records\" storyboard scener over" diff --git a/po/de_DE.po b/po/de_DE.po index 6933c74d07..66cb2c31c0 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.9.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" "PO-Revision-Date: 2016-07-19 9:40:00+0200\n" "Last-Translator: Lothar Serra Mari <rootfather@scummvm.org>\n" "Language-Team: Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari " @@ -862,7 +862,7 @@ msgstr "" "Spezielle Farbmischungsmethoden werden von manchen Spielen unterstќtzt." #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Vollbildmodus" @@ -1817,7 +1817,8 @@ msgstr "Zur Spiele~l~iste" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1834,8 +1835,8 @@ msgstr "Speichern:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2179,11 +2180,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (ohne Filter)" @@ -2198,19 +2199,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal ohn.Skalieren" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Seitenverhфltniskorrektur an" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Seitenverhфltniskorrektur aus" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Aktiver Grafikfilter:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Fenstermodus" @@ -2817,7 +2818,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2827,7 +2829,8 @@ msgstr "Spiel laden:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3142,6 +3145,10 @@ msgstr "Haupt~m~enќ" msgid "~W~ater Effect Enabled" msgstr "~W~assereffekt aktiviert" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Das Spiel ist pausiert. Zum Weiterspielen beliebige Taste drќcken." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Szenenbuch-Sequenz in der Chronikhalle ќberspringen" diff --git a/po/es_ES.po b/po/es_ES.po index 3959e0acff..12a8357ba5 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -6,9 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0svn\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" -"PO-Revision-Date: 2016-02-24 18:01+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" +"PO-Revision-Date: 2016-10-09 01:40+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: Espanol\n" @@ -36,7 +36,7 @@ msgstr "Mostrar archivos ocultos" #: gui/browser.cpp:68 msgid "Show files marked with the hidden attribute" -msgstr "Muestra los archivos marcados como ocultos" +msgstr "Mostrar los archivos marcados como ocultos" #: gui/browser.cpp:72 gui/remotebrowser.cpp:56 msgid "Go up" @@ -76,9 +76,8 @@ msgid "Choose" msgstr "Aceptar" #: gui/downloaddialog.cpp:48 -#, fuzzy msgid "Select directory where to download game data" -msgstr "Selecciona el directorio del juego" +msgstr "Selecciona el directorio donde descargar los archivos de juego" #: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:472 gui/launcher.cpp:173 msgid "Select directory with game data" @@ -86,30 +85,32 @@ msgstr "Selecciona el directorio del juego" #: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263 msgid "From: " -msgstr "" +msgstr "Desde:" #: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264 msgid "To: " -msgstr "" +msgstr "Hasta:" #: gui/downloaddialog.cpp:63 msgid "Cancel download" -msgstr "" +msgstr "Cancelar descarga" #: gui/downloaddialog.cpp:65 msgctxt "lowres" msgid "Cancel download" -msgstr "" +msgstr "Cancelar descarga" #: gui/downloaddialog.cpp:67 msgid "Hide" -msgstr "" +msgstr "Ocultar" #: gui/downloaddialog.cpp:117 msgid "" "It looks like your connection is limited. Do you really want to download " "files with it?" msgstr "" +"Parece que estсs usando una conexiѓn limitada. ПSeguro que quieres descargar " +"archivos?" #: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152 #: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217 @@ -137,13 +138,15 @@ msgstr "No" #: gui/downloaddialog.cpp:136 gui/launcher.cpp:544 msgid "ScummVM couldn't open the specified directory!" -msgstr "ЁScummVM no ha podido abrir el directorio!" +msgstr "ScummVM no ha podido abrir el directorio." #: gui/downloaddialog.cpp:146 msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" +"No ha podido crearse un directorio para la descarga. El directorio contiene " +"un archivo con el mismo nombre." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:501 @@ -171,16 +174,18 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" +"Ya existe un directorio \"%s\" en la ruta especificada .\n" +"ПSeguro que quieres descargar los archivos en ese directorio?" #: gui/downloaddialog.cpp:251 #, c-format msgid "Downloaded %s %s / %s %s" -msgstr "" +msgstr "Descargado: %s %s / %s %s" #: gui/downloaddialog.cpp:258 -#, fuzzy, c-format +#, c-format msgid "Download speed: %s %s" -msgstr "ЁBњsqueda completada!" +msgstr "Velocidad de descarga: %s %s" #: gui/editgamedialog.cpp:132 msgid "Game" @@ -409,10 +414,12 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"Para que la sincronizaciѓn de partidas guardadas funcione, es necesario " +"utilizar el directorio predeterminado." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." -msgstr "Esta ID ya estс siendo usada. Por favor, elige otra." +msgstr "Esta ID ya estс en uso. Elige otra." #: gui/editrecorddialog.cpp:58 msgid "Author:" @@ -572,7 +579,7 @@ msgstr "Tecla asociada: ninguna" #: gui/KeysDialog.cpp:90 msgid "Please select an action" -msgstr "Por favor, selecciona una acciѓn" +msgstr "Selecciona una acciѓn" #: gui/KeysDialog.cpp:106 msgid "Press the key to associate" @@ -696,6 +703,8 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" msgstr "" +"Este directorio se estс utilizando para una descarga y todavэa no puede " +"usarse." #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -712,11 +721,11 @@ msgstr "Este juego no permite cargar partidas desde el lanzador." #: gui/launcher.cpp:505 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" -"ЁScummVM no ha podido encontrar ningњn motor capaz de ejecutar el juego!" +"ScummVM no ha podido encontrar ningњn motor capaz de ejecutar el juego." #: gui/launcher.cpp:556 msgid "ScummVM could not find any game in the specified directory!" -msgstr "ЁScummVM no ha encontrado ningњn juego en el directorio!" +msgstr "ScummVM no ha encontrado ningњn juego en el directorio." #: gui/launcher.cpp:569 msgid "Pick the game:" @@ -736,7 +745,7 @@ msgstr "... progreso..." #: gui/massadd.cpp:259 msgid "Scan complete!" -msgstr "ЁBњsqueda completada!" +msgstr "Bњsqueda completada." #: gui/massadd.cpp:262 #, c-format @@ -844,7 +853,7 @@ msgid "Special dithering modes supported by some games" msgstr "Modos especiales de difuminado compatibles con algunos juegos" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Pantalla completa" @@ -1135,36 +1144,36 @@ msgstr "Idioma de la interfaz de ScummVM" #: gui/options.cpp:1264 msgid "Update check:" -msgstr "" +msgstr "Buscar actualizaciones:" #: gui/options.cpp:1264 msgid "How often to check ScummVM updates" -msgstr "" +msgstr "Frecuencia con la que se buscan actualizaciones" #: gui/options.cpp:1276 msgid "Check now" -msgstr "" +msgstr "Buscar ahora" #: gui/options.cpp:1284 msgid "Cloud" -msgstr "" +msgstr "Nube" #: gui/options.cpp:1286 msgctxt "lowres" msgid "Cloud" -msgstr "" +msgstr "Nube" #: gui/options.cpp:1297 msgid "Storage:" -msgstr "" +msgstr "Almacenamiento:" #: gui/options.cpp:1297 msgid "Active cloud storage" -msgstr "" +msgstr "Almacenamiento activo" #: gui/options.cpp:1304 gui/options.cpp:1855 msgid "<none>" -msgstr "" +msgstr "<ninguno>" #: gui/options.cpp:1308 backends/platform/wii/options.cpp:114 msgid "Username:" @@ -1172,106 +1181,103 @@ msgstr "Usuario:" #: gui/options.cpp:1308 msgid "Username used by this storage" -msgstr "" +msgstr "Nombre de usuario utilizado para este almacenamiento" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "" +msgstr "Espacio utilizado:" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "" +msgstr "Espacio utilizado para las partidas guardadas en este almacenamiento" #: gui/options.cpp:1314 msgid "Last sync time:" -msgstr "" +msgstr "кltima sincronizaciѓn:" #: gui/options.cpp:1314 msgid "When the last saved games sync for this storage occured" -msgstr "" +msgstr "Cuсndo se ha producido la њltima sincronizaciѓn de partidas guardadas" #: gui/options.cpp:1317 gui/storagewizarddialog.cpp:71 msgid "Connect" -msgstr "" +msgstr "Conectar" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" msgstr "" +"Abrir el asistente de configuraciѓn para habilitar el almacenamiento en lэnea" #: gui/options.cpp:1318 msgid "Refresh" -msgstr "" +msgstr "Refrescar" #: gui/options.cpp:1318 msgid "Refresh current cloud storage information (username and usage)" msgstr "" +"Refrescar la informaciѓn del almacenamiento en lэnea (nombre de usuario y " +"espacio)" #: gui/options.cpp:1319 -#, fuzzy msgid "Download" -msgstr "Abajo" +msgstr "Descargar" #: gui/options.cpp:1319 msgid "Open downloads manager dialog" -msgstr "" +msgstr "Abrir el gestor de descargas" #: gui/options.cpp:1321 msgid "Run server" -msgstr "" +msgstr "Habilitar servidor" #: gui/options.cpp:1321 msgid "Run local webserver" -msgstr "" +msgstr "Habilitar el servidor local" #: gui/options.cpp:1322 gui/options.cpp:1965 -#, fuzzy msgid "Not running" -msgstr "Error al ejecutar el juego:" +msgstr "Detenido" #: gui/options.cpp:1326 -#, fuzzy msgid "/root/ Path:" -msgstr "Adicional:" +msgstr "Directorio /raэz/:" #: gui/options.cpp:1326 gui/options.cpp:1328 gui/options.cpp:1329 -#, fuzzy msgid "Specifies which directory the Files Manager can access" -msgstr "Especifica dѓnde guardar tus partidas" +msgstr "Especifica los directorios accesibles para el gestor de archivos" #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "Adicional:" +msgstr " /raэz/:" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "Servidor:" +msgstr "Puerto del servidor:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"Puerto utilizado por el servidor\n" +"La autentificaciѓn solo es posible con el puerto predeterminado" #: gui/options.cpp:1498 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Tienes que reiniciar ScummVM para aplicar los cambios." #: gui/options.cpp:1521 -#, fuzzy msgid "Failed to change cloud storage!" -msgstr "Fallo al guardar la partida" +msgstr "Fallo al cambiar el almacenamiento en lэnea" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "Ya se ha habilitado otro almacenamiento en lэnea" #: gui/options.cpp:1562 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." +msgstr "No se puede escribir en el directorio elegido. Selecciona otro." #: gui/options.cpp:1571 msgid "Select directory for GUI themes" @@ -1286,9 +1292,8 @@ msgid "Select directory for plugins" msgstr "Selecciona el directorio de plugins" #: gui/options.cpp:1604 -#, fuzzy msgid "Select directory for Files Manager /root/" -msgstr "Selecciona el directorio adicional" +msgstr "Selecciona el directorio /raэz/ para el gestor de archivos" #: gui/options.cpp:1666 msgid "" @@ -1301,31 +1306,31 @@ msgstr "" #: gui/options.cpp:1862 #, c-format msgid "%llu bytes" -msgstr "" +msgstr "%llu bytes" #: gui/options.cpp:1870 msgid "<right now>" -msgstr "" +msgstr "<ahora>" #: gui/options.cpp:1872 -#, fuzzy msgid "<never>" -msgstr "Nunca" +msgstr "<nunca>" #: gui/options.cpp:1956 -#, fuzzy msgid "Stop server" -msgstr "Servidor:" +msgstr "Detener servidor" #: gui/options.cpp:1957 msgid "Stop local webserver" -msgstr "" +msgstr "Detener el servidor local" #: gui/options.cpp:2046 msgid "" "Request failed.\n" "Check your Internet connection." msgstr "" +"La solicitud ha fallado.\n" +"Comprueba tu conexiѓn." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1399,9 +1404,8 @@ msgid "Unknown Author" msgstr "Autor desconocido" #: gui/remotebrowser.cpp:128 -#, fuzzy msgid "ScummVM could not access the directory!" -msgstr "ЁScummVM no ha podido abrir el directorio!" +msgstr "ScummVM no ha podido acceder al directorio." #: gui/saveload-dialog.cpp:334 msgid "List view" @@ -1471,72 +1475,73 @@ msgstr "Introduce una descripciѓn para la ranura %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "Asistente de conexiѓn para %s" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "Accede a esta URL:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "Obtщn el cѓdigo del almacenamiento, escrэbelo" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "aquэ y pulsa 'Conectar':" #: gui/storagewizarddialog.cpp:69 -#, fuzzy msgid "Open URL" -msgstr "OpenGL" +msgstr "Abrir URL" #: gui/storagewizarddialog.cpp:70 msgid "Paste" -msgstr "" +msgstr "Pegar" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "Pega el contenido del portapapeles" #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "Se te redirigirс a la pсgina de ScummVM, y tendrсs" #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "que darle permiso para acceder a tu almacenamiento." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "Ya hay otro almacenamiento activo. ПQuieres interrumpirlo?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "" +msgstr "Espera a que el almacenamiento actual finalice y prueba otra vez." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "La casilla %s contiene un error." #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "Las casilllas %s contienen errores." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" -msgstr "" +msgstr "Todo correcto." #: gui/storagewizarddialog.cpp:201 msgid "Invalid code" -msgstr "" +msgstr "Cѓdigo invсlido" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"No se ha podido abrir la URL.\n" +"Accede a la pсgina manualmente." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -1574,19 +1579,22 @@ msgid "" "\n" "Would you like to enable this feature?" msgstr "" +"Ahora ScummVM puede buscar actualizaciones automсticamente,\n" +"para lo cual se requiere una conexiѓn a Internet.\n" +"\n" +"Would you like to enable this feature?" #: gui/updates-dialog.cpp:55 msgid "(You can always enable it in the options dialog on the Misc tab)" -msgstr "" +msgstr "(Puedes activar esta funciѓn en la pestaёa Otras del menњ de opciones)" #: gui/updates-dialog.cpp:92 -#, fuzzy msgid "Check for updates automatically" -msgstr "Buscar actualizaciones..." +msgstr "Buscar actualizaciones automсticamente" #: gui/updates-dialog.cpp:111 msgid "Proceed" -msgstr "" +msgstr "Aplicar" #: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376 msgid "Clear value" @@ -1717,20 +1725,19 @@ msgstr "Hercules сmbar" #: common/updates.cpp:58 msgid "Daily" -msgstr "" +msgstr "Diariamente" #: common/updates.cpp:60 msgid "Weekly" -msgstr "" +msgstr "Semanalmente" #: common/updates.cpp:62 msgid "Monthly" -msgstr "" +msgstr "Mensualmente" #: common/updates.cpp:64 -#, fuzzy msgid "<Bad value>" -msgstr "Eliminar valor" +msgstr "<Valor incorrecto>" #: engines/advancedDetector.cpp:334 #, c-format @@ -1784,7 +1791,8 @@ msgstr "~V~olver al lanzador" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1801,8 +1809,8 @@ msgstr "Guardar partida" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -1814,9 +1822,9 @@ msgid "" "the README for basic information, and for instructions on how to obtain " "further assistance." msgstr "" -"Lo sentimos, aњn no hay ayuda disponible para este juego. Por favor, " -"consulta el archivo README para encontrar informaciѓn bсsica e instrucciones " -"para obtener mсs ayuda." +"Lo sentimos, aњn no hay ayuda disponible para este juego. Consulta el " +"archivo README para encontrar informaciѓn bсsica e instrucciones para " +"obtener mсs ayuda." #: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393 #, c-format @@ -1824,9 +1832,9 @@ msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Ha habido un fallo al guardar la partida (%s). Por favor, consulta el " -"archivo README para encontrar informaciѓn bсsica e instrucciones sobre cѓmo " -"obtener mсs ayuda." +"Ha habido un fallo al guardar la partida (%s). Consulta el 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:100 #: engines/tsage/dialogs.cpp:112 @@ -1892,9 +1900,9 @@ msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Ha habido un fallo al cargar la partida (%s). Por favor, consulta el archivo " -"README para encontrar informaciѓn bсsica e instrucciones sobre cѓmo obtener " -"mсs ayuda." +"Ha habido un fallo al cargar la partida (%s). Consulta el archivo README " +"para encontrar informaciѓn bсsica e instrucciones sobre cѓmo obtener mсs " +"ayuda." #: engines/engine.cpp:546 msgid "" @@ -2012,19 +2020,20 @@ msgid "C64 Audio Emulator" msgstr "Emulador de C64 Audio" #: backends/cloud/storage.cpp:210 -#, fuzzy msgid "Saved games sync complete." -msgstr "ЁBњsqueda completada!" +msgstr "Se ha completado la sincronizaciѓn." #: backends/cloud/storage.cpp:221 msgid "Saved games sync was cancelled." -msgstr "" +msgstr "La sincronizaciѓn se ha cancelado." #: backends/cloud/storage.cpp:223 msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" +"La sincronizaciѓn ha fallado.\n" +"Comprueba tu conexiѓn." #: backends/cloud/storage.cpp:327 #, c-format @@ -2032,16 +2041,16 @@ msgid "" "Download complete.\n" "Failed to download %u files." msgstr "" +"Descarga completada.\n" +"No se han podido descargar %u archivos." #: backends/cloud/storage.cpp:329 -#, fuzzy msgid "Download complete." -msgstr "ЁBњsqueda completada!" +msgstr "Descarga completada." #: backends/cloud/storage.cpp:339 -#, fuzzy msgid "Download failed." -msgstr "Cargar partida" +msgstr "La descarga ha fallado." #: backends/events/default/default-events.cpp:196 msgid "Do you really want to return to the Launcher?" @@ -2144,11 +2153,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (sin filtros)" @@ -2163,19 +2172,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Activar la correcciѓn de aspecto" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Desactivar la correcciѓn de aspecto" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Filtro de grсficos activo:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Modo ventana" @@ -2702,22 +2711,20 @@ msgid "Check for Updates..." msgstr "Buscar actualizaciones..." #: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55 -#, fuzzy msgid "Color mode" -msgstr "Modo para daltѓnicos" +msgstr "Modo de color" #: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56 msgid "Use color graphics" -msgstr "" +msgstr "Usar grсficos en color" #: engines/adl/detection.cpp:65 msgid "Scanlines" -msgstr "" +msgstr "Lэnes horizontales" #: engines/adl/detection.cpp:66 -#, fuzzy msgid "Show scanlines" -msgstr "Mostrar etiquetas de objetos" +msgstr "Mostrar lэneas horizontales" #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48 @@ -2758,29 +2765,31 @@ msgstr "" "menњs." #: engines/agi/detection.cpp:177 -#, fuzzy msgid "Use Hercules hires font" -msgstr "Hercules verde" +msgstr "Usar fuentes Hercules de alta resoluciѓn" #: engines/agi/detection.cpp:178 msgid "Uses Hercules hires font, when font file is available." -msgstr "" +msgstr "Utiliza las fuentes Hercules de alta resoluciѓn, si estсn disponibles." #: engines/agi/detection.cpp:187 msgid "Pause when entering commands" -msgstr "" +msgstr "Pausar al escribir comandos" #: 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 "" +"Muestra una ventana de comandos y pausa el juego (como en los juegos SCI), " +"en vez de una ventana en tiempo real." #: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888 #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2790,7 +2799,8 @@ msgstr "Cargar partida:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3066,11 +3076,12 @@ msgstr "" #: engines/mohawk/detection.cpp:169 msgid "Play the Myst fly by movie" -msgstr "" +msgstr "Reproducir el vuelo de reconocimiento de Myst" #: engines/mohawk/detection.cpp:170 msgid "The Myst fly by movie was not played by the original engine." msgstr "" +"El vuelo de reconocimiento de Myst no se mostraba en el motor original." #. I18N: Option for fast scene switching #: engines/mohawk/dialogs.cpp:181 engines/mohawk/dialogs.cpp:267 @@ -3087,19 +3098,21 @@ msgid "~D~rop Page" msgstr "~T~irar pсgina" #: engines/mohawk/dialogs.cpp:188 -#, fuzzy msgid "Show ~M~ap" msgstr "~M~ostrar el mapa" #: engines/mohawk/dialogs.cpp:194 -#, fuzzy msgid "Main Men~u~" -msgstr "~M~enњ principal" +msgstr "Menњ ~p~rincipal" #: engines/mohawk/dialogs.cpp:268 msgid "~W~ater Effect Enabled" msgstr "Efecto ag~u~a activado" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Juego pausado. Pulsa cualquier tecla para continuar." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Saltar las escenas del salѓn de registros" @@ -3239,13 +3252,12 @@ msgid "Enable high resolution graphics/content" msgstr "Activar grсficos/contenido de alta resoluciѓn" #: engines/sci/detection.cpp:410 -#, fuzzy msgid "Enable black-lined video" -msgstr "Activar modo Roland GS" +msgstr "Activar lэneas negras en vэdeos" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" -msgstr "" +msgstr "Mostrar lэneas negras sobre los vэdeos para que parezcan mсs nэtidos" #: engines/sci/detection.cpp:420 msgid "Prefer digital sound effects" @@ -3296,13 +3308,12 @@ msgstr "" "Usar los cursores plateados alternativos, en vez de los dorados normales" #: engines/scumm/detection.cpp:1341 -#, fuzzy msgid "Show Object Line" msgstr "Mostrar etiquetas de objetos" #: engines/scumm/detection.cpp:1342 msgid "Show the names of objects at the bottom of the screen" -msgstr "" +msgstr "Mostrar los nombres de los objetos en la parte inferior de la pantalla" #: engines/scumm/dialogs.cpp:172 #, c-format @@ -4068,7 +4079,7 @@ msgid "" "Please download it from www.scummvm.org" msgstr "" "No se ha encontrado el archivo \"sky.cpt\"\n" -"Por favor, bсjalo de www.scummvm.org" +"Descсrgalo en www.scummvm.org" #: engines/sky/compact.cpp:141 msgid "" @@ -4076,7 +4087,7 @@ msgid "" "Please (re)download it from www.scummvm.org" msgstr "" "El archivo \"sky.cpt\" tiene un tamaёo incorrecto.\n" -"Por favor, vuelve a bajarlo de www.scummvm.org" +"Descсrgalo de nuevo en www.scummvm.org" #: engines/sky/detection.cpp:44 msgid "Floppy intro" @@ -4134,7 +4145,7 @@ msgid "" "Target new saved game already exists!\n" "Would you like to keep the old saved game (%s) or the new one (%s)?\n" msgstr "" -"ЁLa partida guardada ya existe!\n" +"La partida guardada ya existe.\n" "ПQuieres conservar la partida guardada antigua (%s) o la nueva (%s)?\n" #: engines/sword1/control.cpp:1235 @@ -4166,12 +4177,13 @@ msgstr "Muestra las etiquetas de los objetos al pasar el ratѓn" #: engines/sword25/detection.cpp:46 msgid "Use English speech" -msgstr "" +msgstr "Usar voces en inglщs" #: engines/sword25/detection.cpp:47 msgid "" "Use English speech instead of German for every language other than German" msgstr "" +"Usa las voces inglesas en vez de las alemanas para todos los otros idiomas." #: engines/teenagent/resources.cpp:96 msgid "" @@ -4186,7 +4198,7 @@ msgid "" "executable. Please decompress it" msgstr "" "El archivo teenagent.dat estс comprimido y este ejecutable no incluye zlib. " -"Por favor, descomprэmelo" +"Es necesario que lo descomprimas." #: engines/wintermute/detection.cpp:58 msgid "Show FPS-counter" @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\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" @@ -843,7 +843,7 @@ msgid "Special dithering modes supported by some games" msgstr "Joko batzuk onarturiko lausotze-modu bereziak" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Pantaila osoa" @@ -1780,7 +1780,8 @@ msgstr "It~z~uli abiarazlera" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1797,8 +1798,8 @@ msgstr "Gorde jokoa:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2137,11 +2138,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (Iragazi gabe)" @@ -2156,19 +2157,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normala" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Formatu-ratio zuzenketa gaituta" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Formatu-ratio zuzenketa desgaituta" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Filtro grafiko aktiboa:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Leiho modua" @@ -2773,7 +2774,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2783,7 +2785,8 @@ msgstr "Jokoa kargatu:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3093,6 +3096,11 @@ msgstr "Menu ~n~agusia" msgid "~W~ater Effect Enabled" msgstr "~U~r-efektua gaituta" +#: engines/mohawk/mohawk.cpp:61 +#, fuzzy +msgid "The game is paused. Press any key to continue." +msgstr "Joko pausatua. Sakatu ZURIUNEA jarraitzeko." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Saltatu Hall of Records-eko eszenak" diff --git a/po/fi_FI.po b/po/fi_FI.po index 67e18e7758..5621a5783c 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.6.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" "PO-Revision-Date: 2012-12-01 19:37+0200\n" "Last-Translator: Toni Saarela <saarela@gmail.com>\n" "Language-Team: Finnish\n" @@ -854,7 +854,7 @@ msgid "Special dithering modes supported by some games" msgstr "Erityiset dithering asetukset joita jotkut pelit tukevat" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Kokoruututila" @@ -1799,7 +1799,8 @@ msgstr "Palaa p~e~livalitsimeen" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1816,8 +1817,8 @@ msgstr "Tallenna peli:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2157,12 +2158,12 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 #, fuzzy msgid "OpenGL" msgstr "Avaa" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "" @@ -2177,19 +2178,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normaali (ei skaalausta)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Kuvasuhteen korjaus pффllф" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Kuvasuhteen korjaus pois pффltф" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Valittu grafiikkafiltteri:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Ikkunoitu tila" @@ -2794,7 +2795,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2804,7 +2806,8 @@ msgstr "Lataa pelitallenne:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3100,6 +3103,11 @@ msgstr "Pффvalikko" msgid "~W~ater Effect Enabled" msgstr "Vesiefekti pффllф" +#: engines/mohawk/mohawk.cpp:61 +#, fuzzy +msgid "The game is paused. Press any key to continue." +msgstr "Pause. Paina vфlilyіntiф jatkaaksesi." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "" diff --git a/po/fr_FR.po b/po/fr_FR.po index 9feea25629..4b45b4b667 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.8.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" "PO-Revision-Date: 2016-09-05 21:34+0100\n" "Last-Translator: Thierry Crozat <criezy@scummvm.org>\n" -"Language-Team: French <scummvm-devel@lists.sf.net>\n" +"Language-Team: French <scummvm-devel@lists.scummvm.org>\n" "Language: Francais\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" @@ -856,7 +856,7 @@ msgid "Special dithering modes supported by some games" msgstr "Mode spщcial de tramage supportщ par certains jeux" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Plein щcran" @@ -1802,7 +1802,8 @@ msgstr "Retour au ~L~anceur" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1819,8 +1820,8 @@ msgstr "Sauvegarde :" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2161,11 +2162,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (sans filtre)" @@ -2180,19 +2181,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Activer la correction du rapport d'aspect" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Dщsactiver la correction du rapport d'aspect" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Mode graphique actif:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Mode Fenъtre" @@ -2799,7 +2800,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2809,7 +2811,8 @@ msgstr "Charger le jeu :" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3118,6 +3121,10 @@ msgstr "~M~enu Principal" msgid "~W~ater Effect Enabled" msgstr "~E~ffets de l'Eau Activщs" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Jeu en pause. Appuyer sur une touche pour Reprendre." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Sauter les scшnes storyboard de la Salle des Archives" diff --git a/po/gl_ES.po b/po/gl_ES.po index 803a45d0e3..530b9d2680 100644 --- a/po/gl_ES.po +++ b/po/gl_ES.po @@ -6,9 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.8.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" -"PO-Revision-Date: 2016-02-21 00:43+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" +"PO-Revision-Date: 2016-10-09 13:57+0200\n" "Last-Translator: Santiago G. Sanz <s.sanz@uvigo.es>\n" "Language-Team: Santiago G. Sanz <s.sanz@uvigo.es>\n" "Language: Galego\n" @@ -76,9 +76,8 @@ msgid "Choose" msgstr "Elixir" #: gui/downloaddialog.cpp:48 -#, fuzzy msgid "Select directory where to download game data" -msgstr "Selecciona un directorio con datos de xogo" +msgstr "Selecciona un directorio para descargar os datos de xogo" #: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:472 gui/launcher.cpp:173 msgid "Select directory with game data" @@ -86,30 +85,32 @@ msgstr "Selecciona un directorio con datos de xogo" #: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263 msgid "From: " -msgstr "" +msgstr "De: " #: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264 msgid "To: " -msgstr "" +msgstr "Para: " #: gui/downloaddialog.cpp:63 msgid "Cancel download" -msgstr "" +msgstr "Cancelar descarga" #: gui/downloaddialog.cpp:65 msgctxt "lowres" msgid "Cancel download" -msgstr "" +msgstr "Cancelar descarga" #: gui/downloaddialog.cpp:67 msgid "Hide" -msgstr "" +msgstr "Ocultar" #: gui/downloaddialog.cpp:117 msgid "" "It looks like your connection is limited. Do you really want to download " "files with it?" msgstr "" +"Parece que a conexiѓn щ limitada. Seguro que queres descargar ficheiros con " +"ela?" #: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152 #: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217 @@ -144,6 +145,8 @@ msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" +"Non se pode crear un directorio para descargar. O directorio especificado " +"ten un ficheiro co mesmo nome." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:501 @@ -171,16 +174,18 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" +"\"%s\" xa existe no directorio especificado.\n" +"Seguro que queres descargar os ficheiros a ese directorio?" #: gui/downloaddialog.cpp:251 #, c-format msgid "Downloaded %s %s / %s %s" -msgstr "" +msgstr "Descargado: %s %s / %s %s" #: gui/downloaddialog.cpp:258 -#, fuzzy, c-format +#, c-format msgid "Download speed: %s %s" -msgstr "Anсlise finalizada!" +msgstr "Velocidade de descarga: %s %s" #: gui/editgamedialog.cpp:132 msgid "Game" @@ -407,6 +412,9 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"A caracterэstica de sincronizaciѓn de partidas gardadas non funciona con " +"directorios non predeterminados. Para sincronizar as partidas gardadas, " +"emprega o directorio predeterminado." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." @@ -694,7 +702,7 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" -msgstr "" +msgstr "Aэnda non se pode empregar este directorio. A descarga non rematou!" #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -842,7 +850,7 @@ msgid "Special dithering modes supported by some games" msgstr "Modos de interpolaciѓn de cores compatibles con algњns xogos" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Pantalla completa" @@ -1130,36 +1138,36 @@ msgstr "Idioma da interfaz de ScummVM" #: gui/options.cpp:1264 msgid "Update check:" -msgstr "" +msgstr "Comprobaciѓn de actualizaciѓns:" #: gui/options.cpp:1264 msgid "How often to check ScummVM updates" -msgstr "" +msgstr "Frecuencia de comprobaciѓn das actualizaciѓns de ScummVM" #: gui/options.cpp:1276 msgid "Check now" -msgstr "" +msgstr "Comprobar agora" #: gui/options.cpp:1284 msgid "Cloud" -msgstr "" +msgstr "Nube" #: gui/options.cpp:1286 msgctxt "lowres" msgid "Cloud" -msgstr "" +msgstr "Nube" #: gui/options.cpp:1297 msgid "Storage:" -msgstr "" +msgstr "Almacenamento:" #: gui/options.cpp:1297 msgid "Active cloud storage" -msgstr "" +msgstr "Almacenamento na nube activo" #: gui/options.cpp:1304 gui/options.cpp:1855 msgid "<none>" -msgstr "" +msgstr "<ningњn>" #: gui/options.cpp:1308 backends/platform/wii/options.cpp:114 msgid "Username:" @@ -1167,101 +1175,102 @@ msgstr "Nome de usuario:" #: gui/options.cpp:1308 msgid "Username used by this storage" -msgstr "" +msgstr "Nome de usuario empregado por este almacenamento" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "" +msgstr "Espazo empregado:" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" msgstr "" +"Espazo empregado polas partidas gardadas de ScummVM neste almacenamento." #: gui/options.cpp:1314 msgid "Last sync time:" -msgstr "" +msgstr "кltima sincronizaciѓn:" #: gui/options.cpp:1314 msgid "When the last saved games sync for this storage occured" msgstr "" +"O momento da њltima sincronizaciѓn das partidas gardadas neste almacenamento." #: gui/options.cpp:1317 gui/storagewizarddialog.cpp:71 msgid "Connect" -msgstr "" +msgstr "Conectar" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" msgstr "" +"Abre o diсlogo do asistente para conectar coa tњa conta de almacenamento na " +"nube." #: gui/options.cpp:1318 msgid "Refresh" -msgstr "" +msgstr "Actualizar" #: gui/options.cpp:1318 msgid "Refresh current cloud storage information (username and usage)" msgstr "" +"Actualiza a informaciѓn do almacenamento na nube actual (nome de usuario e " +"espazo empregado)." #: gui/options.cpp:1319 -#, fuzzy msgid "Download" -msgstr "Abaixo" +msgstr "Descargar" #: gui/options.cpp:1319 msgid "Open downloads manager dialog" -msgstr "" +msgstr "Abre o diсlogo do xestor de descargas." #: gui/options.cpp:1321 msgid "Run server" -msgstr "" +msgstr "Executar servidor" #: gui/options.cpp:1321 msgid "Run local webserver" -msgstr "" +msgstr "Executar servidor web local" #: gui/options.cpp:1322 gui/options.cpp:1965 -#, fuzzy msgid "Not running" -msgstr "Erro de execuciѓn do xogo:" +msgstr "Non se estс a executar" #: gui/options.cpp:1326 -#, fuzzy msgid "/root/ Path:" -msgstr "Camiёo adicional:" +msgstr "Camiёo de /root/:" #: gui/options.cpp:1326 gui/options.cpp:1328 gui/options.cpp:1329 -#, fuzzy msgid "Specifies which directory the Files Manager can access" -msgstr "Especifica o lugar dos ficheiros de gardado" +msgstr "Especifica o directorio de acceso do xestor de ficheiros." #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "Camiёo adicional:" +msgstr "Camiёo de /root/:" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "Servidor:" +msgstr "Porto do servidor:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"O porto empregado polo servidor.\n" +"Autorizaciѓn non dispoёible con portos non predeterminados." #: gui/options.cpp:1498 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:1521 -#, fuzzy msgid "Failed to change cloud storage!" -msgstr "Erro ao gardar a partida" +msgstr "Erro ao cambiar o almacenamento na nube!" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "Xa estс activo outro almacenamento na nube." #: gui/options.cpp:1562 msgid "The chosen directory cannot be written to. Please select another one." @@ -1280,9 +1289,8 @@ msgid "Select directory for plugins" msgstr "Seleccionar directorio para complementos" #: gui/options.cpp:1604 -#, fuzzy msgid "Select directory for Files Manager /root/" -msgstr "Seleccionar directorio para ficheiros adicionais" +msgstr "Seleccionar directorio para /root/ de xestor de ficheiros" #: gui/options.cpp:1666 msgid "" @@ -1295,31 +1303,31 @@ msgstr "" #: gui/options.cpp:1862 #, c-format msgid "%llu bytes" -msgstr "" +msgstr "%llu bytes" #: gui/options.cpp:1870 msgid "<right now>" -msgstr "" +msgstr "<agora mesmo>" #: gui/options.cpp:1872 -#, fuzzy msgid "<never>" -msgstr "Nunca" +msgstr "<nunca>" #: gui/options.cpp:1956 -#, fuzzy msgid "Stop server" -msgstr "Servidor:" +msgstr "Deter servidor" #: gui/options.cpp:1957 msgid "Stop local webserver" -msgstr "" +msgstr "Deter servidor web local" #: gui/options.cpp:2046 msgid "" "Request failed.\n" "Check your Internet connection." msgstr "" +"Erro ao solicitar.\n" +"Comproba a tњa conexiѓn с Internet." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1393,9 +1401,8 @@ msgid "Unknown Author" msgstr "Autor descoёecido" #: gui/remotebrowser.cpp:128 -#, fuzzy msgid "ScummVM could not access the directory!" -msgstr "ScummVM non foi quen de abrir o directorio!" +msgstr "ScummVM non foi quen de acceder ao directorio!" #: gui/saveload-dialog.cpp:334 msgid "List view" @@ -1465,72 +1472,73 @@ msgstr "Introduce unha descriciѓn para o espazo %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "Asistente de conexiѓn ao almacenamento de %s" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "Ir с seguinte URL:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "Obtщn o cѓdigo do almacenamento." #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "Escrэbeo neste campo e preme Conectar:" #: gui/storagewizarddialog.cpp:69 -#, fuzzy msgid "Open URL" -msgstr "OpenGL" +msgstr "Abrir URL" #: gui/storagewizarddialog.cpp:70 msgid "Paste" -msgstr "" +msgstr "Pegar" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "Pega o contido do portapapeis nos campos." #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "Irсs с pсxina de ScummVM para facilitar" #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "os permisos de acceso ao teu almacenamento." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "Hai outro almacenamento activo. Seguro que queres interrompelo?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "" +msgstr "Agarda a que finalice o almacenamento actual e tщntao de novo." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "O campo %s ten un erro." #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "Os campos %s teёen erros." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" -msgstr "" +msgstr "Todo correcto!" #: gui/storagewizarddialog.cpp:201 msgid "Invalid code" -msgstr "" +msgstr "Cѓdigo non vсlido" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"Erro ao abrir a URL!\n" +"Por favor, accede a esta pсxina manualmente." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -1568,19 +1576,22 @@ msgid "" "\n" "Would you like to enable this feature?" msgstr "" +"ScummVM agora ofrece a busca automсtica\n" +"de actualizaciѓns. Require acceso с Internet.\n" +"\n" +"Queres activar esta caracterэstica?" #: gui/updates-dialog.cpp:55 msgid "(You can always enable it in the options dialog on the Misc tab)" -msgstr "" +msgstr "(Podes actэvalo no diсlogo de opciѓn da pestana Misc.)" #: gui/updates-dialog.cpp:92 -#, fuzzy msgid "Check for updates automatically" -msgstr "Buscar actualizaciѓns..." +msgstr "Buscar actualizaciѓns automaticamente" #: gui/updates-dialog.cpp:111 msgid "Proceed" -msgstr "" +msgstr "Continuar" #: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376 msgid "Clear value" @@ -1711,20 +1722,19 @@ msgstr "Hercules сmbar" #: common/updates.cpp:58 msgid "Daily" -msgstr "" +msgstr "Diariamente" #: common/updates.cpp:60 msgid "Weekly" -msgstr "" +msgstr "Semanalmente" #: common/updates.cpp:62 msgid "Monthly" -msgstr "" +msgstr "Mensualmente" #: common/updates.cpp:64 -#, fuzzy msgid "<Bad value>" -msgstr "Limpar valor" +msgstr "<Valor errѓneo>" #: engines/advancedDetector.cpp:334 #, c-format @@ -1778,7 +1788,8 @@ msgstr "~V~olver ao Iniciador" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1795,8 +1806,8 @@ msgstr "Gardar partida:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2004,19 +2015,20 @@ msgid "C64 Audio Emulator" msgstr "Emulador de C64 Audio" #: backends/cloud/storage.cpp:210 -#, fuzzy msgid "Saved games sync complete." -msgstr "Anсlise finalizada!" +msgstr "Sincronizaciѓn de partidas gardadas completada." #: backends/cloud/storage.cpp:221 msgid "Saved games sync was cancelled." -msgstr "" +msgstr "Cancelouse a sincronizaciѓn de partidas gardadas." #: backends/cloud/storage.cpp:223 msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" +"Erro ao sincronizar as partidas gardadas.\n" +"Comproba a tњa conexiѓn с Internet." #: backends/cloud/storage.cpp:327 #, c-format @@ -2024,16 +2036,16 @@ msgid "" "Download complete.\n" "Failed to download %u files." msgstr "" +"Descarga completada.\n" +"Erro ao descargar %u ficheiros." #: backends/cloud/storage.cpp:329 -#, fuzzy msgid "Download complete." -msgstr "Anсlise finalizada!" +msgstr "Descarga completada." #: backends/cloud/storage.cpp:339 -#, fuzzy msgid "Download failed." -msgstr "Cargar ficheiro" +msgstr "Erro ao descargar." #: backends/events/default/default-events.cpp:196 msgid "Do you really want to return to the Launcher?" @@ -2136,11 +2148,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (Sen filtraxe)" @@ -2155,19 +2167,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (sen escala)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Correcciѓn de proporciѓn activada" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Correcciѓn de proporciѓn desactivada" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Filtro de grсficos activo:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Modo en ventс" @@ -2693,22 +2705,20 @@ msgid "Check for Updates..." msgstr "Buscar actualizaciѓns..." #: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55 -#, fuzzy msgid "Color mode" -msgstr "Modo accesible para daltonismo" +msgstr "Modo de cor" #: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56 msgid "Use color graphics" -msgstr "" +msgstr "Empregar grсficos en cor" #: engines/adl/detection.cpp:65 msgid "Scanlines" -msgstr "" +msgstr "Liёas de varrido" #: engines/adl/detection.cpp:66 -#, fuzzy msgid "Show scanlines" -msgstr "Mostrar etiquetas" +msgstr "Mostra liёas de varrido." #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48 @@ -2723,7 +2733,7 @@ msgstr "Empregar pantallas orixinais de gardado e carga" #: engines/toltecs/detection.cpp:201 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -"Empregar as pantallas orixinais de gardado e carga, no canto das de ScummVM" +"Emprega as pantallas orixinais de gardado e carga, no canto das de ScummVM." #: engines/agi/detection.cpp:157 msgid "Use an alternative palette" @@ -2734,8 +2744,8 @@ msgid "" "Use an alternative palette, common for all Amiga games. This was the old " "behavior" msgstr "" -"Empregar unha paleta alternativa, comњn para todos os xogos de Amiga (uso " -"antigo)" +"Emprega unha paleta alternativa, comњn para todos os xogos de Amiga (uso " +"antigo)." #: engines/agi/detection.cpp:167 msgid "Mouse support" @@ -2749,29 +2759,31 @@ msgstr "" "os menњs do xogo." #: engines/agi/detection.cpp:177 -#, fuzzy msgid "Use Hercules hires font" -msgstr "Hercules verde" +msgstr "Empregar fonte Hercules de alta resoluciѓn" #: engines/agi/detection.cpp:178 msgid "Uses Hercules hires font, when font file is available." -msgstr "" +msgstr "Emprega a fonte Hщrcules de alta resoluciѓn se estс dispoёible." #: engines/agi/detection.cpp:187 msgid "Pause when entering commands" -msgstr "" +msgstr "Pausar ao introducir comandos" #: 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 "" +"Mostra unha ventс de comandos e pausa o xogo (como en SCI), no canto de " +"facelo en tempo real." #: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888 #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2781,7 +2793,8 @@ msgstr "Restaurar xogo:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3058,11 +3071,11 @@ msgstr "" #: engines/mohawk/detection.cpp:169 msgid "Play the Myst fly by movie" -msgstr "" +msgstr "Reproducir o filme de imaxes aщreas de Myst" #: engines/mohawk/detection.cpp:170 msgid "The Myst fly by movie was not played by the original engine." -msgstr "" +msgstr "O filme de imaxes aщreas de Myst non se reproduciu co motor orixinal." #. I18N: Option for fast scene switching #: engines/mohawk/dialogs.cpp:181 engines/mohawk/dialogs.cpp:267 @@ -3079,19 +3092,21 @@ msgid "~D~rop Page" msgstr "~D~eixar folla" #: engines/mohawk/dialogs.cpp:188 -#, fuzzy msgid "Show ~M~ap" -msgstr "Mo~s~trar mapa" +msgstr "Mostrar ~m~apa" #: engines/mohawk/dialogs.cpp:194 -#, fuzzy msgid "Main Men~u~" -msgstr "~M~enњ principal" +msgstr "Menњ ~p~rincipal" #: engines/mohawk/dialogs.cpp:268 msgid "~W~ater Effect Enabled" msgstr "Efecto de ~a~uga activado" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Xogo en pausa. Pulsa calquera tecla para continuar." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Omitir as escenas do Salѓn dos rexistros" @@ -3229,13 +3244,12 @@ msgid "Enable high resolution graphics/content" msgstr "Activa os grсficos ou o contido de alta resoluciѓn." #: engines/sci/detection.cpp:410 -#, fuzzy msgid "Enable black-lined video" -msgstr "Activar modo Roland GS" +msgstr "Activar vэdeo con bordos" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" -msgstr "" +msgstr "Debuxa liёas negras sobre os vэdeos para aumentar a nitidez aparente." #: engines/sci/detection.cpp:420 msgid "Prefer digital sound effects" @@ -3288,13 +3302,12 @@ msgstr "" "normais." #: engines/scumm/detection.cpp:1341 -#, fuzzy msgid "Show Object Line" -msgstr "Mostrar etiquetas" +msgstr "Mostrar liёa de obsecto" #: engines/scumm/detection.cpp:1342 msgid "Show the names of objects at the bottom of the screen" -msgstr "" +msgstr "Mostra os nomes dos obxectos na parte inferior da pantalla" #: engines/scumm/dialogs.cpp:172 #, c-format @@ -4155,12 +4168,13 @@ msgstr "Mostra as etiquetas dos obxectos ao apuntar co rato." #: engines/sword25/detection.cpp:46 msgid "Use English speech" -msgstr "" +msgstr "Empregar voces en inglщs" #: engines/sword25/detection.cpp:47 msgid "" "Use English speech instead of German for every language other than German" msgstr "" +"Emprega as voces en inglщs no canto de alemсn para o resto dos idiomas." #: engines/teenagent/resources.cpp:96 msgid "" diff --git a/po/hu_HU.po b/po/hu_HU.po index ecbd835087..ff6d966a42 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -5,9 +5,9 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" -"PO-Revision-Date: 2016-09-06 06:22+0200\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" +"PO-Revision-Date: 2016-10-03 05:32+0200\n" "Last-Translator: George Kormendi <grubycza@hotmail.com>\n" "Language-Team: Hungarian\n" "Language: Magyar\n" @@ -849,7 +849,7 @@ 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:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Teljeskщpernyѕs mѓd:" @@ -1778,7 +1778,8 @@ msgstr "Visszatщrщs az indэtѓba" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1795,8 +1796,8 @@ msgstr "Jсtщk mentщse:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2134,11 +2135,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (Nincs szћrщs)" @@ -2153,19 +2154,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normсl (nincs сtmщretezщs)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Mщretarсny korrekciѓ engedщlyezve" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Mщretarсny korrekciѓ letiltva" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Aktэv grafikus szћrѕk:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Ablakos mѓd" @@ -2765,7 +2766,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2775,7 +2777,8 @@ msgstr "Jсtщkmenet visszaсllэtсsa:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3082,6 +3085,10 @@ msgstr "Fѕ Menќ ~u~" msgid "~W~ater Effect Enabled" msgstr "Vэzeffektus engedщlyezve" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "A jсtщk szќnetel. Nyomj egy gombot a folytatсshoz." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Hall of Records storyboard сtvezetѕk сtugrсsa" diff --git a/po/it_IT.po b/po/it_IT.po index f26002ef70..b2e8f2bc86 100644 --- a/po/it_IT.po +++ b/po/it_IT.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-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\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" @@ -849,7 +849,7 @@ msgid "Special dithering modes supported by some games" msgstr "Modalitр di resa grafica speciali supportate da alcuni giochi" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Modalitр a schermo intero" @@ -1791,7 +1791,8 @@ msgstr "~V~ai a elenco giochi" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1808,8 +1809,8 @@ msgstr "Salva gioco:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2154,11 +2155,11 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (senza filtri)" @@ -2173,19 +2174,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normale (no ridim.)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Correzione proporzioni attivata" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Correzione proporzioni disattivata" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Filtro grafico attivo:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Modalitр finestra" @@ -2789,7 +2790,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2799,7 +2801,8 @@ msgstr "Ripristina gioco:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3097,6 +3100,11 @@ msgstr "~M~enu principale" msgid "~W~ater Effect Enabled" msgstr "~E~ffetto acqua attivo" +#: engines/mohawk/mohawk.cpp:61 +#, fuzzy +msgid "The game is paused. Press any key to continue." +msgstr "Gioco in pausa. Premere SPAZIO per continuare." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Salta le scene della Hall of Records" diff --git a/po/module.mk b/po/module.mk index 8311b76a66..f8addcd2ad 100644 --- a/po/module.mk +++ b/po/module.mk @@ -8,7 +8,7 @@ updatepot: xgettext -f - -D $(srcdir) -d scummvm --c++ -k_ -k_s -k_c:1,2c -k_sc:1,2c --add-comments=I18N\ -kDECLARE_TRANSLATION_ADDITIONAL_CONTEXT:1,2c -o $(POTFILE) \ --copyright-holder="ScummVM Team" --package-name=ScummVM \ - --package-version=$(VERSION) --msgid-bugs-address=scummvm-devel@lists.sf.net -o $(POTFILE)_ + --package-version=$(VERSION) --msgid-bugs-address=scummvm-devel@lists.scummvm.org -o $(POTFILE)_ sed -e 's/SOME DESCRIPTIVE TITLE/LANGUAGE translation for ScummVM/' \ -e 's/UTF-8/CHARSET/' -e 's/PACKAGE/ScummVM/' $(POTFILE)_ > $(POTFILE).new diff --git a/po/nb_NO.po b/po/nb_NO.po index d01e3e8369..72976fb23e 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -6,9 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" -"PO-Revision-Date: 2016-02-25 23:42+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" +"PO-Revision-Date: 2016-10-05 23:47+0200\n" "Last-Translator: Einar Johan Trјan Sјmхen <einarjohants@gmail.com>\n" "Language-Team: somaen <einarjohants@gmail.com>\n" "Language: Norsk (bokmaal)\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: iso-8859-1\n" -"X-Generator: Poedit 1.8.7\n" +"X-Generator: Poedit 1.8.9\n" #: gui/about.cpp:94 #, c-format @@ -78,9 +78,8 @@ msgid "Choose" msgstr "Velg" #: gui/downloaddialog.cpp:48 -#, fuzzy msgid "Select directory where to download game data" -msgstr "Velg mappe med spilldata" +msgstr "Velg mappe for nedlasting av spilldata" #: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:472 gui/launcher.cpp:173 msgid "Select directory with game data" @@ -88,30 +87,32 @@ msgstr "Velg mappe med spilldata" #: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263 msgid "From: " -msgstr "" +msgstr "Fra: " #: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264 msgid "To: " -msgstr "" +msgstr "Til: " #: gui/downloaddialog.cpp:63 msgid "Cancel download" -msgstr "" +msgstr "Avbryt nedlasting" #: gui/downloaddialog.cpp:65 msgctxt "lowres" msgid "Cancel download" -msgstr "" +msgstr "Avbryt nedlasting" #: gui/downloaddialog.cpp:67 msgid "Hide" -msgstr "" +msgstr "Skjul" #: gui/downloaddialog.cpp:117 msgid "" "It looks like your connection is limited. Do you really want to download " "files with it?" msgstr "" +"Det ser ut til at tilkoblingen din er begrenset. Vil du virkelig laste ned " +"filer med den?" #: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152 #: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217 @@ -139,13 +140,15 @@ msgstr "Nei" #: gui/downloaddialog.cpp:136 gui/launcher.cpp:544 msgid "ScummVM couldn't open the specified directory!" -msgstr "ScummVM kunne ikke хpne den valgte mappen!" +msgstr "ScummVM kunne ikke хpne den valgte mappa!" #: gui/downloaddialog.cpp:146 msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" +"Kan ikke opprette mappe for nedlasting - den angitte mappa har ei fil med " +"samme navn." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:501 @@ -173,16 +176,18 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" +"\"%s finnes allerede i den angitte mappa.\n" +"Vil du virkelig laste ned filer til denne mappa?" #: gui/downloaddialog.cpp:251 #, c-format msgid "Downloaded %s %s / %s %s" -msgstr "" +msgstr "Lastet ned %s %s / %s %s" #: gui/downloaddialog.cpp:258 -#, fuzzy, c-format +#, c-format msgid "Download speed: %s %s" -msgstr "Sјk fullfјrt!" +msgstr "Nedlastingshastighet: %s %s" #: gui/editgamedialog.cpp:132 msgid "Game" @@ -411,6 +416,8 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"Syncing av lagrede spill fungerer ikke med ikke-standard mapper. Hvis du vil " +"at de lagrede spillene dine skal synce mх du bruke standardmapper." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." @@ -696,7 +703,7 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" -msgstr "" +msgstr "Denne mappa kan ikke brukes ennх, den blir lastet ned til!" #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -847,7 +854,7 @@ msgid "Special dithering modes supported by some games" msgstr "Spesiel dithering-modus stјttet av enkelte spill" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Fullskjermsmodus" @@ -1131,36 +1138,36 @@ msgstr "Sprхk i ScummVM-GUIet" #: gui/options.cpp:1264 msgid "Update check:" -msgstr "" +msgstr "Oppdateringssjekk:" #: gui/options.cpp:1264 msgid "How often to check ScummVM updates" -msgstr "" +msgstr "Hvor ofte det skal sjekkes for ScummVM-oppdateringer" #: gui/options.cpp:1276 msgid "Check now" -msgstr "" +msgstr "Sjekk nх" #: gui/options.cpp:1284 msgid "Cloud" -msgstr "" +msgstr "Sky" #: gui/options.cpp:1286 msgctxt "lowres" msgid "Cloud" -msgstr "" +msgstr "Sky" #: gui/options.cpp:1297 msgid "Storage:" -msgstr "" +msgstr "Lagring:" #: gui/options.cpp:1297 msgid "Active cloud storage" -msgstr "" +msgstr "Aktiv skylagring" #: gui/options.cpp:1304 gui/options.cpp:1855 msgid "<none>" -msgstr "" +msgstr "<ingen>" #: gui/options.cpp:1308 backends/platform/wii/options.cpp:114 msgid "Username:" @@ -1168,101 +1175,96 @@ msgstr "Brukernavn:" #: gui/options.cpp:1308 msgid "Username used by this storage" -msgstr "" +msgstr "Brukernavn for denne lagringsmхten" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "" +msgstr "Brukt plass:" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "" +msgstr "Plass brukt av ScummVM's lagrede spill pх denne lagringsmхten" #: gui/options.cpp:1314 msgid "Last sync time:" -msgstr "" +msgstr "Forrige synctidspunkt" #: gui/options.cpp:1314 msgid "When the last saved games sync for this storage occured" -msgstr "" +msgstr "Nхr forrige sync av lagrede spill til denne lagringsmхten skjedde." #: gui/options.cpp:1317 gui/storagewizarddialog.cpp:71 msgid "Connect" -msgstr "" +msgstr "Koble til" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" -msgstr "" +msgstr "Хpne veiviserdialog for х koble til skylagringen din" #: gui/options.cpp:1318 msgid "Refresh" -msgstr "" +msgstr "Oppfrisk" #: gui/options.cpp:1318 msgid "Refresh current cloud storage information (username and usage)" -msgstr "" +msgstr "Oppfrisk gjeldende skylagringsinformasjon (brukernavn og bruk)" #: gui/options.cpp:1319 -#, fuzzy msgid "Download" -msgstr "Ned" +msgstr "Last ned" #: gui/options.cpp:1319 msgid "Open downloads manager dialog" -msgstr "" +msgstr "Хpne nedlastingsbehandlerdialog" #: gui/options.cpp:1321 msgid "Run server" -msgstr "" +msgstr "Kjјr server" #: gui/options.cpp:1321 msgid "Run local webserver" -msgstr "" +msgstr "Kjјr lokal webserver" #: gui/options.cpp:1322 gui/options.cpp:1965 -#, fuzzy msgid "Not running" -msgstr "Problem ved kjјring av spill:" +msgstr "Kjјrer ikke" #: gui/options.cpp:1326 -#, fuzzy msgid "/root/ Path:" -msgstr "Ekstrasti:" +msgstr "/root/ Sti:" #: gui/options.cpp:1326 gui/options.cpp:1328 gui/options.cpp:1329 -#, fuzzy msgid "Specifies which directory the Files Manager can access" -msgstr "Bestemmer sti til lagrede spill" +msgstr "Angi mappe som filbehandleren skal ha tilgang til" #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "Ekstrasti:" +msgstr "/root/ Sti:" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "Server:" +msgstr "Serverport:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"Hvilken port som brukes av serveren\n" +"Autentisering med server stјttes ikke med ikke-standard port" #: gui/options.cpp:1498 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:1521 -#, fuzzy msgid "Failed to change cloud storage!" -msgstr "Klarte ikke х lagre spill." +msgstr "Klarte ikke х kontakte skylagring!" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "En annen skylagring er allerede aktiv" #: gui/options.cpp:1562 msgid "The chosen directory cannot be written to. Please select another one." @@ -1281,9 +1283,8 @@ msgid "Select directory for plugins" msgstr "Velg mappe for plugins" #: gui/options.cpp:1604 -#, fuzzy msgid "Select directory for Files Manager /root/" -msgstr "Velg mappe for ytterligere filer" +msgstr "Velg mappe for filbehandler /root/" #: gui/options.cpp:1666 msgid "" @@ -1296,31 +1297,31 @@ msgstr "" #: gui/options.cpp:1862 #, c-format msgid "%llu bytes" -msgstr "" +msgstr "%llu bytes" #: gui/options.cpp:1870 msgid "<right now>" -msgstr "" +msgstr "<med en gang>" #: gui/options.cpp:1872 -#, fuzzy msgid "<never>" -msgstr "Aldri" +msgstr "<aldri>" #: gui/options.cpp:1956 -#, fuzzy msgid "Stop server" -msgstr "Server:" +msgstr "Stopp server" #: gui/options.cpp:1957 msgid "Stop local webserver" -msgstr "" +msgstr "Stopp lokal webserver" #: gui/options.cpp:2046 msgid "" "Request failed.\n" "Check your Internet connection." msgstr "" +"Forespјrsel feilet.\n" +"Sjekk internettilkoblingen din." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1394,9 +1395,8 @@ msgid "Unknown Author" msgstr "Ukjent Forfatter" #: gui/remotebrowser.cpp:128 -#, fuzzy msgid "ScummVM could not access the directory!" -msgstr "ScummVM kunne ikke хpne den valgte mappen!" +msgstr "ScummVM kunne ikke хpne mappen!" #: gui/saveload-dialog.cpp:334 msgid "List view" @@ -1466,73 +1466,73 @@ msgstr "Gi en beskrivelse for posisjon %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "%s lagringstilkoblingsveiviser" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "Naviger til fјlgende URL:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "Skaff koden fra lagringsmхten, skriv den inn" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "i fјlgende felt og trykk 'Koble til'" #: gui/storagewizarddialog.cpp:69 -#, fuzzy msgid "Open URL" -msgstr "OpenGL" +msgstr "Хpne URL" #: gui/storagewizarddialog.cpp:70 msgid "Paste" -msgstr "" +msgstr "Lim inn" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "Lim utklippstavleinnhold til disse feltene" #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "Du vil omdirigeres til ScummVM's side hvor" #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "du fхr muligheten til х gi den tilgang til lagringsmхten din." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "En annen lagringsmхte er aktiv. Vil du avbryte den?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "" +msgstr "Vent til gjeldende lagringsmхte fullfјrer og prјv igjen." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "Felt %s har en feil" #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "Feltene %s har feil i dem." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" msgstr "" #: gui/storagewizarddialog.cpp:201 -#, fuzzy msgid "Invalid code" -msgstr "Ugyldig sti" +msgstr "Ugyldig kode" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"Klarte ikke хpne URL.\n" +"Vennligst naviger til denne siden manuelt." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -1570,19 +1570,22 @@ msgid "" "\n" "Would you like to enable this feature?" msgstr "" +"ScummVM stјtter nх automatisk sjekking for oppdateringer\n" +"noe som krever internettilgang.\n" +"\n" +"Vil du aktivere denne funksjonaliteten?" #: gui/updates-dialog.cpp:55 msgid "(You can always enable it in the options dialog on the Misc tab)" -msgstr "" +msgstr "(Du kan alltids aktivere dette i valgdialogen i Diverse-fanen)" #: gui/updates-dialog.cpp:92 -#, fuzzy msgid "Check for updates automatically" -msgstr "Sjekk for oppdateringer..." +msgstr "Sjekk for oppdateringer automatisk" #: gui/updates-dialog.cpp:111 msgid "Proceed" -msgstr "" +msgstr "Fortsett" #: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376 msgid "Clear value" @@ -1713,20 +1716,19 @@ msgstr "Hercules Oransje" #: common/updates.cpp:58 msgid "Daily" -msgstr "" +msgstr "Daglig" #: common/updates.cpp:60 msgid "Weekly" -msgstr "" +msgstr "Ukentlig" #: common/updates.cpp:62 msgid "Monthly" -msgstr "" +msgstr "Mхnedlig" #: common/updates.cpp:64 -#, fuzzy msgid "<Bad value>" -msgstr "Tјm verdi" +msgstr "<Ugyldig verdi>" #: engines/advancedDetector.cpp:334 #, c-format @@ -1781,7 +1783,8 @@ msgstr "~T~ilbake til oppstarter" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1798,8 +1801,8 @@ msgstr "Lagret spill:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2007,19 +2010,20 @@ msgid "C64 Audio Emulator" msgstr "C64 Lydemulator" #: backends/cloud/storage.cpp:210 -#, fuzzy msgid "Saved games sync complete." -msgstr "Sјk fullfјrt!" +msgstr "Sync av lagrede spill fullfјrt" #: backends/cloud/storage.cpp:221 msgid "Saved games sync was cancelled." -msgstr "" +msgstr "Syncing av lagrede spill avbrutt." #: backends/cloud/storage.cpp:223 msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" +"Sync av lagrede spill feilet.\n" +"Sjekk internettilkoblingen din." #: backends/cloud/storage.cpp:327 #, c-format @@ -2027,16 +2031,16 @@ msgid "" "Download complete.\n" "Failed to download %u files." msgstr "" +"Nedlasting fullfјrt.\n" +"Klarte ikke laste ned %u filer." #: backends/cloud/storage.cpp:329 -#, fuzzy msgid "Download complete." -msgstr "Sјk fullfјrt!" +msgstr "Nedlasting fullfјrt" #: backends/cloud/storage.cpp:339 -#, fuzzy msgid "Download failed." -msgstr "Last fil" +msgstr "Nedlasting feilet" #: backends/events/default/default-events.cpp:196 msgid "Do you really want to return to the Launcher?" @@ -2139,11 +2143,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (Ingen filtrering)" @@ -2158,19 +2162,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (ingen skalering)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Aspekt-rate korrigering aktivert" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Aspekt-rate korrigering deaktivert" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Aktivt grafikkfilter:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Vindusmodus" @@ -2697,22 +2701,20 @@ msgid "Check for Updates..." msgstr "Sjekk for oppdateringer..." #: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55 -#, fuzzy msgid "Color mode" -msgstr "Fargeblindmodus" +msgstr "Fargemodus" #: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56 msgid "Use color graphics" -msgstr "" +msgstr "Bruk fargegrafikk" #: engines/adl/detection.cpp:65 msgid "Scanlines" msgstr "" #: engines/adl/detection.cpp:66 -#, fuzzy msgid "Show scanlines" -msgstr "Vis objektmerkelapper" +msgstr "Vis scanlines" #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48 @@ -2751,9 +2753,8 @@ 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" +msgstr "Bruk Hercules hјyopplјst font" #: engines/agi/detection.cpp:178 msgid "Uses Hercules hires font, when font file is available." @@ -2773,7 +2774,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2783,7 +2785,8 @@ msgstr "Gjennopprett spill:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3079,7 +3082,6 @@ msgid "~D~rop Page" msgstr "~D~ropp Side" #: engines/mohawk/dialogs.cpp:188 -#, fuzzy msgid "Show ~M~ap" msgstr "Vi~s~ Kart" @@ -3092,6 +3094,10 @@ msgstr "Hoved~m~eny" msgid "~W~ater Effect Enabled" msgstr "~V~anneffekt aktivert" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Spillet er satt pх pause. Trykk en tast for х fortsette." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Hopp over Hall of Records storyboard scenene." @@ -3227,9 +3233,8 @@ msgid "Enable high resolution graphics/content" msgstr "Aktiver hјyopplјselig grafikk/innhold" #: engines/sci/detection.cpp:410 -#, fuzzy msgid "Enable black-lined video" -msgstr "Aktiver Roland GS-modus" +msgstr "Aktiver svartlinjet video" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" @@ -3283,9 +3288,8 @@ msgstr "" "Bruk det alternative settet med sјlvmuspekere, istedenfor de normale gylne." #: engines/scumm/detection.cpp:1341 -#, fuzzy msgid "Show Object Line" -msgstr "Vis objektmerkelapper" +msgstr "Vis objektlinje" #: engines/scumm/detection.cpp:1342 msgid "Show the names of objects at the bottom of the screen" @@ -4144,12 +4148,12 @@ msgstr "Vis merkelapper for objekter nхr musa stхr over dem" #: engines/sword25/detection.cpp:46 msgid "Use English speech" -msgstr "" +msgstr "Bruk engelsk tale" #: engines/sword25/detection.cpp:47 msgid "" "Use English speech instead of German for every language other than German" -msgstr "" +msgstr "Bruk engelsk tale istedenfor tysk for alle andre sprхk enn tysk." #: engines/teenagent/resources.cpp:96 msgid "" diff --git a/po/nl_NL.po b/po/nl_NL.po index 0568533c3a..8ee39fe4a6 100644 --- a/po/nl_NL.po +++ b/po/nl_NL.po @@ -6,16 +6,16 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.9.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" -"PO-Revision-Date: 2016-09-15 10:55+0200\n" -"Last-Translator: Ben Castricum <scummvm@bencastricum.nl>\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" +"PO-Revision-Date: 2016-10-09 21:57+0100\n" +"Last-Translator: Willem Jan Palenstijn <wjp@usecode.org>\n" "Language-Team: Ben Castricum <scummvm@bencastricum.nl>\n" "Language: Nederlands\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.9\n" +"X-Generator: Poedit 1.5.5\n" "X-Poedit-SourceCharset: iso-8859-1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -859,7 +859,7 @@ msgid "Special dithering modes supported by some games" msgstr "Speciale ditheringmodi die door sommige games ondersteund worden." #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Volledig-scherm modus" @@ -1791,7 +1791,8 @@ msgstr "S~t~artmenu" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1808,8 +1809,8 @@ msgstr "Spel opslaan:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2153,11 +2154,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (geen filters)" @@ -2172,19 +2173,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normaal (niet schalen)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Pixelverhoudingcorrectie ingeschakeld" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Pixelverhoudingcorrectie uitgeschakeld" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Actieve grafische filter:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Venstermodus" @@ -2791,7 +2792,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2801,7 +2803,8 @@ msgstr "Laad opgeslagen spel:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3109,6 +3112,10 @@ msgstr "~H~oofdmenu" msgid "~W~ater Effect Enabled" msgstr "~W~ater Effect Aangezet" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Spel is gepauzeerd. Druk op een toets om verder te gaan." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Sla de Hall of Records verhaallijnscenes over" diff --git a/po/nn_NO.po b/po/nn_NO.po index 188fd64fc6..4624f16e24 100644 --- a/po/nn_NO.po +++ b/po/nn_NO.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-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" "PO-Revision-Date: 2016-02-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" @@ -845,7 +845,7 @@ msgid "Special dithering modes supported by some games" msgstr "Spesielle dithering-modus som stјttast av nokre spel" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Fullskjermsmodus" @@ -1777,7 +1777,8 @@ msgstr "Tilbake til Oppsta~r~tar" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1794,8 +1795,8 @@ msgstr "Lagra spel:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2132,11 +2133,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (Ingen filtrering)" @@ -2151,19 +2152,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (ikkje skaler)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Aspekt-korrigering aktivert" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Aspekt-korrigering ikkje aktivert" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Aktivt grafikkfilter:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Vindusmodus" @@ -2761,7 +2762,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2771,7 +2773,8 @@ msgstr "Gjenopprett spel:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3054,6 +3057,11 @@ msgstr "Hoved~m~eny" msgid "~W~ater Effect Enabled" msgstr "~V~anneffekt aktivert" +#: engines/mohawk/mohawk.cpp:61 +#, fuzzy +msgid "The game is paused. Press any key to continue." +msgstr "Spelet er pausa. Trykk MELLOMROM for х fortsette." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "" diff --git a/po/pl_PL.po b/po/pl_PL.po index 23f0b0fecb..dbbc85f509 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" "PO-Revision-Date: 2016-02-20 23:43+0100\n" "Last-Translator: MichaГ ZiБbkowski <mziab@o2.pl>\n" "Language-Team: Grajpopolsku.pl <grajpopolsku@gmail.com>\n" @@ -844,7 +844,7 @@ msgid "Special dithering modes supported by some games" msgstr "Specjalne tryby ditheringu wspierane przez niektѓre gry" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "PeГny ekran" @@ -1780,7 +1780,8 @@ msgstr "~P~owrѓt do launchera" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1797,8 +1798,8 @@ msgstr "Zapis:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2134,11 +2135,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (bez filtrowania)" @@ -2153,19 +2154,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "ZwykГy (bez skalowania)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "WГБczono korekcjъ formatu obrazu" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "WyГБczono korekcjъ formatu obrazu" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Aktywny filtr graficzny:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Okno" @@ -2766,7 +2767,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2776,7 +2778,8 @@ msgstr "Wznѓw grъ:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3083,6 +3086,11 @@ msgstr "~M~enu gГѓwne" msgid "~W~ater Effect Enabled" msgstr "~E~fekty wody wГБczone" +#: engines/mohawk/mohawk.cpp:61 +#, fuzzy +msgid "The game is paused. Press any key to continue." +msgstr "Gra wstrzymana. NaciЖnij spacjъ, aby wznowiц." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Pomiё scenki storyboardowe w Hali Rekordѓw" diff --git a/po/pt_BR.po b/po/pt_BR.po index 1d47c2e185..d0fe5e4163 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.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-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\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" @@ -860,7 +860,7 @@ msgid "Special dithering modes supported by some games" msgstr "Modos especiais de dithering suportados por alguns jogos" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Modo Tela Cheia" @@ -1810,7 +1810,8 @@ msgstr "~V~oltar ao menu" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1827,8 +1828,8 @@ msgstr "Salvar jogo:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2174,12 +2175,12 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 #, fuzzy msgid "OpenGL" msgstr "Abrir" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "" @@ -2194,19 +2195,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (sem escala)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Correчуo de proporчуo habilitada" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Correчуo de proporчуo desabilitada" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Ativa os filtros grсficos" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Modo janela" @@ -2807,7 +2808,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2817,7 +2819,8 @@ msgstr "Restaurar jogo:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3132,6 +3135,11 @@ msgstr "~M~enu Principal ScummVM" msgid "~W~ater Effect Enabled" msgstr "Modo ~E~feitos de сgua ativado" +#: engines/mohawk/mohawk.cpp:61 +#, fuzzy +msgid "The game is paused. Press any key to continue." +msgstr "Jogo pausado. Pressione ESPAЧO para continuar." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "" diff --git a/po/ru_RU.po b/po/ru_RU.po index 677421e3de..0a1bb7d0f1 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -6,9 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.8.0svn\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" -"PO-Revision-Date: 2016-05-22 17:04+0300\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" +"PO-Revision-Date: 2016-10-07 19:14+0300\n" "Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n" "Language-Team: Russian\n" "Language: Russian\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Poedit 1.8.7\n" +"X-Generator: Poedit 1.8.9\n" #: gui/about.cpp:94 #, c-format @@ -78,9 +78,8 @@ msgid "Choose" msgstr "Выбрать" #: gui/downloaddialog.cpp:48 -#, fuzzy msgid "Select directory where to download game data" -msgstr "Выберите директорию с файлами игры" +msgstr "Выберите директорию для скачивания данных игры" #: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:472 gui/launcher.cpp:173 msgid "Select directory with game data" @@ -88,30 +87,32 @@ msgstr "Выберите директорию с файлами игры" #: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263 msgid "From: " -msgstr "" +msgstr "От: " #: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264 msgid "To: " -msgstr "" +msgstr "К: " #: gui/downloaddialog.cpp:63 msgid "Cancel download" -msgstr "" +msgstr "Прервать загрузку" #: gui/downloaddialog.cpp:65 msgctxt "lowres" msgid "Cancel download" -msgstr "" +msgstr "Прервать" #: gui/downloaddialog.cpp:67 msgid "Hide" -msgstr "" +msgstr "Спрятать" #: gui/downloaddialog.cpp:117 msgid "" "It looks like your connection is limited. Do you really want to download " "files with it?" msgstr "" +"Похоже, что ваше соединение ограничено. Вы действительно хотите загрузить " +"файлы?" #: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152 #: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217 @@ -146,6 +147,8 @@ msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" +"Не удалось создать директорию для загрузки, так как указанная директория уже " +"содержит файл с таким же именем." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:501 @@ -173,16 +176,18 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" +"\"%s\" уже существует в указанной директории.\n" +"Вы действительно хотите загрузить файлы в эту директорию?" #: gui/downloaddialog.cpp:251 #, c-format msgid "Downloaded %s %s / %s %s" -msgstr "" +msgstr "Загружено %s %s / %s %s" #: gui/downloaddialog.cpp:258 -#, fuzzy, c-format +#, c-format msgid "Download speed: %s %s" -msgstr "Поиск закончен!" +msgstr "Скорость загрузки: %s %s" #: gui/editgamedialog.cpp:132 msgid "Game" @@ -410,6 +415,9 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"Синхронизация сохранений игр не работает с директориями не по умолчанию. " +"Если вы хотите, чтобы ваши сохранения игр синхронизировались, используйте " +"директорию по умолчанию." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." @@ -697,6 +705,8 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" msgstr "" +"Эта директория пока не может быть использована. В неё сейчас загружаются " +"данные!" #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -844,7 +854,7 @@ msgid "Special dithering modes supported by some games" msgstr "Специальные режимы рендеринга, поддерживаемые некоторыми играми" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Полноэкранный режим" @@ -1147,24 +1157,24 @@ msgstr "Проверить сейчас" #: gui/options.cpp:1284 msgid "Cloud" -msgstr "" +msgstr "Облако" #: gui/options.cpp:1286 msgctxt "lowres" msgid "Cloud" -msgstr "" +msgstr "Облако" #: gui/options.cpp:1297 msgid "Storage:" -msgstr "" +msgstr "Облако:" #: gui/options.cpp:1297 msgid "Active cloud storage" -msgstr "" +msgstr "Активное облачное хранилище" #: gui/options.cpp:1304 gui/options.cpp:1855 msgid "<none>" -msgstr "" +msgstr "<нет>" #: gui/options.cpp:1308 backends/platform/wii/options.cpp:114 msgid "Username:" @@ -1172,101 +1182,96 @@ msgstr "Пользователь:" #: gui/options.cpp:1308 msgid "Username used by this storage" -msgstr "" +msgstr "Имя пользователя в этом облаке" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "" +msgstr "Используемый объём" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "" +msgstr "Объём, занимаемый сохранениями игр ScummVM на этом облаке" #: gui/options.cpp:1314 msgid "Last sync time:" -msgstr "" +msgstr "Последняя синхронизация:" #: gui/options.cpp:1314 msgid "When the last saved games sync for this storage occured" -msgstr "" +msgstr "Когда производилась последняя синхронизация с этим облаком" #: gui/options.cpp:1317 gui/storagewizarddialog.cpp:71 msgid "Connect" -msgstr "" +msgstr "Подключить" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" -msgstr "" +msgstr "Открывает диалог для установки подключения к облаку" #: gui/options.cpp:1318 msgid "Refresh" -msgstr "" +msgstr "Обновить" #: gui/options.cpp:1318 msgid "Refresh current cloud storage information (username and usage)" -msgstr "" +msgstr "Обновляет текущую информацию об облаке (имя пользователя и объём)" #: gui/options.cpp:1319 -#, fuzzy msgid "Download" -msgstr "Вниз" +msgstr "Загрузить" #: gui/options.cpp:1319 msgid "Open downloads manager dialog" -msgstr "" +msgstr "Открывает менеджер загрузок" #: gui/options.cpp:1321 msgid "Run server" -msgstr "" +msgstr "Запустить сервер" #: gui/options.cpp:1321 msgid "Run local webserver" -msgstr "" +msgstr "Запускает локальный веб-сервер" #: gui/options.cpp:1322 gui/options.cpp:1965 -#, fuzzy msgid "Not running" -msgstr "Ошибка запуска игры:" +msgstr "Не запущен" #: gui/options.cpp:1326 -#, fuzzy msgid "/root/ Path:" -msgstr "Доп. путь:" +msgstr "Корневая директория:" #: gui/options.cpp:1326 gui/options.cpp:1328 gui/options.cpp:1329 -#, fuzzy msgid "Specifies which directory the Files Manager can access" -msgstr "Указывает путь к сохранениям игры" +msgstr "Указывает путь к директории, куда будет иметь доступ Менеджер файлов" #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "Доп. путь:" +msgstr "Корень:" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "Сервер:" +msgstr "Порт сервера:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"Номер порта, используемый сервером\n" +"Установление доступа работает только с портом по умолчанию" #: gui/options.cpp:1498 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Вы должны перезапустить ScummVM, чтобы применить изменения." #: gui/options.cpp:1521 -#, fuzzy msgid "Failed to change cloud storage!" -msgstr "Не удалось сохранить игру" +msgstr "Не удалось сменить облако!" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "Уже активно другое облачное хранилище." #: gui/options.cpp:1562 msgid "The chosen directory cannot be written to. Please select another one." @@ -1285,9 +1290,8 @@ msgid "Select directory for plugins" msgstr "Выберите директорию с плагинами" #: gui/options.cpp:1604 -#, fuzzy msgid "Select directory for Files Manager /root/" -msgstr "Выберите директорию с дополнительными файлами" +msgstr "Выберите директорию для корня в Менеджере файлов" #: gui/options.cpp:1666 msgid "" @@ -1300,31 +1304,31 @@ msgstr "" #: gui/options.cpp:1862 #, c-format msgid "%llu bytes" -msgstr "" +msgstr "%llu байт" #: gui/options.cpp:1870 msgid "<right now>" -msgstr "" +msgstr "<сейчас>" #: gui/options.cpp:1872 -#, fuzzy msgid "<never>" -msgstr "Никогда" +msgstr "<никогда>" #: gui/options.cpp:1956 -#, fuzzy msgid "Stop server" -msgstr "Сервер:" +msgstr "Остановить сервер" #: gui/options.cpp:1957 msgid "Stop local webserver" -msgstr "" +msgstr "Останавливает локальный веб-сервер" #: gui/options.cpp:2046 msgid "" "Request failed.\n" "Check your Internet connection." msgstr "" +"Ошибка запроса.\n" +"Проверьте ваше Интернет-соединение." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1398,9 +1402,8 @@ msgid "Unknown Author" msgstr "Неизвестный автор" #: gui/remotebrowser.cpp:128 -#, fuzzy msgid "ScummVM could not access the directory!" -msgstr "ScummVM не может открыть указанную директорию!" +msgstr "ScummVM не имеет доступа к указанной директории!" #: gui/saveload-dialog.cpp:334 msgid "List view" @@ -1470,72 +1473,73 @@ msgstr "Введите описание слота %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "Диалог подключения к облаку %s" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "Перейдите по следующему URL:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "Получите код от облака, а затем введите его" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "в поля, расположенные ниже, и нажмите 'Подключить':" #: gui/storagewizarddialog.cpp:69 -#, fuzzy msgid "Open URL" -msgstr "OpenGL" +msgstr "Открыть URL" #: gui/storagewizarddialog.cpp:70 msgid "Paste" -msgstr "" +msgstr "Вставить" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "Вставляет содержимое буфера обмена в поля" #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "Сейчас вы будете перенаправлены на страницу ScummVM," #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "где вам нужно будет разрешить доступ к вашему облаку." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "Другое облако уже активно. Вы хотите прервать процесс?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "" +msgstr "Подождите, пока текущее облако завершит работу, и попробуйте снова." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "Поле %s содержит ошибку." #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "Поля %s содержат ошибки." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" -msgstr "" +msgstr "Всё OK!" #: gui/storagewizarddialog.cpp:201 msgid "Invalid code" -msgstr "" +msgstr "Код неверен" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"Не удалось открыть URL!\n" +"Пожалуйста, перейдите вручную по указанному URL." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -1786,7 +1790,8 @@ msgstr "~В~ главное меню" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1803,8 +1808,8 @@ msgstr "Сохранить игру:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2015,19 +2020,20 @@ msgid "C64 Audio Emulator" msgstr "Эмулятор звука C64" #: backends/cloud/storage.cpp:210 -#, fuzzy msgid "Saved games sync complete." -msgstr "Поиск закончен!" +msgstr "Синхронизация сохранений игр завершена." #: backends/cloud/storage.cpp:221 msgid "Saved games sync was cancelled." -msgstr "" +msgstr "Синхронизация сохранений игр была прервана." #: backends/cloud/storage.cpp:223 msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" +"Ошибка синхронизации сохранений игр.\n" +"Проверьте ваше соединение с Интернетом." #: backends/cloud/storage.cpp:327 #, c-format @@ -2035,16 +2041,16 @@ msgid "" "Download complete.\n" "Failed to download %u files." msgstr "" +"Загрузка завершена.\n" +"Не удалось загрузить %u файлов." #: backends/cloud/storage.cpp:329 -#, fuzzy msgid "Download complete." -msgstr "Поиск закончен!" +msgstr "Загрузка завершена." #: backends/cloud/storage.cpp:339 -#, fuzzy msgid "Download failed." -msgstr "Загрузить файл" +msgstr "Ошибка загрузки." #: backends/events/default/default-events.cpp:196 msgid "Do you really want to return to the Launcher?" @@ -2147,11 +2153,11 @@ msgstr "Режим автодрэга сейчас" msgid "Swipe three fingers to the right to toggle." msgstr "Проведите тремя пальцами направо для переключения." -#: backends/graphics/opengl/opengl-graphics.cpp:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (без фильтров)" @@ -2166,19 +2172,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Без увеличения" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Коррекция соотношения сторон включена" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Коррекция соотношения сторон выключена" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Активный графический фильтр:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Оконный режим" @@ -2702,22 +2708,20 @@ msgid "Check for Updates..." msgstr "Проверить обновления..." #: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55 -#, fuzzy msgid "Color mode" -msgstr "Режим без цвета" +msgstr "Режим цвета" #: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56 msgid "Use color graphics" -msgstr "" +msgstr "Использовать цветную графику" #: engines/adl/detection.cpp:65 msgid "Scanlines" -msgstr "" +msgstr "Скан-линии" #: engines/adl/detection.cpp:66 -#, fuzzy msgid "Show scanlines" -msgstr "Показывать строку объектов" +msgstr "Показывать скан-линии" #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48 @@ -2783,7 +2787,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2793,7 +2798,8 @@ msgstr "Восстановить игру:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3102,6 +3108,10 @@ msgstr "Главное мен~ю~" msgid "~W~ater Effect Enabled" msgstr "~Э~ффекты воды включены" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Игра остановлена. Нажмите любую кнопку, чтобы продолжить." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Пропустить сцены из Галереи Истории" @@ -3240,11 +3250,12 @@ msgstr "Включить графику и контент высокого рарешения" #: engines/sci/detection.cpp:410 msgid "Enable black-lined video" -msgstr "" +msgstr "Включить видео с линиями" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" msgstr "" +"Рисует чёрные линии поверх видео, увеличивая таким образом видимую чёткость" #: engines/sci/detection.cpp:420 msgid "Prefer digital sound effects" @@ -4233,7 +4244,3 @@ msgid "Use MPEG video from the DVD version, instead of lower resolution AVI" msgstr "" "Использовать MPEG-видео из DVD-версии вместо видео низкого разрешения в " "формате AVI" - -#, fuzzy -#~ msgid "Specifies where Files Manager can access to" -#~ msgstr "Указывает путь к сохранениям игры" diff --git a/po/scummvm.pot b/po/scummvm.pot index a13879d726..257ffd61b9 100644 --- a/po/scummvm.pot +++ b/po/scummvm.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ScummVM 1.9.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" +"Project-Id-Version: ScummVM 1.10.0git\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -834,7 +834,7 @@ msgid "Special dithering modes supported by some games" msgstr "" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "" @@ -1744,7 +1744,8 @@ msgstr "" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1761,8 +1762,8 @@ msgstr "" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2071,11 +2072,11 @@ msgstr "" msgid "Swipe three fingers to the right to toggle." msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "" @@ -2090,19 +2091,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "" @@ -2694,7 +2695,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2704,7 +2706,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -2978,6 +2981,10 @@ msgstr "" msgid "~W~ater Effect Enabled" msgstr "" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "" + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "" diff --git a/po/sv_SE.po b/po/sv_SE.po index d2be275a62..cd47d75622 100644 --- a/po/sv_SE.po +++ b/po/sv_SE.po @@ -6,9 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0svn\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" -"PO-Revision-Date: 2016-02-25 23:06+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" +"PO-Revision-Date: 2016-10-06 19:01+0200\n" "Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n" "Language-Team: \n" "Language: Svenska\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: iso-8859-1\n" -"X-Generator: Poedit 1.8.7\n" +"X-Generator: Poedit 1.8.9\n" #: gui/about.cpp:94 #, c-format @@ -78,9 +78,8 @@ msgid "Choose" msgstr "Vфlj" #: gui/downloaddialog.cpp:48 -#, fuzzy msgid "Select directory where to download game data" -msgstr "Vфlj katalog med speldata" +msgstr "Vфlj katalogen dфr du vill ladda ner speldata" #: gui/downloaddialog.cpp:49 gui/editgamedialog.cpp:472 gui/launcher.cpp:173 msgid "Select directory with game data" @@ -88,30 +87,32 @@ msgstr "Vфlj katalog med speldata" #: gui/downloaddialog.cpp:51 gui/downloaddialog.cpp:263 msgid "From: " -msgstr "" +msgstr "Frхn:" #: gui/downloaddialog.cpp:52 gui/downloaddialog.cpp:264 msgid "To: " -msgstr "" +msgstr "Till:" #: gui/downloaddialog.cpp:63 msgid "Cancel download" -msgstr "" +msgstr "Avbryt nedladdning" #: gui/downloaddialog.cpp:65 msgctxt "lowres" msgid "Cancel download" -msgstr "" +msgstr "Avbryt nedladdning " #: gui/downloaddialog.cpp:67 msgid "Hide" -msgstr "" +msgstr "Gіm" #: gui/downloaddialog.cpp:117 msgid "" "It looks like your connection is limited. Do you really want to download " "files with it?" msgstr "" +"Det verkar som att din anslutning фr begrфnsad. Vill du verkligen anvфnda " +"den fіr att ladda ner filer?" #: gui/downloaddialog.cpp:118 gui/downloaddialog.cpp:152 #: gui/filebrowser-dialog.cpp:132 gui/fluidsynth-dialog.cpp:217 @@ -146,6 +147,8 @@ msgid "" "Cannot create a directory to download - the specified directory has a file " "with the same name." msgstr "" +"Kan inte skapa katalog fіr nedladdning - den angivna katalogen innehхller en " +"fil med samma namn." #: gui/downloaddialog.cpp:146 gui/editgamedialog.cpp:293 #: gui/fluidsynth-dialog.cpp:153 gui/KeysDialog.cpp:42 gui/launcher.cpp:501 @@ -173,16 +176,18 @@ msgid "" "The \"%s\" already exists in the specified directory.\n" "Do you really want to download files into that directory?" msgstr "" +"\"%s\" existerar redan i den angivna katalogen. Vill du verkligen ladda ner " +"filer i den katalogen?" #: gui/downloaddialog.cpp:251 #, c-format msgid "Downloaded %s %s / %s %s" -msgstr "" +msgstr "Laddar ner %s %s / %s %s" #: gui/downloaddialog.cpp:258 -#, fuzzy, c-format +#, c-format msgid "Download speed: %s %s" -msgstr "Scanning fфrdig!" +msgstr "Nedladdningshastighet: %s %s" #: gui/editgamedialog.cpp:132 msgid "Game" @@ -411,6 +416,8 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"Synkfunktionen fіr sparade data fungerar endast med standardkataloger. Om du " +"vill synka dina sparade data mхste du anvфnda standardkatalogen." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." @@ -699,6 +706,7 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" msgstr "" +"Den hфr katalogen kan inte anvфndas фn, eftersom nхgot laddas ner i den!" #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -847,7 +855,7 @@ msgid "Special dithering modes supported by some games" msgstr "Speciella gitterlфgen stіdda av vissa spel" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Fullskфrmslфge" @@ -1133,36 +1141,36 @@ msgstr "Sprхk fіr ScummVM:s anvфndargrфnssnitt" #: gui/options.cpp:1264 msgid "Update check:" -msgstr "" +msgstr "Uppdateringskoll:" #: gui/options.cpp:1264 msgid "How often to check ScummVM updates" -msgstr "" +msgstr "Hur ofta ScummVM kollar efter uppdateringar" #: gui/options.cpp:1276 msgid "Check now" -msgstr "" +msgstr "Kolla nu" #: gui/options.cpp:1284 msgid "Cloud" -msgstr "" +msgstr "Moln" #: gui/options.cpp:1286 msgctxt "lowres" msgid "Cloud" -msgstr "" +msgstr "Moln" #: gui/options.cpp:1297 msgid "Storage:" -msgstr "" +msgstr "Lager:" #: gui/options.cpp:1297 msgid "Active cloud storage" -msgstr "" +msgstr "Aktivera molnlagring" #: gui/options.cpp:1304 gui/options.cpp:1855 msgid "<none>" -msgstr "" +msgstr "<ingen>" #: gui/options.cpp:1308 backends/platform/wii/options.cpp:114 msgid "Username:" @@ -1170,101 +1178,97 @@ msgstr "Anv. namn:" #: gui/options.cpp:1308 msgid "Username used by this storage" -msgstr "" +msgstr "Anvфndarnamn som anvфnds av detta lager" #: gui/options.cpp:1311 msgid "Used space:" -msgstr "" +msgstr "Utnyttjat utrymme:" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "" +msgstr "Utrymme som anvфnds av ScummVM:s sparade data pх det hфr lagret" #: gui/options.cpp:1314 msgid "Last sync time:" -msgstr "" +msgstr "Senast synkad:" #: gui/options.cpp:1314 msgid "When the last saved games sync for this storage occured" -msgstr "" +msgstr "Nфr sparade data synkades senast fіr det hфr lagret" #: gui/options.cpp:1317 gui/storagewizarddialog.cpp:71 msgid "Connect" -msgstr "" +msgstr "Anslut" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" -msgstr "" +msgstr "жppna anslutningsguiden fіr att ansluta ditt molnlagerkonto" #: gui/options.cpp:1318 msgid "Refresh" -msgstr "" +msgstr "Uppdatera" #: gui/options.cpp:1318 msgid "Refresh current cloud storage information (username and usage)" msgstr "" +"Uppdaterar informationen om aktuellt molnlager (anvфndarnamn och anvфndning)" #: gui/options.cpp:1319 -#, fuzzy msgid "Download" -msgstr "Ned" +msgstr "Nedladdning" #: gui/options.cpp:1319 msgid "Open downloads manager dialog" -msgstr "" +msgstr "жppna fіnstret fіr nedladdningshantering" #: gui/options.cpp:1321 msgid "Run server" -msgstr "" +msgstr "Starta server" #: gui/options.cpp:1321 msgid "Run local webserver" -msgstr "" +msgstr "Starta lokal webbserver" #: gui/options.cpp:1322 gui/options.cpp:1965 -#, fuzzy msgid "Not running" -msgstr "Fel under kіrning av spel:" +msgstr "Ej aktiv" #: gui/options.cpp:1326 -#, fuzzy msgid "/root/ Path:" -msgstr "Sіkv. extra:" +msgstr "/root/-sіkvфg:" #: gui/options.cpp:1326 gui/options.cpp:1328 gui/options.cpp:1329 -#, fuzzy msgid "Specifies which directory the Files Manager can access" -msgstr "Bestфmmer var dina spardata lagras" +msgstr "Bestфmmer vilken katalog filhanteraren har хtkomst till" #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "Sіkv. extra:" +msgstr "/root/-sіkvфg:" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "Server:" +msgstr "Serverport:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"Vilken port anvфnds av servern\n" +"Serverautorisering фr endast tillgфnglig med standardporten" #: gui/options.cpp:1498 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Du mхste starta om ScummVM fіr att фndringarna ska fх effekt." #: gui/options.cpp:1521 -#, fuzzy msgid "Failed to change cloud storage!" -msgstr "Kunde inte spara spelet." +msgstr "Kunde inte фndra molnlager!" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "Ett annat molnlager фr redan aktivt." #: gui/options.cpp:1562 msgid "The chosen directory cannot be written to. Please select another one." @@ -1284,9 +1288,8 @@ msgid "Select directory for plugins" msgstr "Vфlj katalog fіr tillфgg" #: gui/options.cpp:1604 -#, fuzzy msgid "Select directory for Files Manager /root/" -msgstr "Vфlj katalog fіr extra filer" +msgstr "Vфlj katalog fіr filhanterarens /root/" #: gui/options.cpp:1666 msgid "" @@ -1299,31 +1302,31 @@ msgstr "" #: gui/options.cpp:1862 #, c-format msgid "%llu bytes" -msgstr "" +msgstr "%llu bytes" #: gui/options.cpp:1870 msgid "<right now>" -msgstr "" +msgstr "<nu direkt>" #: gui/options.cpp:1872 -#, fuzzy msgid "<never>" -msgstr "Aldrig" +msgstr "<aldrig>" #: gui/options.cpp:1956 -#, fuzzy msgid "Stop server" -msgstr "Server:" +msgstr "Stoppa server" #: gui/options.cpp:1957 msgid "Stop local webserver" -msgstr "" +msgstr "Stoppa lokal webbserver" #: gui/options.cpp:2046 msgid "" "Request failed.\n" "Check your Internet connection." msgstr "" +"Fіrsіket misslyckades.\n" +"Kontrollera din internetanslutning." #. I18N: You must leave "#" as is, only word 'next' is translatable #: gui/predictivedialog.cpp:86 @@ -1397,9 +1400,8 @@ msgid "Unknown Author" msgstr "Okфnd skapare" #: gui/remotebrowser.cpp:128 -#, fuzzy msgid "ScummVM could not access the directory!" -msgstr "ScummVM kunde inte іppna den valda katalogen!" +msgstr "ScummVM kunde inte іppna katalogen!" #: gui/saveload-dialog.cpp:334 msgid "List view" @@ -1469,73 +1471,73 @@ msgstr "Ange en beskrivning fіr position %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "%s lageranslutningsguide" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "Navigera till fіljande webbadress:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "Hфmta koden frхn lagret, ange den" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "i fіljande fфlt och tryck pх \"Anslut\":" #: gui/storagewizarddialog.cpp:69 -#, fuzzy msgid "Open URL" -msgstr "OpenGL" +msgstr "жppna adress" #: gui/storagewizarddialog.cpp:70 msgid "Paste" -msgstr "" +msgstr "Klistra in" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "Klistrar in innehхllet frхn urklipp i fфlten" #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "Du kommer att fіras till ScummVM:s sida" #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "dфr du borde kunna komma хt ditt lager." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "Ett annat lager фr aktivt. Vill du avbryta det?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "" +msgstr "Vфnta tills det nuvarande lagret фr fфrdigt och fіrsіk igen." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "%s-fфltet innehхller ett misstag." #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "Fіljande fфlt innehхller misstag: %s." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" -msgstr "" +msgstr "Allt okej!" #: gui/storagewizarddialog.cpp:201 -#, fuzzy msgid "Invalid code" -msgstr "Ogiltig sіkvфg" +msgstr "Ogiltig kod" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"Kunde inte іppna adressen!\n" +"Var god navigera till sidan manuellt." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -1573,19 +1575,23 @@ msgid "" "\n" "Would you like to enable this feature?" msgstr "" +"ScummVM stіder nu automatisk uppdateringskontroll,\n" +"vilket krфver en internetanslutning.\n" +"\n" +"Vill du aktivera den hфr funktionen?" #: gui/updates-dialog.cpp:55 msgid "(You can always enable it in the options dialog on the Misc tab)" msgstr "" +"(Du kan alltid aktivera den under \"Diverse\"-fliken i instфllningarna)" #: gui/updates-dialog.cpp:92 -#, fuzzy msgid "Check for updates automatically" -msgstr "Sіk efter uppdateringar..." +msgstr "Kolla efter uppdateringar automatiskt" #: gui/updates-dialog.cpp:111 msgid "Proceed" -msgstr "" +msgstr "Fortsфtt" #: gui/widget.cpp:366 gui/widget.cpp:368 gui/widget.cpp:374 gui/widget.cpp:376 msgid "Clear value" @@ -1716,20 +1722,19 @@ msgstr "Herkules bфrnsten" #: common/updates.cpp:58 msgid "Daily" -msgstr "" +msgstr "Dagligen" #: common/updates.cpp:60 msgid "Weekly" -msgstr "" +msgstr "Varje vecka" #: common/updates.cpp:62 msgid "Monthly" -msgstr "" +msgstr "Varje mхnad" #: common/updates.cpp:64 -#, fuzzy msgid "<Bad value>" -msgstr "Tіm sіkfфltet" +msgstr "<Dхligt vфrde>" #: engines/advancedDetector.cpp:334 #, c-format @@ -1784,7 +1789,8 @@ msgstr "Хte~r~vфnd till launcher" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1801,8 +1807,8 @@ msgstr "Spara spelet:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2010,36 +2016,35 @@ msgid "C64 Audio Emulator" msgstr "C64 ljudemulator" #: backends/cloud/storage.cpp:210 -#, fuzzy msgid "Saved games sync complete." -msgstr "Scanning fфrdig!" +msgstr "Synkningen av sparade speldata фr fфrdig." #: backends/cloud/storage.cpp:221 msgid "Saved games sync was cancelled." -msgstr "" +msgstr "Synkningen av sparade speldata avbrіts." #: backends/cloud/storage.cpp:223 msgid "" "Saved games sync failed.\n" "Check your Internet connection." msgstr "" +"Synkningen av sparade speldata misslyckades. Kontrollera din " +"internetanslutning." #: backends/cloud/storage.cpp:327 #, c-format msgid "" "Download complete.\n" "Failed to download %u files." -msgstr "" +msgstr "Nedladdningen фr fфrdig. Kunde inte ladda ner %u filer." #: backends/cloud/storage.cpp:329 -#, fuzzy msgid "Download complete." -msgstr "Scanning fфrdig!" +msgstr "Nedladdning fфrdig!" #: backends/cloud/storage.cpp:339 -#, fuzzy msgid "Download failed." -msgstr "Ladda spel:" +msgstr "Nedladdningen misslyckades." #: backends/events/default/default-events.cpp:196 msgid "Do you really want to return to the Launcher?" @@ -2142,11 +2147,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (ingen filtrering)" @@ -2161,19 +2166,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normalt (ingen skalning)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Korrektion av bildfіrhхllande pх" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Korrektion av bildfіrhхllande av" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Aktivt grafikfilter:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Fіnsterlфge" @@ -2700,22 +2705,20 @@ msgid "Check for Updates..." msgstr "Sіk efter uppdateringar..." #: engines/adl/detection.cpp:45 engines/adl/detection.cpp:55 -#, fuzzy msgid "Color mode" -msgstr "Fфrgblint lфge" +msgstr "Fфrglфge" #: engines/adl/detection.cpp:46 engines/adl/detection.cpp:56 msgid "Use color graphics" -msgstr "" +msgstr "Anvфnd fфrggrafik" #: engines/adl/detection.cpp:65 msgid "Scanlines" -msgstr "" +msgstr "Avsіkningslinjer" #: engines/adl/detection.cpp:66 -#, fuzzy msgid "Show scanlines" -msgstr "Visa etiketter" +msgstr "Visa avsіkningslinjer" #: engines/agi/detection.cpp:147 engines/cine/detection.cpp:70 #: engines/drascula/detection.cpp:302 engines/dreamweb/detection.cpp:48 @@ -2755,29 +2758,32 @@ msgstr "" "spelmenyer." #: engines/agi/detection.cpp:177 -#, fuzzy msgid "Use Hercules hires font" -msgstr "Herkules grіn" +msgstr "Anvфnd hіgupplіst typsnitt fіr Hercules" #: engines/agi/detection.cpp:178 msgid "Uses Hercules hires font, when font file is available." msgstr "" +"Anvфnd hіgupplіst typsnitt fіr Herkules nфr typsnittsfilen фr tillgфnglig." #: engines/agi/detection.cpp:187 msgid "Pause when entering commands" -msgstr "" +msgstr "Pausa nфr kommandon anges" #: engines/agi/detection.cpp:188 msgid "" "Shows a command prompt window and pauses the game (like in SCI) instead of a " "real-time prompt." msgstr "" +"Visar ett fіnster med en textruta och pausar spelet (som i SCI-spel) " +"istфllet fіr inmatning i realtid." #: engines/agi/saveload.cpp:774 engines/avalanche/parser.cpp:1888 #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2787,7 +2793,8 @@ msgstr "Хterstфll spel:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3064,11 +3071,11 @@ msgstr "" #: engines/mohawk/detection.cpp:169 msgid "Play the Myst fly by movie" -msgstr "" +msgstr "Spela flygvideon i Myst" #: engines/mohawk/detection.cpp:170 msgid "The Myst fly by movie was not played by the original engine." -msgstr "" +msgstr "Flygvideon i Myst visades inte i originalspelet." #. I18N: Option for fast scene switching #: engines/mohawk/dialogs.cpp:181 engines/mohawk/dialogs.cpp:267 @@ -3085,12 +3092,10 @@ msgid "~D~rop Page" msgstr "Slфpp si~d~a" #: engines/mohawk/dialogs.cpp:188 -#, fuzzy msgid "Show ~M~ap" msgstr "~V~isa karta" #: engines/mohawk/dialogs.cpp:194 -#, fuzzy msgid "Main Men~u~" msgstr "Huvud~m~eny" @@ -3098,6 +3103,10 @@ msgstr "Huvud~m~eny" msgid "~W~ater Effect Enabled" msgstr "~V~atteneffekt aktiverad" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Spelet pausat. Tryck pх valfri tangent fіr att fortsфtta." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Skippa Hall of Records storyboard-scenerna" @@ -3124,18 +3133,16 @@ msgstr "" "\n" #: engines/parallaction/saveload.cpp:194 -#, fuzzy msgid "Load file" -msgstr "Ladda spel:" +msgstr "Ladda fil" #: engines/parallaction/saveload.cpp:201 msgid "Loading game..." msgstr "Laddar speldata..." #: engines/parallaction/saveload.cpp:209 -#, fuzzy msgid "Save file" -msgstr "Spara spelet:" +msgstr "Spara fil" #: engines/parallaction/saveload.cpp:216 msgid "Saving game..." @@ -3235,13 +3242,12 @@ msgid "Enable high resolution graphics/content" msgstr "Aktivera hіgupplіst grafik/innehхll" #: engines/sci/detection.cpp:410 -#, fuzzy msgid "Enable black-lined video" -msgstr "Aktivera Roland GS-lфge" +msgstr "Aktivera videorфnder" #: engines/sci/detection.cpp:411 msgid "Draw black lines over videos to increase their apparent sharpness" -msgstr "" +msgstr "Rita svarta linjer іver videor fіr att fх dem att se skarpare ut" #: engines/sci/detection.cpp:420 msgid "Prefer digital sound effects" @@ -3292,13 +3298,12 @@ msgstr "" "Anvфnd de alternativa silverpekarna istфllet fіr de normala guldpekarna" #: engines/scumm/detection.cpp:1341 -#, fuzzy msgid "Show Object Line" -msgstr "Visa etiketter" +msgstr "Visa objektrad" #: engines/scumm/detection.cpp:1342 msgid "Show the names of objects at the bottom of the screen" -msgstr "" +msgstr "Visa namnen pх objekt pх botten av skфrmen" #: engines/scumm/dialogs.cpp:172 #, c-format @@ -4155,12 +4160,12 @@ msgstr "Visar etiketter fіr objekten som musen pekar pх" #: engines/sword25/detection.cpp:46 msgid "Use English speech" -msgstr "" +msgstr "Anvфnd engelskt tal" #: engines/sword25/detection.cpp:47 msgid "" "Use English speech instead of German for every language other than German" -msgstr "" +msgstr "Anvфnd engelskt tal istфllet fіr tyska fіr alla sprхk utom tyska" #: engines/teenagent/resources.cpp:96 msgid "" diff --git a/po/uk_UA.po b/po/uk_UA.po index f437aa53b2..33748a3ca9 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.9.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" "PO-Revision-Date: 2016-09-17 22:36+0200\n" "Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n" "Language-Team: Ukrainian\n" @@ -203,8 +203,8 @@ msgid "" "Short game identifier used for referring to saved games and running the game " "from the command line" msgstr "" -"Короткий ідентифікатор, який використовується для назв збережений станів ігор і для " -"запуску з командної стрічки" +"Короткий ідентифікатор, який використовується для назв збережений станів " +"ігор і для запуску з командної стрічки" #: gui/editgamedialog.cpp:138 msgctxt "lowres" @@ -416,6 +416,8 @@ msgid "" "Saved games sync feature doesn't work with non-default directories. If you " "want your saved games to sync, use default directory." msgstr "" +"Запис станів ігор працює тільки з папкою за замовченням. Якщо ви хочете, щоб " +"ваші стани ігр синхронізувалися, використовуйте папку за замовченням." #: gui/editgamedialog.cpp:536 msgid "This game ID is already taken. Please choose another one." @@ -702,7 +704,7 @@ msgstr "" #: gui/launcher.cpp:344 msgid "This directory cannot be used yet, it is being downloaded into!" -msgstr "" +msgstr "Цю папку ще не можна використовувати, в неї іде завантаження!" #: gui/launcher.cpp:394 msgid "Do you really want to remove this game configuration?" @@ -714,7 +716,8 @@ msgstr "Ви хочете завантажити збережений стан гри?" #: gui/launcher.cpp:501 msgid "This game does not support loading games from the launcher." -msgstr "Ця гра не підтримує завантаження збережених станів ігор через головне меню." +msgstr "" +"Ця гра не підтримує завантаження збережених станів ігор через головне меню." #: gui/launcher.cpp:505 msgid "ScummVM could not find any engine capable of running the selected game!" @@ -850,7 +853,7 @@ msgid "Special dithering modes supported by some games" msgstr "Спеціальні режими растрування, які підтримують деякі ігри" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Повноекранний режим" @@ -1184,7 +1187,8 @@ msgstr "Використаний об'єм" #: gui/options.cpp:1311 msgid "Space used by ScummVM's saved games on this storage" -msgstr "Об'єм, використаний для збережених станів ігор ScummVM на цьому середовищі" +msgstr "" +"Об'єм, використаний для збережених станів ігор ScummVM на цьому середовищі" #: gui/options.cpp:1314 msgid "Last sync time:" @@ -1200,7 +1204,9 @@ msgstr "Залучитись" #: gui/options.cpp:1317 msgid "Open wizard dialog to connect your cloud storage account" -msgstr "Розпочати кроки для залучення до вашого облікового засобу на хмарному середовищі" +msgstr "" +"Розпочати кроки для залучення до вашого облікового засобу на хмарному " +"середовищі" #: gui/options.cpp:1318 msgid "Refresh" @@ -1239,21 +1245,21 @@ msgid "Specifies which directory the Files Manager can access" msgstr "Вказує шлях до якого можна мати доступ через Керування файлами" #: gui/options.cpp:1328 -#, fuzzy msgctxt "lowres" msgid "/root/ Path:" -msgstr "Додатк. шлях:" +msgstr "Корінний шлях:" #: gui/options.cpp:1338 -#, fuzzy msgid "Server's port:" -msgstr "Сервер:" +msgstr "Порт сервера:" #: gui/options.cpp:1338 msgid "" "Which port is used by the server\n" "Auth with server is not available with non-default port" msgstr "" +"Порт, который будет использован сервером\n" +"Аутентификация с сервером доступна только для порта по умолчанию" #: gui/options.cpp:1498 msgid "You have to restart ScummVM before your changes will take effect." @@ -1265,7 +1271,7 @@ msgstr "Не вдалося змінити змарне середовище!" #: gui/options.cpp:1524 msgid "Another cloud storage is already active." -msgstr "" +msgstr "Другое облако уже активно." #: gui/options.cpp:1562 msgid "The chosen directory cannot be written to. Please select another one." @@ -1467,19 +1473,19 @@ msgstr "Введіть опис для слоту %d:" #: gui/storagewizarddialog.cpp:55 #, c-format msgid "%s Storage Connection Wizard" -msgstr "" +msgstr "Діалог підключення до хмари %s" #: gui/storagewizarddialog.cpp:58 msgid "Navigate to the following URL:" -msgstr "" +msgstr "Перейдіть за наступним URL:" #: gui/storagewizarddialog.cpp:61 msgid "Obtain the code from the storage, enter it" -msgstr "" +msgstr "Після отримання коду від хмарного середовища, введіть" #: gui/storagewizarddialog.cpp:62 msgid "in the following field and press 'Connect':" -msgstr "" +msgstr "його до комірок нижче і натисніть 'Під'єднатись'" #: gui/storagewizarddialog.cpp:69 msgid "Open URL" @@ -1491,47 +1497,49 @@ msgstr "Вставити" #: gui/storagewizarddialog.cpp:70 msgid "Pastes clipboard contents into fields" -msgstr "" +msgstr "Вставляє вміст буфера обміну до комірки" #: gui/storagewizarddialog.cpp:78 msgid "You will be directed to ScummVM's page where" -msgstr "" +msgstr "Вас буде перенаправлено до сторінки ScummVM, де" #: gui/storagewizarddialog.cpp:79 msgid "you should allow it to access your storage." -msgstr "" +msgstr "вам буде потрібно дозволити доступ до вашої хмари." #: gui/storagewizarddialog.cpp:112 msgid "Another Storage is active. Do you want to interrupt it?" -msgstr "" +msgstr "Активна інше хмарне середовище. Чи ви хочете припинити процес?" #: gui/storagewizarddialog.cpp:121 msgid "Wait until current Storage finishes up and try again." -msgstr "" +msgstr "Заждіть, поки поточне середовище закінчить роботу, і спробуйте знов." #: gui/storagewizarddialog.cpp:182 #, c-format msgid "Field %s has a mistake in it." -msgstr "" +msgstr "Комірка %s має похибку." #: gui/storagewizarddialog.cpp:184 #, c-format msgid "Fields %s have mistakes in them." -msgstr "" +msgstr "Комірки %s мають похибки." #: gui/storagewizarddialog.cpp:199 msgid "All OK!" -msgstr "" +msgstr "Все добре!" #: gui/storagewizarddialog.cpp:201 msgid "Invalid code" -msgstr "" +msgstr "Невірний код" #: gui/storagewizarddialog.cpp:209 msgid "" "Failed to open URL!\n" "Please navigate to this page manually." msgstr "" +"Не вдалося відкрити URL!\n" +"Будь-ласка, перейдіть вручну на вказану сторінку." #: gui/themebrowser.cpp:45 msgid "Select a Theme" @@ -1781,7 +1789,8 @@ msgstr "~П~овер.в головне меню" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1798,8 +1807,8 @@ msgstr "Зберегти гру: " #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -1898,8 +1907,8 @@ msgid "" "might not work in future versions of ScummVM." msgstr "" "ПОПЕРЕДЖЕННЯ: Гра, яку ви хочете запустити, ще не підтримується повністю " -"ScummVM. Скорше за все вона не буде працювати стабільно, і збережені стани ігор, " -"які ви зробите, можуть не працювати у подальших версіях ScummVM." +"ScummVM. Скорше за все вона не буде працювати стабільно, і збережені стани " +"ігор, які ви зробите, можуть не працювати у подальших версіях ScummVM." #: engines/engine.cpp:549 msgid "Start anyway" @@ -2140,11 +2149,11 @@ msgstr "Режим самотягнення включено" msgid "Swipe three fingers to the right to toggle." msgstr "Проведіть трьома пальцямі направо для переключення." -#: backends/graphics/opengl/opengl-graphics.cpp:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL (без фільтрів)" @@ -2159,19 +2168,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Без збільшення" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Корекцію співвідношення сторін увімкнено" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Корекцію співвідношення сторін вимкнено" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Поточний графічний фільтр:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Віконний режим" @@ -2776,7 +2785,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2786,7 +2796,8 @@ msgstr "Відновити гру:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3027,7 +3038,8 @@ msgid "" "Do you wish to use this saved game file with ScummVM?\n" "\n" msgstr "" -"Наступний оригінальний файл збереженого стану гри було знайдено у вашій папці з грою:\n" +"Наступний оригінальний файл збереженого стану гри було знайдено у вашій " +"папці з грою:\n" "\n" "%s %s\n" "\n" @@ -3053,7 +3065,8 @@ msgid "" "'import_savefile'.\n" "\n" msgstr "" -"%d оригінальних файлів зі збереженеми станами гри було успішно імпортовано у\n" +"%d оригінальних файлів зі збереженеми станами гри було успішно імпортовано " +"у\n" "ScummVM. Якщо ви захочете пізніше імпортувати оригінальні файли зі станом " "гри, вам потрібно\n" "відкрити консоль відладчика і ввести команду 'import_savefile'.\n" @@ -3093,6 +3106,10 @@ msgstr "Головне меню" msgid "~W~ater Effect Enabled" msgstr "Ефекти води увімкнено" +#: engines/mohawk/mohawk.cpp:61 +msgid "The game is paused. Press any key to continue." +msgstr "Ігру призупинено. Натисніть будь-яку клавішу для продовження." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Перескакувати Залу Рекордів" diff --git a/po/zh-Latn_CN.po b/po/zh-Latn_CN.po index 6edb532dc3..df30e72539 100644 --- a/po/zh-Latn_CN.po +++ b/po/zh-Latn_CN.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.9.0git\n" -"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-09-18 15:13+0100\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.scummvm.org\n" +"POT-Creation-Date: 2016-10-04 13:52+0200\n" "PO-Revision-Date: 2016-03-15 04:09-0700\n" "Last-Translator: Chenbo Li <lichenbo1949@gmail.com>\n" "Language-Team: Chenbo Li <lichenbo1949@gmail.com>\n" @@ -840,7 +840,7 @@ msgid "Special dithering modes supported by some games" msgstr "Youxi Zhichi Teshu de Doudong Moshi" #: gui/options.cpp:789 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2388 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2389 msgid "Fullscreen mode" msgstr "Quanping Moshi" @@ -1774,7 +1774,8 @@ msgstr "~R~Fanhui Qidongqi" #: engines/drascula/saveload.cpp:364 engines/dreamweb/saveload.cpp:262 #: engines/hugo/file.cpp:298 engines/mohawk/dialogs.cpp:104 #: engines/neverhood/menumodule.cpp:880 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save game:" @@ -1791,8 +1792,8 @@ msgstr "Baocun Youxi:" #: engines/dreamweb/saveload.cpp:262 engines/hugo/file.cpp:298 #: engines/mohawk/dialogs.cpp:104 engines/neverhood/menumodule.cpp:880 #: engines/parallaction/saveload.cpp:209 engines/pegasus/pegasus.cpp:377 -#: engines/sci/engine/kfile.cpp:753 engines/scumm/dialogs.cpp:184 -#: engines/sherlock/scalpel/scalpel.cpp:1250 +#: engines/sci/engine/kfile.cpp:887 engines/sci/engine/kfile.cpp:1163 +#: engines/scumm/dialogs.cpp:184 engines/sherlock/scalpel/scalpel.cpp:1250 #: engines/sherlock/tattoo/widget_files.cpp:75 engines/toltecs/menu.cpp:291 #: engines/toon/toon.cpp:3340 engines/tsage/scenes.cpp:599 msgid "Save" @@ -2131,11 +2132,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:129 +#: backends/graphics/opengl/opengl-graphics.cpp:128 msgid "OpenGL" msgstr "OpenGL" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:129 msgid "OpenGL (No filtering)" msgstr "OpenGL" @@ -2150,19 +2151,19 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Putong" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2289 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2290 msgid "Enabled aspect ratio correction" msgstr "Qiyong Bili Jiaozheng" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2295 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2296 msgid "Disabled aspect ratio correction" msgstr "Jinyong Bili Jiaozheng" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2349 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2350 msgid "Active graphics filter:" msgstr "Huodong de Tuxing Guolvqi:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2390 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2391 msgid "Windowed mode" msgstr "Chuangkou Moshi" @@ -2761,7 +2762,8 @@ msgstr "" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore game:" @@ -2771,7 +2773,8 @@ msgstr "Huifu Youxi:" #: engines/cge/events.cpp:83 engines/cge2/events.cpp:76 #: engines/drascula/saveload.cpp:377 engines/dreamweb/saveload.cpp:170 #: engines/hugo/file.cpp:400 engines/neverhood/menumodule.cpp:893 -#: engines/sci/engine/kfile.cpp:888 engines/sherlock/scalpel/scalpel.cpp:1263 +#: engines/sci/engine/kfile.cpp:1006 engines/sci/engine/kfile.cpp:1235 +#: engines/sherlock/scalpel/scalpel.cpp:1263 #: engines/sherlock/tattoo/widget_files.cpp:94 engines/toltecs/menu.cpp:266 #: engines/toon/toon.cpp:3432 msgid "Restore" @@ -3081,6 +3084,11 @@ msgstr "~M~Zhucaidan" msgid "~W~ater Effect Enabled" msgstr "~W~Qiyong Shuimian Xiaoguo" +#: engines/mohawk/mohawk.cpp:61 +#, fuzzy +msgid "The game is paused. Press any key to continue." +msgstr "Youxi Zanting. An Kongge Yi jixu." + #: engines/neverhood/detection.cpp:184 msgid "Skip the Hall of Records storyboard scenes" msgstr "Tiaoguo Hall of Records Jishiban Changjing" diff --git a/test/common/algorithm.h b/test/common/algorithm.h index eeed59d821..13c0a15b3f 100644 --- a/test/common/algorithm.h +++ b/test/common/algorithm.h @@ -28,8 +28,8 @@ class AlgorithmTestSuite : public CxxTest::TestSuite { /** * Auxiliary function to check the equality of two generic collections (A and B), from one_first to one_last. * - * @note: It assumes that other has at least (one_last - one-first) lenght, starting from other_first. - * + * @note: It assumes that other has at least (one_last - one-first) lenght, starting from other_first. + * * @param one_first: The first element of the first collection to be compared. * @param one_last: The last element of the first collection to be compared. * @param other_first: The first element of the collection to be compared. @@ -37,19 +37,19 @@ class AlgorithmTestSuite : public CxxTest::TestSuite { */ template<typename It> bool checkEqual(It one_first, It one_last, It other_first) { - if (one_first == one_last) + if (one_first == one_last) return true; // Check whether two containers have the same items in the same order, // starting from some iterators one_first and other_first - // + // // It iterates through the containers, comparing the elements one by one. // If it finds a discrepancy, it returns false. Otherwise, it returns true. - for (; one_first != one_last; ++one_first, ++other_first) - if (*one_first != *other_first) + for (; one_first != one_last; ++one_first, ++other_first) + if (*one_first != *other_first) return false; - + return true; } @@ -125,19 +125,19 @@ public: Common::sort(list.begin(), list.end()); TS_ASSERT_EQUALS(checkSort(list.begin(), list.end(), Common::Less<Item>()), true); } - + void test_string_replace() { Common::String original = "Hello World"; Common::String expected = "Hells Wsrld"; Common::replace(original.begin(), original.end(), 'o', 's'); - - TS_ASSERT_EQUALS(original, expected); + + TS_ASSERT_EQUALS(original, expected); } void test_container_replace() { - + Common::List<int> original; Common::List<int> expected; for (int i = 0; i < 6; ++i) { @@ -150,7 +150,7 @@ public: } Common::replace(original.begin(), original.end(), 3, 5); - + TS_ASSERT_EQUALS(checkEqual(original.begin(), original.end(), expected.begin()), true); } }; diff --git a/test/common/str.h b/test/common/str.h index 461b26088a..c59c5a5efd 100644 --- a/test/common/str.h +++ b/test/common/str.h @@ -438,16 +438,16 @@ class StringTestSuite : public CxxTest::TestSuite // Using iterators (also a terribly useless program as a test). testString.replace(testString.begin(), testString.end(), "That is the supernew string."); - TS_ASSERT_EQUALS(testString, Common::String("That is the supernew string.")); - + TS_ASSERT_EQUALS(testString, Common::String("That is the supernew string.")); + // With sub strings of character arrays. testString.replace(21, 6, "That phrase is new.", 5, 6); TS_ASSERT_EQUALS(testString, Common::String("That is the supernew phrase.")); - // Now with substrings. + // Now with substrings. testString.replace(12, 2, Common::String("That hy is new."), 5, 2); TS_ASSERT_EQUALS(testString, Common::String("That is the hypernew phrase.")); - + // -------------------------- // Tests with displacement // -------------------------- @@ -463,20 +463,20 @@ class StringTestSuite : public CxxTest::TestSuite // Using iterators (also a terribly useless program as a test) testString.replace(testString.begin() + 4, testString.begin() + 5, " coffee "); - TS_ASSERT_EQUALS(testString, Common::String("Good coffee friends")); + TS_ASSERT_EQUALS(testString, Common::String("Good coffee friends")); // With sub strings of character arrays testString.replace(4, 0, "Lorem ipsum expresso dolor sit amet", 11, 9); TS_ASSERT_EQUALS(testString, Common::String("Good expresso coffee friends")); - - // Now with substrings + + // Now with substrings testString.replace(5, 9, Common::String("Displaced ristretto string"), 10, 10); TS_ASSERT_EQUALS(testString, Common::String("Good ristretto coffee friends")); - + // ----------------------- // Deep copy compliance // ----------------------- - + // Makes a deep copy without changing the length of the original Common::String s1 = "TestTestTestTestTestTestTestTestTestTestTest"; Common::String s2(s1); diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 980ce3a3ea..7041f428ab 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -76,13 +76,13 @@ enum { }; -AVIDecoder::AVIDecoder(Audio::Mixer::SoundType soundType, SelectTrackFn trackFn) : - _frameRateOverride(0), _soundType(soundType), _selectTrackFn(trackFn) { +AVIDecoder::AVIDecoder(Audio::Mixer::SoundType soundType) : + _frameRateOverride(0), _soundType(soundType) { initCommon(); } -AVIDecoder::AVIDecoder(const Common::Rational &frameRateOverride, Audio::Mixer::SoundType soundType, - SelectTrackFn trackFn) : _frameRateOverride(frameRateOverride), _soundType(soundType), _selectTrackFn(trackFn) { +AVIDecoder::AVIDecoder(const Common::Rational &frameRateOverride, Audio::Mixer::SoundType soundType) : + _frameRateOverride(frameRateOverride), _soundType(soundType) { initCommon(); } @@ -94,6 +94,23 @@ AVIDecoder::AVIAudioTrack *AVIDecoder::createAudioTrack(AVIStreamHeader sHeader, return new AVIAudioTrack(sHeader, wvInfo, _soundType); } +bool AVIDecoder::seekToFrame(uint frame) { + if (!isSeekable()) + return false; + + // If we didn't find a video track, we can't seek by frame (of course) + if (_videoTracks.empty()) + return false; + + AVIVideoTrack *track = static_cast<AVIVideoTrack *>(_videoTracks.front().track); + Audio::Timestamp time = track->getFrameTime(frame); + + if (time < 0) + return false; + + return seek(time); +} + void AVIDecoder::initCommon() { _decodedHeader = false; _foundMovieList = false; @@ -111,6 +128,14 @@ bool AVIDecoder::isSeekable() const { return isVideoLoaded() && !_indexEntries.empty(); } +const Graphics::Surface *AVIDecoder::decodeNextTransparency() { + if (_videoTracks.size() != 2) + return nullptr; + + AVIVideoTrack *track = static_cast<AVIVideoTrack *>(_videoTracks[1].track); + return track->decodeNextFrame(); +} + bool AVIDecoder::parseNextChunk() { uint32 tag = _fileStream->readUint32BE(); uint32 size = _fileStream->readUint32LE(); @@ -293,14 +318,8 @@ void AVIDecoder::handleStreamHeader(uint32 size) { } void AVIDecoder::addTrack(Track *track, bool isExternal) { - if (!_selectTrackFn || - (dynamic_cast<AVIVideoTrack *>(track) && _selectTrackFn(true, _videoTrackCounter++)) || - (dynamic_cast<AVIAudioTrack *>(track) && _selectTrackFn(false, _audioTrackCounter++))) { - VideoDecoder::addTrack(track, isExternal); - _lastAddedTrack = track; - } else { - _lastAddedTrack = nullptr; - } + VideoDecoder::addTrack(track, isExternal); + _lastAddedTrack = track; } void AVIDecoder::readStreamName(uint32 size) { @@ -368,15 +387,19 @@ bool AVIDecoder::loadStream(Common::SeekableReadStream *stream) { status.index = index; status.chunkSearchOffset = _movieListStart; - if ((*it)->getTrackType() == Track::kTrackTypeVideo) - _videoTracks.push_back(status); - else + if ((*it)->getTrackType() == Track::kTrackTypeAudio) { _audioTracks.push_back(status); - } + } else if (_videoTracks.empty()) { + _videoTracks.push_back(status); + } else { + // Secondary video track + assert(_videoTracks.size() == 1); + status.chunkSearchOffset = getVideoTrackOffset(index); + assert(status.chunkSearchOffset != 0); - if (_videoTracks.size() != 1) { - close(); - return false; + // Add the video track to the list + _videoTracks.push_back(status); + } } // Check if this is a special Duck Truemotion video @@ -407,12 +430,13 @@ void AVIDecoder::readNextPacket() { if (_videoTracks.empty()) return; - // Get the video frame first - handleNextPacket(_videoTracks[0]); + // Handle the video first + for (uint idx = 0; idx < _videoTracks.size(); ++idx) + handleNextPacket(_videoTracks[idx]); // Handle audio tracks next - for (uint32 i = 0; i < _audioTracks.size(); i++) - handleNextPacket(_audioTracks[i]); + for (uint idx = 0; idx < _audioTracks.size(); ++idx) + handleNextPacket(_audioTracks[idx]); } void AVIDecoder::handleNextPacket(TrackStatus &status) { @@ -524,7 +548,7 @@ bool AVIDecoder::rewind() { return false; for (uint32 i = 0; i < _videoTracks.size(); i++) - _videoTracks[i].chunkSearchOffset = _movieListStart; + _videoTracks[i].chunkSearchOffset = getVideoTrackOffset(_videoTracks[i].index); for (uint32 i = 0; i < _audioTracks.size(); i++) _audioTracks[i].chunkSearchOffset = _movieListStart; @@ -532,6 +556,15 @@ bool AVIDecoder::rewind() { return true; } +uint AVIDecoder::getVideoTrackOffset(uint trackIndex, uint frameNumber) { + if (trackIndex == _videoTracks.front().index && frameNumber == 0) + return _movieListStart; + + OldIndex *entry = _indexEntries.find(trackIndex, frameNumber); + assert(entry); + return entry->offset; +} + bool AVIDecoder::seekIntern(const Audio::Timestamp &time) { // Can't seek beyond the end if (time > getDuration()) @@ -666,6 +699,26 @@ bool AVIDecoder::seekIntern(const Audio::Timestamp &time) { videoTrack->decodeFrame(chunk); } + // Update any secondary video track for transparencies + if (_videoTracks.size() == 2) { + // Set it's frame number + AVIVideoTrack *videoTrack2 = static_cast<AVIVideoTrack *>(_videoTracks.back().track); + videoTrack2->setCurFrame((int)frame - 1); + + // Find the index entry for the frame and read it in + OldIndex *entry = _indexEntries.find(_videoTracks.back().index, frame); + assert(entry); + + Common::SeekableReadStream *chunk = nullptr; + _fileStream->seek(entry->offset + 8); + _videoTracks.back().chunkSearchOffset = entry->offset; + + if (entry->size != 0) + chunk = _fileStream->readStream(entry->size); + + videoTrack2->decodeFrame(chunk); + } + // Set the video track's frame videoTrack->setCurFrame((int)frame - 1); @@ -674,7 +727,7 @@ bool AVIDecoder::seekIntern(const Audio::Timestamp &time) { return true; } -byte AVIDecoder::getStreamIndex(uint32 tag) const { +byte AVIDecoder::getStreamIndex(uint32 tag) { char string[3]; WRITE_BE_UINT16(string, tag >> 16); string[2] = 0; @@ -975,4 +1028,16 @@ void AVIDecoder::AVIAudioTrack::createAudioStream() { AVIDecoder::TrackStatus::TrackStatus() : track(0), chunkSearchOffset(0) { } +AVIDecoder::OldIndex *AVIDecoder::IndexEntries::find(uint index, uint frameNumber) { + for (uint idx = 0, frameCtr = 0; idx < size(); ++idx) { + if ((*this)[idx].id != ID_REC && + AVIDecoder::getStreamIndex((*this)[idx].id) == index) { + if (frameCtr++ == frameNumber) + return &(*this)[idx]; + } + } + + return nullptr; +} + } // End of namespace Video diff --git a/video/avi_decoder.h b/video/avi_decoder.h index a3733b579c..4bba07e98f 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -62,10 +62,8 @@ namespace Video { */ class AVIDecoder : public VideoDecoder { public: - typedef bool(*SelectTrackFn)(bool isVideo, int trackNumber); - AVIDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType, SelectTrackFn trackFn = nullptr); - AVIDecoder(const Common::Rational &frameRateOverride, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType, - SelectTrackFn trackFn = nullptr); + AVIDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); + AVIDecoder(const Common::Rational &frameRateOverride, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); virtual ~AVIDecoder(); bool loadStream(Common::SeekableReadStream *stream); @@ -77,6 +75,7 @@ public: bool isRewindable() const { return true; } bool isSeekable() const; + const Graphics::Surface *decodeNextTransparency(); protected: // VideoDecoder API void readNextPacket(); @@ -190,6 +189,7 @@ protected: uint16 getWidth() const { return _bmInfo.width; } uint16 getHeight() const { return _bmInfo.height; } + uint16 getBitCount() const { return _bmInfo.bitCount; } Graphics::PixelFormat getPixelFormat() const; int getCurFrame() const { return _curFrame; } int getFrameCount() const { return _frameCount; } @@ -272,10 +272,15 @@ protected: uint32 chunkSearchOffset; }; + class IndexEntries : public Common::Array<OldIndex> { + public: + OldIndex *find(uint index, uint frameNumber); + }; + AVIHeader _header; void readOldIndex(uint32 size); - Common::Array<OldIndex> _indexEntries; + IndexEntries _indexEntries; Common::SeekableReadStream *_fileStream; bool _decodedHeader; @@ -287,7 +292,6 @@ protected: int _videoTrackCounter, _audioTrackCounter; Track *_lastAddedTrack; - SelectTrackFn _selectTrackFn; void initCommon(); @@ -297,8 +301,9 @@ protected: void handleStreamHeader(uint32 size); void readStreamName(uint32 size); uint16 getStreamType(uint32 tag) const { return tag & 0xFFFF; } - byte getStreamIndex(uint32 tag) const; + static byte getStreamIndex(uint32 tag); void checkTruemotion1(); + uint getVideoTrackOffset(uint trackIndex, uint frameNumber = 0); void handleNextPacket(TrackStatus& status); bool shouldQueueAudio(TrackStatus& status); @@ -306,6 +311,14 @@ protected: public: virtual AVIAudioTrack *createAudioTrack(AVIStreamHeader sHeader, PCMWaveFormat wvInfo); + + /** + * Seek to a given frame. + * + * This only works when the video track(s) supports getFrameTime(). + * This calls seek() internally. + */ + virtual bool seekToFrame(uint frame); }; } // End of namespace Video diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp index 278dc2d1fc..4e05499065 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -2779,6 +2779,7 @@ void VMDDecoder::setAutoStartSound(bool autoStartSound) { AdvancedVMDDecoder::AdvancedVMDDecoder(Audio::Mixer::SoundType soundType) { _decoder = new VMDDecoder(g_system->getMixer(), soundType); _decoder->setAutoStartSound(false); + _useAudioSync = true; } AdvancedVMDDecoder::~AdvancedVMDDecoder() { diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h index 44de1c7d68..726d052e26 100644 --- a/video/coktel_decoder.h +++ b/video/coktel_decoder.h @@ -569,6 +569,11 @@ public: void close(); void setSurfaceMemory(void *mem, uint16 width, uint16 height, uint8 bpp); + void setAudioSync(bool sync) { _useAudioSync = sync; } + +protected: + bool _useAudioSync; + bool useAudioSync() const { return _useAudioSync; } private: class VMDVideoTrack : public FixedRateVideoTrack { diff --git a/video/video_decoder.h b/video/video_decoder.h index eca15e7265..a415a70724 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -184,7 +184,7 @@ public: * This only works when one video track is present, and that track * supports getFrameTime(). This calls seek() internally. */ - bool seekToFrame(uint frame); + virtual bool seekToFrame(uint frame); /** * Pause or resume the video. This should stop/resume any audio playback |