diff options
author | Eugene Sandulenko | 2006-05-17 23:52:45 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-05-17 23:52:45 +0000 |
commit | 14ec3f45fa08a0c0071693f4094fc088eb0062b5 (patch) | |
tree | 87e2af334bd1503eacc55c71cd5ccb94e5eb5751 /engines/sword1 | |
parent | 65091f7370ee118b8f99c6106d8cad1fd0ee719e (diff) | |
download | scummvm-rg350-14ec3f45fa08a0c0071693f4094fc088eb0062b5.tar.gz scummvm-rg350-14ec3f45fa08a0c0071693f4094fc088eb0062b5.tar.bz2 scummvm-rg350-14ec3f45fa08a0c0071693f4094fc088eb0062b5.zip |
- Heavily modified patch #1214784: "Disable overlay scaling"
- Eriktorbjorn's patch from same tracker item for scaling sword1/2 cutscenes
is applied as is. It lacks resolution switch on-the-fly.
- GUI widgets are repositioned on the fly and use most space, even aspect
ratio corrected screen is used without scaling
- Heavy tesing is required, but works for me in all cases except for bug
#1483272: "GUI: SCUMM pause dialog breaks upon scaler switch" which needs more
work.
- I probavly broke some backend or two
svn-id: r22505
Diffstat (limited to 'engines/sword1')
-rw-r--r-- | engines/sword1/animation.cpp | 11 | ||||
-rw-r--r-- | engines/sword1/animation.h | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index ff21d99de4..9d0fbb7788 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -48,6 +48,9 @@ void AnimationState::setPalette(byte *pal) { #endif void AnimationState::drawYUV(int width, int height, byte *const *dat) { + _frameWidth = width; + _frameHeight = height; + #ifdef BACKEND_8BIT _scr->plotYUV(_lut, width, height, dat); #else @@ -57,7 +60,13 @@ void AnimationState::drawYUV(int width, int height, byte *const *dat) { void AnimationState::updateScreen(void) { #ifndef BACKEND_8BIT - _sys->copyRectToOverlay(_overlay, _movieWidth, 0, 40, _movieWidth, _movieHeight); + int width = _movieScale * _frameWidth; + int height = _movieScale * _frameHeight; + int pitch = _movieScale * _movieWidth; + int x = _movieScale * ((_movieWidth - _frameWidth) / 2); + int y = _movieScale * ((_movieHeight - _frameHeight) / 2); + + _sys->copyRectToOverlay(_overlay + y * pitch + x, pitch, x, y + _movieScale * 40, width, height); #endif _sys->updateScreen(); } diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h index 378116fe6a..6e1fa11c3d 100644 --- a/engines/sword1/animation.h +++ b/engines/sword1/animation.h @@ -61,6 +61,9 @@ class AnimationState : public Graphics::BaseAnimationState { private: Screen *_scr; + int _frameWidth; + int _frameHeight; + public: AnimationState(Screen *scr, Audio::Mixer *snd, OSystem *sys); ~AnimationState(); |