aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2/animation.cpp
diff options
context:
space:
mode:
authorFabio Battaglia2009-04-07 19:52:46 +0000
committerFabio Battaglia2009-04-07 19:52:46 +0000
commitdc9c538a62d64b40c3a39a673d2f680fa9422f41 (patch)
treeda10a2ff6b6804e714fb124aac805445fe204058 /engines/sword2/animation.cpp
parentb80abe318d65679d5c0cd8a94a8c106534d240ea (diff)
downloadscummvm-rg350-dc9c538a62d64b40c3a39a673d2f680fa9422f41.tar.gz
scummvm-rg350-dc9c538a62d64b40c3a39a673d2f680fa9422f41.tar.bz2
scummvm-rg350-dc9c538a62d64b40c3a39a673d2f680fa9422f41.zip
Sword2: PSX version support, and GMM loading/saving
svn-id: r39896
Diffstat (limited to 'engines/sword2/animation.cpp')
-rw-r--r--engines/sword2/animation.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index 57b6235b0a..73877326e4 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -35,6 +35,7 @@
#include "sword2/maketext.h"
#include "sword2/resman.h"
#include "sword2/sound.h"
+#include "sword2/screen.h"
#include "sword2/animation.h"
#include "gui/message.h"
@@ -207,6 +208,7 @@ void MoviePlayer::openTextObject(uint32 index) {
text->_textSprite.h = frame.height;
text->_textSprite.type = RDSPR_DISPLAYALIGN | RDSPR_NOCOMPRESSION;
text->_textSprite.data = text->_textMem + FrameHeader::size();
+ text->_textSprite.isText = true;
_vm->_screen->createSurface(&text->_textSprite, &_textSurface);
_textX = 320 - text->_textSprite.w / 2;
@@ -239,6 +241,14 @@ void MoviePlayer::drawTextObject(uint32 index, byte *screen) {
uint16 width = text->_textSprite.w;
uint16 height = text->_textSprite.h;
+ // Resize text sprites for PSX version
+ if (Sword2Engine::isPsx()) {
+ height *= 2;
+ byte *buffer = (byte *)malloc(width * height);
+ Screen::resizePsxSprite(buffer, src, width, height);
+ src = buffer;
+ }
+
byte *dst = screen + _textY * _decoder->getWidth() + _textX;
for (int y = 0; y < height; y++) {