aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/gfx.cpp
diff options
context:
space:
mode:
authorMax Horn2006-07-09 11:47:17 +0000
committerMax Horn2006-07-09 11:47:17 +0000
commitbea72e9514a5b3ced091d952762a5fa633e27740 (patch)
treec697df47b449a0952c2bb18f10502cae8ae3d939 /engines/scumm/gfx.cpp
parent51ad5aa7197b3ced348ae37e2bc1586cb25dff3e (diff)
downloadscummvm-rg350-bea72e9514a5b3ced091d952762a5fa633e27740.tar.gz
scummvm-rg350-bea72e9514a5b3ced091d952762a5fa633e27740.tar.bz2
scummvm-rg350-bea72e9514a5b3ced091d952762a5fa633e27740.zip
Patch #1519399: DS Backend
svn-id: r23452
Diffstat (limited to 'engines/scumm/gfx.cpp')
-rw-r--r--engines/scumm/gfx.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 2881558efa..b355b29eed 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -32,6 +32,9 @@
#include "scumm/resource.h"
#include "scumm/usage_bits.h"
#include "scumm/he/wiz_he.h"
+#ifdef __DS__
+#include "blitters.h"
+#endif
namespace Scumm {
@@ -545,6 +548,9 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
// Handle the text mask in older games; newer (V7/V8) games do not use it anymore.
const byte *text = (byte *)_charset->_textSurface.pixels + x + y * _charset->_textSurface.pitch;
+#ifdef __DS__
+ DS::asmDrawStripToScreen(height, width, text, src, dst, vs->pitch, _screenWidth, _charset->_textSurface.pitch);
+#else
// Compose the text over the game graphics
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
@@ -557,6 +563,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
dst += _screenWidth;
text += _charset->_textSurface.pitch;
}
+#endif
} else {
// Just do a simple blit in V7/V8 games.
blit(dst, _screenWidth, src, vs->pitch, width, height);
@@ -974,6 +981,10 @@ static void fill(byte *dst, int dstPitch, byte color, int w, int h) {
}
static void copy8Col(byte *dst, int dstPitch, const byte *src, int height) {
+
+#ifndef __DS__
+
+
do {
#if defined(SCUMM_NEED_ALIGNMENT)
memcpy(dst, src, 8);
@@ -984,6 +995,10 @@ static void copy8Col(byte *dst, int dstPitch, const byte *src, int height) {
dst += dstPitch;
src += dstPitch;
} while (--height);
+#else
+ DS::asmCopy8Col(dst, dstPitch, src, height);
+#endif
+
}
static void clear8Col(byte *dst, int dstPitch, int height) {